/* ── SmartShop Suite: My Account Popup ──────────────────────────────────── */

#sss-account-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 999990;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 64px 16px 0;
    backdrop-filter: blur(2px);
}

#sss-account-popup {
    background: var(--sss-acc-bg, #fff);
    color: var(--sss-acc-text, #333);
    width: 360px;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: sss-slideDown .22s ease;
}
@keyframes sss-slideDown {
    from { opacity:0; transform: translateY(-12px); }
    to   { opacity:1; transform: translateY(0); }
}

#sss-account-close {
    position: absolute;
    top: 10px; right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #aaa;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background .15s, color .15s;
    z-index: 2;
}
#sss-account-close:hover { background: #f0f0f0; color: #333; }

/* ── Tab bar ─────────────────────────────────────────────────────────────── */
.sss-tab-bar {
    display: flex;
    border-bottom: 2px solid #eee;
    background: #fafafa;
    border-radius: 12px 12px 0 0;
}
.sss-tab {
    flex: 1;
    padding: 14px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #888;
    transition: color .15s;
    position: relative;
    font-family: inherit;
}
.sss-tab.active { color: var(--sss-acc-accent, #2c3e50); }
.sss-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 2px;
    background: var(--sss-acc-accent, #2c3e50);
}

/* ── Tab panes ───────────────────────────────────────────────────────────── */
.sss-tab-pane { display: none; padding: 20px 22px; }
.sss-tab-pane.active { display: block; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.sss-form-group { margin-bottom: 14px; }
.sss-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.sss-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sss-form-row .sss-form-group { margin-bottom: 0; }

.sss-input-wrap { position: relative; }
.sss-toggle-pass {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; font-size: 14px; color: #aaa;
}

.sss-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
    color: var(--sss-acc-text, #333);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.sss-input:focus {
    outline: none;
    border-color: var(--sss-acc-accent, #2c3e50);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sss-acc-accent, #2c3e50) 15%, transparent);
}

.sss-form-footer { text-align: right; margin: -6px 0 12px; }
.sss-form-message {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 10px;
    display: none;
}
.sss-form-message.success { background: #d4edda; color: #155724; display: block; }
.sss-form-message.error   { background: #f8d7da; color: #721c24; display: block; }

.sss-auth-switch { font-size: 13px; text-align: center; color: #888; margin-top: 16px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.sss-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 18px;
    border-radius: 7px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; border: none;
    transition: filter .15s, transform .1s;
    font-family: inherit; text-decoration: none;
}
.sss-btn:active { transform: scale(.98); }
.sss-btn-full { width: 100%; }
.sss-btn-primary { background: var(--sss-acc-accent, #2c3e50); color: #fff; }
.sss-btn-primary:hover { filter: brightness(1.1); color: #fff; }
.sss-btn:disabled { opacity: .6; cursor: not-allowed; }

.sss-link { color: var(--sss-acc-accent, #2c3e50); text-decoration: none; font-weight: 600; }
.sss-link:hover { text-decoration: underline; }

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.sss-dash-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.sss-dash-avatar {
    width: 42px; height: 42px;
    background: var(--sss-acc-accent, #2c3e50);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #fff;
}
.sss-dash-avatar svg { width: 24px; height: 24px; }
.sss-dash-user strong { display: block; font-size: 15px; color: var(--sss-acc-text, #333); }
.sss-dash-user span   { font-size: 12px; color: #888; }

.sss-dash-nav { padding: 8px 0 16px; }
.sss-dash-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 22px;
    text-decoration: none;
    color: var(--sss-acc-text, #333);
    font-size: 14px;
    transition: background .12s;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
}
.sss-dash-item:hover { background: #f7f7f7; }
.sss-di-icon { font-size: 18px; width: 24px; text-align: center; }
.sss-di-arrow { margin-left: auto; color: #ccc; font-size: 18px; }
.sss-dash-divider { border: none; border-top: 1px solid #f0f0f0; margin: 4px 0; }
.sss-dash-logout { color: #e74c3c; }

/* Sub-view */
.sss-sub-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid #f0f0f0;
}
.sss-sub-header h3 { margin: 0; font-size: 16px; }
.sss-back-btn {
    background: none; border: none;
    font-size: 15px; cursor: pointer; color: var(--sss-acc-accent, #2c3e50);
    font-weight: 600; padding: 0; font-family: inherit;
}

/* Orders list */
#sss-orders-list { padding: 8px 22px; }
.sss-order-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid #f4f4f4;
    font-size: 13px;
}
.sss-order-row:last-child { border-bottom: none; }
.sss-order-id { font-weight: 700; color: var(--sss-acc-accent, #2c3e50); }
.sss-order-status {
    background: #e8f5e9; color: #2e7d32;
    padding: 2px 8px; border-radius: 50px; font-size: 11px; font-weight: 600;
}
.sss-order-meta { color: #888; margin-left: auto; text-align: right; }
.sss-view-all { display: block; text-align: center; padding: 12px; font-size: 13px; }

/* Settings sub-view */
#sss-dash-settings { padding: 0 22px 20px; }

/* Mobile: bottom sheet */
@media (max-width: 480px) {
    #sss-account-overlay {
        align-items: flex-end;
        justify-content: center;
        padding: 0;
    }
    #sss-account-popup {
        width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }
}
