/* =====================================================================
   DASHBOARD – 5amsa Services (متجر خمسة) Admin Panel
   Designed to match the existing gold-theme design system (tokens.css)
   Import this file after app.css in dashboard.html
   ===================================================================== */

/* ── Layout ─────────────────────────────────────────────────────── */
.dashboard-layout {
    display: flex;
    min-height: 100dvh;
    background: var(--bg);
    padding-bottom: 0;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.dash-sidebar {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    z-index: 90;
    width: 68px;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-inline-end: 1px solid var(--line);
    transition: width 0.3s var(--ease), transform 0.3s var(--ease);
    overflow: hidden;
}

/* Hover to expand */
.dash-sidebar:hover {
    width: 260px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px;
    border-bottom: 1px solid var(--line);
    min-height: 72px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    text-decoration: none;
    overflow: hidden;
}

.sidebar-logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(229, 183, 87, 0.3));
    flex-shrink: 0;
}

.sidebar-logo b {
    color: var(--gold);
}

/* ── Sidebar Nav & Collapse States ──────────────────────────────── */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-tab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    color: var(--muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-align: start;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}

.dash-tab-btn .tab-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--quiet);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13px;
    transition: var(--transition);
    flex-shrink: 0;
}

.dash-tab-btn .tab-label {
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s var(--ease), visibility 0.2s;
}

.dash-tab-btn:hover {
    color: var(--text);
    background: var(--surface-2);
}
.dash-tab-btn:hover .tab-icon {
    color: var(--gold);
    border-color: var(--line-gold);
    background: var(--gold-wash);
}

.dash-tab-btn.active {
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
}
.dash-tab-btn.active .tab-icon {
    color: var(--gold);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.dash-tab-btn .tab-badge {
    display: none !important;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    margin-inline-start: auto;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #0c0e12;
    font-size: 10px;
    font-weight: 900;
    border-radius: var(--radius-full);
}

/* Collapsed by default: hide text labels with fade */
.dash-sidebar:not(:hover) .dash-tab-btn .tab-label {
    opacity: 0;
    visibility: hidden;
}
.dash-sidebar:not(:hover) .dash-tab-btn .tab-badge,
.dash-sidebar:not(:hover) .sidebar-logo span,
.dash-sidebar:not(:hover) .sidebar-user-info {
    display: none;
}
.dash-sidebar:hover .dash-tab-btn .tab-label {
    opacity: 1;
    visibility: visible;
}
.dash-sidebar:hover .dash-tab-btn .tab-badge {
    display: none !important;
}
.dash-sidebar:hover .sidebar-logo span {
    display: inline;
}
.dash-sidebar:hover .sidebar-user-info {
    display: block;
}

.dash-sidebar:not(:hover) .sidebar-header {
    justify-content: center;
    padding: 18px 4px;
}

.dash-sidebar:not(:hover) .dash-tab-btn {
    justify-content: center;
    padding: 10px 4px;
    gap: 0;
}
.dash-sidebar:not(:hover) .sidebar-logo { justify-content: center; }
.dash-sidebar:not(:hover) .sidebar-user { justify-content: center; }
.dash-sidebar:not(:hover) .sidebar-actions {
    flex-direction: column;
    align-items: center;
}

/* On hover: expand and show labels */
.dash-sidebar:hover .sidebar-header {
    justify-content: space-between;
    padding: 18px 16px;
}
.dash-sidebar:hover .dash-tab-btn {
    justify-content: flex-start;
    padding: 12px 14px;
}
.dash-sidebar:hover .sidebar-logo { justify-content: flex-start; }
.dash-sidebar:hover .sidebar-user { justify-content: flex-start; }
.dash-sidebar:hover .sidebar-actions {
    flex-direction: row;
}

/* ── Sidebar Footer ─────────────────────────────────────────────── */
.sidebar-footer {
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--gold);
    background: var(--gold-wash);
    border: 1px solid var(--line-gold);
    border-radius: 50%;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-user-info strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}
.sidebar-user-info small {
    color: var(--muted);
    font-size: 10px;
}

.sidebar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-icon-btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}
.sidebar-icon-btn:hover {
    color: var(--gold);
    border-color: var(--line-gold);
    background: var(--gold-wash);
}

/* Mobile Overlay */
.sidebar-mobile-overlay { display: none; }

/* ── Main Content ───────────────────────────────────────────────── */
.dash-main {
    flex: 1;
    margin-inline-start: 68px;
    transition: margin-inline-start 0.3s var(--ease);
    min-width: 0;
}

/* ── Top Bar ────────────────────────────────────────────────────── */
.dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 28px;
    background: var(--surface-glass);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.hamburger-dash-btn {
    display: none;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
}
.hamburger-dash-btn:hover { color: var(--gold); border-color: var(--line-gold); }

.topbar-title h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.topbar-search {
    position: relative;
    width: 220px;
}
.topbar-search i {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--quiet);
    font-size: 12px;
    pointer-events: none;
}
.topbar-search-input {
    width: 100%;
    height: 38px;
    padding-inline: 34px 14px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: var(--transition);
}
.topbar-search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--gold-wash);
}

.topbar-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.topbar-btn:hover {
    color: var(--gold);
    border-color: var(--line-gold);
    background: var(--gold-wash);
}
.topbar-notif-btn .notif-dot {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff6b6b;
    display: none;
}
.topbar-notif-btn .notif-dot.active { display: block; }

/* ── Panels ─────────────────────────────────────────────────────── */
.dash-panels { padding: 28px; overflow-y: auto; }
.dash-panel { display: none; animation: panelFadeIn 0.35s var(--ease); }
.dash-panel.active { display: block; }

@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Panel Toolbar ──────────────────────────────────────────────── */
.panel-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}
.panel-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.panel-toolbar-left h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}
.members-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--gold-wash);
    color: var(--gold);
    border: 1px solid var(--line-gold);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
}
.panel-subtitle { color: var(--muted); font-size: 13px; margin-top: 4px; }
.panel-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Stats Grid ─────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: var(--surface-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.stat-card:hover {
    border-color: var(--line-gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.stat-card-gold {
    border-color: var(--line-gold);
    background: linear-gradient(135deg, rgba(229,183,87,0.08), transparent);
}
.stat-card-gold::before {
    content: '';
    position: absolute;
    top: -50%;
    inset-inline-end: -30%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--gold-glow), transparent 70%);
    pointer-events: none;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--gold);
    background: var(--gold-wash);
    border: 1px solid var(--line-gold);
    border-radius: var(--radius);
    font-size: 20px;
    flex-shrink: 0;
}
.stat-info { flex: 1; min-width: 0; }
.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.stat-label { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; }

.stat-trend {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.stat-trend.up { color: var(--green); background: var(--green-wash); }
.stat-trend.down { color: #ff6b6b; background: rgba(255, 107, 107, 0.12); }

/* ── Charts Grid ────────────────────────────────────────────────── */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.chart-card {
    padding: 24px;
    background: var(--surface-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
}
.chart-header h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.chart-body { min-height: 180px; position: relative; }
.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    color: var(--quiet);
    gap: 8px;
}
.chart-placeholder i { font-size: 32px; opacity: 0.4; }
.chart-placeholder p { font-size: 13px; }

/* ── Dash Card ──────────────────────────────────────────────────── */
.dash-card {
    background: var(--surface-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    overflow: hidden;
}
.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
}
.dash-card-header h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.dash-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.dash-card-action:hover {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
    background: rgba(255, 107, 107, 0.1);
}
.dash-card-toolbar { display: flex; align-items: center; gap: 8px; }
.dash-card-body { padding: 24px; }

/* ── Activity List ──────────────────────────────────────────────── */
.activity-list { padding: 8px 24px; }
.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--line);
    transition: var(--transition);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--surface-2); border-radius: var(--radius-sm); }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.activity-dot.order { background: var(--gold); }
.activity-dot.user  { background: #58a6ff; }
.activity-dot.system { background: var(--quiet); }
.activity-text { flex: 1; font-size: 13px; color: var(--text); line-height: 1.4; }
.activity-text small { display: block; color: var(--quiet); font-size: 11px; margin-top: 2px; }
.activity-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: var(--quiet);
    gap: 12px;
}
.activity-empty i { font-size: 36px; opacity: 0.4; }
.activity-empty p { font-size: 13px; }

/* ── Tables ─────────────────────────────────────────────────────── */
.dash-table-container { overflow-x: auto; }
.dash-card .dash-table-container { padding-inline: 8px; }
.table-header-row { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 12px; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table thead th {
    text-align: start;
    padding: 14px 16px;
    color: var(--quiet);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}
.dash-table tbody td {
    padding: 12px 16px;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table tbody tr:hover td { background: rgba(255,255,255,0.02); }

.dash-table .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}
.badge-success { color: var(--green); background: var(--green-wash); }
.badge-warning { color: var(--gold); background: var(--gold-wash); }
.badge-danger  { color: #ff6b6b; background: rgba(255, 107, 107, 0.12); }
.badge-info    { color: #58a6ff; background: rgba(88, 166, 255, 0.12); }

.dash-table .actions-cell { display: flex; gap: 6px; min-width: 32px; min-height: 32px; }

/* Kebab Menu */
.kebab-menu { position: relative; }
.kebab-dropdown {
    display: none;
    position: fixed;
    min-width: 160px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 500;
}
.kebab-dropdown.open { display: block; }
.kebab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
    text-align: start;
}
.kebab-item:hover { background: var(--surface-2); color: var(--text); }
.kebab-item i { font-size: 12px; width: 16px; text-align: center; }
.kebab-divider { height: 1px; background: var(--line); margin: 4px 0; }
.kebab-danger { color: #ff6b6b !important; }
.kebab-danger:hover { background: rgba(255, 107, 107, 0.1) !important; color: #ff6b6b !important; }

.customer-lookup-group {
    position: relative;
}

.customer-lookup-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    z-index: 40;
}

.customer-lookup-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: start;
    cursor: pointer;
}

.customer-lookup-item:hover,
.customer-lookup-item.active {
    background: var(--gold-wash);
}

.customer-lookup-item strong {
    font-size: 13px;
}

.customer-lookup-item small {
    color: var(--quiet);
    font-size: 11px;
}

.customer-selected-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.customer-selected-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
    background: var(--surface-2);
    display: grid;
    place-items: center;
}

.customer-selected-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.customer-selected-meta strong {
    display: block;
    font-size: 13px;
}

.customer-selected-meta small {
    color: var(--quiet);
    font-size: 11px;
}

.table-action-btn {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 11px;
    cursor: pointer;
    transition: var(--transition);
}
.table-action-btn:hover { color: var(--gold); border-color: var(--line-gold); background: var(--gold-wash); }
.table-action-btn.danger:hover {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
    background: rgba(255, 107, 107, 0.1);
}

/* ── Category Selector & Grid ───────────────────────────────────── */
.cat-selector { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.cat-chip:hover,
.cat-chip.active {
    color: #0c0e12;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229, 183, 87, 0.3);
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.cat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--surface-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: var(--transition);
}
.cat-card:hover { border-color: var(--line-gold); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.cat-card-left { display: flex; align-items: center; gap: 12px; }
.cat-card-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: var(--gold);
    background: var(--gold-wash);
    border: 1px solid var(--line-gold);
    border-radius: 10px;
    font-size: 16px;
}
.cat-card-info strong { display: block; color: var(--text); font-size: 14px; font-weight: 700; }
.cat-card-info small { color: var(--muted); font-size: 11px; }
.cat-card-actions { display: flex; gap: 4px; }

/* ── Roles Grid ─────────────────────────────────────────────────── */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.role-card {
    padding: 20px 22px;
    background: var(--surface-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: var(--transition);
}
.role-card:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.role-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.role-card-header h3 { font-size: 16px; font-weight: 800; color: var(--text); }
.role-card-header .role-badge {
    padding: 2px 10px;
    font-size: 10px;
    font-weight: 800;
    color: var(--gold);
    background: var(--gold-wash);
    border: 1px solid var(--line-gold);
    border-radius: var(--radius-full);
}
.role-card p { color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.role-perms { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.role-perm-tag {
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
}
.role-card-actions { display: flex; gap: 6px; }

/* ── Permissions Grid ───────────────────────────────────────────── */
.perms-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}
.perm-group {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
}
.perm-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.perm-group-title i { font-size: 11px; }
.perm-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--muted);
}
.perm-row .toggle-switch { flex-shrink: 0; }

/* ── Logs ───────────────────────────────────────────────────────── */
.log-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.log-filter-btn {
    padding: 6px 16px;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.log-filter-btn:hover,
.log-filter-btn.active {
    color: #0c0e12;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-color: var(--gold);
}
.logs-container { max-height: 500px; overflow-y: auto; }
.log-item { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.log-item:last-child { border-bottom: none; }
.log-time { font-size: 11px; color: var(--quiet); white-space: nowrap; min-width: 60px; padding-top: 2px; }
.log-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.log-content { flex: 1; font-size: 13px; color: var(--text); line-height: 1.4; }
.log-content small { color: var(--quiet); }

/* ── Rating Overview ────────────────────────────────────────────── */
.rating-overview {
    display: flex;
    gap: 40px;
    padding: 24px;
    background: var(--surface-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    align-items: center;
}
.rating-big { text-align: center; min-width: 140px; }
.rating-big-number { font-size: 56px; font-weight: 900; color: var(--text); line-height: 1; letter-spacing: -0.04em; }
.rating-stars-big { display: flex; justify-content: center; gap: 4px; margin: 8px 0; font-size: 20px; color: var(--gold); }
.rating-stars-big i { filter: drop-shadow(0 2px 6px rgba(229,183,87,0.3)); }
.rating-total { color: var(--muted); font-size: 13px; }
.rating-bars { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.rating-bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.rating-bar-row span:first-child { min-width: 36px; display: flex; align-items: center; gap: 4px; }
.rating-bar-row span:first-child i { font-size: 10px; color: var(--gold); }
.rating-bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: var(--radius-full); overflow: hidden; }
.rating-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: var(--radius-full); transition: width 0.5s var(--ease); }
.rating-bar-row span:last-child { min-width: 24px; text-align: end; color: var(--quiet); }

/* ── Reviews List ───────────────────────────────────────────────── */
.reviews-list { padding: 8px 24px; }
.review-item { display: flex; gap: 14px; padding: 16px 8px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.review-item:last-child { border-bottom: none; }
.review-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--gold-wash); border: 1px solid var(--line-gold);
    display: grid; place-items: center; font-size: 14px;
    font-weight: 700; color: var(--gold); flex-shrink: 0;
}
.review-body { flex: 1; }
.review-name { font-size: 14px; font-weight: 700; color: var(--text); }
.review-stars { display: inline-flex; gap: 2px; margin: 4px 0; font-size: 12px; color: var(--gold); }
.review-text { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 4px; }

/* ── Misc Cards ─────────────────────────────────────────────────── */
.misc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.misc-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: var(--surface-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: var(--transition);
}
.misc-card:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.misc-card-danger:hover { border-color: rgba(255, 107, 107, 0.3); }
.misc-card-icon {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    color: var(--gold); background: var(--gold-wash);
    border: 1px solid var(--line-gold); border-radius: var(--radius);
    font-size: 18px; flex-shrink: 0;
}
.misc-card-info { flex: 1; min-width: 0; }
.misc-card-info h3 { font-size: 14px; font-weight: 700; color: var(--text); }
.misc-card-info p { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.misc-input-group { display: flex; align-items: center; gap: 6px; }

/* ── Toggle Switch ──────────────────────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0;
    background: var(--surface-3); border: 1px solid var(--line);
    border-radius: var(--radius-full); cursor: pointer; transition: var(--transition);
}
.toggle-slider::before {
    content: ''; position: absolute; top: 2px; inset-inline-start: 2px;
    width: 16px; height: 16px; background: var(--muted);
    border-radius: 50%; transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--gold); border-color: var(--gold); }
.toggle-switch input:checked + .toggle-slider::before {
    background: #0c0e12; inset-inline-start: calc(100% - 18px);
}
.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
}

/* ── News Grid ──────────────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.news-card {
    padding: 22px; background: var(--surface-glass);
    border: 1px solid var(--line); border-radius: var(--radius);
    transition: var(--transition);
}
.news-card:hover { border-color: var(--line-gold); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.25); }
.news-card-tag { display: inline-block; padding: 2px 10px; font-size: 10px; font-weight: 700; border-radius: var(--radius-full); margin-bottom: 10px; }
.news-card-tag.announcement { color: var(--gold); background: var(--gold-wash); border: 1px solid var(--line-gold); }
.news-card-tag.update { color: #58a6ff; background: rgba(88,166,255,0.12); border: 1px solid rgba(88,166,255,0.2); }
.news-card-tag.promotion { color: var(--green); background: var(--green-wash); border: 1px solid rgba(46,204,113,0.2); }
.news-card-tag.event { color: #a855f7; background: rgba(168,85,247,0.12); border: 1px solid rgba(168,85,247,0.2); }
.news-card-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.news-card-content { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); }
.news-card-date { font-size: 11px; color: var(--quiet); }
.news-card-actions { display: flex; gap: 6px; }

/* ── Modal Styles ───────────────────────────────────────────────── */
.dash-modal {
    position: fixed; inset: 0; z-index: 300;
    display: grid; place-items: center; padding: 20px;
    visibility: hidden; opacity: 0;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
    transition: var(--transition);
}
.dash-modal.active { visibility: visible; opacity: 1; }
.dash-modal-content {
    width: min(520px, 100%); max-height: 90vh; overflow-y: auto;
    background: var(--surface-2); border: 1px solid var(--line-gold);
    border-radius: var(--radius-lg); box-shadow: 0 30px 80px rgba(0,0,0,0.7);
    animation: modalSlideIn 0.3s var(--ease);
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.dash-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.dash-modal-header h3 { font-size: 18px; font-weight: 800; color: var(--text); }
.dash-modal-close {
    width: 32px; height: 32px; display: grid; place-items: center;
    color: var(--muted); background: var(--surface-3);
    border: none; border-radius: 50%; font-size: 14px; cursor: pointer; transition: var(--transition);
}
.dash-modal-close:hover { color: var(--text); background: var(--gold); }
.dash-modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.dash-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); }

/* ── Form Elements ──────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 700; color: var(--muted); }
.dash-input { width: 100%; height: 46px; padding: 0 16px; color: var(--text); background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; transition: var(--transition); }
.dash-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-wash); }
.dash-textarea { height: auto; padding: 14px 16px; resize: vertical; min-height: 80px; font-family: inherit; }
.dash-select { height: 46px; padding: 0 16px; color: var(--text); background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; cursor: pointer; transition: var(--transition); }
.dash-select:focus { outline: none; border-color: var(--gold); }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; color: var(--text); background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; cursor: pointer; transition: var(--transition); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--muted); }

/* ── Toast ──────────────────────────────────────────────────────── */
.dash-toast {
    position: fixed; bottom: 28px; inset-inline-end: 28px; z-index: 9999;
    padding: 14px 24px; background: var(--surface-2);
    border: 1px solid var(--line-gold); border-radius: var(--radius);
    color: var(--text); font-size: 14px; font-weight: 700;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); backdrop-filter: blur(16px);
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: all 0.3s var(--ease); pointer-events: none;
}
.dash-toast.active { opacity: 1; visibility: visible; transform: translateY(0); }
.dash-toast .toast-icon { display: inline-flex; align-items: center; gap: 8px; }
.dash-toast .toast-icon i { color: var(--gold); }

/* ── Analytics Grid & Cards ─────────────────────────────────────── */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.analytics-card {
    background: var(--surface-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: var(--transition);
}
.analytics-card:hover {
    border-color: var(--line-gold);
}

.analytics-card-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
}
.analytics-card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-card-body {
    padding: 16px 22px;
    max-height: 340px;
    overflow-y: auto;
}

.analytics-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: var(--quiet);
    gap: 8px;
}
.analytics-empty i { font-size: 28px; opacity: 0.35; }
.analytics-empty p { font-size: 13px; }

/* ── Rank List Items ────────────────────────────────────────────── */
.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.rank-item:last-child { border-bottom: none; }

.rank-num {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    background: var(--gold-wash);
    color: var(--gold);
    border: 1px solid var(--line-gold);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.rank-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 10px;
    flex-shrink: 0;
}

.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-bar-track {
    height: 6px;
    background: var(--surface-2);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.rank-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.6s var(--ease);
    min-width: 2px;
}

.rank-meta {
    text-align: end;
    flex-shrink: 0;
    min-width: 70px;
}
.rank-meta strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.rank-meta small {
    display: block;
    font-size: 10px;
    color: var(--quiet);
    margin-top: 1px;
}

/* ── Source Donut Chart ─────────────────────────────────────────── */
.source-donut-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 8px 0;
}

.source-donut {
    position: relative;
    border-radius: 50%;
    flex-shrink: 0;
}

.source-donut-hole {
    position: absolute;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 50%;
    background: var(--surface-glass);
    border-radius: 50%;
}

.source-donut-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-label {
    flex: 1;
    color: var(--muted);
    font-weight: 500;
}

.legend-value {
    font-weight: 700;
    color: var(--text);
    font-size: 12px;
}

/* ── Form Row 2 Col ─────────────────────────────────────────────── */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .charts-grid { grid-template-columns: 1fr; }
    .rating-overview { flex-direction: column; align-items: center; gap: 24px; }
    .rating-bars { width: 100%; }
}
@media (max-width: 768px) {
    .dash-sidebar { transform: translateX(-100%); }
    .dash-sidebar.mobile-open { transform: translateX(0); }
    .dash-sidebar.mobile-open + .sidebar-mobile-overlay { display: block; }
    [dir="ltr"] .dash-sidebar { transform: translateX(-100%); }
    [dir="ltr"] .dash-sidebar.mobile-open { transform: translateX(0); }
    .dash-main { margin-inline-start: 0 !important; }
    .hamburger-dash-btn { display: grid !important; }
    .dash-panels { padding: 16px; }
    .panel-toolbar { flex-direction: column; }
    .topbar-search { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .topbar-title h1 { font-size: 18px; }
    .misc-grid, .news-grid, .roles-grid { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: 1fr 1fr; }
    .analytics-grid { grid-template-columns: 1fr; }
    .source-donut-wrap { flex-direction: column; align-items: center; }
    .form-row-2 { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
    .stats-grid, .cat-grid { grid-template-columns: 1fr; }
    .perms-grid { max-height: none; }
}

/* ── Icon Picker ────────────────────────────────────────────────── */
.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-option {
    width: 36px; height: 36px; border-radius: 8px;
    border: 2px solid var(--line); background: var(--surface);
    color: var(--text); display: grid; place-items: center; cursor: pointer;
    transition: .15s;
}
.icon-option:hover { border-color: var(--gold); color: var(--gold); }
.icon-option.active { border-color: var(--gold); color: var(--gold); background: var(--gold)11; }

/* ── File Upload Trigger ───────────────────────────────────────── */
.file-upload-trigger {
    display: block; cursor: pointer;
}
.file-upload-preview {
    width: 100%; min-height: 80px; border: 2px dashed var(--line);
    border-radius: 10px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 6px;
    color: var(--muted); font-size: 12px; transition: .2s;
    overflow: hidden; position: relative;
}
.file-upload-preview:hover { border-color: var(--gold); color: var(--gold); }
.file-upload-preview i { font-size: 24px; }
.file-upload-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ── Color Picker ───────────────────────────────────────────────── */
.color-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.color-option {
    width: 32px; height: 32px; border-radius: 50%;
    border: 3px solid transparent; cursor: pointer; transition: .15s;
}
.color-option:hover { transform: scale(1.15); }
.color-option.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }

/* ── Light Theme Overrides ──────────────────────────────────────── */
body.light-theme .dash-sidebar { background: var(--surface); border-color: var(--line); }
body.light-theme .dash-topbar { background: var(--surface-glass); }
body.light-theme .stat-card,
body.light-theme .chart-card,
body.light-theme .dash-card,
body.light-theme .role-card,
body.light-theme .news-card,
body.light-theme .misc-card,
body.light-theme .cat-card,
body.light-theme .rating-overview { background: var(--surface-glass); }

body.light-theme .dash-input,
body.light-theme .dash-select,
body.light-theme .topbar-search-input,
body.light-theme .cat-chip,
body.light-theme .log-filter-btn,
body.light-theme .sidebar-icon-btn,
body.light-theme .sidebar-avatar,
body.light-theme .dash-tab-btn .tab-icon,
body.light-theme .btn-secondary { background: var(--surface-2); color: var(--text); }

body.light-theme .dash-table thead th { background: var(--surface-2); }
body.light-theme .dash-modal-content { background: var(--surface); }
body.light-theme .analytics-card,
body.light-theme .source-donut-hole { background: var(--surface-glass); }

/* ── Receipt / Invoice Styles ───────────────────────────────────── */
.receipt-wrapper {
    padding: 24px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.receipt-header {
    text-align: center;
    border-bottom: 2px dashed var(--line-gold);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.receipt-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.receipt-brand img {
    width: 34px;
    height: 34px;
    padding: 6px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--gold);
}

.receipt-store-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: -0.03em;
}

.receipt-store-tagline {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

.receipt-invoice-number {
    margin-top: 12px;
    font-size: 13px;
    color: var(--quiet);
}

.receipt-invoice-number strong {
    display: block;
    font-size: 20px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: 1px;
    margin-top: 4px;
}

.receipt-details {
    margin-bottom: 16px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

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

.receipt-label {
    color: var(--quiet);
    font-weight: 600;
    font-size: 12px;
}

.receipt-value {
    font-weight: 700;
    color: var(--text);
    text-align: end;
}

.receipt-amount {
    font-size: 20px;
    color: var(--gold);
    font-weight: 900;
}

.receipt-refund-status {
    margin-top: 16px;
    padding: 14px;
    background: rgba(255, 107, 107, 0.06);
    border: 1px solid rgba(255, 107, 107, 0.15);
    border-radius: var(--radius-sm);
}

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed var(--line);
}

.receipt-qr-placeholder {
    font-size: 52px;
    color: var(--quiet);
    opacity: 0.3;
    margin-bottom: 8px;
}

.receipt-legal-text {
    font-size: 10px;
    color: var(--quiet);
    line-height: 1.5;
}

/* ── Invoice Number Badge in Table ──────────────────────────────── */
.invoice-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 0.5px;
    color: var(--gold);
    background: var(--gold-wash);
    border: 1px solid var(--line-gold);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.invoice-badge:hover {
    background: var(--gold-wash-strong);
    transform: translateY(-1px);
}

.refund-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.refund-badge-requested {
    color: #f39c12;
    background: rgba(243, 156, 18, 0.12);
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.refund-badge-approved {
    color: var(--green);
    background: var(--green-wash);
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.refund-badge-rejected {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.2);
}

/* ── Enhanced Receipt: Buyer Info & Sections ──────────────────── */
.receipt-inner { font-family:inherit; }
.receipt-section { margin-bottom:16px; }
.receipt-section-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--gold); margin-bottom:8px; border-bottom:1px solid var(--line); padding-bottom:4px; }
.receipt-buyer-info { display:flex; align-items:center; gap:12px; padding:8px 0; }
.receipt-buyer-avatar { width:36px; height:36px; border-radius:50%; background:var(--surface); display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0; }
.receipt-buyer-avatar img { width:100%; height:100%; object-fit:cover; }
.receipt-buyer-avatar i { font-size:18px; color:var(--gold); }
.receipt-buyer-details { flex:1; }
.receipt-buyer-name { font-weight:700; font-size:13px; color:var(--text); }
.receipt-buyer-email { font-size:11px; color:var(--muted); }
.receipt-client-label { font-size:11px; color:var(--muted); margin-top:2px; }
.receipt-refund-box { margin-top:12px; padding:12px; background:rgba(255,107,107,0.08); border:1px solid rgba(255,107,107,0.2); border-radius:8px; }
.receipt-legal { font-size:11px; color:var(--muted); }
.receipt-legal-small { font-size:10px; color:var(--quiet); margin-top:4px; }

/* ── Receipt Modal Kebab Menu ──────────────────────────────────── */
.receipt-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.receipt-kebab-wrapper {
    position: relative;
}

.receipt-kebab-btn {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.receipt-kebab-btn:hover {
    color: var(--gold);
    border-color: var(--line-gold);
    background: var(--gold-wash);
}

.receipt-kebab-dropdown {
    position: fixed;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 510;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px) scale(0.96);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    pointer-events: none;
}

.receipt-kebab-dropdown.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.receipt-kebab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: start;
}

.receipt-kebab-item:hover {
    background: var(--surface-2);
    color: var(--text);
}

.receipt-kebab-item i {
    font-size: 12px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.receipt-kebab-divider {
    height: 1px;
    background: var(--line);
    margin: 4px 0;
}

.receipt-kebab-danger {
    color: #ff6b6b !important;
}

.receipt-kebab-danger:hover {
    background: rgba(255, 107, 107, 0.1) !important;
    color: #ff6b6b !important;
}

body.light-theme .receipt-kebab-dropdown {
    background: var(--surface);
    border-color: var(--line);
}

body.light-theme .receipt-kebab-item:hover {
    background: var(--surface-2);
    color: var(--text);
}
