* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', 'Inter', sans-serif;
    background: #fff;
    color: #1a1a1a;
}

/* ===== MODAL LOGIN ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-box {
    background: #fff;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-title {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.modal-sub {
    font-size: 13px;
    color: #888;
    margin-bottom: 24px;
}

.modal-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 24px;
}

.modal-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #888;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.modal-tab.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

/* ===== LAYOUT CUENTA ===== */
.account-container {
    display: flex;
    max-width: 1100px;
    margin: 40px auto 80px;
    padding: 0 20px;
    min-height: 70vh;
    gap: 0;
}

.account-sidebar {
    width: 260px;
    flex-shrink: 0;
    padding-right: 40px;
    border-right: 1px solid #eee;
}

.user-brief {
    text-align: center;
    padding: 20px 0 30px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #FFD700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;
}

#user-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.camera-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #1a1a1a;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    border: 2px solid #fff;
    transition: background 0.2s;
}

.camera-icon:hover { background: #333; }

#user-display-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: none;
    background: none;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    color: #444;
    transition: all 0.15s;
    width: 100%;
}

.nav-link:hover { background: #f5f5f5; color: #1a1a1a; }
.nav-link.active { background: #f5f5f5; font-weight: 700; color: #1a1a1a; }
.nav-link i { width: 16px; text-align: center; }

.nav-link.logout {
    color: #e00;
    margin-top: 16px;
}
.nav-link.logout:hover { background: #fff5f5; }

/* ===== CONTENIDO ===== */
.account-content {
    flex: 1;
    padding-left: 60px;
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.25s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.account-content h1 {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.tab-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 24px;
}

/* ===== FORMULARIOS ===== */
.grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 8px;
}

.input-box { display: flex; flex-direction: column; }
.input-box.full { grid-column: span 2; }

.input-box label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 6px;
}

.input-box input,
.input-box select {
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.2s;
    width: 100%;
}

.input-box input:focus,
.input-box select:focus {
    outline: none;
    border-color: #1a1a1a;
}

.input-box input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Ojo contraseña */
.toggle-pass {
    position: absolute;
    right: 12px;
    bottom: 11px;
    cursor: pointer;
    color: #888;
    font-size: 14px;
}
.toggle-pass:hover { color: #1a1a1a; }

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}
.checkbox-label input { width: 15px; height: 15px; accent-color: #1a1a1a; }

/* Mensajes */
.form-error {
    font-size: 13px;
    color: #e00;
    background: #fff5f5;
    border: 1px solid #fcc;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.form-success {
    font-size: 13px;
    color: #2a9d5c;
    background: #f0fff6;
    border: 1px solid #b2f0cc;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 12px;
    display: inline-block;
}

/* Botones */
.btn-primary {
    background: #1a1a1a;
    color: #fff;
    padding: 13px 28px;
    border: none;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}
.btn-primary:hover { background: #333; }
.btn-primary.full { width: 100%; margin-top: 0; }

.btn-danger {
    background: #fff;
    color: #e00;
    padding: 11px 24px;
    border: 1px solid #e00;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}
.btn-danger:hover { background: #e00; color: #fff; }

/* ===== PEDIDOS ===== */
.order-card {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.order-card-info { line-height: 1.8; }
.order-card-id { font-weight: 700; font-size: 15px; }
.order-card-date { color: #888; font-size: 12px; }
.order-card-total { font-weight: 900; font-size: 18px; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}
.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 14px; }

/* ===== PREFERENCIAS ===== */
.pref-group {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.pref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.pref-row:last-child { border-bottom: none; }

.pref-label { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.pref-desc { font-size: 12px; color: #888; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: 0.3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: #1a1a1a; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Zona de peligro */
.danger-zone {
    margin-top: 40px;
    padding: 20px;
    border: 1px solid #fcc;
    border-radius: 6px;
    background: #fff8f8;
}
.danger-zone h3 { font-size: 14px; font-weight: 700; color: #e00; margin-bottom: 6px; }
.danger-zone p { font-size: 13px; color: #888; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .account-container {
        flex-direction: column;
        margin-top: 70px;
    }
    .account-sidebar {
        width: 100%;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
        margin-bottom: 30px;
    }
    .account-nav { flex-direction: row; flex-wrap: wrap; }
    .nav-link { flex: 1; min-width: 120px; font-size: 12px; }
    .account-content { padding-left: 0; }
    .grid-form { grid-template-columns: 1fr; }
    .input-box.full { grid-column: span 1; }
}

/* ===== SOPORTE ===== */
.support-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0 20px;
    max-width: 500px;
}

.support-icon {
    width: 48px;
    height: 48px;
    background: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.support-icon i {
    color: #FFD700;
    font-size: 20px;
}

.support-info h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.support-email {
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 1px;
}

.support-email:hover {
    color: #0047AB;
    border-color: #0047AB;
}

.support-time {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.support-time i {
    color: #888;
}

.support-tips {
    max-width: 500px;
    background: #fff;
    border-left: 3px solid #FFD700;
    padding: 16px 20px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 20px;
}

.support-tips h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.support-tips ul {
    list-style: none;
    padding: 0;
}

.support-tips ul li {
    font-size: 13px;
    color: #555;
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.support-tips ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #1a1a1a;
    font-weight: 700;
}
