/* ================================================================
   profile.css — POS Profile Page
   Strategy:
   • Lines 1–400  → MOBILE styles (default, no media query)
   • Lines 400+   → DESKTOP styles (inside @media min-width:1024px)
   • bento-grid hidden on mobile | mob-stack hidden on desktop
================================================================ */

/* ── Reset & Base ── */
body {
    background: #f4f4f5;
    font-family: 'Inter', 'Outfit', sans-serif;
    margin: 0; padding: 0;
    -webkit-font-smoothing: antialiased;
}

@keyframes skeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Skeleton ── */
.skeleton {
    background: linear-gradient(90deg, #e4e4e7 25%, #d4d4d8 50%, #e4e4e7 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}
.prof-skeleton {
    height: 280px;
    border-radius: 20px;
    margin: 16px;
}

/* ================================================================
   MOBILE TOPBAR
================================================================ */
.desk-topbar { display: none; }

.mob-topbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 0 16px;
    box-shadow: 0 1px 8px rgba(0,0,0,.04);
}
.mob-back {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f172a; font-size: 1rem;
    text-decoration: none;
    border: 1px solid #e2e8f0;
}
.mob-title {
    flex: 1; text-align: center;
    font-size: 1rem; font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.mob-spacer { width: 36px; }

/* ================================================================
   PAGE WRAPPER
================================================================ */
.prof-page {
    padding-bottom: 90px; /* space for bottom nav */
}
.prof-content { width: 100%; }

/* ================================================================
   HERO CARD  (mobile)
================================================================ */
.prof-hero {
    position: relative;
    background: #fff;
    overflow: hidden;
    animation: slideUpFade 0.4s ease-out;
}
.prof-cover {
    height: 130px;
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    position: relative;
}
.prof-cover::after {
    content: '';
    position: absolute; bottom: -1px; left: 0;
    width: 100%; height: 20px;
    background: #fff;
    border-radius: 20px 20px 0 0;
}
.prof-avatar-wrap {
    position: absolute;
    bottom: -15px; left: 20px;
    z-index: 10;
}
.prof-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
    display: flex; align-items: center; justify-content: center;
    color: #3b82f6; font-size: 2.2rem;
}
.prof-hero-info {
    padding: 28px 20px 20px;
    background: #fff;
}
.prof-name {
    margin: 0 0 6px;
    font-size: 1.8rem; font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #0f172a; letter-spacing: -0.02em;
}
.role-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 20px;
    font-size: 0.8rem; font-weight: 800;
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
    background: #fff; color: #0f172a;
}
.role-badge.admin   { color: #8b5cf6; border-color: #ddd6fe; background: #f5f3ff; }
.role-badge.cashier { color: #059669; border-color: #a7f3d0; background: #ecfdf5; }
.prof-email { margin: 0; font-size: 0.9rem; color: #64748b; font-weight: 500; }

/* ================================================================
   MOBILE CARD STACK
================================================================ */
.mob-stack { padding: 12px 16px 0; }

/* Plan Ticket */
.plan-ticket {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 20px; padding: 22px;
    color: #fff;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 28px -6px rgba(15,23,42,.4);
    position: relative; overflow: hidden;
}
.plan-ticket::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,.1) 0%, transparent 60%);
    pointer-events: none;
}
.plan-info h4 {
    margin: 0 0 4px;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: #94a3b8;
}
.plan-info h2 {
    margin: 0; font-size: 1.4rem; font-weight: 800;
    font-family: 'Outfit', sans-serif;
    display: flex; align-items: center; gap: 8px;
}
.plan-badge {
    background: rgba(255,255,255,.15);
    padding: 3px 8px; border-radius: 6px;
    font-size: 0.7rem; font-weight: 700;
}
.btn-upgrade {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #fff; text-decoration: none;
    padding: 10px 16px; border-radius: 12px;
    font-weight: 800; font-size: 0.88rem;
    display: flex; align-items: center; gap: 7px;
    box-shadow: 0 4px 12px rgba(245,158,11,.3);
    transition: transform .2s; white-space: nowrap;
}
.btn-upgrade:active { transform: scale(0.95); }

/* Section title */
.section-title {
    margin: 0 0 10px 4px;
    font-size: 0.85rem; font-weight: 800;
    color: #64748b; text-transform: uppercase; letter-spacing: 0.5px;
}

/* Stats Grid */
.stats-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; margin-bottom: 20px;
}
.stat-card {
    background: #fff; border-radius: 18px; padding: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,.03);
}
.stat-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; margin-bottom: 10px;
}
.stat-icon.blue  { background: #eff6ff; color: #3b82f6; }
.stat-icon.green { background: #f0fdf4; color: #10b981; }
.stat-label { margin: 0 0 3px; font-size: 0.82rem; color: #64748b; font-weight: 600; }
.stat-value {
    margin: 0; font-size: 1.4rem; font-weight: 800;
    font-family: 'Outfit', sans-serif; color: #0f172a;
}
.ai-insight {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.75rem; font-weight: 700;
    padding: 4px 10px; border-radius: 20px;
    background: #eff6ff; color: #2563eb; margin-top: 8px;
}

/* Settings Group (read-only list) */
.settings-group {
    background: #fff; border-radius: 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,.03);
    overflow: hidden;
}
.profile-readonly-item {
    display: flex; justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
}
.profile-readonly-item:last-child { border-bottom: none; }
.profile-readonly-item .label { color: #64748b; font-size: 0.88rem; font-weight: 600; }
.profile-readonly-item .value { color: #0f172a; font-size: 0.9rem; font-weight: 700; text-align: right; }

/* Settings Group (edit form inside modal) */
.settings-item {
    display: flex; flex-direction: column;
    padding: 13px 18px;
    border-bottom: 1px solid #f1f5f9;
}
.settings-item:last-child { border-bottom: none; }
.settings-item label { font-size: 0.78rem; color: #64748b; font-weight: 700; margin-bottom: 3px; }
.settings-item input {
    border: none; background: transparent;
    font-family: inherit; font-size: 1rem;
    font-weight: 600; color: #0f172a;
    width: 100%; outline: none; padding: 3px 0;
}
.settings-item input:focus { color: #3b82f6; }

/* Edit profile btn */
.btn-edit-profile {
    display: inline-flex; align-items: center; gap: 7px;
    background: #eff6ff; color: #3b82f6; border: none;
    padding: 8px 16px; border-radius: 12px;
    font-weight: 800; font-size: 0.88rem;
    cursor: pointer; transition: background .2s; margin-bottom: 16px;
}
.btn-edit-profile:active { background: #dbeafe; }

/* Admin list */
.admin-list {
    background: #fff; border-radius: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,.03);
    overflow: hidden; margin-bottom: 16px;
}
.admin-list-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 18px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none; color: inherit; transition: background .18s;
}
.admin-action {
    width: 100%;
    border: 0;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.admin-list-item:last-child { border-bottom: none; }
.admin-list-item:active { background: #f8fafc; }
.admin-list-item .left { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 0.95rem; color: #1e293b; }
.admin-list-item .left i { font-size: 1.1rem; color: #3b82f6; background: #eff6ff; padding: 9px; border-radius: 10px; }
.admin-list-item .right { color: #cbd5e1; font-size: 1rem; }

/* Logout btn */
.logout-btn {
    width: 100%; padding: 15px;
    background: #fff; color: #ef4444;
    font-size: 1rem; font-weight: 800;
    border-radius: 18px; border: none; cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.03);
    margin-bottom: 20px; transition: all .2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.logout-btn:active { background: #fef2f2; transform: scale(.98); }

/* ================================================================
   MODAL  (Edit Shop)
================================================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    z-index: 2000; display: none;
    align-items: flex-end; justify-content: center;
}
.modal-content {
    background: #f8fafc; width: 100%;
    max-height: 90vh; border-radius: 22px 22px 0 0;
    padding: 22px; overflow-y: auto;
    animation: slideUpFade .3s ease-out;
    box-shadow: 0 -10px 40px rgba(0,0,0,.2);
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 18px;
    position: sticky; top: 0; background: #f8fafc;
    padding-bottom: 14px; border-bottom: 1px solid #e2e8f0; z-index: 10;
}
.modal-header h3 { margin: 0; font-size: 1.2rem; font-weight: 800; color: #0f172a; }
.btn-close-modal {
    background: #e2e8f0; border: none;
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: #475569; cursor: pointer;
}
.sticky-action-bar {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(14px);
    padding: 12px 16px; z-index: 99;
    border-top: 1px solid rgba(0,0,0,.05);
    box-shadow: 0 -4px 20px rgba(0,0,0,.05);
}
.btn-save {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff; border: none; width: 100%; padding: 15px;
    border-radius: 14px; font-size: 1rem; font-weight: 800;
    font-family: 'Outfit', sans-serif; cursor: pointer;
    box-shadow: 0 8px 20px rgba(59,130,246,.28);
    transition: transform .2s;
    display: flex; justify-content: center; align-items: center; gap: 9px;
}
.btn-save:active { transform: scale(.97); }

/* ── Desktop footer & topbar hidden on mobile ── */
.desk-footer { display: none; }

/* ================================================================
   BENTO GRID  — hidden on mobile, shown on desktop
================================================================ */
.bento-grid { display: none; }


/* ================================================================
   DESKTOP  (>= 1024px)
================================================================ */
@media (min-width: 1024px) {

    /* ── Kill mobile chrome ── */
    .mob-topbar   { display: none !important; }
    .mob-stack    { display: none !important; }
    .bottom-nav   { display: none !important; }
    .prof-skeleton { margin: 0 0 24px; border-radius: 22px; }

    /* ── Body ── */
    body { background: #f1f5f9; padding-top: 64px; }

    /* ── Desktop Topbar ── */
    .desk-topbar {
        display: flex;
        position: fixed; top: 0; left: 0; right: 0; height: 64px;
        background: #0f172a;
        border-bottom: 1px solid rgba(255,255,255,.06);
        align-items: center; z-index: 500;
    }
    .desk-topbar-inner {
        max-width: 1280px; margin: 0 auto; width: 100%;
        padding: 0 36px;
        display: flex; align-items: center; justify-content: space-between;
    }
    .desk-brand {
        display: flex; align-items: center; gap: 10px;
        font-size: 1.05rem; font-weight: 800; color: #fff;
        text-decoration: none;
    }
    .desk-brand i { color: #3b82f6; font-size: 1.2rem; }
    .desk-nav { display: flex; gap: 4px; }
    .desk-nav a {
        display: flex; align-items: center; gap: 6px;
        padding: 8px 14px; border-radius: 10px;
        color: #94a3b8; font-size: 0.88rem; font-weight: 600;
        text-decoration: none; transition: all .18s;
    }
    .desk-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
    .desk-nav a.is-active { background: rgba(59,130,246,.15); color: #60a5fa; }

    /* ── Page wrapper ── */
    .prof-page {
        max-width: 1280px; margin: 0 auto;
        padding: 32px 36px 0;
    }
    .prof-content { animation: slideUpFade .4s ease-out; }

    /* ── Hero — horizontal on desktop ── */
    .prof-hero {
        display: flex; flex-direction: row;
        align-items: stretch;
        border-radius: 22px; overflow: hidden;
        margin-bottom: 24px;
        box-shadow: 0 4px 24px rgba(0,0,0,.07);
    }
    .prof-cover {
        width: 200px; min-height: 150px; height: auto;
        flex-shrink: 0; position: relative;
        border-radius: 0;
    }
    .prof-cover::after { display: none; }
    .prof-avatar-wrap {
        position: absolute; inset: 0;
        display: flex; align-items: center; justify-content: center;
        bottom: auto; left: auto;
    }
    .prof-avatar { width: 88px; height: 88px; font-size: 2.4rem; }
    .prof-hero-info {
        flex: 1; padding: 28px 36px;
        display: flex; flex-direction: column; justify-content: center;
    }
    .prof-name { font-size: 2.1rem; }

    /* ── BENTO GRID layout ── */
    .bento-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-bottom: 28px;
    }
    .bento-tile {
        background: #fff; border-radius: 20px; padding: 24px;
        box-shadow: 0 2px 16px rgba(0,0,0,.04);
        display: flex; flex-direction: column; gap: 10px;
        animation: slideUpFade .4s ease-out;
    }
    /* Stat tiles */
    .bt-icon {
        width: 46px; height: 46px; border-radius: 13px;
        display: flex; align-items: center; justify-content: center;
        font-size: 1.25rem;
    }
    .b-blue .bt-icon { background: #eff6ff; color: #3b82f6; }
    .b-green .bt-icon { background: #f0fdf4; color: #10b981; }
    .bt-label { margin: 0; font-size: 0.83rem; color: #64748b; font-weight: 600; }
    .bt-value {
        margin: 0; font-size: 2.2rem; font-weight: 800;
        font-family: 'Outfit', sans-serif; color: #0f172a;
        letter-spacing: -0.04em; line-height: 1;
    }
    .bt-tag {
        display: inline-flex; align-items: center; gap: 5px;
        font-size: 0.76rem; font-weight: 700;
        padding: 5px 11px; border-radius: 20px;
        background: #eff6ff; color: #2563eb; align-self: flex-start;
    }
    .bt-tag-green { background: #ecfdf5 !important; color: #10b981 !important; }

    /* Plan tile (dark) */
    .b-dark {
        background: linear-gradient(135deg, #1e293b, #0f172a);
        color: #fff; position: relative; overflow: hidden;
    }
    .b-dark::before {
        content: '';
        position: absolute; inset: 0;
        background: radial-gradient(circle at top right, rgba(255,255,255,.08), transparent 60%);
        pointer-events: none;
    }
    .bt-overline { margin: 0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: #94a3b8; }
    .bt-plan-name {
        margin: 0; font-size: 1.5rem; font-weight: 800;
        font-family: 'Outfit', sans-serif;
        display: flex; align-items: center; gap: 9px;
    }
    .bt-plan-name i { color: #60a5fa; }
    .b-dark .plan-badge { background: rgba(255,255,255,.15); font-size: 0.72rem; align-self: flex-start; }
    .b-dark .btn-upgrade { align-self: flex-start; margin-top: 4px; }

    /* Shop Details tile — 2 columns */
    .b-shop { grid-column: span 2; }
    .bt-row-header {
        display: flex; align-items: center; justify-content: space-between;
    }
    .bt-section-title {
        margin: 0; font-size: 0.95rem; font-weight: 800;
        color: #0f172a; display: flex; align-items: center; gap: 7px;
    }
    .bt-section-title i { color: #3b82f6; }
    .bt-fields {
        display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    }
    .bt-field {
        background: #f8fafc; border-radius: 11px; padding: 13px 15px;
        display: flex; flex-direction: column; gap: 3px;
    }
    .ft-label { font-size: 0.75rem; color: #64748b; font-weight: 700; }
    .ft-value { font-size: 0.95rem; color: #0f172a; font-weight: 700; }

    /* Management + System tiles */
    .b-manage, .b-system { gap: 14px; }
    .b-manage .admin-list,
    .b-system .admin-list { margin-bottom: 0; box-shadow: none; border: 1px solid #f1f5f9; }
    .b-system .logout-btn { margin-bottom: 0; }

    /* Modal becomes centered on desktop */
    .modal-overlay { align-items: center; }
    .modal-content {
        max-width: 600px; border-radius: 22px; padding: 30px;
    }
    .sticky-action-bar {
        position: static; background: transparent;
        backdrop-filter: none; box-shadow: none;
        border: none; padding: 20px 0 0;
    }

    /* ── Desktop Footer ── */
    .desk-footer {
        display: block;
        background: #0f172a;
        margin-top: 48px;
    }
    .desk-footer-inner {
        max-width: 1280px; margin: 0 auto;
        padding: 48px 36px 32px;
        display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
    }
    .df-brand {
        display: flex; align-items: center; gap: 10px;
        font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 10px;
    }
    .df-brand i { color: #3b82f6; font-size: 1.2rem; }
    .df-tagline { margin: 0 0 6px; color: #94a3b8; font-size: 0.85rem; font-style: italic; }
    .df-desc { margin: 0; color: #64748b; font-size: 0.83rem; line-height: 1.6; }
    .df-heading { margin: 0 0 14px; color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
    .df-nav { display: flex; flex-direction: column; gap: 10px; }
    .df-nav a { color: #64748b; text-decoration: none; font-size: 0.88rem; display: flex; align-items: center; gap: 8px; transition: color .2s; }
    .df-nav a:hover { color: #fff; }
    .df-info { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
    .df-info li { color: #64748b; font-size: 0.88rem; display: flex; align-items: center; gap: 8px; }
    .df-info li i { color: #3b82f6; width: 14px; }
    .df-payments { display: flex; gap: 10px; }
    .df-payments span {
        background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
        color: #94a3b8; padding: 5px 12px; border-radius: 20px;
        font-size: 0.78rem; font-weight: 700;
        display: flex; align-items: center; gap: 6px;
    }
    .df-bottom {
        max-width: 1280px; margin: 0 auto;
        padding: 20px 36px;
        border-top: 1px solid rgba(255,255,255,.06);
        display: flex; justify-content: space-between; align-items: center;
    }
    .df-bottom span { color: #475569; font-size: 0.82rem; display: flex; align-items: center; gap: 5px; }
}

/* Mobile visual system: same calm surfaces, blue action language and compact
   identity hierarchy used across Home, Udhar and POS. */
@media (max-width: 1023px) {
    body { background: linear-gradient(180deg, #f5f8ff 0%, #f8fafc 44%, #f5f8ff 100%); }

    .mob-topbar {
        background: rgba(239,246,255,.92);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow: 0 1px 12px rgba(15,23,42,.05);
    }

    .prof-page { padding-bottom: calc(var(--app-bottom-nav-height, 74px) + 18px); }
    .prof-hero {
        margin: 16px 16px 14px;
        border-radius: 24px;
        overflow: hidden;
        box-shadow: 0 12px 30px rgba(30, 64, 175, .12);
    }
    .prof-cover {
        height: 98px;
        background: linear-gradient(135deg, #2563eb 0%, #4f6df5 52%, #7c3aed 100%);
    }
    .prof-cover::before {
        content: '';
        position: absolute;
        inset: 0;
        opacity: .18;
        background-image: radial-gradient(rgba(255,255,255,.75) 1px, transparent 1px);
        background-size: 12px 12px;
    }
    .prof-cover::after { display: none; }
    .prof-avatar-wrap {
        top: 52px;
        bottom: auto;
        left: 20px;
    }
    .prof-avatar {
        width: 72px;
        height: 72px;
        border-width: 4px;
        color: #2563eb;
        font-size: 1.8rem;
        box-shadow: 0 8px 20px rgba(15, 23, 42, .18);
    }
    .prof-hero-info { padding: 40px 20px 19px; }
    .prof-name { font-size: 1.45rem; line-height: 1.15; margin-bottom: 7px; }
    .role-badge { padding: 5px 10px; font-size: .74rem; margin-bottom: 5px; }
    .prof-email { font-size: .8rem; min-height: 1.1em; }

    .mob-stack { padding: 0 16px; }
    .plan-ticket {
        background: linear-gradient(135deg, #172554 0%, #1e3a8a 54%, #312e81 100%);
        border-radius: 20px;
        padding: 18px;
        margin-bottom: 18px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
    }
    .plan-info h2 { font-size: 1.22rem; }
    .btn-upgrade { padding: 9px 12px; border-radius: 11px; font-size: .8rem; }
    .section-title { margin: 17px 2px 10px; color: #64748b; }
    .stats-grid { gap: 10px; margin-bottom: 10px; }
    .stat-card { border-radius: 18px; padding: 15px; box-shadow: 0 5px 16px rgba(15,23,42,.05); }
    .stat-icon { width: 38px; height: 38px; margin-bottom: 9px; }
    .stat-value { font-size: 1.28rem; }
    .ai-insight { font-size: .68rem; padding: 4px 7px; }

    #mob-admin-section {
        padding: 12px;
        margin-top: 18px;
        border-radius: 20px;
        background: #eef2ff;
        border: 1px solid #dbe4ff;
    }
    #mob-admin-section .section-title { margin: 1px 2px 10px; color: #5b21b6; }
    #mob-admin-section .admin-list {
        border: 1px solid rgba(37, 99, 235, .13);
        box-shadow: 0 8px 20px rgba(37, 99, 235, .08);
        margin-bottom: 0;
    }
    #mob-admin-section .admin-list-item:first-child {
        background: linear-gradient(90deg, #eff6ff, #fff);
    }
    .admin-list, .settings-group, .logout-btn { border-radius: 18px; }
    .admin-list-item { padding: 14px 15px; }
    .admin-list-item .left { font-size: .88rem; }
    .admin-list-item .left i { padding: 8px; border-radius: 10px; }
    .admin-list-item .left span { display: flex; flex-direction: column; gap: 2px; }
    .admin-list-item .left small { color: #64748b; font-size: .68rem; font-weight: 650; }
    #mob-admin-section .admin-list-item:nth-child(1) .left i { background: #fff7e6; color: #f59e0b !important; }
    #mob-admin-section .admin-list-item:nth-child(2) .left i { background: #eff6ff; color: #2563eb; }
    #mob-admin-section .admin-list-item:nth-child(3) .left i { background: #f5f3ff; color: #7c3aed; }
    #mob-set-target {
        background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
        border: 1px solid #bbf7d0;
        box-shadow: 0 8px 20px rgba(16,185,129,.08);
    }
    #mob-set-target .left i { background: #dcfce7; color: #10b981 !important; }
    #mob-set-target .right { color: #059669; font-weight: 800; }
    .profile-readonly-item { padding: 13px 15px; }
    .profile-readonly-item .value { max-width: 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .btn-edit-profile { width: 100%; justify-content: center; margin-bottom: 4px; }
    .help-list { background: #f0f9ff; border: 1px solid #dbeafe; }
    .help-list .admin-list-item { background: rgba(255,255,255,.82); }
    .logout-btn { background: #fff7f7; border: 1px solid #fecaca; box-shadow: none; }
}

/* Profile layout v2: compact identity, clearer card groups and less visual
   competition between profile, subscription and management actions. */
@media (max-width: 1023px) {
    .prof-hero {
        min-height: 118px;
        padding: 20px;
        display: grid;
        grid-template-columns: 66px minmax(0, 1fr);
        align-items: center;
        gap: 15px;
        isolation: isolate;
        background: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 58%, #7c3aed 100%);
    }
    .prof-cover {
        position: absolute;
        inset: 0;
        height: auto;
        z-index: -1;
        background: transparent;
    }
    .prof-cover::before {
        opacity: .15;
        background-size: 14px 14px;
    }
    .prof-avatar-wrap {
        position: relative;
        inset: auto;
        width: 66px;
        z-index: 1;
    }
    .prof-avatar {
        width: 64px;
        height: 64px;
        border: 3px solid rgba(255,255,255,.7);
        background: rgba(255,255,255,.96);
        box-shadow: 0 12px 24px rgba(30,27,75,.24);
    }
    .prof-hero-info {
        min-width: 0;
        z-index: 1;
        padding: 0;
        background: transparent;
    }
    .prof-name {
        overflow: hidden;
        color: #fff;
        font-size: 1.38rem;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-shadow: 0 2px 10px rgba(30,27,75,.18);
    }
    .prof-hero .role-badge.admin,
    .prof-hero .role-badge.cashier {
        color: #fff;
        border-color: rgba(255,255,255,.24);
        background: rgba(255,255,255,.16);
        backdrop-filter: blur(8px);
    }
    .prof-email { color: rgba(255,255,255,.78); min-height: 0; }

    .plan-ticket {
        min-height: 78px;
        border: 1px solid rgba(99,102,241,.22);
        background: linear-gradient(135deg, #172554 0%, #263b85 56%, #4338ca 100%);
    }
    .stats-grid .stat-card {
        position: relative;
        overflow: hidden;
        border: 1px solid #e6edf8;
    }
    .stats-grid .stat-card:first-child { background: linear-gradient(145deg, #fff 54%, #eef6ff); }
    .stats-grid .stat-card:last-child { background: linear-gradient(145deg, #fff 54%, #edfcf5); }
    .stats-grid .stat-card::before {
        content: '';
        position: absolute;
        inset: 0 0 auto;
        height: 3px;
        background: #3b82f6;
    }
    .stats-grid .stat-card:last-child::before { background: #10b981; }

    #mob-admin-section { padding: 14px; box-shadow: 0 12px 30px rgba(79,70,229,.08); }
    #mob-admin-section .admin-list {
        display: grid;
        gap: 9px;
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    #mob-admin-section .admin-list-item {
        min-height: 58px;
        border: 1px solid rgba(99,102,241,.1);
        border-radius: 14px;
        background: rgba(255,255,255,.92);
        box-shadow: 0 4px 12px rgba(49,46,129,.05);
    }
    #mob-admin-section .admin-list-item:first-child {
        border-color: #fde6b0;
        background: linear-gradient(100deg, #fffaf0, #fff);
    }
    .settings-group {
        border: 1px solid #e5edf8;
        box-shadow: 0 8px 22px rgba(15,23,42,.05);
    }
    .profile-readonly-item:nth-child(even) { background: #fbfdff; }
    .btn-edit-profile {
        min-height: 46px;
        color: #1d4ed8;
        background: linear-gradient(135deg, #eff6ff, #eef2ff);
        border: 1px solid #dbeafe;
    }
    .help-list {
        display: grid;
        gap: 8px;
        padding: 8px;
        overflow: visible;
    }
    .help-list .admin-list-item {
        border: 0;
        border-radius: 13px;
    }
    .logout-btn { min-height: 50px; margin-top: 8px; }
}

@media (min-width: 1024px) {
    .prof-cover { background: linear-gradient(145deg, #2563eb, #7c3aed); }
    .bento-tile { border: 1px solid rgba(148,163,184,.14); }
    .b-manage { background: linear-gradient(145deg, #eef2ff, #fff 62%); }
    .b-goals { background: linear-gradient(145deg, #ecfdf5, #fff 65%); }
    .b-shop { background: linear-gradient(145deg, #eff6ff, #fff 48%); }
    .b-system { background: linear-gradient(145deg, #f0f9ff, #fff 58%); }
    #desk-set-target { border-radius: 12px; background: rgba(255,255,255,.82); }
}
