* {
    box-sizing: border-box;
}

/* styles/index.css */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding-top: 40px;
    padding-left: 10px;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    touch-action: manipulation;
}

body * {
    user-select: none;
}

input,
textarea,
select {
    user-select: auto !important;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-main {
    max-width: 400px;
    width: 100%;
    height: auto;
}

.form-container {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 95%;
    max-width: 500px;
    box-sizing: border-box;
}

h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.logo-container i {
    display: block;
    margin: 10px 0;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    border-radius: 25px;
    font-size: 16px;
    box-sizing: border-box;
    color: var(--text-color);
    transition: border 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus {
    border-color: #F75934;
    outline: none;
    box-shadow: 0 0 5px rgba(247, 89, 52, 0.3);
}

button {
    width: 100%;
    border-radius: 25px;
    padding: 14px;
    font-size: 16px;
    background: linear-gradient(135deg, #F75934 0%, #FF8E2B 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
    transition: transform 0.2s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(247, 89, 52, 0.4);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    background: linear-gradient(135deg, #F75934 0%, #FF8E2B 100%);
    border-radius: 30px;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(247, 89, 52, 0.2);
}

.spinner-container {
    text-align: center;
    margin-top: 1.5rem;
}

.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border-left-color: #F75934;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.status-message {
    padding: 15px;
    margin-top: 20px;
    border-radius: 10px;
    text-align: left;
    white-space: pre-wrap;
    max-height: 250px;
    overflow-y: auto;
    font-size: 13px;
    font-family: 'Courier New', Courier, monospace;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Success Highlight for Two-Step Flow */
.found-success {
    border: 2px solid #28a745 !important;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.2) !important;
}

.footer {
    width: 100%;
    margin-top: auto;
    padding: 40px 0 20px 0;
    text-align: center;
    color: var(--footer-text);
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 600px) {
    body {
        padding-top: 80px;
    }

    .logo-main {
        max-width: 280px;
    }

    .form-container {
        padding: 1.5rem;
        border-radius: 10px;
    }

    .back-btn {
        font-size: 16px;
        padding: 8px 16px;
    }
}

/* Multi-site Cards Styling */
.sites-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Más espacio entre cards */
    width: 100%;
    margin-top: 25px;
}

.site-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 5px solid #21759b;
    /* WordPress Blue */
}

.site-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #d0d0d0;
}

.site-info {
    text-align: left;
}

.site-name {
    font-weight: 700;
    color: #21759b;
    font-size: 15px;
    margin-bottom: 2px;
}

.site-path {
    font-size: 0.85em;
    color: #666;
}

.mini-recover-btn {
    background: #21759b;
    color: white !important;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(33, 117, 155, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
    width: auto !important;
    /* Sobrescribir el 100% de button general */
    margin-top: 0 !important;
}

.mini-recover-btn:hover {
    background: #1a5c7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 117, 155, 0.3);
}

@media (max-width: 600px) {
    .site-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .mini-recover-btn {
        width: 100% !important;
        justify-content: center;
    }
}

/* Log Console Styling */
.log-console {
    background-color: #1e1e1e;
    color: #00ff00;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    text-align: left;
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #333;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    display: none;
    /* Se muestra solo al iniciar reparación */
}

.log-entry {
    margin-bottom: 4px;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
}

.log-time {
    color: #888;
    margin-right: 8px;
}