/* ==========================================================
   SS Profile Page  v2.0
   Theme: White / Black / Highlight Blue #2563EB
   ========================================================== */

/* ── Reset scoped to our shell ─────────────────────────── */
.ss-shell *, .ss-shell *::before, .ss-shell *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.ss-shell {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #111;
    -webkit-font-smoothing: antialiased;
}

/* ── Page shell ─────────────────────────────────────────── */
.ss-shell {
    display: flex;
    min-height: 680px;
    background: #fff;
    border: 1px solid #E2E4E8;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.ss-sidebar {
    width: 210px;
    flex-shrink: 0;
    background: #0F1117;
    display: flex;
    flex-direction: column;
}

.ss-sidebar-user {
    padding: 24px 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.ss-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #1E2330;
    border: 1.5px solid rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    letter-spacing: .5px;
    margin-bottom: 12px;
}

.ss-sidebar-name {
    font-size: 13px;
    font-weight: 600;
    color: #F5F6FA;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-sidebar-email {
    font-size: 11px;
    color: #5A6070;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* nav list */
.ss-nav {
    list-style: none;
    padding: 10px 0 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ss-nav li { position: relative; }

.ss-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 400;
    color: #7A8090;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color .12s, background .12s;
    cursor: pointer;
}

.ss-nav li a:hover { color: #fff; background: rgba(255,255,255,.04); }

.ss-nav li.is-active a {
    color: #fff;
    font-weight: 500;
    background: rgba(255,255,255,.06);
    border-left-color: #fff;
}

.ss-nav li.ss-nav-logout { margin-top: auto; }

.ss-nav li.ss-nav-logout a {
    color: #6B7280;
    border-top: 1px solid rgba(255,255,255,.06);
}

.ss-nav li.ss-nav-logout a:hover { color: #F87171; background: rgba(248,113,113,.06); }

/* nav icon placeholder — uses a thin square */
.ss-nav-icon {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    opacity: .6;
}

/* ── Main ─────────────────────────────────────────────── */
.ss-main {
    flex: 1;
    background: #F8F9FB;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ss-content {
    flex: 1;
    padding: 28px 30px 36px;
    overflow-x: hidden;
}

/* ── Typography helpers ───────────────────────────────── */
.ss-page-title {
    font-size: 19px;
    font-weight: 700;
    color: #0F1117;
    letter-spacing: -.3px;
    margin-bottom: 3px;
}

.ss-page-sub {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 24px;
}

.ss-label {
    font-size: 11px;
    font-weight: 600;
    color: #9CA3AF;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

/* ── Cards ────────────────────────────────────────────── */
.ss-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    margin-bottom: 16px;
}

.ss-card-body { padding: 18px 20px; }

.ss-card-header {
    padding: 14px 20px;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ss-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

/* ── Stat row ─────────────────────────────────────────── */
.ss-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.ss-stat {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px 18px;
}

.ss-stat-val {
    font-size: 24px;
    font-weight: 700;
    color: #0F1117;
    line-height: 1;
    margin-bottom: 6px;
}

.ss-stat-val.blue { color: #2563EB; }
.ss-stat-val.green { color: #16A34A; }

.ss-stat-lbl {
    font-size: 12px;
    color: #6B7280;
}

/* ── Badges ───────────────────────────────────────────── */
.ss-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.4;
}

/* pickup statuses */
.ss-badge-placed        { background: #F3F4F6; color: #374151; }
.ss-badge-confirmed     { background: #DBEAFE; color: #1D4ED8; }
.ss-badge-preparing     { background: #FEF3C7; color: #92400E; }
.ss-badge-ready-pickup  { background: #EDE9FE; color: #5B21B6; }
.ss-badge-picked-up     { background: #DCFCE7; color: #15803D; }
/* delivery statuses */
.ss-badge-ready-delivery{ background: #EDE9FE; color: #5B21B6; }
.ss-badge-on-the-way    { background: #FEF3C7; color: #92400E; }
.ss-badge-delivered     { background: #DCFCE7; color: #15803D; }
/* woocommerce defaults */
.ss-badge-processing    { background: #DBEAFE; color: #1D4ED8; }
.ss-badge-pending       { background: #F3F4F6; color: #374151; }
.ss-badge-cancelled     { background: #FEE2E2; color: #B91C1C; }
.ss-badge-refunded      { background: #FEE2E2; color: #B91C1C; }
.ss-badge-on-hold       { background: #FEF3C7; color: #92400E; }
.ss-badge-completed     { background: #DCFCE7; color: #15803D; }

/* ── Orders table ─────────────────────────────────────── */
.ss-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.ss-orders-table thead th {
    font-size: 11px;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 10px 16px;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
    text-align: left;
    white-space: nowrap;
}

.ss-orders-table tbody tr {
    border-bottom: 1px solid #F3F4F6;
    transition: background .1s;
    cursor: pointer;
}

.ss-orders-table tbody tr:last-child { border-bottom: none; }
.ss-orders-table tbody tr:hover { background: #F9FAFB; }

.ss-orders-table tbody td {
    padding: 13px 16px;
    font-size: 13px;
    color: #111;
    vertical-align: middle;
}

.ss-orders-table tbody td.muted { color: #6B7280; }

.ss-orders-table .ss-view-btn {
    font-size: 12px;
    font-weight: 500;
    color: #2563EB;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.ss-orders-table .ss-view-btn:hover { background: #EFF6FF; }

/* ── Order type tag ───────────────────────────────────── */
.ss-type-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
}

.ss-type-tag.delivery { background: #EFF6FF; color: #2563EB; }
.ss-type-tag.pickup   { background: #F0FDF4; color: #16A34A; }

/* ── Timeline / stepper ───────────────────────────────── */
.ss-timeline {
    display: flex;
    align-items: flex-start;
    padding: 20px 24px 16px;
    position: relative;
    overflow-x: auto;
}

.ss-step {
    flex: 1;
    min-width: 0;
    text-align: center;
    position: relative;
}

/* connector bar */
.ss-step::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: #E5E7EB;
    z-index: 0;
}

.ss-step:last-child::after { display: none; }

.ss-step.done::after  { background: #0F1117; }
.ss-step.now::after   { background: #E5E7EB; }

/* dot */
.ss-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #E5E7EB;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    position: relative;
    z-index: 1;
    transition: border-color .2s, background .2s;
}

/* check mark via CSS */
.ss-step-dot::after {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #D1D5DB;
}

.ss-step.done .ss-step-dot {
    border-color: #0F1117;
    background: #0F1117;
}

.ss-step.done .ss-step-dot::after {
    background: #fff;
    width: 6px;
    height: 11px;
    border-radius: 0;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg) translate(-1px, -2px);
    background: transparent;
}

.ss-step.now .ss-step-dot {
    border-color: #2563EB;
    background: #fff;
}

.ss-step.now .ss-step-dot::after {
    background: #2563EB;
    width: 10px;
    height: 10px;
}

.ss-step-label {
    font-size: 11px;
    color: #9CA3AF;
    line-height: 1.4;
    padding: 0 4px;
}

.ss-step.done .ss-step-label { color: #374151; font-weight: 500; }
.ss-step.now  .ss-step-label { color: #2563EB; font-weight: 600; }

/* ── Order detail view ────────────────────────────────── */
.ss-detail-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.ss-detail-section.wide { grid-template-columns: 1fr; }
.ss-detail-section.three { grid-template-columns: 1fr 1fr 1fr; }

.ss-info-block {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px 18px;
}

.ss-info-block-title {
    font-size: 11px;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #F3F4F6;
}

.ss-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 0;
    font-size: 13px;
}

.ss-info-row .key { color: #6B7280; flex-shrink: 0; }
.ss-info-row .val { color: #111; font-weight: 500; text-align: right; }
.ss-info-row .val.mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 12px; }

/* ── Items table ──────────────────────────────────────── */
.ss-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ss-items-table thead th {
    font-size: 11px;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 8px 14px;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
    text-align: left;
}

.ss-items-table thead th:last-child,
.ss-items-table thead th:nth-last-child(2) { text-align: right; }

.ss-items-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #F3F4F6;
    color: #111;
    vertical-align: top;
}

.ss-items-table tbody tr:last-child td { border-bottom: none; }
.ss-items-table tbody td.muted { color: #6B7280; }
.ss-items-table tbody td:last-child,
.ss-items-table tbody td:nth-last-child(1) { text-align: right; }

.ss-items-table .ss-item-name { font-weight: 500; }
.ss-items-table .ss-item-sku  { font-size: 11px; color: #9CA3AF; margin-top: 2px; }
.ss-items-table .ss-item-meta { font-size: 11px; color: #6B7280; margin-top: 3px; }

/* ── Totals block ─────────────────────────────────────── */
.ss-totals {
    width: 260px;
    margin-left: auto;
    border-top: 1px solid #E5E7EB;
    padding-top: 14px;
}

.ss-totals-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.ss-totals-row .key { color: #6B7280; }
.ss-totals-row .val { color: #111; font-weight: 500; }
.ss-totals-row.total { border-top: 1px solid #E5E7EB; margin-top: 6px; padding-top: 10px; }
.ss-totals-row.total .key { font-weight: 700; color: #111; font-size: 14px; }
.ss-totals-row.total .val { font-weight: 700; color: #0F1117; font-size: 14px; }

/* ── Notes timeline ───────────────────────────────────── */
.ss-notes { margin-top: 2px; }

.ss-note {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #F3F4F6;
}

.ss-note:last-child { border-bottom: none; }

.ss-note-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D1D5DB;
    flex-shrink: 0;
    margin-top: 5px;
}

.ss-note-body { flex: 1; }
.ss-note-date { font-size: 11px; color: #9CA3AF; margin-bottom: 2px; }
.ss-note-text { font-size: 13px; color: #374151; }

/* ── Back button ──────────────────────────────────────── */
.ss-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6B7280;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 18px;
    font-weight: 500;
}

.ss-back:hover { color: #111; }

.ss-back-arrow {
    display: inline-block;
    width: 16px;
    height: 16px;
    position: relative;
}

.ss-back-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 2px;
    width: 8px;
    height: 8px;
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
}

/* ── S-Wallet ─────────────────────────────────────────── */
.ss-wallet-balance-card {
    background: #0F1117;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ss-wallet-balance-label {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 6px;
}

.ss-wallet-balance-amount {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.5px;
}

.ss-wallet-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #4ADE80;
    background: rgba(74,222,128,.12);
    padding: 3px 9px;
    border-radius: 20px;
    margin-top: 8px;
}

.ss-wallet-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ADE80;
}

.ss-wallet-btns { display: flex; gap: 8px; }

.ss-wallet-btn {
    padding: 9px 16px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background .12s;
}

.ss-wallet-btn:hover { background: rgba(255,255,255,.12); }

/* txn table */
.ss-txn-table {
    width: 100%;
    border-collapse: collapse;
}

.ss-txn-table thead th {
    font-size: 11px;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 9px 16px;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
    text-align: left;
}

.ss-txn-table tbody td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid #F3F4F6;
    color: #111;
    vertical-align: middle;
}

.ss-txn-table tbody tr:last-child td { border-bottom: none; }
.ss-txn-table td.cr { color: #16A34A; font-weight: 600; }
.ss-txn-table td.dr { color: #DC2626; font-weight: 600; }
.ss-txn-table td.muted { color: #6B7280; font-size: 12px; }

/* ── Address ──────────────────────────────────────────── */
.ss-address-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 12px;
}

.ss-address-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ss-address-label {
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

.ss-default-tag {
    font-size: 10px;
    font-weight: 600;
    background: #F0FDF4;
    color: #16A34A;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 7px;
}

.ss-address-body {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.8;
}

.ss-add-new {
    width: 100%;
    padding: 12px;
    border: 1.5px dashed #D1D5DB;
    border-radius: 10px;
    background: transparent;
    color: #9CA3AF;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .12s;
}

.ss-add-new:hover {
    border-color: #2563EB;
    color: #2563EB;
    background: #EFF6FF;
}

.ss-add-plus {
    font-size: 18px;
    line-height: 1;
    font-weight: 300;
}

/* ── Payment ──────────────────────────────────────────── */
.ss-pay-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid #F3F4F6;
}

.ss-pay-row:last-child { border-bottom: none; }

.ss-pay-logo {
    width: 46px;
    height: 30px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #374151;
    flex-shrink: 0;
    background: #F9FAFB;
}

.ss-pay-info { flex: 1; }
.ss-pay-name { font-size: 13px; font-weight: 500; color: #111; }
.ss-pay-sub  { font-size: 11px; color: #9CA3AF; margin-top: 1px; }

.ss-remove-btn {
    font-size: 13px;
    color: #D1D5DB;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.ss-remove-btn:hover { color: #DC2626; }

/* ── Account form ─────────────────────────────────────── */
.ss-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.ss-field { margin-bottom: 2px; }

.ss-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 5px;
}

.ss-field input,
.ss-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 13px;
    color: #111;
    background: #fff;
    outline: none;
    transition: border-color .12s, box-shadow .12s;
    -webkit-appearance: none;
}

.ss-field input:focus,
.ss-field select:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.ss-form-divider {
    font-size: 12px;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 18px 0 10px;
    border-top: 1px solid #F3F4F6;
    margin-top: 6px;
}

.ss-save-btn {
    background: #0F1117;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: background .12s;
}

.ss-save-btn:hover { background: #1F2937; }

/* ── Loading spinner ──────────────────────────────────── */
.ss-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: #9CA3AF;
    font-size: 13px;
    gap: 10px;
}

.ss-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #E5E7EB;
    border-top-color: #2563EB;
    border-radius: 50%;
    animation: ss-spin .7s linear infinite;
}

@keyframes ss-spin { to { transform: rotate(360deg); } }

/* ── Empty state ──────────────────────────────────────── */
.ss-empty {
    text-align: center;
    padding: 48px 24px;
    color: #9CA3AF;
    font-size: 13px;
}

.ss-empty strong { display: block; font-size: 15px; color: #374151; margin-bottom: 6px; font-weight: 600; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 860px) {
    .ss-shell { flex-direction: column; border-radius: 0; }
    .ss-sidebar { width: 100%; }
    .ss-nav { flex-direction: row; flex-wrap: wrap; padding-top: 0; }
    .ss-nav li a { padding: 9px 12px; border-left: none; border-bottom: 2px solid transparent; font-size: 12px; }
    .ss-nav li.is-active a { border-left: none; border-bottom-color: #fff; }
    .ss-nav li.ss-nav-logout { margin-top: 0; }
    .ss-nav li.ss-nav-logout a { border-top: none; }
    .ss-stats { grid-template-columns: 1fr 1fr; }
    .ss-detail-section { grid-template-columns: 1fr; }
    .ss-detail-section.three { grid-template-columns: 1fr; }
    .ss-form-grid { grid-template-columns: 1fr; }
    .ss-totals { width: 100%; }
    .ss-content { padding: 18px; }
}
