:root {
    --primary:    #D97355;   /* naranja terracota */
    --secondary:  #D9A155;   /* ámbar dorado      */
    --accent:     #D9B59D;   /* melocotón suave   */
    --dark:       #3D1F0F;   /* marrón oscuro     */
    --light-bg:   #FDF6F0;   /* crema cálido      */
    --card-bg:    #ffffff;
    --border:     #E8D5C4;
    --text-muted: #8C6A55;
    --danger:     #dc3545;
    --success:    #198754;
}

/* ---- Layout ---- */
body {
    background: var(--light-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.auth-wrapper {
    width: 100%;
    max-width: 440px;
    padding: 1rem;
}

/* ---- Card ---- */
.auth-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(217, 115, 85, 0.15);
    overflow: hidden;
}

/* ---- Header ---- */
.auth-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}

.auth-logo {
    max-height: 80px;
    max-width: 220px;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

.auth-header h1 {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.3px;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}

/* ---- Body ---- */
.auth-body {
    padding: 2rem;
}

/* ---- Form controls ---- */
.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--dark);
    margin-bottom: 0.35rem;
}

.form-control {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 115, 85, 0.15);
    outline: none;
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.input-group .form-control {
    border-right: none;
}

.input-group .btn-outline-secondary {
    border: 1.5px solid var(--border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    background: #fdf6f0;
    color: var(--text-muted);
    transition: background 0.2s;
}

.input-group .btn-outline-secondary:hover {
    background: var(--accent);
    color: var(--dark);
}

/* ---- Primary button ---- */
.btn-auth {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 1rem;
    width: 100%;
    transition: opacity 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

.btn-auth:hover {
    opacity: 0.92;
    color: #fff;
    transform: translateY(-1px);
}

.btn-auth:active {
    transform: translateY(0);
}

/* ---- Links ---- */
.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* ---- Divider ---- */
.auth-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}

/* ---- Alerts ---- */
.alert-auth {
    border-radius: 8px;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border: none;
}

.alert-auth.alert-danger {
    background: #fff0f0;
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-auth.alert-success {
    background: #f0fff4;
    color: var(--success);
    border-left: 4px solid var(--success);
}

/* ---- Remember me ---- */
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ---- Footer ---- */
.auth-footer {
    text-align: center;
    padding: 1rem 2rem 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .auth-body {
        padding: 1.5rem;
    }

    .auth-header {
        padding: 1.5rem 1.5rem 1.25rem;
    }
}
