* {
       margin: 0;
       padding: 0;
       box-sizing: border-box;
   }
   
   :root {
       /* Corporate Dark Theme */
       --bg-primary: #0d1117;
       --bg-secondary: #161b22;
       --bg-tertiary: #1c2128;
       --bg-elevated: #22272e;
       --bg-hover: #2d333b;
       
       /* Professional Blue Palette */
       --primary: #0969da;
       --primary-hover: #0860ca;
       --primary-active: #0757ba;
       --primary-light: #1f6feb;
       
       /* Status Colors */
       --success: #1f883d;
       --success-light: #26a641;
       --warning: #bf8700;
       --warning-light: #d29922;
       --danger: #cf222e;
       --danger-light: #e5534b;
       --info: #0969da;
       
       /* Text Colors */
       --text-primary: #e6edf3;
       --text-secondary: #8b949e;
       --text-tertiary: #6e7681;
       --text-link: #2f81f7;
       
       /* Borders */
       --border-default: #30363d;
       --border-muted: #21262d;
       --border-emphasis: #444c56;
       
       /* Shadows */
       --shadow-sm: 0 1px 0 rgba(1, 4, 9, 0.1);
       --shadow-md: 0 3px 6px rgba(1, 4, 9, 0.12);
       --shadow-lg: 0 8px 24px rgba(1, 4, 9, 0.12);
       --shadow-xl: 0 16px 32px rgba(1, 4, 9, 0.16);
       
       /* Fonts: Inter for English. Arabic UI uses Cairo (same as admin) then Almarai. */
       --font-sans: "Inter", "Cairo", "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
       --font-arabic: "Cairo", "Almarai", sans-serif;
       --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
   }
   
   body {
       font-family: var(--font-sans);
       background: var(--bg-primary);
       color: var(--text-primary);
       line-height: 1.5;
       -webkit-font-smoothing: antialiased;
   }
   
   body.rtl {
       direction: rtl;
       font-family: var(--font-arabic);
       font-weight: 500;
       letter-spacing: 0;
       -webkit-font-smoothing: antialiased;
       -moz-osx-font-smoothing: grayscale;
       text-rendering: optimizeLegibility;
   }

   /* Arabic UI: Cairo like the admin panel — thicker, clearer on dark UI. Layout stays LTR. */
   html[lang="ar"],
   html.lang-ar {
       --font-sans: "Cairo", "Almarai", sans-serif;
       --font-arabic: "Cairo", "Almarai", sans-serif;
       --text-secondary: #c9d1d9;
       --text-tertiary: #8b949e;
       font-family: var(--font-arabic);
   }
   html[lang="ar"] body,
   html.lang-ar body {
       font-family: var(--font-arabic);
       font-size: 14px;
       font-weight: 600;
       line-height: 1.7;
       letter-spacing: 0;
       -webkit-font-smoothing: auto;
       -moz-osx-font-smoothing: auto;
       text-rendering: optimizeLegibility;
   }
   html[lang="ar"] *:not(code):not(pre):not(kbd):not(.license-code),
   html.lang-ar *:not(code):not(pre):not(kbd):not(.license-code) {
       letter-spacing: 0 !important;
   }
   html[lang="ar"] h1,
   html[lang="ar"] h2,
   html[lang="ar"] h3,
   html[lang="ar"] h4,
   html[lang="ar"] h5,
   html[lang="ar"] h6,
   html.lang-ar h1,
   html.lang-ar h2,
   html.lang-ar h3,
   html.lang-ar h4,
   html.lang-ar h5,
   html.lang-ar h6 {
       font-family: var(--font-arabic);
       font-weight: 800;
       line-height: 1.5;
   }
   html[lang="ar"] button,
   html[lang="ar"] .btn,
   html[lang="ar"] .button,
   html[lang="ar"] .ds-btn,
   html[lang="ar"] .nav-links a,
   html[lang="ar"] input,
   html[lang="ar"] textarea,
   html[lang="ar"] select,
   html.lang-ar button,
   html.lang-ar .btn,
   html.lang-ar .button,
   html.lang-ar .ds-btn,
   html.lang-ar .nav-links a,
   html.lang-ar input,
   html.lang-ar textarea,
   html.lang-ar select {
       font-family: var(--font-arabic);
       font-weight: 700;
   }
   html[lang="ar"] .nav-links a,
   html.lang-ar .nav-links a {
       font-size: 14px;
   }
   html[lang="ar"] #dhGreeting,
   html.lang-ar #dhGreeting {
       font-family: var(--font-arabic);
       font-size: 31px;
       font-weight: 800;
       line-height: 1.45;
   }
   html[lang="ar"] .section-title,
   html[lang="ar"] .dh-kicker,
   html.lang-ar .section-title,
   html.lang-ar .dh-kicker {
       font-family: var(--font-arabic);
       font-weight: 800;
       line-height: 1.5;
   }
   html[lang="ar"] .dh-kicker,
   html.lang-ar .dh-kicker {
       font-size: 12px;
       font-weight: 700;
   }
   html[lang="ar"] .dh-hero-meta,
   html[lang="ar"] .dh-discord-nudge-copy p,
   html[lang="ar"] .dh-explore-copy p,
   html[lang="ar"] .stat-label,
   html[lang="ar"] .stat-desc,
   html[lang="ar"] .pcard-meta dt,
   html[lang="ar"] .pcard-meta dd,
   html[lang="ar"] .pcard-life > span,
   html[lang="ar"] .pcard-tags span,
   html[lang="ar"] .pcard-state,
   html.lang-ar .dh-hero-meta,
   html.lang-ar .dh-discord-nudge-copy p,
   html.lang-ar .dh-explore-copy p,
   html.lang-ar .stat-label,
   html.lang-ar .stat-desc,
   html.lang-ar .pcard-meta dt,
   html.lang-ar .pcard-meta dd,
   html.lang-ar .pcard-life > span,
   html.lang-ar .pcard-tags span,
   html.lang-ar .pcard-state {
       font-size: 12.5px;
       font-weight: 600;
       line-height: 1.7;
   }
   html[lang="ar"] .logo-lockup,
   html.lang-ar .logo-lockup {
       gap: 1px;
       line-height: 1.05;
   }
   html[lang="ar"] .logo-lockup [data-lang],
   html.lang-ar .logo-lockup [data-lang],
   html[lang="ar"] .logo-lockup small,
   html.lang-ar .logo-lockup small {
       direction: ltr;
       text-align: left;
       line-height: 1.15 !important;
   }
   html[lang="ar"] .logo-lockup small,
   html.lang-ar .logo-lockup small {
       font-size: 10.5px !important;
       font-weight: 600 !important;
       letter-spacing: 0.01em;
       text-transform: none;
       margin: 0;
       padding: 0;
   }
   html[lang="ar"] .dh-discord-nudge-copy strong,
   html[lang="ar"] .ds-btn,
   html[lang="ar"] .pcard-id h3,
   html.lang-ar .dh-discord-nudge-copy strong,
   html.lang-ar .ds-btn,
   html.lang-ar .pcard-id h3 {
       font-size: 14px;
       font-weight: 800;
   }
   html[lang="ar"] .section-title,
   html.lang-ar .section-title {
       font-size: 18px;
   }
   html[lang="ar"] code,
   html[lang="ar"] pre,
   html[lang="ar"] kbd,
   html[lang="ar"] .license-code,
   html.lang-ar code,
   html.lang-ar pre,
   html.lang-ar kbd,
   html.lang-ar .license-code {
       font-family: var(--font-mono);
   }

   /* Mixed Arabic + English: isolate text only — do not flip flex/grid layout */
   html[lang="ar"] [data-lang],
   html[lang="ar"] p,
   html[lang="ar"] strong,
   html[lang="ar"] small,
   html[lang="ar"] label,
   html[lang="ar"] .stat-label,
   html[lang="ar"] .stat-change,
   html[lang="ar"] .toast-title,
   html[lang="ar"] .toast-message,
   html[lang="ar"] .dh-discord-nudge-copy p,
   html[lang="ar"] .dh-discord-nudge-copy strong,
   html[lang="ar"] .pcard-meta dt,
   html[lang="ar"] .pcard-meta dd,
   html.lang-ar [data-lang],
   html.lang-ar p,
   html.lang-ar strong,
   html.lang-ar small,
   html.lang-ar label,
   html.lang-ar .stat-label,
   html.lang-ar .stat-change,
   html.lang-ar .toast-title,
   html.lang-ar .toast-message,
   html.lang-ar .dh-discord-nudge-copy p,
   html.lang-ar .dh-discord-nudge-copy strong,
   html.lang-ar .pcard-meta dt,
   html.lang-ar .pcard-meta dd {
       direction: rtl;
       unicode-bidi: isolate;
       text-align: left;
   }
   html[lang="ar"] .section-title,
   html[lang="ar"] .dh-products-title,
   html[lang="ar"] .dh-products-head,
   html[lang="ar"] .dh-section-kicker,
   html[lang="ar"] .dh-preview-all,
   html[lang="ar"] .dh-preview-head,
   html[lang="ar"] .dh-preview-row,
   html[lang="ar"] .dh-home-preview,
   html[lang="ar"] .dh-products-tools,
   html[lang="ar"] .section-header,
   html[lang="ar"] .pcard-meta,
   html[lang="ar"] .pcard-meta > div,
   html[lang="ar"] .pcard-head,
   html[lang="ar"] .pcard-id,
   html[lang="ar"] .pcard-order,
   html[lang="ar"] .pcard-foot,
   html[lang="ar"] .pcard-links,
   html[lang="ar"] h1,
   html[lang="ar"] h2,
   html[lang="ar"] h3,
   html[lang="ar"] .nav-links,
   html[lang="ar"] .filter-group,
   html[lang="ar"] .toast,
   html[lang="ar"] .toast-inner,
   html[lang="ar"] .toast-container,
   html.lang-ar .section-title,
   html.lang-ar .dh-products-title,
   html.lang-ar .dh-products-head,
   html.lang-ar .dh-section-kicker,
   html.lang-ar .dh-preview-all,
   html.lang-ar .dh-preview-head,
   html.lang-ar .dh-preview-row,
   html.lang-ar .dh-home-preview,
   html.lang-ar .dh-products-tools,
   html.lang-ar .section-header,
   html.lang-ar .pcard-meta,
   html.lang-ar .pcard-meta > div,
   html.lang-ar .pcard-head,
   html.lang-ar .pcard-id,
   html.lang-ar .pcard-order,
   html.lang-ar .pcard-foot,
   html.lang-ar .pcard-links,
   html.lang-ar h1,
   html.lang-ar h2,
   html.lang-ar h3,
   html.lang-ar .nav-links,
   html.lang-ar .filter-group,
   html.lang-ar .toast,
   html.lang-ar .toast-inner,
   html.lang-ar .toast-container {
       direction: ltr;
       unicode-bidi: isolate;
   }
   html[lang="ar"] #dhGreeting,
   html.lang-ar #dhGreeting {
       direction: rtl;
       unicode-bidi: isolate;
       text-align: left;
   }
   html[lang="ar"] input,
   html[lang="ar"] textarea,
   html[lang="ar"] code,
   html[lang="ar"] pre,
   html[lang="ar"] kbd,
   html[lang="ar"] .stat-value,
   html[lang="ar"] .pcard-ip,
   html[lang="ar"] .license-code,
   html[lang="ar"] .dh-hero-email,
   html.lang-ar input,
   html.lang-ar textarea,
   html.lang-ar code,
   html.lang-ar pre,
   html.lang-ar kbd,
   html.lang-ar .stat-value,
   html.lang-ar .pcard-ip,
   html.lang-ar .license-code,
   html.lang-ar .dh-hero-email {
       direction: ltr;
       unicode-bidi: isolate;
       text-align: left;
   }
   
   
   
   /* Professional Header */
   .main-header {
       position: fixed;
       top: 0; left: 0; right: 0;
       z-index: 1000;
       background: rgba(22, 27, 34, 0.9);
       border-bottom: 1px solid var(--border-default);
       box-shadow: var(--shadow-sm);
       backdrop-filter: blur(16px);
       -webkit-backdrop-filter: blur(16px);
   }
   
   .header-container {
       max-width: 1280px;
       margin: 0 auto;
       padding: 0 24px;
       height: 64px;
       display: flex;
       justify-content: space-between;
       align-items: center;
   }
   
   .logo {
       display: flex;
       align-items: center;
       gap: 12px;
       font-weight: 600;
       font-size: 16px;
       color: var(--text-primary);
       cursor: pointer;
       transition: opacity 0.2s;
   }
   
   .logo:hover {
       opacity: 0.8;
   }
   
   .logo-icon {
       width: 32px;
       height: 32px;
       background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
       border-radius: 6px;
       display: flex;
       align-items: center;
       justify-content: center;
       color: white;
       font-size: 18px;
       box-shadow: 0 2px 8px rgba(9, 105, 218, 0.3);
   }
   
   .header-nav {
       display: flex;
       align-items: center;
       gap: 16px;
   }
   
   .nav-links {
       display: flex;
       gap: 4px;
       list-style: none;
       margin: 0 16px 0 0;
   }
   
   body.rtl .nav-links {
       margin: 0 0 0 16px;
   }
   
   .nav-links a {
       padding: 8px 16px;
       color: var(--text-secondary);
       text-decoration: none;
       font-weight: 500;
       font-size: 14px;
       border-radius: 6px;
       transition: all 0.2s;
   }
   
   .nav-links a:hover {
       color: var(--text-primary);
       background: var(--bg-tertiary);
   }
   
   .nav-links a.active {
       color: var(--text-primary);
       background: var(--bg-elevated);
   }
   
   .search-container {
       position: relative;
       width: 300px;
   }
   
   .search-input {
       width: 100%;
       height: 36px;
       padding: 0 12px 0 36px;
       background: var(--bg-tertiary);
       border: 1px solid var(--border-default);
       border-radius: 6px;
       color: var(--text-primary);
       font-size: 14px;
       transition: all 0.2s;
   }
   
   body.rtl .search-input {
       padding: 0 36px 0 12px;
   }
   
   .search-input:focus {
       outline: none;
       border-color: var(--primary);
       background: var(--bg-primary);
       box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.12);
   }
   
   .search-icon {
       position: absolute;
       left: 12px;
       top: 50%;
       transform: translateY(-50%);
       color: var(--text-tertiary);
       font-size: 16px;
       pointer-events: none;
   }
   
   body.rtl .search-icon {
       left: auto;
       right: 12px;
   }
   
   .header-actions {
       display: flex;
       align-items: center;
       gap: 8px;
   }
   
   .icon-btn {
       width: 36px;
       height: 36px;
       background: transparent;
       border: 1px solid var(--border-default);
       border-radius: 6px;
       display: flex;
       align-items: center;
       justify-content: center;
       cursor: pointer;
       color: var(--text-secondary);
       font-size: 16px;
       transition: all 0.2s;
       position: relative;
   }
   
   .icon-btn:hover {
       background: var(--bg-hover);
       border-color: var(--border-emphasis);
       color: var(--text-primary);
       transform: translateY(-1px);
   }
   
   .icon-btn.active {
       background: var(--bg-elevated);
       border-color: var(--primary);
       color: var(--primary);
   }
   
   .notification-badge {
       position: absolute;
       top: -4px;
       right: -4px;
       background: var(--danger);
       color: white;
       border-radius: 10px;
       padding: 2px 6px;
       font-size: 11px;
       font-weight: 600;
       line-height: 1;
       min-width: 18px;
       text-align: center;
       box-shadow: 0 2px 4px rgba(207, 34, 46, 0.4);
       animation: pulse 2s ease-in-out infinite;
   }
   
   @keyframes pulse {
       0%, 100% { transform: scale(1); }
       50% { transform: scale(1.1); }
   }
   
   /* ✅ NEW: Notifications Dropdown */
   /* ═══════ Notifications Panel ═══════ */
   .notifications-dropdown {
       position: absolute; top: calc(100% + 10px); right: 0;
       width: 355px;
       background: #161b22;
       border: 1px solid #30363d;
       border-radius: 12px;
       box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02);
       opacity: 0; visibility: hidden;
       transform: translateY(-6px) scale(0.98);
       transform-origin: top right;
       transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
       z-index: 1001; overflow: hidden;
   }
   .notifications-dropdown.show {
       opacity: 1; visibility: visible; transform: translateY(0) scale(1);
   }
   .notif-panel-header {
       padding: 13px 16px 0; border-bottom: 1px solid #30363d;
   }
   .notif-panel-title-row {
       display: flex; align-items: center;
       justify-content: space-between; margin-bottom: 10px;
   }
   .notif-panel-title {
       display: flex; align-items: center; gap: 7px;
       font-size: 13px; font-weight: 700; color: #e6edf3;
   }
   .notif-mark-all {
       font-size: 11.5px; font-weight: 600; color: #58a6ff;
       background: none; border: none; cursor: pointer; font-family: inherit;
       padding: 3px 8px; border-radius: 6px; transition: background 0.15s;
   }
   .notif-mark-all:hover { background: rgba(88,166,255,0.1); }
   .notif-tabs { display: flex; margin-bottom: -1px; }
   .notif-tab {
       padding: 6px 13px; font-size: 12px; font-weight: 600;
       color: #8b949e; background: none; border: none;
       border-bottom: 2px solid transparent;
       cursor: pointer; font-family: inherit;
       transition: color 0.15s, border-color 0.15s;
       display: flex; align-items: center; gap: 5px;
   }
   .notif-tab:hover { color: #e6edf3; }
   .notif-tab.active { color: #e6edf3; border-bottom-color: #0969da; }
   .notif-tab-count {
       display: inline-flex; align-items: center; justify-content: center;
       min-width: 16px; height: 16px; padding: 0 4px;
       background: #0969da; color: white;
       font-size: 9.5px; font-weight: 700; border-radius: 8px;
   }
   .notif-tab-count:empty { display: none; }
   .notif-tab[data-notif-filter="tickets"] .notif-tab-count { background: #6e40c9; }
   .notification-icon.ticket { background: rgba(110,64,201,0.14); color: #d2a8ff; border-color: rgba(110,64,201,0.28); }
   .notifications-list {
       max-height: 320px; overflow-y: auto;
       scrollbar-width: thin; scrollbar-color: #30363d transparent;
   }
   .notifications-list::-webkit-scrollbar { width: 3px; }
   .notifications-list::-webkit-scrollbar-thumb { background: #30363d; border-radius: 2px; }
   .notification-item {
       display: flex; align-items: flex-start; gap: 11px;
       padding: 12px 16px; border-bottom: 1px solid #21262d;
       cursor: pointer; transition: background 0.15s; position: relative;
   }
   .notification-item:last-child { border-bottom: none; }
   .notification-item:hover { background: #1c2128; }
   .notification-item.unread { background: rgba(9,105,218,0.05); }
   .notification-item.unread:hover { background: rgba(9,105,218,0.09); }
   .notification-item.unread::before {
       content: ''; position: absolute;
       left: 0; top: 0; bottom: 0;
       width: 3px; background: #0969da; border-radius: 0 2px 2px 0;
   }
   .notification-icon {
       width: 34px; height: 34px; border-radius: 9px;
       display: flex; align-items: center; justify-content: center;
       font-size: 15px; flex-shrink: 0; border: 1px solid transparent;
   }
   .notification-icon.warning { background: rgba(191,135,0,0.12); color: #d29922; border-color: rgba(191,135,0,0.2); }
   .notification-icon.danger  { background: rgba(207,34,46,0.12);  color: #f85149; border-color: rgba(207,34,46,0.2); }
   .notification-icon.success { background: rgba(31,136,61,0.12);  color: #3fb950; border-color: rgba(31,136,61,0.2); }
   .notification-icon.info    { background: rgba(9,105,218,0.12);  color: #58a6ff; border-color: rgba(9,105,218,0.2); }
   .notification-content { flex: 1; min-width: 0; }
   .notification-title {
       font-size: 13px; font-weight: 700; color: #e6edf3; margin-bottom: 2px;
       white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
   }
   .notification-message {
       font-size: 12px; color: #8b949e; line-height: 1.4;
       display: -webkit-box; -webkit-line-clamp: 2;
       -webkit-box-orient: vertical; overflow: hidden;
   }
   .notification-time { font-size: 11px; color: #6e7681; margin-top: 4px; }
   .notif-unread-dot {
       width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
       background: #0969da; margin-top: 4px;
       box-shadow: 0 0 6px rgba(9,105,218,0.5);
   }
   .no-notifications { padding: 40px 20px; text-align: center; }
   .no-notifications-icon {
       width: 44px; height: 44px; background: #1c2128;
       border: 1px solid #30363d; border-radius: 12px;
       display: flex; align-items: center; justify-content: center;
       margin: 0 auto 12px; font-size: 20px; opacity: 0.5;
   }
   .no-notifications-text { color: #8b949e; font-size: 13px; font-weight: 600; }
   .notif-panel-footer {
       padding: 9px 16px; border-top: 1px solid #30363d;
       display: flex; justify-content: center;
   }
   .notif-footer-btn {
       font-size: 12px; font-weight: 600; color: #8b949e;
       background: none; border: none; cursor: pointer; font-family: inherit;
       padding: 4px 12px; border-radius: 6px; transition: background 0.15s, color 0.15s;
   }
   .notif-footer-btn:hover { background: #1c2128; color: #e6edf3; }
   .no-notifications-text {
       color: var(--text-secondary);
       font-size: 14px;
   }
   
   /* ✅ NEW: User Menu Dropdown */
   .user-menu {
       display: flex;
       align-items: center;
       gap: 8px;
       padding: 4px 4px 4px 12px;
       background: transparent;
       border: 1px solid var(--border-default);
       border-radius: 6px;
       cursor: pointer;
       transition: all 0.2s;
       position: relative;
   }
   
   body.rtl .user-menu {
       padding: 4px 12px 4px 4px;
   }
   
   .user-menu:hover {
       background: var(--bg-hover);
       border-color: var(--border-emphasis);
   }
   
   .user-menu.active {
       background: var(--bg-elevated);
       border-color: var(--primary);
   }
   
   .user-avatar {
       width: 28px;
       height: 28px;
       border-radius: 50%;
       background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
       display: flex;
       align-items: center;
       justify-content: center;
       color: white;
       font-weight: 600;
       font-size: 12px;
   }
   
   .user-name {
       font-weight: 500;
       font-size: 14px;
       color: var(--text-primary);
   }
   
   .user-menu-dropdown {
       position: absolute;
       top: calc(100% + 8px);
       right: 0;
       width: 240px;
       background: var(--bg-secondary);
       border: 1px solid var(--border-default);
       border-radius: 8px;
       box-shadow: var(--shadow-xl);
       opacity: 0;
       visibility: hidden;
       transform: translateY(-10px);
       transition: all 0.2s;
       z-index: 1000;
       overflow: hidden;
   }
   
   .user-menu-dropdown.show {
       opacity: 1;
       visibility: visible;
       transform: translateY(0);
   }
   
   .user-menu-header {
       padding: 16px;
       border-bottom: 1px solid var(--border-default);
   }
   
   .user-menu-name {
       font-size: 14px;
       font-weight: 600;
       color: var(--text-primary);
       margin-bottom: 4px;
   }
   
   .user-menu-email {
       font-size: 12px;
       color: var(--text-secondary);
   }
   
   .user-menu-list {
       padding: 8px 0;
   }
   
   .user-menu-item {
       padding: 10px 16px;
       display: flex;
       align-items: center;
       gap: 12px;
       cursor: pointer;
       transition: background 0.2s;
       border: none;
       background: none;
       width: 100%;
       text-align: left;
       font-family: inherit;
       color: var(--text-primary);
   }
   
   .user-menu-item:hover {
       background: var(--bg-tertiary);
   }
   
   .user-menu-item-icon {
       display: inline-flex;
       align-items: center;
       justify-content: center;
       width: 16px;
       height: 16px;
       flex: 0 0 16px;
       color: var(--text-secondary);
   }
   .ui-ico {
       width: 16px;
       height: 16px;
       display: block;
   }
   .pg-deco-ico .ui-ico,
   .alp-mb-prod-icon .ui-ico {
       width: 14px;
       height: 14px;
   }
   .empty-icon .ui-ico {
       width: 42px;
       height: 42px;
       margin: 0 auto;
   }
   
   .user-menu-item-text {
       font-size: 14px;
       font-weight: 500;
   }
   
   .user-menu-separator {
       height: 1px;
       background: var(--border-default);
       margin: 8px 0;
   }
   
   .user-menu-item.danger {
       color: var(--danger-light);
   }
   
   .user-menu-item.danger .user-menu-item-icon {
       color: var(--danger-light);
   }
   
   /* ═══════════════════════════════════════════════════════════
      AUTH PAGE — v3 — Full dark, both panels harmonious
      ═══════════════════════════════════════════════════════════ */

   /* ─── Wrapper ─── */
   .auth-wrapper {
       display: flex;
       min-height: 100vh;
       background: #080e18;
       position: relative;  /* needed for pg-deco absolute positioning */
   }

   /* ════════════════════════════════════
      LEFT PANEL
      ════════════════════════════════════ */
   .auth-left {
       flex: 0 0 460px;
       background: #080e18;
       border-right: 1px solid rgba(48,54,61,0.6);
       display: flex;
       align-items: center;
       justify-content: center;
       padding: 48px 40px;
       position: relative;
       overflow: hidden;
   }
   /* Top accent bar */
   .auth-left::before {
       content: '';
       position: absolute;
       top: 0; left: 0; right: 0; height: 2px;
       background: linear-gradient(90deg, #0969da 0%, #58a6ff 55%, transparent 100%);
       z-index: 3;
   }
   /* Blobs */
   .alp-blob {
       position: absolute; border-radius: 50%;
       pointer-events: none;
   }
   .alp-blob-1 {
       width: 500px; height: 400px;
       top: -140px; right: -140px;
       background: radial-gradient(ellipse, rgba(9,105,218,0.13) 0%, transparent 65%);
   }
   .alp-blob-2 {
       width: 360px; height: 360px;
       bottom: -100px; left: -80px;
       background: radial-gradient(ellipse, rgba(88,166,255,0.07) 0%, transparent 65%);
   }
   /* Dot grid */
   .alp-grid {
       position: absolute; inset: 0;
       background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
       background-size: 24px 24px;
       pointer-events: none;
   }
   .alp-inner {
       position: relative; z-index: 2;
       width: 100%;
   }

   /* Brand */
   .alp-brand {
       display: flex; align-items: center; gap: 11px;
       margin-bottom: 32px;
   }
   .alp-brand-icon {
       width: 38px; height: 38px;
       background: linear-gradient(135deg, #0969da 0%, #1f6feb 100%);
       border-radius: 10px;
       display: flex; align-items: center; justify-content: center;
       box-shadow: 0 4px 16px rgba(9,105,218,0.4);
       flex-shrink: 0;
   }
   .alp-brand-name {
       font-size: 14px; font-weight: 800;
       color: #e6edf3;
   }
   .alp-brand-tag {
       font-size: 11px; color: #6e7681; margin-top: 1px;
   }

   /* Headline */
   .alp-headline { margin-bottom: 22px; }
   .alp-eyebrow {
       font-size: 10px; font-weight: 700; letter-spacing: 1.3px;
       text-transform: uppercase; color: #58a6ff;
       margin-bottom: 10px;
       display: flex; align-items: center; gap: 8px;
   }
   .alp-eyebrow::before {
       content: ''; width: 16px; height: 2px;
       background: #58a6ff; border-radius: 2px;
   }
   .alp-title {
       font-size: 26px; font-weight: 900; color: #e6edf3;
       line-height: 1.22; margin-bottom: 10px; letter-spacing: -0.4px;
   }
   .alp-title-accent {
       background: linear-gradient(90deg, #58a6ff 0%, #79c0ff 100%);
       -webkit-background-clip: text; -webkit-text-fill-color: transparent;
       background-clip: text;
   }
   .alp-desc { font-size: 13px; color: #8b949e; line-height: 1.6; }

   /* ── Dashboard mockup ── */
   .alp-mockup {
       background: #161b22;
       border: 1px solid #30363d;
       border-radius: 10px;
       overflow: hidden;
       margin-bottom: 22px;
       box-shadow: 0 12px 40px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.04);
   }
   /* Browser bar */
   .alp-mb-bar {
       display: flex; align-items: center; gap: 0;
       padding: 7px 12px;
       background: #0d1117;
       border-bottom: 1px solid #30363d;
   }
   .alp-mb-dots { display: flex; gap: 5px; margin-right: 10px; }
   .alp-dot {
       width: 7px; height: 7px; border-radius: 50%;
   }
   .alp-dot.red    { background: #ff5f57; }
   .alp-dot.yellow { background: #febc2e; }
   .alp-dot.green  { background: #28c840; }
   .alp-mb-url {
       flex: 1; display: flex; align-items: center; justify-content: center;
       gap: 5px; font-size: 9.5px; color: #6e7681;
       font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
   }
   /* Mockup body */
   .alp-mb-body {
       padding: 11px; display: flex; flex-direction: column; gap: 7px;
   }
   /* Stat cards */
   .alp-mb-stats {
       display: grid; grid-template-columns: repeat(4,1fr); gap: 5px;
   }
   .alp-mb-stat {
       padding: 8px 4px; border-radius: 7px;
       text-align: center; border: 1px solid transparent;
   }
   .alp-mb-stat.c-blue   { background: rgba(9,105,218,0.1);  border-color: rgba(9,105,218,0.2);  }
   .alp-mb-stat.c-green  { background: rgba(40,200,64,0.1);  border-color: rgba(40,200,64,0.2);  }
   .alp-mb-stat.c-yellow { background: rgba(254,188,46,0.1); border-color: rgba(254,188,46,0.2); }
   .alp-mb-stat.c-red    { background: rgba(255,95,87,0.1);  border-color: rgba(255,95,87,0.2);  }
   .alp-mb-stat-n {
       font-size: 15px; font-weight: 900; color: #e6edf3; line-height: 1;
   }
   .alp-mb-stat-l {
       font-size: 8.5px; color: #6e7681; margin-top: 3px;
       font-weight: 600; text-transform: uppercase; letter-spacing: 0.2px;
   }
   /* Section label */
   .alp-mb-section-lbl {
       font-size: 9px; font-weight: 700; color: #6e7681;
       text-transform: uppercase; letter-spacing: 0.6px;
       padding: 0 2px;
   }
   /* Product rows */
   .alp-mb-product {
       display: flex; align-items: center; gap: 8px;
       background: #1c2128;
       border: 1px solid #30363d;
       border-radius: 7px; padding: 8px 9px;
       transition: border-color 0.2s;
   }
   .alp-mb-prod-icon {
       width: 26px; height: 26px; border-radius: 6px;
       display: flex; align-items: center; justify-content: center;
       font-size: 12px; flex-shrink: 0; border: 1px solid transparent;
   }
   .alp-mb-prod-icon.c-blue   { background: rgba(9,105,218,0.15);   border-color: rgba(9,105,218,0.2);  }
   .alp-mb-prod-icon.c-purple { background: rgba(188,140,255,0.15); border-color: rgba(188,140,255,0.2);}
   .alp-mb-prod-icon.c-orange { background: rgba(255,140,0,0.15);   border-color: rgba(255,140,0,0.2);  }
   .alp-mb-prod-info { flex: 1; min-width: 0; }
   .alp-mb-prod-name {
       font-size: 10.5px; font-weight: 700; color: #e6edf3;
       white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
   }
   .alp-mb-prod-key {
       font-size: 9px; color: #6e7681;
       font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
       margin-top: 1px;
   }
   .alp-mb-badge {
       font-size: 8.5px; font-weight: 700;
       padding: 2px 7px; border-radius: 10px; flex-shrink: 0;
       border: 1px solid transparent;
   }
   .alp-mb-badge.b-green  { background: rgba(40,200,64,0.1);  color: #3fb950; border-color: rgba(40,200,64,0.2);  }
   .alp-mb-badge.b-yellow { background: rgba(254,188,46,0.1); color: #d29922; border-color: rgba(254,188,46,0.2); }
   .alp-mb-badge.b-red    { background: rgba(255,95,87,0.1);  color: #f85149; border-color: rgba(255,95,87,0.2);  }

   /* Stats strip */
   .alp-stats {
       display: flex; align-items: center;
       padding: 14px 0 0;
       border-top: 1px solid rgba(48,54,61,0.7);
   }
   .alp-stat { flex: 1; text-align: center; }
   .alp-stat-n {
       font-size: 15px; font-weight: 900; color: #e6edf3; letter-spacing: -0.2px;
   }
   .alp-stat-l {
       font-size: 9.5px; color: #6e7681; margin-top: 2px;
       font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px;
   }
   .alp-stat-sep { width: 1px; height: 26px; background: rgba(48,54,61,0.8); }

   /* ════════════════════════════════════
      RIGHT PANEL — dark, matching left
      ════════════════════════════════════ */
   .auth-right {
       flex: 1;
       display: flex;
       flex-direction: column;
       background: #080e18;
       position: relative;
       overflow-y: auto;
   }
   /* Top accent bar matching left */
   .auth-right::before {
       content: '';
       position: absolute;
       top: 0; left: 0; right: 0; height: 2px;
       background: linear-gradient(90deg, transparent 0%, #0969da 40%, #58a6ff 70%, transparent 100%);
       z-index: 3;
   }
   /* Matching blobs */
   .arp-blob {
       position: absolute; border-radius: 50%; pointer-events: none;
   }
   .arp-blob-1 {
       width: 400px; height: 400px;
       top: -80px; left: -80px;
       background: radial-gradient(ellipse, rgba(9,105,218,0.08) 0%, transparent 65%);
   }
   /* Matching dot grid */
   .arp-grid {
       position: absolute; inset: 0;
       background-image: radial-gradient(circle, rgba(255,255,255,0.02) 1px, transparent 1px);
       background-size: 24px 24px;
       pointer-events: none;
   }
   .arp-inner {
       flex: 1; display: flex; flex-direction: column;
       align-items: center; justify-content: center;
       padding: 48px 24px;
       position: relative; z-index: 3;
   }

   /* Mobile brand */
   .arp-mobile-brand {
       display: none; align-items: center; gap: 10px;
       margin-bottom: 24px; align-self: flex-start;
   }

   /* ── Form card ── */
   .arp-card {
       width: 100%; max-width: 400px;
       background: #161b22;
       border: 1px solid #30363d;
       border-radius: 14px;
       padding: 32px;
       box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03);
       position: relative;
       overflow: hidden;
   }
   /* Card top glow */
   .arp-card-glow {
       position: absolute;
       top: 0; left: 0; right: 0; height: 3px;
       background: linear-gradient(90deg, #0969da 0%, #58a6ff 55%, transparent 100%);
       z-index: 1;
   }
   .arp-card::after {
       content: '';
       position: absolute;
       top: -60px; right: -60px;
       width: 200px; height: 200px;
       border-radius: 50%;
       background: radial-gradient(circle, rgba(9,105,218,0.06) 0%, transparent 65%);
       pointer-events: none;
   }

   /* Form header */
   .arp-header {
       display: flex; align-items: flex-start; gap: 13px;
       margin-bottom: 24px;
       position: relative; z-index: 2;
   }
   .arp-header-icon {
       width: 40px; height: 40px; flex-shrink: 0;
       background: rgba(9,105,218,0.12);
       border: 1px solid rgba(9,105,218,0.25);
       border-radius: 10px;
       display: flex; align-items: center; justify-content: center;
       color: #58a6ff; margin-top: 2px;
   }
   .arp-title {
       font-size: 21px; font-weight: 800; color: #e6edf3;
       letter-spacing: -0.2px; margin-bottom: 4px;
   }
   .arp-subtitle { font-size: 13px; color: #8b949e; line-height: 1.4; }

   /* Fields */
   .arp-field { margin-bottom: 12px; position: relative; z-index: 2; }
   .arp-label {
       display: block; margin-bottom: 5px;
       font-size: 11.5px; font-weight: 700;
       color: #8b949e;
       text-transform: uppercase; letter-spacing: 0.5px;
   }
   .arp-input-wrap { position: relative; }
   .arp-field-ico {
       position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
       color: #6e7681; pointer-events: none; transition: color 0.2s;
   }
   .arp-input-wrap:focus-within .arp-field-ico { color: #58a6ff; }
   .arp-input-wrap input {
       width: 100%; height: 44px;
       padding: 0 40px 0 40px;
       background: #0d1117;
       border: 1px solid #30363d;
       border-radius: 9px;
       font-size: 14px; color: #e6edf3;
       transition: border-color 0.2s, box-shadow 0.2s;
       font-family: inherit;
       -webkit-appearance: none;
   }
   .arp-input-wrap input::placeholder { color: #484f58; }
   .arp-input-wrap input:focus {
       outline: none;
       border-color: #0969da;
       box-shadow: 0 0 0 3px rgba(9,105,218,0.15);
       background: #0b1220;
   }
   .arp-eye {
       position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
       background: none; border: none; cursor: pointer;
       color: #6e7681; display: flex; align-items: center;
       padding: 4px; transition: color 0.15s;
   }
   .arp-eye:hover { color: #e6edf3; }

   /* strength bar */
   .auth-strength-wrap { margin: -4px 0 10px; position: relative; z-index: 2; }

   /* Submit */
   .arp-submit {
       width: 100%; height: 44px;
       border-radius: 9px; font-size: 14px; font-weight: 700;
       margin-top: 6px; display: flex; align-items: center;
       justify-content: center; gap: 7px;
       position: relative; z-index: 2;
       background: linear-gradient(135deg, #0969da 0%, #1f6feb 100%);
       border: none; color: white;
       box-shadow: 0 4px 14px rgba(9,105,218,0.35);
       transition: transform 0.15s, box-shadow 0.15s;
   }
   .arp-submit:hover:not(:disabled) {
       transform: translateY(-1px);
       box-shadow: 0 6px 20px rgba(9,105,218,0.45);
   }
   .arp-submit:hover:not(:disabled) svg { transform: translateX(3px); }
   .arp-submit svg { transition: transform 0.15s; }

   /* Divider */
   .arp-divider {
       display: flex; align-items: center; gap: 10px;
       margin: 16px 0; color: #484f58;
       font-size: 11px; font-weight: 600;
       text-transform: uppercase; letter-spacing: 0.5px;
       position: relative; z-index: 2;
   }
   .arp-divider::before, .arp-divider::after {
       content: ''; flex: 1; height: 1px; background: #30363d;
   }

   /* Google */
   .arp-google-btn {
       width: 100%; height: 42px;
       background: #1c2128;
       border: 1px solid #30363d;
       border-radius: 9px; color: #e6edf3;
       font-size: 13px; font-weight: 600;
       cursor: pointer; transition: all 0.2s; font-family: inherit;
       display: flex; align-items: center; justify-content: center; gap: 9px;
       position: relative; z-index: 2;
   }
   .arp-google-btn:hover {
       background: #21262d;
       border-color: #484f58;
       transform: translateY(-1px);
       box-shadow: 0 4px 14px rgba(0,0,0,0.3);
   }

   /* Switch */
   .arp-switch {
       display: flex; align-items: center; justify-content: center;
       gap: 6px; margin-top: 16px; position: relative; z-index: 2;
   }
   .arp-switch-text { font-size: 13px; color: #8b949e; }
   .arp-switch-btn {
       background: none; border: none; color: #58a6ff;
       font-size: 13px; font-weight: 700;
       cursor: pointer; font-family: inherit; padding: 0;
       transition: color 0.15s;
   }
   .arp-switch-btn:hover { color: #79c0ff; text-decoration: underline; }

   /* Trust row */
   .arp-trust {
       display: flex; align-items: center; justify-content: center;
       gap: 8px; margin-top: 20px; padding-top: 16px;
       border-top: 1px solid #21262d;
       position: relative; z-index: 2;
   }
   .arp-trust-item {
       display: flex; align-items: center; gap: 4px;
       font-size: 10.5px; font-weight: 600; color: #6e7681;
   }
   .arp-trust-dot {
       width: 3px; height: 3px; border-radius: 50%; background: #484f58;
   }

   /* ── Hide old classes ── */
   .tabs, .tab, .auth-input-icon, .auth-form-box,
   .auth-feature-list, .auth-left-panel, .auth-right-panel,
   .auth-left-content, .auth-brand-wrap, .auth-headline,
   .auth-stats-row, .auth-form-header, .auth-input-group,
   .auth-submit-btn, .auth-divider, .auth-google-btn,
   .auth-switch-row, .auth-form-title { }

   /* ── Welcome badge (stays above card) ── */
   .arp-welcome-badge {
       display: flex; align-items: center; gap: 7px;
       background: rgba(9,105,218,0.08);
       border: 1px solid rgba(9,105,218,0.2);
       border-radius: 20px;
       padding: 5px 13px 5px 9px;
       font-size: 11.5px; font-weight: 600; color: #58a6ff;
       margin-bottom: 16px; width: fit-content;
       letter-spacing: 0.1px;
   }
   .arp-wb-dot {
       width: 7px; height: 7px; border-radius: 50%;
       background: #3fb950; flex-shrink: 0;
       box-shadow: 0 0 7px rgba(63,185,80,0.7);
       animation: arp-pulse 2.5s ease-in-out infinite;
   }
   @keyframes arp-pulse {
       0%, 100% { opacity: 1; transform: scale(1); }
       50%       { opacity: 0.65; transform: scale(1.2); }
   }

   /* ══════════════════════════════════════════════════
      PAGE-LEVEL DECO — 2 floating cards on auth-wrapper
      Left panel = 460px. Right panel = rest.
      Form card ≈ 400px centered in right panel.

      pg-deco-a: upper-right zone (~75% from left, ~20% from top)
      pg-deco-b: lower-right zone (~82% from left, ~75% from top)
      ══════════════════════════════════════════════════ */

   .pg-deco {
       position: absolute;
       pointer-events: none;
       z-index: 2;
       animation: pgFloat 7s ease-in-out infinite;
   }
   .pg-deco-b { animation-delay: 2s; animation-duration: 8s; }

   @keyframes pgFloat {
       0%, 100% { transform: translateY(0); }
       50%       { transform: translateY(-9px); }
   }

   /* ── Deco A: Activity card — upper right of right panel ── */
   .pg-deco-a {
       right: 3%;
       top: 12%;
       width: 210px;
       background: rgba(22,27,34,0.82);
       border: 1px solid rgba(48,54,61,0.85);
       border-radius: 13px;
       padding: 13px 14px;
       backdrop-filter: blur(14px);
       -webkit-backdrop-filter: blur(14px);
       box-shadow: 0 10px 36px rgba(0,0,0,0.45),
                   inset 0 1px 0 rgba(255,255,255,0.03);
   }
   .pg-deco-card-hd {
       display: flex; align-items: center; gap: 6px;
       font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
       text-transform: uppercase; color: #8b949e;
       margin-bottom: 11px;
   }
   .pg-deco-live {
       width: 6px; height: 6px; border-radius: 50%;
       background: #3fb950; flex-shrink: 0;
       box-shadow: 0 0 5px rgba(63,185,80,0.65);
       animation: pgLivePulse 2.5s ease-in-out infinite;
   }
   @keyframes pgLivePulse {
       0%, 100% { opacity: 1; }
       50%       { opacity: 0.5; }
   }

   .pg-deco-rows { display: flex; flex-direction: column; gap: 8px; }
   .pg-deco-row  { display: flex; align-items: center; gap: 8px; }

   .pg-deco-ico {
       width: 26px; height: 26px; border-radius: 7px;
       display: flex; align-items: center; justify-content: center;
       font-size: 12px; flex-shrink: 0; border: 1px solid transparent;
   }
   .pg-deco-ico.blue   { background:rgba(9,105,218,0.15);   border-color:rgba(9,105,218,0.25);   }
   .pg-deco-ico.purple { background:rgba(188,140,255,0.15); border-color:rgba(188,140,255,0.25); }
   .pg-deco-ico.orange { background:rgba(255,140,0,0.15);   border-color:rgba(255,140,0,0.25);   }

   .pg-deco-info { flex: 1; min-width: 0; }
   .pg-deco-name {
       font-size: 10.5px; font-weight: 700; color: #c9d1d9;
       white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
   }
   .pg-deco-time { font-size: 9.5px; color: #6e7681; margin-top: 1px; }

   .pg-deco-badge {
       font-size: 8.5px; font-weight: 700; padding: 2px 7px;
       border-radius: 8px; flex-shrink: 0;
   }
   .pg-deco-badge.green { background:rgba(63,185,80,0.1);  color:#3fb950; }
   .pg-deco-badge.blue  { background:rgba(9,105,218,0.12); color:#58a6ff; }

   /* ── Deco B: Users pill — lower right ── */
   .pg-deco-b {
       right: 3%;
       bottom: 14%;
       display: flex; align-items: center; gap: 11px;
       background: rgba(22,27,34,0.82);
       border: 1px solid rgba(48,54,61,0.85);
       border-radius: 14px;
       padding: 10px 15px 10px 11px;
       backdrop-filter: blur(14px);
       -webkit-backdrop-filter: blur(14px);
       box-shadow: 0 10px 36px rgba(0,0,0,0.45),
                   inset 0 1px 0 rgba(255,255,255,0.03);
   }
   .pg-deco-avatars { display: flex; }
   .pg-deco-av {
       width: 26px; height: 26px; border-radius: 50%;
       display: flex; align-items: center; justify-content: center;
       font-size: 9.5px; font-weight: 800; color: white;
       border: 2px solid #080e18;
       margin-right: -7px; flex-shrink: 0;
   }
   .pg-deco-avatars .pg-deco-av:last-child { margin-right: 0; }
   .pg-deco-pill-body { padding-left: 6px; }
   .pg-deco-pill-num {
       font-size: 13px; font-weight: 900; color: #e6edf3;
       letter-spacing: -0.2px; line-height: 1;
   }
   .pg-deco-pill-sub {
       font-size: 10px; color: #6e7681; margin-top: 2px;
   }

   /* Hide on screens < 1280px (not enough space) */
   @media (max-width: 1280px) {
       .pg-deco-a, .pg-deco-b { display: none; }
   }

   /* ── Responsive ── */
   @media (max-width: 920px) {
       .auth-left { display: none; }
       .arp-mobile-brand { display: flex; }
       .arp-inner { padding: 28px 16px; }
       .arp-card  { padding: 24px 20px; }
       .arp-features, .arp-deco-stats { max-width: 100%; }
   }
   @media (max-width: 480px) {
       .arp-card { border-radius: 10px; padding: 20px 16px; }
       .arp-welcome-badge { font-size: 10.5px; }
   }
   
   .form-group {
       margin-bottom: 16px;
   }
   
   .form-group label {
       display: block;
       margin-bottom: 6px;
       color: var(--text-primary);
       font-weight: 600;
       font-size: 14px;
   }
   
   .form-group input {
       width: 100%;
       height: 40px;
       padding: 0 12px;
       background: var(--bg-tertiary);
       border: 1px solid var(--border-default);
       border-radius: 6px;
       font-size: 14px;
       color: var(--text-primary);
       transition: all 0.2s;
       font-family: inherit;
   }
   
   .form-group input:focus {
       outline: none;
       border-color: var(--primary);
       background: var(--bg-primary);
       box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.12);
   }
   
   .btn {
       width: 100%;
       height: 40px;
       border: none;
       border-radius: 6px;
       font-size: 14px;
       font-weight: 600;
       cursor: pointer;
       transition: all 0.2s;
       font-family: inherit;
   }
   
   .btn-primary {
       background: var(--primary);
       color: white;
   }
   
   .btn-primary:hover:not(:disabled) {
       background: var(--primary-hover);
       transform: translateY(-1px);
       box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
   }
   
   .btn-primary:active:not(:disabled) {
       background: var(--primary-active);
       transform: translateY(0);
   }
   
   .btn:disabled {
       opacity: 0.5;
       cursor: not-allowed;
   }
   
   .btn-secondary {
       background: var(--bg-elevated);
       color: var(--text-primary);
       border: 1px solid var(--border-default);
   }
   
   .btn-secondary:hover:not(:disabled) {
       background: var(--bg-hover);
       border-color: var(--border-emphasis);
   }
   
   .divider {
       text-align: center;
       margin: 24px 0;
       position: relative;
   }
   
   .divider::before {
       content: '';
       position: absolute;
       top: 50%;
       left: 0;
       right: 0;
       height: 1px;
       background: var(--border-default);
   }
   
   .divider span {
       background: var(--bg-secondary);
       padding: 0 12px;
       position: relative;
       color: var(--text-tertiary);
       font-size: 12px;
       font-weight: 600;
       text-transform: uppercase;
   }
   
   .message {
       padding: 12px 16px;
       border-radius: 6px;
       margin-bottom: 16px;
       font-size: 14px;
       display: none;
       border: 1px solid;
   }
   
   .error-message {
       background: rgba(207, 34, 46, 0.1);
       color: var(--danger-light);
       border-color: var(--danger);
   }
   
   .success-message {
       background: rgba(31, 136, 61, 0.1);
       color: var(--success-light);
       border-color: var(--success);
   }
   
   /* Dashboard */
   .dashboard-wrapper {
       min-height: 100vh;
       padding-top: 64px;
   }
   
   .dashboard-container {
       max-width: 1280px;
       margin: 0 auto;
       padding: 24px;
   }
   
   /* Page Header */
   .page-header {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
       border-radius: 12px;
       padding: 28px 28px 24px;
       margin-bottom: 24px;
       position: relative;
       overflow: hidden;
   }
   .page-header::before {
       content: '';
       position: absolute;
       top: 0; left: 0; right: 0;
       height: 2px;
       background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 50%, transparent 100%);
   }
   /* subtle background glow */
   .page-header::after {
       content: '';
       position: absolute;
       top: -60px; right: -60px;
       width: 260px; height: 260px;
       border-radius: 50%;
       background: radial-gradient(circle, rgba(9,105,218,0.07) 0%, transparent 70%);
       pointer-events: none;
   }
   
   .page-header-top {
       display: flex;
       justify-content: space-between;
       align-items: flex-start;
       margin-bottom: 20px;
       padding-bottom: 20px;
       border-bottom: 1px solid var(--border-default);
   }
   
   .page-title-section h1 {
       font-size: 24px;
       font-weight: 700;
       color: var(--text-primary);
       margin-bottom: 6px;
   }
   
   .page-subtitle {
       color: var(--text-secondary);
       font-size: 14px;
   }
   
   .page-actions {
       display: flex;
       gap: 12px;
       align-items: center;
   }
   
   .btn-action {
       height: 36px;
       padding: 0 16px;
       font-size: 14px;
       font-weight: 500;
       border-radius: 6px;
       cursor: pointer;
       transition: all 0.2s;
       font-family: inherit;
       display: inline-flex;
       align-items: center;
       justify-content: center;
       white-space: nowrap;
   }
   
   .btn-new-product {
       background: var(--primary);
       color: white;
       border: none;
       box-shadow: var(--shadow-sm);
   }
   
   .btn-new-product:hover {
       background: var(--primary-hover);
       transform: translateY(-1px);
       box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
   }
   
   .btn-new-product:active {
       background: var(--primary-active);
       transform: translateY(0);
   }
   
   .btn-sign-out {
       background: transparent;
       color: var(--text-secondary);
       border: 1px solid var(--border-default);
   }
   
   .btn-sign-out:hover {
       color: var(--text-primary);
       background: var(--bg-tertiary);
       border-color: var(--border-emphasis);
   }
   
   .btn-sign-out:active {
       background: var(--bg-elevated);
   }
   
   .user-info {
       display: flex; align-items: center; gap: 16px;
       padding: 16px 18px;
       background: var(--bg-tertiary);
       border: 1px solid var(--border-default);
       border-radius: 10px;
   }
   
   .user-info-avatar {
       width: 52px;
       height: 52px;
       border-radius: 8px;
       background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
       display: flex;
       align-items: center;
       justify-content: center;
       color: white;
       font-weight: 700;
       font-size: 20px;
       flex-shrink: 0;
       box-shadow: 0 4px 12px rgba(19, 20, 20, 0.15);
   }
   
   .user-info-details {
       flex: 1;
   }
   
   .user-info-details h3 {
       font-size: 16px;
       font-weight: 600;
       color: var(--text-primary);
       margin-bottom: 4px;
   }
   
   .user-info-details p {
       font-size: 14px;
       color: var(--text-secondary);
       margin-bottom: 6px;
   }
   
   .verified-badge {
       display: inline-flex; align-items: center; gap: 4px;
       padding: 3px 10px;
       background: rgba(31, 136, 61, 0.12);
       color: #3fb950;
       border: 1px solid rgba(31, 136, 61, 0.2);
       border-radius: 20px;
       font-size: 12px; font-weight: 700;
   }
   
   /* Stats Grid */
   .stats-grid {
       display: grid;
       grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
       gap: 16px;
       margin-bottom: 24px;
   }
   
   .stat-card {
       background: var(--bg-secondary);
       border: 1px solid var(--border-default);
       border-radius: 12px;
       padding: 22px;
       transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
       position: relative;
       overflow: hidden;
   }
   .stat-card::before {
       content: '';
       position: absolute;
       top: 0; left: 0; right: 0;
       height: 3px;
       background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
       opacity: 0;
       transition: opacity 0.25s;
   }
   .stat-card:hover {
       border-color: rgba(9,105,218,0.4);
       transform: translateY(-4px);
       box-shadow: 0 8px 24px rgba(9,105,218,0.12), var(--shadow-lg);
   }
   .stat-card:hover::before { opacity: 1; }
   
   .stat-header {
       display: flex;
       justify-content: space-between;
       align-items: flex-start;
       margin-bottom: 16px;
   }
   
   .stat-icon {
       width: 50px; height: 50px;
       border-radius: 10px;
       display: flex; align-items: center; justify-content: center;
       font-size: 24px; transition: transform 0.3s;
       border: 1px solid rgba(255,255,255,0.05);
   }
   
   .stat-card:hover .stat-icon {
       transform: scale(1.1) rotate(5deg);
   }
   
   .stat-icon.blue {
       background: rgba(9, 105, 218, 0.15);
       color: var(--primary-light);
   }
   
   .stat-icon.green {
       background: rgba(31, 136, 61, 0.15);
       color: var(--success-light);
   }
   
   .stat-icon.yellow {
       background: rgba(191, 135, 0, 0.15);
       color: var(--warning-light);
   }
   
   .stat-icon.red {
       background: rgba(207, 34, 46, 0.15);
       color: var(--danger-light);
   }
   
   .stat-label {
       color: var(--text-secondary);
       font-size: 14px;
       font-weight: 500;
       margin-bottom: 8px;
   }
   
   .stat-value {
       font-size: 32px;
       font-weight: 700;
       color: var(--text-primary);
       line-height: 1;
   }
   
   .stat-change {
       display: inline-flex;
       align-items: center;
       gap: 4px;
       font-size: 13px;
       font-weight: 500;
       margin-top: 8px;
   }
   
   .stat-change.positive {
       color: var(--success-light);
   }
   
   .stat-change.negative {
       color: var(--danger-light);
   }
   
   .stat-change.neutral {
       color: var(--text-secondary);
   }
   
   /* Section Container */
   .section {
       background: var(--bg-secondary);
       border: 1px solid var(--border-default);
       border-radius: 12px;
       margin-bottom: 24px;
       animation: fadeIn 0.4s ease;
       overflow: hidden;
   }
   
   @keyframes fadeIn {
       from { opacity: 0; transform: translateY(10px); }
       to { opacity: 1; transform: translateY(0); }
   }
   
   .section-header {
       display: flex;
       justify-content: space-between;
       align-items: center;
       padding: 20px 24px;
       border-bottom: 1px solid var(--border-default);
   }
   
   .section-title {
       font-size: 18px;
       font-weight: 600;
       color: var(--text-primary);
   }
   
   .section-body {
       padding: 24px;
   }
   
   /* Quick Actions */
   .actions-grid {
       display: grid;
       grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
       gap: 16px;
   }
   
   .action-card {
       background: var(--bg-tertiary);
       border: 1px solid var(--border-default);
       padding: 20px;
       border-radius: 12px;
       cursor: pointer;
       transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
       display: flex; align-items: center; gap: 16px;
   }
   .action-card:hover {
       background: var(--bg-elevated);
       border-color: rgba(9,105,218,0.3);
       transform: translateY(-2px);
       box-shadow: 0 6px 18px rgba(9,105,218,0.1);
   }
   
   .action-icon {
       width: 48px;
       height: 48px;
       background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
       border-radius: 8px;
       display: flex;
       align-items: center;
       justify-content: center;
       font-size: 24px;
       color: white;
       flex-shrink: 0;
       box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
   }
   
   .action-content h4 {
       font-size: 15px;
       font-weight: 600;
       color: var(--text-primary);
       margin-bottom: 4px;
   }
   
   .action-content p {
       font-size: 13px;
       color: var(--text-secondary);
   }
   
   /* Filter Buttons */
   .filter-group {
       display: flex;
       gap: 8px;
       flex-wrap: wrap;
   }
   
   .filter-btn {
       height: 30px;
       padding: 0 16px;
       background: transparent;
       border: 1px solid var(--border-default);
       border-radius: 20px;
       cursor: pointer;
       color: var(--text-secondary);
       font-size: 13px; font-weight: 600;
       transition: all 0.2s; font-family: inherit;
   }
   .filter-btn:hover {
       background: var(--bg-hover);
       color: var(--text-primary);
       border-color: var(--border-emphasis);
   }
   .filter-btn.active {
       background: var(--primary);
       color: white; border-color: var(--primary);
       box-shadow: 0 2px 10px rgba(9,105,218,0.3);
   }
   
   /* Products Grid */
   .products-grid {
       display: grid;
       grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
       gap: 16px;
   }
   
   .product-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    border-color: var(--border-emphasis);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.product-type {
    display: inline-block;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: rgba(31, 136, 61, 0.15);
    color: var(--success-light);
}
.status-expiring {
       background: rgba(191,135,0,0.12);
       color: #d29922;
       border-color: rgba(191,135,0,0.2);
   }
   .status-expired {
       background: rgba(207,34,46,0.12);
       color: #f85149;
       border-color: rgba(207,34,46,0.2);
   }
   
   .product-details {
       margin: 16px 0;
   }
   
   .detail-row {
       display: flex;
       justify-content: space-between;
       padding: 10px 0;
       border-bottom: 1px solid var(--border-muted);
       font-size: 14px;
   }
   
   .detail-row:last-child {
       border-bottom: none;
   }
   
   .detail-label {
       color: var(--text-secondary);
       font-weight: 500;
   }
   
   .detail-value {
       color: var(--text-primary);
       font-weight: 600;
   }
   
   .license-box {
       background: var(--bg-elevated);
       border: 1px solid var(--border-default);
       border-radius: 6px;
       padding: 12px;
       margin: 16px 0;
   }
   
   .license-label {
       color: var(--text-secondary);
       font-size: 12px;
       font-weight: 600;
       margin-bottom: 8px;
       text-transform: uppercase;
       letter-spacing: 0.5px;
       display: flex;
       justify-content: space-between;
       align-items: center;
   }
   
   .license-code {
       display: flex;
       justify-content: flex-start;
       align-items: center;
       gap: 8px;
   }
   
   .license-text {
       font-family: var(--font-mono);
       font-size: 14px;
       font-weight: 600;
       color: var(--primary-light);
   }
   
   .copy-btn {
       background: transparent;
       color: var(--text-secondary);
       border: none;
       padding: 4px;
       border-radius: 4px;
       cursor: pointer;
       font-size: 18px;
       transition: all 0.2s;
       font-family: inherit;
       width: auto;
       height: auto;
       display: inline-flex;
       align-items: center;
       justify-content: center;
       margin-right: 4px;
   }

   body.rtl .copy-btn {
       margin-right: 0;
       margin-left: 4px;
   }
   
   .copy-btn:hover {
       color: var(--primary);
       transform: scale(1.15);
   }
   
   .copy-btn.copied {
       color: var(--success);
       animation: checkPulse 0.6s ease;
   }

   @keyframes checkPulse {
       0%, 100% { transform: scale(1); }
       50% { transform: scale(1.2); }
   }
   
   .btn-renew {
       width: 100%;
       height: 36px;
       background: var(--primary);
       color: white;
       border: none;
       border-radius: 6px;
       font-weight: 600;
       cursor: pointer;
       transition: all 0.2s;
       margin-top: 16px;
       font-family: inherit;
       font-size: 14px;
   }
   
   .btn-renew:hover {
       background: var(--primary-hover);
       transform: translateY(-1px);
       box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
   }
   
   .empty-state {
       text-align: center;
       padding: 64px 20px;
       grid-column: 1/-1;
   }
   
   .empty-icon {
       font-size: 48px;
       margin-bottom: 16px;
       opacity: 0.4;
   }
   
   .empty-state h3 {
       font-size: 18px;
       font-weight: 600;
       color: var(--text-primary);
       margin-bottom: 8px;
   }
   
   .empty-state p {
       color: var(--text-secondary);
       font-size: 14px;
   }
   
   /* Progress Bar */
   .progress-container {
       margin-top: 8px;
   }
   
   .progress-bar {
       height: 6px;
       background: var(--bg-elevated);
       border-radius: 3px;
       overflow: hidden;
   }
   
   .progress-fill {
       height: 100%;
       background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
       border-radius: 3px;
       transition: width 0.3s ease;
   }
   
   .progress-text {
       font-size: 12px;
       color: var(--text-secondary);
       margin-top: 6px;
       font-weight: 500;
   }
   
   /* Utilities */
   .hidden {
       display: none !important;
   }
   
   .loading {
       display: inline-block;
       width: 14px;
       height: 14px;
       border: 2px solid rgba(230, 237, 243, 0.3);
       border-radius: 50%;
       border-top-color: white;
       animation: spin 0.6s linear infinite;
   }
   
   @keyframes spin {
       to { transform: rotate(360deg); }
   }
   
   /* ══════════════════════════════════════
      Toast Notifications — v2
      Matches the notification panel design
      ══════════════════════════════════════ */
   .toast-container {
       position: fixed;
       top: 72px; right: 18px;
       z-index: 10000;
       pointer-events: none;
       display: flex; flex-direction: column; gap: 9px;
   }

   @keyframes toastIn {
       from { transform: translateX(calc(100% + 20px)) scale(0.96); opacity: 0; }
       to   { transform: translateX(0) scale(1); opacity: 1; }
   }
   @keyframes toastOut {
       from { transform: translateX(0) scale(1); opacity: 1; max-height: 100px; margin: 0; }
       to   { transform: translateX(calc(100% + 20px)) scale(0.96); opacity: 0; max-height: 0; margin: 0; }
   }

   .toast {
       /* Same card style as notification panel */
       background: #161b22;
       border: 1px solid #30363d;
       border-radius: 12px;
       padding: 0;
       min-width: 300px; max-width: 360px;
       box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.02);
       pointer-events: auto;
       animation: toastIn 0.28s cubic-bezier(0.34,1.26,0.64,1) forwards;
       display: flex; flex-direction: column;
       overflow: hidden; position: relative;
   }
   .toast.removing {
       animation: toastOut 0.25s ease-in forwards;
   }

   /* Inner layout — matches notification-item */
   .toast-inner {
       display: flex; align-items: flex-start; gap: 11px;
       padding: 13px 14px 13px 0;
       position: relative;
   }

   /* Left accent bar — matches unread notification bar */
   .toast-accent {
       width: 3px; flex-shrink: 0; align-self: stretch;
       border-radius: 0 2px 2px 0;
   }
   .toast.success .toast-accent { background: #3fb950; }
   .toast.error   .toast-accent { background: #f85149; }
   .toast.warning .toast-accent { background: #d29922; }
   .toast.info    .toast-accent { background: #58a6ff; }

   /* Icon box — matches notification-icon style */
   .toast-icon {
       width: 34px; height: 34px; flex-shrink: 0;
       border-radius: 9px;
       display: flex; align-items: center; justify-content: center;
       border: 1px solid transparent;
   }
   .toast.success .toast-icon { background: rgba(63,185,80,0.12);   border-color: rgba(63,185,80,0.22);   color: #3fb950; }
   .toast.error   .toast-icon { background: rgba(248,81,73,0.12);   border-color: rgba(248,81,73,0.22);   color: #f85149; }
   .toast.warning .toast-icon { background: rgba(210,153,34,0.12);  border-color: rgba(210,153,34,0.22);  color: #d29922; }
   .toast.info    .toast-icon { background: rgba(88,166,255,0.12);  border-color: rgba(88,166,255,0.22);  color: #58a6ff; }

   /* Content */
   .toast-content { flex: 1; min-width: 0; }
   .toast-title {
       font-size: 13px; font-weight: 700; color: #e6edf3;
       margin-bottom: 2px;
       white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
   }
   .toast-message {
       font-size: 12px; color: #8b949e; line-height: 1.4;
       display: -webkit-box;
       -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
   }

   /* Close button */
   .toast-close {
       background: none; border: none;
       color: #6e7681; cursor: pointer;
       width: 26px; height: 26px; flex-shrink: 0;
       display: flex; align-items: center; justify-content: center;
       border-radius: 7px; padding: 0; margin-top: 1px;
       transition: background 0.15s, color 0.15s;
   }
   .toast-close:hover { background: #21262d; color: #e6edf3; }

   /* Progress bar at bottom — shows time remaining */
   .toast-progress {
       height: 2px; width: 100%;
       background: #21262d;
       position: absolute; bottom: 0; left: 0;
   }
   .toast-progress-bar {
       height: 100%; width: 100%;
       border-radius: 0 0 12px 12px;
       transition: width linear;
   }
   .toast.success .toast-progress-bar { background: #3fb950; }
   .toast.error   .toast-progress-bar { background: #f85149; }
   .toast.warning .toast-progress-bar { background: #d29922; }
   .toast.info    .toast-progress-bar { background: #58a6ff; }
   
   /* Responsive */
   @media (max-width: 768px) {
       .header-container {
           padding: 0 16px;
       }
   
       .nav-links {
           display: none;
       }
   
       .search-container {
           width: 200px;
       }
   
       .user-name {
           display: none;
       }
   
       .dashboard-container {
           padding: 16px;
       }
   
       .page-header {
           padding: 16px;
       }
   
       .page-header-top {
           flex-direction: column;
           gap: 16px;
       }
   
       .page-actions {
           width: 100%;
       }
   
       .btn-action {
           flex: 1;
       }
   
       .stats-grid {
           grid-template-columns: repeat(2, 1fr);
       }
   
       .products-grid {
           grid-template-columns: 1fr;
       }
   
       .section-header {
           padding: 16px;
       }
   
       .section-body {
           padding: 16px;
       }
   
       .auth-container {
           padding: 32px 24px;
       }
   
       .notifications-dropdown {
           width: calc(100vw - 40px);
           right: -120px;
       }
   
       .toast-container {
           right: 10px;
           left: 10px;
       }
   
       .toast {
           min-width: auto;
           max-width: none;
       }
   }
   /* ========================================
      ⚙️ Settings Page Styles
      ======================================== */
   
      .settings-container {
       display: grid;
       grid-template-columns: 1fr;
       gap: 24px;
       max-width: 800px;
       margin: 0 auto;
   }
   
   .settings-card {
       background: var(--bg-secondary);
       border: 1px solid var(--border-default);
       border-radius: 8px;
       overflow: hidden;
       animation: fadeIn 0.4s ease;
   }
   
   .settings-card-header {
       padding: 20px 24px;
       border-bottom: 1px solid var(--border-default);
       background: var(--bg-tertiary);
   }
   
   .settings-card-header h3 {
       font-size: 18px;
       font-weight: 600;
       color: var(--text-primary);
       margin: 0;
   }
   
   .settings-card-body {
       padding: 24px;
   }
   
   /* Profile Photo Section */
   .profile-photo-section {
       margin-bottom: 32px;
   }
   
   .profile-photo-container {
       display: flex;
       align-items: center;
       gap: 24px;
   }
   
   .profile-photo {
       width: 120px;
       height: 120px;
       border-radius: 50%;
       background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
       display: flex;
       align-items: center;
       justify-content: center;
       overflow: hidden;
       box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
       flex-shrink: 0;
   }
   
   .profile-photo-placeholder {
       font-size: 48px;
       font-weight: 700;
       color: white;
   }
   
   .profile-photo-actions {
       display: flex;
       flex-direction: column;
       gap: 12px;
       flex: 1;
   }
   
   .profile-photo-actions .btn {
       width: 100%;
       max-width: 200px;
   }
   
   /* Info Grid */
   .info-grid {
       display: grid;
       grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
       gap: 20px;
   }
   
   .info-item {
       padding: 16px;
       background: var(--bg-tertiary);
       border: 1px solid var(--border-default);
       border-radius: 6px;
   }
   
   .info-label {
       font-size: 12px;
       font-weight: 600;
       color: var(--text-secondary);
       text-transform: uppercase;
       letter-spacing: 0.5px;
       margin-bottom: 8px;
   }
   
   .info-value {
       font-size: 14px;
       font-weight: 600;
       color: var(--text-primary);
   }
   
   /* Button Styles for Settings */
   .btn-danger {
       background: var(--danger);
       color: white;
       border: none;
   }
   
   .btn-danger:hover:not(:disabled) {
       background: var(--danger-light);
       transform: translateY(-1px);
       box-shadow: 0 4px 12px rgba(207, 34, 46, 0.3);
   }
   
   .btn-danger:active:not(:disabled) {
       background: #b31d28;
       transform: translateY(0);
   }
   
   /* Responsive */
   @media (max-width: 768px) {
       .settings-container {
           padding: 0;
       }
   
       .profile-photo-container {
           flex-direction: column;
           align-items: flex-start;
       }
   
       .profile-photo {
           width: 100px;
           height: 100px;
       }
   
       .profile-photo-placeholder {
           font-size: 40px;
       }
   
       .profile-photo-actions .btn {
           max-width: 100%;
       }
   
       .info-grid {
           grid-template-columns: 1fr;
       }
   
       .settings-card-header,
       .settings-card-body {
           padding: 16px;
       }
   }
   
   /* RTL Support */
   body.rtl .profile-photo-container {
       direction: ltr;
   }
   
   body.rtl .profile-photo-actions {
       direction: rtl;
   }
   
   /* ==========================================
      🎨 NEW STYLES FOR DASHBOARD v4.3
      ========================================== */
   
   /* ==========================================
      1️⃣ Enhanced Language Switcher
      ========================================== */
   
      .language-switcher {
       position: relative;
   }
   
   .language-btn {
       display: flex;
       align-items: center;
       gap: 8px;
       padding: 8px 12px;
       background: var(--bg-secondary);
       border: 1px solid var(--border-default);
       border-radius: 8px;
       color: var(--text-primary);
       font-size: 14px;
       font-weight: 500;
       cursor: pointer;
       transition: all 0.2s ease;
   }
   
   .language-btn:hover {
       background: var(--bg-hover);
       border-color: var(--border-emphasis);
   }
   
   .language-btn.active {
       background: var(--bg-hover);
       border-color: var(--border-emphasis);
   }
   .language-btn:focus {
       outline: none;
   }
   .language-btn:focus-visible {
       outline: 2px solid rgba(56, 139, 253, 0.55);
       outline-offset: 2px;
   }
   
   .language-icon {
       font-size: 18px;
   }
   
   .language-dropdown {
       position: absolute;
       top: calc(100% + 8px);
       right: 0;
       min-width: 180px;
       background: var(--bg-elevated);
       border: 1px solid var(--border-default);
       border-radius: 12px;
       box-shadow: var(--shadow-xl);
       padding: 8px;
       opacity: 0;
       visibility: hidden;
       transform: translateY(-10px);
       transition: all 0.2s ease;
       z-index: 1000;
   }
   
   .language-dropdown.show {
       opacity: 1;
       visibility: visible;
       transform: translateY(0);
   }
   
   .language-option {
       display: flex;
       align-items: center;
       gap: 12px;
       padding: 10px 12px;
       border-radius: 8px;
       color: var(--text-primary);
       font-size: 14px;
       font-weight: 500;
       cursor: pointer;
       transition: all 0.2s ease;
   }
   
   .language-option:hover {
       background: var(--bg-hover);
   }
   
   .language-option.active {
       background: rgba(37, 99, 235, 0.15);
       color: var(--primary-light);
   }
   
   .language-option-flag {
       font-size: 20px;
   }
   
   .language-option-text {
       flex: 1;
   }
   
   .language-option-check {
       font-size: 16px;
       color: var(--primary-light);
       opacity: 0;
       transition: opacity 0.2s ease;
   }
   
   .language-option.active .language-option-check {
       opacity: 1;
   }
   
   /* ==========================================
      2️⃣ Back Button
      ========================================== */
   
   .back-btn {
       display: inline-flex;
       align-items: center;
       gap: 8px;
       padding: 8px 16px;
       background: var(--bg-secondary);
       border: 1px solid var(--border-default);
       border-radius: 8px;
       color: var(--text-primary);
       font-size: 14px;
       font-weight: 500;
       cursor: pointer;
       transition: all 0.2s ease;
       margin-bottom: 24px;
   }
   
   .back-btn:hover {
       background: var(--bg-hover);
       border-color: var(--border-emphasis);
       transform: translateX(-4px);
   }
   
   .back-btn svg {
       transition: transform 0.2s ease;
   }
   
   .back-btn:hover svg {
       transform: translateX(-2px);
   }
   
   /* ==========================================
      3️⃣ Invoices Page
      ========================================== */
   
   .invoices-grid {
       display: grid;
       grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
       gap: 24px;
   }
   
   .invoice-card {
       background: var(--bg-secondary);
       border: 1px solid var(--border-default);
       border-radius: 12px;
       padding: 24px;
       transition: all 0.3s ease;
   }
   
   .invoice-card:hover {
       border-color: var(--border-emphasis);
       box-shadow: var(--shadow-lg);
       transform: translateY(-2px);
   }
   
   .invoice-header {
       display: flex;
       justify-content: space-between;
       align-items: flex-start;
       margin-bottom: 20px;
       padding-bottom: 16px;
       border-bottom: 1px solid var(--border-muted);
   }
   
   .invoice-info {
       flex: 1;
   }
   
   .invoice-number {
       font-size: 12px;
       font-weight: 600;
       color: var(--text-secondary);
       letter-spacing: 0.5px;
       margin-bottom: 8px;
   }
   
   .invoice-product-name {
       font-size: 18px;
       font-weight: 700;
       color: var(--text-primary);
       margin-bottom: 4px;
   }
   
   .invoice-type {
       font-size: 13px;
       color: var(--text-secondary);
   }
   
   .invoice-amount {
       font-size: 24px;
       font-weight: 700;
       color: var(--primary-light);
   }
   
   .invoice-details {
       display: flex;
       flex-direction: column;
       gap: 12px;
       margin-bottom: 20px;
   }
   
   .invoice-detail-item {
       display: flex;
       justify-content: space-between;
       align-items: center;
   }
   
   .invoice-detail-label {
       font-size: 13px;
       color: var(--text-secondary);
   }
   
   .invoice-detail-value {
       font-size: 14px;
       font-weight: 500;
       color: var(--text-primary);
   }
   
   .invoice-delivery-data {
       background: var(--bg-tertiary);
       border: 1px solid var(--border-muted);
       border-radius: 8px;
       padding: 16px;
       margin-bottom: 20px;
   }
   
   .delivery-code {
       display: block;
       padding: 12px;
       background: var(--bg-primary);
       border: 1px solid var(--border-default);
       border-radius: 6px;
       font-family: 'Monaco', 'Courier New', monospace;
       font-size: 13px;
       color: var(--primary-light);
       word-break: break-all;
       white-space: pre-wrap;
       margin: 8px 0;
   }
   
   .btn-copy-inline {
       padding: 6px 12px;
       background: var(--bg-secondary);
       border: 1px solid var(--border-default);
       border-radius: 6px;
       color: var(--text-primary);
       font-size: 12px;
       cursor: pointer;
       transition: all 0.2s ease;
   }
   
   .btn-copy-inline:hover {
       background: var(--bg-hover);
       border-color: var(--primary);
       color: var(--primary-light);
   }
   
   .invoice-actions {
       display: flex;
       gap: 8px;
       flex-wrap: wrap;
   }
   
   .btn-invoice-action {
       flex: 1;
       min-width: 100px;
       padding: 10px 16px;
       background: var(--bg-tertiary);
       border: 1px solid var(--border-default);
       border-radius: 8px;
       color: var(--text-primary);
       font-size: 13px;
       font-weight: 500;
       cursor: pointer;
       transition: all 0.2s ease;
       text-align: center;
   }
   
   .btn-invoice-action:hover {
       background: var(--bg-hover);
       border-color: var(--primary);
       color: var(--primary-light);
       transform: translateY(-1px);
   }
   
   /* ==========================================
      4️⃣ Invoice Details Modal
      ========================================== */
   
   .invoice-details-content {
       padding: 24px;
       max-height: 70vh;
       overflow-y: auto;
   }
   
   .invoice-details-header {
       display: flex;
       justify-content: space-between;
       align-items: flex-start;
       margin-bottom: 32px;
       padding-bottom: 20px;
       border-bottom: 2px solid var(--primary);
   }
   
   .company-info h2 {
       font-size: 28px;
       color: var(--primary-light);
       margin-bottom: 4px;
   }
   
   .company-info p {
       font-size: 14px;
       color: var(--text-secondary);
   }
   
   .invoice-meta {
       text-align: right;
   }
   
   .invoice-number-large {
       font-size: 32px;
       font-weight: 700;
       color: var(--primary-light);
       margin-bottom: 8px;
   }
   
   .invoice-date {
       font-size: 14px;
       color: var(--text-secondary);
   }
   
   .invoice-section {
       margin-bottom: 32px;
   }
   
   .invoice-section h4 {
       font-size: 16px;
       font-weight: 600;
       color: var(--text-primary);
       margin-bottom: 12px;
   }
   
   .customer-info {
       background: var(--bg-tertiary);
       border: 1px solid var(--border-default);
       border-radius: 8px;
       padding: 16px;
   }
   
   .customer-info div {
       padding: 4px 0;
       font-size: 14px;
       color: var(--text-primary);
   }
   
   .invoice-table {
       width: 100%;
       border-collapse: collapse;
       margin: 20px 0;
   }
   
   .invoice-table th,
   .invoice-table td {
       padding: 12px;
       text-align: left;
       border-bottom: 1px solid var(--border-default);
       font-size: 14px;
   }
   
   .invoice-table th {
       background: var(--bg-tertiary);
       font-weight: 600;
       color: var(--text-secondary);
   }
   
   .invoice-table td {
       color: var(--text-primary);
   }
   
   .delivery-box {
       background: var(--bg-tertiary);
       border: 1px solid var(--border-default);
       border-radius: 8px;
       padding: 16px;
   }
   
   .delivery-box code {
       display: block;
       padding: 12px;
       background: var(--bg-primary);
       border: 1px solid var(--border-default);
       border-radius: 6px;
       font-family: 'Monaco', 'Courier New', monospace;
       font-size: 13px;
       color: var(--primary-light);
       white-space: pre-wrap;
       word-break: break-all;
       margin-bottom: 12px;
   }
   
   .invoice-totals {
       max-width: 350px;
       margin-left: auto;
       margin-top: 32px;
       padding: 20px;
       background: var(--bg-tertiary);
       border: 1px solid var(--border-default);
       border-radius: 8px;
   }
   
   .total-row {
       display: flex;
       justify-content: space-between;
       padding: 8px 0;
       font-size: 14px;
       color: var(--text-primary);
   }
   
   .total-row.final {
       border-top: 2px solid var(--border-emphasis);
       margin-top: 12px;
       padding-top: 12px;
       font-size: 18px;
       font-weight: 700;
       color: var(--primary-light);
   }
   
   .paid-badge {
       margin-top: 16px;
       padding: 10px;
       background: rgba(34, 197, 94, 0.15);
       border: 1px solid rgba(34, 197, 94, 0.3);
       border-radius: 6px;
       text-align: center;
       font-weight: 600;
       color: var(--success-light);
   }
   
   .invoice-footer {
       margin-top: 40px;
       padding-top: 20px;
       border-top: 1px solid var(--border-default);
       text-align: center;
   }
   
   .invoice-footer p {
       font-size: 16px;
       color: var(--text-secondary);
       font-style: italic;
   }
   
   /* ==========================================
      5️⃣ Responsive Design
      ========================================== */
   
   @media (max-width: 768px) {
       .invoices-grid {
           grid-template-columns: 1fr;
       }
       
       .invoice-actions {
           flex-direction: column;
       }
       
       .btn-invoice-action {
           width: 100%;
       }
       
       .invoice-details-header {
           flex-direction: column;
           gap: 20px;
       }
       
       .invoice-meta {
           text-align: left;
       }
       
       .invoice-totals {
           margin-left: 0;
           margin-right: 0;
       }
       
       .language-dropdown {
           right: auto;
           left: 0;
       }
   }
   
   /* ==========================================
      6️⃣ RTL Support
      ========================================== */
   
   [dir="rtl"] .back-btn svg {
       transform: scaleX(-1);
   }
   
   [dir="rtl"] .back-btn:hover {
       transform: translateX(4px);
   }
   
   [dir="rtl"] .back-btn:hover svg {
       transform: scaleX(-1) translateX(2px);
   }
   
   [dir="rtl"] .language-dropdown {
       right: auto;
       left: 0;
   }
   
   [dir="rtl"] .invoice-table th,
   [dir="rtl"] .invoice-table td {
       text-align: right;
   }
   
   [dir="rtl"] .invoice-totals {
       margin-left: 0;
       margin-right: auto;
   }
   
   /* ==========================================
      7️⃣ Print Styles
      ========================================== */
   
   @media print {
       .back-btn,
       .invoice-actions,
       .modal-actions {
           display: none !important;
       }
       
       .invoice-details-content {
           max-height: none;
           overflow: visible;
       }
   }
   
   /* ==========================================
      8️⃣ Animations
      ========================================== */
   
   @keyframes slideInUp {
       from {
           opacity: 0;
           transform: translateY(20px);
       }
       to {
           opacity: 1;
           transform: translateY(0);
       }
   }
   
   .invoice-card {
       animation: slideInUp 0.3s ease;
   }
   
   .invoice-card:nth-child(1) { animation-delay: 0.05s; }
   .invoice-card:nth-child(2) { animation-delay: 0.1s; }
   .invoice-card:nth-child(3) { animation-delay: 0.15s; }
   .invoice-card:nth-child(4) { animation-delay: 0.2s; }
   .invoice-card:nth-child(5) { animation-delay: 0.25s; }
   .invoice-card:nth-child(6) { animation-delay: 0.3s; }
   
   /* ==========================================
      🔧 MODAL CSS - CRITICAL FIX
      أضف هذا في dashboard.css
      ========================================== */
   
   /* Modal Base */
   .modal {
       position: fixed;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       z-index: 9999;
       display: flex;
       align-items: center;
       justify-content: center;
       opacity: 0;
       visibility: hidden;
       transition: all 0.3s ease;
       pointer-events: none;
   }
   
   .modal.active {
       opacity: 1;
       visibility: visible;
       pointer-events: all;
   }
   
   .modal-overlay {
       position: absolute;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       background: rgba(0, 0, 0, 0.75);
       backdrop-filter: blur(8px);
       -webkit-backdrop-filter: blur(8px);
       z-index: 1;
       cursor: pointer;
   }
   
   .modal-content {
       position: relative;
       background: var(--bg-secondary, #161b22);
       border: 1px solid var(--border-default, #30363d);
       border-radius: 16px;
       box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
       max-width: 600px;
       width: 90%;
       max-height: 90vh;
       overflow: hidden;
       z-index: 2;
       transform: scale(0.9) translateY(20px);
       transition: transform 0.3s ease;
       display: flex;
       flex-direction: column;
   }
   
   .modal.active .modal-content {
       transform: scale(1) translateY(0);
   }
   
   .modal-content.large {
       max-width: 1000px;
   }
   
   /* Modal Header */
   .modal-header {
       display: flex;
       justify-content: space-between;
       align-items: center;
       padding: 24px;
       border-bottom: 1px solid var(--border-default, #30363d);
       flex-shrink: 0;
   }
   
   .modal-header h3,
   .modal-title {
       font-size: 20px;
       font-weight: 700;
       color: var(--text-primary, #e6edf3);
       margin: 0;
   }
   
   .modal-close {
       width: 36px;
       height: 36px;
       display: flex;
       align-items: center;
       justify-content: center;
       background: var(--bg-tertiary, #1c2128);
       border: 1px solid var(--border-default, #30363d);
       border-radius: 8px;
       color: var(--text-secondary, #8b949e);
       font-size: 20px;
       font-weight: 700;
       cursor: pointer;
       transition: all 0.2s ease;
       flex-shrink: 0;
   }
   
   .modal-close:hover {
       background: var(--bg-hover, #2d333b);
       color: var(--danger-light, #e5534b);
       border-color: var(--danger-light, #e5534b);
       transform: scale(1.1);
   }
   
   /* Modal Body/Content */
   .modal-body {
       padding: 24px;
       overflow-y: auto;
       flex: 1;
   }
   
   .invoice-details-content {
       padding: 24px;
       max-height: calc(90vh - 180px);
       overflow-y: auto;
   }
   
   /* Custom Scrollbar */
   .modal-body::-webkit-scrollbar,
   .invoice-details-content::-webkit-scrollbar {
       width: 8px;
   }
   
   .modal-body::-webkit-scrollbar-track,
   .invoice-details-content::-webkit-scrollbar-track {
       background: var(--bg-tertiary, #1c2128);
       border-radius: 4px;
   }
   
   .modal-body::-webkit-scrollbar-thumb,
   .invoice-details-content::-webkit-scrollbar-thumb {
       background: var(--border-emphasis, #444c56);
       border-radius: 4px;
   }
   
   .modal-body::-webkit-scrollbar-thumb:hover,
   .invoice-details-content::-webkit-scrollbar-thumb:hover {
       background: var(--primary, #0969da);
   }
   
   /* Modal Actions/Footer */
   .modal-actions {
       display: flex;
       gap: 12px;
       padding: 20px 24px;
       border-top: 1px solid var(--border-default, #30363d);
       background: var(--bg-tertiary, #1c2128);
       flex-shrink: 0;
   }
   
   .modal-actions button {
       flex: 1;
       padding: 12px 20px;
       border-radius: 8px;
       font-size: 14px;
       font-weight: 600;
       cursor: pointer;
       transition: all 0.2s ease;
       border: 1px solid transparent;
   }
   
   .modal-actions .btn-primary {
       background: var(--primary, #0969da);
       color: white;
       border-color: var(--primary, #0969da);
   }
   
   .modal-actions .btn-primary:hover {
       background: var(--primary-hover, #0860ca);
       transform: translateY(-1px);
       box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
   }
   
   .modal-actions .btn-secondary {
       background: var(--bg-secondary, #161b22);
       color: var(--text-primary, #e6edf3);
       border-color: var(--border-default, #30363d);
   }
   
   .modal-actions .btn-secondary:hover {
       background: var(--bg-hover, #2d333b);
       border-color: var(--border-emphasis, #444c56);
   }
   
   /* Invoice Details Specific */
   .invoice-details-header {
       display: flex;
       justify-content: space-between;
       align-items: flex-start;
       margin-bottom: 32px;
       padding-bottom: 20px;
       border-bottom: 2px solid var(--primary, #0969da);
   }
   
   .company-info h2 {
       font-size: 28px;
       color: var(--primary-light, #1f6feb);
       margin-bottom: 4px;
   }
   
   .company-info p {
       font-size: 14px;
       color: var(--text-secondary, #8b949e);
   }
   
   .invoice-meta {
       text-align: right;
   }
   
   .invoice-number-large {
       font-size: 32px;
       font-weight: 700;
       color: var(--primary-light, #1f6feb);
       margin-bottom: 8px;
   }
   
   .invoice-date {
       font-size: 14px;
       color: var(--text-secondary, #8b949e);
   }
   
   .invoice-section {
       margin-bottom: 32px;
   }
   
   .invoice-section h4 {
       font-size: 16px;
       font-weight: 600;
       color: var(--text-primary, #e6edf3);
       margin-bottom: 12px;
   }
   
   .customer-info {
       background: var(--bg-tertiary, #1c2128);
       border: 1px solid var(--border-default, #30363d);
       border-radius: 8px;
       padding: 16px;
   }
   
   .customer-info div {
       padding: 4px 0;
       font-size: 14px;
       color: var(--text-primary, #e6edf3);
   }
   
   .invoice-table {
       width: 100%;
       border-collapse: collapse;
       margin: 20px 0;
   }
   
   .invoice-table th,
   .invoice-table td {
       padding: 12px;
       text-align: left;
       border-bottom: 1px solid var(--border-default, #30363d);
       font-size: 14px;
   }
   
   .invoice-table th {
       background: var(--bg-tertiary, #1c2128);
       font-weight: 600;
       color: var(--text-secondary, #8b949e);
   }
   
   .invoice-table td {
       color: var(--text-primary, #e6edf3);
   }
   
   .delivery-box {
       background: var(--bg-tertiary, #1c2128);
       border: 1px solid var(--border-default, #30363d);
       border-radius: 8px;
       padding: 16px;
   }
   
   .delivery-box code {
       display: block;
       padding: 12px;
       background: var(--bg-primary, #0d1117);
       border: 1px solid var(--border-default, #30363d);
       border-radius: 6px;
       font-family: 'Monaco', 'Courier New', monospace;
       font-size: 13px;
       color: var(--primary-light, #1f6feb);
       white-space: pre-wrap;
       word-break: break-all;
       margin-bottom: 12px;
   }
   
   .btn-copy-inline {
       padding: 8px 12px;
       background: var(--bg-secondary, #161b22);
       border: 1px solid var(--border-default, #30363d);
       border-radius: 6px;
       color: var(--text-primary, #e6edf3);
       font-size: 13px;
       cursor: pointer;
       transition: all 0.2s ease;
   }
   
   .btn-copy-inline:hover {
       background: var(--bg-hover, #2d333b);
       border-color: var(--primary, #0969da);
       color: var(--primary-light, #1f6feb);
   }
   
   .invoice-totals {
       max-width: 350px;
       margin-left: auto;
       margin-top: 32px;
       padding: 20px;
       background: var(--bg-tertiary, #1c2128);
       border: 1px solid var(--border-default, #30363d);
       border-radius: 8px;
   }
   
   .total-row {
       display: flex;
       justify-content: space-between;
       padding: 8px 0;
       font-size: 14px;
       color: var(--text-primary, #e6edf3);
   }
   
   .total-row.final {
       border-top: 2px solid var(--border-emphasis, #444c56);
       margin-top: 12px;
       padding-top: 12px;
       font-size: 18px;
       font-weight: 700;
       color: var(--primary-light, #1f6feb);
   }
   
   .paid-badge {
       margin-top: 16px;
       padding: 12px;
       background: rgba(34, 197, 94, 0.15);
       border: 1px solid rgba(34, 197, 94, 0.3);
       border-radius: 6px;
       text-align: center;
       font-weight: 600;
       font-size: 14px;
       color: var(--success-light, #26a641);
   }
   
   .invoice-footer {
       margin-top: 40px;
       padding-top: 20px;
       border-top: 1px solid var(--border-default, #30363d);
       text-align: center;
   }
   
   .invoice-footer p {
       font-size: 16px;
       color: var(--text-secondary, #8b949e);
       font-style: italic;
   }
   
   /* RTL Support */
   [dir="rtl"] .invoice-meta {
       text-align: left;
   }
   
   [dir="rtl"] .invoice-totals {
       margin-left: 0;
       margin-right: auto;
   }
   
   [dir="rtl"] .invoice-table th,
   [dir="rtl"] .invoice-table td {
       text-align: right;
   }
   
   /* Responsive Design */
   @media (max-width: 768px) {
       .modal-content {
           width: 95%;
           max-height: 95vh;
           border-radius: 12px;
       }
       
       .modal-content.large {
           max-width: 95%;
       }
       
       .modal-header {
           padding: 20px;
       }
       
       .modal-header h3 {
           font-size: 18px;
       }
       
       .invoice-details-content {
           padding: 20px;
       }
       
       .modal-actions {
           flex-direction: column;
           padding: 16px 20px;
       }
       
       .modal-actions button {
           width: 100%;
       }
       
       .invoice-details-header {
           flex-direction: column;
           gap: 20px;
       }
       
       .invoice-meta {
           text-align: left;
       }
       
       .invoice-number-large {
           font-size: 24px;
       }
       
       .invoice-totals {
           margin-left: 0;
           margin-right: 0;
           max-width: 100%;
       }
       
       .company-info h2 {
           font-size: 22px;
       }
   }
   
   /* Animation */
   @keyframes modalFadeIn {
       from {
           opacity: 0;
           transform: scale(0.9) translateY(20px);
       }
       to {
           opacity: 1;
           transform: scale(1) translateY(0);
       }
   }
   
   .modal.active .modal-content {
       animation: modalFadeIn 0.3s ease;
   }
   
   /* Print Styles */
   @media print {
       .modal-overlay,
       .modal-close,
       .modal-actions {
           display: none !important;
       }
       
       .modal-content {
           box-shadow: none;
           border: none;
           max-width: 100%;
           max-height: none;
       }
       
       .invoice-details-content {
           max-height: none;
           overflow: visible;
       }
   }

   /* إخفاء شريط التمرير للصفحة الرئيسية */
body {
    overflow-y: scroll;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* إخفاء شريط التمرير لجميع العناصر */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* إخفاء شريط التمرير للمودال */
.modal-body::-webkit-scrollbar,
.invoice-details-content::-webkit-scrollbar {
    display: none;
}

.modal-body,
.invoice-details-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* ========================================
   نظام التنبيهات المخصص
   ======================================== */

/* خلفية التنبيه */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* صندوق التنبيه */
.custom-alert-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-emphasis);
    border-radius: 12px;
    padding: 0;
    min-width: 400px;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

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

/* رأس التنبيه */
.custom-alert-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.custom-alert-icon.info {
    background: rgba(9, 105, 218, 0.15);
    color: #1f6feb;
}

.custom-alert-icon.warning {
    background: rgba(191, 135, 0, 0.15);
    color: #d29922;
}

.custom-alert-icon.danger {
    background: rgba(207, 34, 46, 0.15);
    color: #e5534b;
}

.custom-alert-icon.success {
    background: rgba(31, 136, 61, 0.15);
    color: #26a641;
}

.custom-alert-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* محتوى التنبيه */
.custom-alert-body {
    padding: 20px 24px;
}

.custom-alert-message {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-line;
}

/* أزرار التنبيه */
.custom-alert-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-default);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.custom-alert-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.custom-alert-btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.custom-alert-btn-cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.custom-alert-btn-confirm {
    background: #0969da;
    color: white;
}

.custom-alert-btn-confirm:hover {
    background: #0860ca;
}

.custom-alert-btn-confirm.danger {
    background: #cf222e;
}

.custom-alert-btn-confirm.danger:hover {
    background: #e5534b;
}

.custom-alert-btn-confirm.success {
    background: #1f883d;
}

.custom-alert-btn-confirm.success:hover {
    background: #26a641;
}


.btn-onesync-change {
    width: 100%;
    height: 36px;
    background: linear-gradient(135deg, #669bea 0%, #4b5ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
    font-family: inherit;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.btn-onesync-change:hover {
    background: linear-gradient(135deg, #669bea 0%, #4b5ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-onesync-change:active {
    transform: translateY(0);
}
/* ==========================================
   🎯 تحسينات زر OneSync Details (Updated!)
   ========================================== */

/* تحسين شكل الأزرار في license-code */
.license-code {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.license-text {
    flex: 1;
    min-width: 0;
    transition: color 0.15s ease;
}

.license-text:hover {
    color: var(--primary-light);
}

.lic-btn {
    min-width: 28px;
    height: 28px;
    padding: 4px;
    border-radius: 4px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    cursor: pointer;
}

.lic-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.lic-btn svg {
    width: 14px;
    height: 14px;
}

/* تصميم متجاوب للأزرار */
@media (max-width: 768px) {
    .license-code {
        flex-direction: column;
        align-items: stretch;
    }
    
    .license-code .copy-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
   🎯 زر OneSync Info (Updated v2!)
   ========================================== */

.btn-onesync-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 105, 218, 0.4);
}

.btn-onesync-info:active {
    transform: translateY(0);
}

/* ==========================================
   🎯 OneSync Compact Button (Updated v3!)
   ========================================== */

.btn-onesync-compact {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: rgba(139, 148, 158, 0.15);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-onesync-compact:hover {
    background: rgba(139, 148, 158, 0.25);
    border-color: var(--border-emphasis);
    color: var(--text-primary);
}

.btn-onesync-compact:active {
    opacity: 0.8;
}

/* ==========================================
   🎯 OneSync Details Modal - Redesigned
   ========================================== */

/* Modal Overlay */
.onesync-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(1, 4, 9, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.onesync-modal-overlay.active {
    opacity: 1;
}

/* Modal Container - متناسق مع الثيم */
.onesync-modal-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-default);
    box-shadow: 0 16px 32px rgba(1, 4, 9, 0.4);
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.onesync-modal-overlay.active .onesync-modal-container {
    transform: scale(1);
}

/* Modal Header */
.onesync-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
}

.onesync-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.onesync-icon {
    font-size: 24px;
    line-height: 1;
}

.onesync-modal-title h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.onesync-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onesync-modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Modal Body */
.onesync-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Detail Card - متناسق مع الثيم */
.onesync-detail-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.onesync-detail-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-emphasis);
}

.onesync-detail-card:last-child {
    margin-bottom: 0;
}

.onesync-detail-card.highlight {
    background: rgba(31, 111, 235, 0.1);
    border-color: rgba(31, 111, 235, 0.3);
}

.onesync-detail-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.onesync-detail-content {
    flex: 1;
    min-width: 0;
}

.onesync-detail-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.onesync-detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

/* OneSync Code Box */
.onesync-code-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    padding: 10px 12px;
}

.onesync-code-text {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-primary);
    background: none;
    border: none;
    word-break: break-all;
}

.onesync-copy-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.onesync-copy-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.onesync-copy-btn.copied {
    background: var(--success);
}

.copy-icon {
    font-size: 12px;
}

.copy-text {
    font-size: 11px;
}

/* Links */
.onesync-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.onesync-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.link-icon {
    font-size: 14px;
    flex-shrink: 0;
}

/* Modal Footer */
.onesync-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-default);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: var(--bg-tertiary);
}
.onesync-modal-footer .pcard-btn {
    flex: 1;
}
.fivem-status-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 12px;
}
.fivem-status-banner strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
}
.fivem-status-banner p {
    margin: 4px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
    opacity: 0.9;
}
.fivem-status-banner.is-active {
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.28);
    color: #3fb950;
}
.fivem-status-banner.is-off {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.28);
    color: #f85149;
}

.onesync-btn-copy-all,
.onesync-btn-close {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.onesync-btn-copy-all {
    background: var(--primary);
    color: white;
}

.onesync-btn-copy-all:hover {
    background: var(--primary-hover);
}

.onesync-btn-close {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.onesync-btn-close:hover {
    background: var(--bg-elevated);
    border-color: var(--border-emphasis);
}

/* RTL Support */
body.rtl .onesync-modal-title,
body.rtl .onesync-detail-card {
    flex-direction: row-reverse;
}

body.rtl .onesync-modal-footer {
    flex-direction: row-reverse;
}

body.rtl .onesync-code-box {
    flex-direction: row-reverse;
}

body.rtl .onesync-copy-btn {
    flex-direction: row-reverse;
}

body.rtl .onesync-link {
    flex-direction: row-reverse;
}

/* Responsive Design */
@media (max-width: 768px) {
    .onesync-modal-container {
        max-width: 95%;
        margin: 10px;
    }
    
    .onesync-modal-header {
        padding: 16px;
    }
    
    .onesync-modal-title h2 {
        font-size: 16px;
    }
    
    .onesync-modal-body {
        padding: 16px;
    }
    
    .onesync-detail-card {
        padding: 12px;
    }
    
    .onesync-code-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .onesync-copy-btn {
        width: 100%;
        justify-content: center;
    }
    
    .onesync-modal-footer {
        flex-direction: column;
        padding: 12px 16px;
    }
    
    .onesync-btn-copy-all,
    .onesync-btn-close {
        width: 100%;
    }
}

/* ==========================================
   🎯 OneSync Corner Button (Final Position!)
   ========================================== */

.btn-onesync-corner {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    background: rgba(139, 148, 158, 0.15);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.btn-onesync-corner:hover {
    background: rgba(139, 148, 158, 0.25);
    border-color: var(--border-emphasis);
    color: var(--text-primary);
    transform: scale(1.05);
}

.btn-onesync-corner:active {
    transform: scale(0.98);
}

/* RTL Support */
body.rtl .btn-onesync-corner {
    right: auto;
    left: 8px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .btn-onesync-corner {
        top: 6px;
        right: 6px;
        padding: 3px 6px;
        font-size: 9px;
    }
    
    body.rtl .btn-onesync-corner {
        right: auto;
        left: 6px;
    }
}

/* ════════════════════════════════════════════════════════════════
   🆕 ENHANCED PRODUCT CARDS v2.0
   ════════════════════════════════════════════════════════════════ */

.product-card {
    position: relative;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(1,4,9,.28);
}
.product-card.card-expired {
    opacity: .75;
}
.product-card.card-expired:hover { opacity: 1; }

/* Accent line top */
.prod-card-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}
.prod-card-accent.status-active  { background: linear-gradient(90deg, #3fb950, #26a641); }
.prod-card-accent.status-expiring{ background: linear-gradient(90deg, #d29922, #bf8700); }
.prod-card-accent.status-expired { background: linear-gradient(90deg, #f85149, #cf222e); }

/* Icon wrap */
.prod-icon-wrap {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.prod-icon-wrap.lifetime, .prod-icon-wrap.general { background: rgba(31,111,235,.15); }
.prod-icon-wrap.subscription { background: rgba(63,185,80,.15); }
.prod-icon-wrap.onesync      { background: rgba(210,153,34,.15); }
.prod-icon-wrap.fortnite     { background: rgba(139,92,246,.15); }
.prod-icon-wrap.nitro        { background: rgba(88,101,242,.15); }
.prod-icon-wrap.fivem_script { background: rgba(248,81,73,.15); }
.prod-icon-wrap.nitro        { background: rgba(88,101,242,.15); }

.product-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.prod-title-area { flex: 1; min-width: 0; }
.product-title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-type-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-muted);
    border-radius: 8px;
    padding: 1px 7px;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Progress bar */
.prod-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.prod-progress-bar {
    flex: 1;
    height: 5px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
}
.prod-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .5s ease;
}
.prod-progress-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.prod-lifetime-label {
    font-size: 12px;
    color: #79c0ff;
    font-weight: 700;
}

/* License box upgrade */
.lic-actions {
    display: flex;
    gap: 4px;
}
.lic-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.lic-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-emphasis);
}

/* Card actions */
.prod-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.prod-card-actions .btn-renew,
.prod-card-actions .btn-onesync-change {
    flex: 1;
}

/* ════════════════════════════════════════════════════════════════
   📊 STATS CARDS — Enhanced
   ════════════════════════════════════════════════════════════════ */
.stat-card {
    position: relative;
    overflow: hidden;
    cursor: default;
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1,4,9,.2);
}
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right, rgba(255,255,255,.03), transparent 60%);
    pointer-events: none;
}

/* ════════════════════════════════════════════════════════════════
   🏠 PAGE HEADER — Enhanced
   ════════════════════════════════════════════════════════════════ */
.page-header {
    position: relative;
    overflow: hidden;
}
.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(31,111,235,.08), transparent 60%);
    pointer-events: none;
}

/* User info enhanced */
.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
}
.user-info::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(31,111,235,.06), transparent 50%);
    pointer-events: none;
}
.user-info-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f6feb, #8957e5);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    border: 2px solid rgba(31,111,235,.4);
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(31,111,235,.1);
}

/* ════════════════════════════════════════════════════════════════
   🎨 FILTER BUTTONS — Enhanced
   ════════════════════════════════════════════════════════════════ */
.filter-group {
    display: flex;
    gap: 6px;
    background: var(--bg-elevated);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-default);
}
.filter-btn {
    border-radius: 7px;
    padding: 6px 14px;
    font-size: 12px;
    transition: all .15s;
}
.filter-btn.active {
    background: var(--primary-light);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(31,111,235,.35);
}

/* ════════════════════════════════════════════════════════════════
   📧 EMPTY STATE — Enhanced
   ════════════════════════════════════════════════════════════════ */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(31,111,235,.04), transparent 60%);
}
.empty-icon {
    font-size: 52px;
    margin-bottom: 16px;
    filter: grayscale(.3);
}

/* ════════════════════════════════════════════════════════════════
   🔐 Customer portal — License / Files / Lua (FiveM-style)
   ════════════════════════════════════════════════════════════════ */
.le-portal-root {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
}
.le-portal-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border-default);
    background: linear-gradient(180deg, rgba(31,111,235,.08), transparent);
}
.le-portal-title {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
}
.le-portal-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.5;
}
/* زر العودة — متناسق مع الثيم الداكن (ليس مظهر الزر الافتراضي للمتصفح) */
.le-portal-root .le-portal-topbar .btn-le-back {
    appearance: none;
    -webkit-appearance: none;
    white-space: nowrap;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-sm);
}
.le-portal-root .le-portal-topbar .btn-le-back:hover {
    background: var(--bg-hover);
    border-color: rgba(88, 166, 255, 0.45);
    color: var(--primary-light);
    box-shadow: 0 2px 12px rgba(9, 105, 218, 0.2);
}
.le-portal-root .le-portal-topbar .btn-le-back:active {
    transform: translateY(1px);
}
.le-portal-layout {
    display: grid;
    grid-template-columns: minmax(200px, 240px) 1fr;
    min-height: 420px;
}
@media (max-width: 900px) {
    .le-portal-layout {
        grid-template-columns: 1fr;
    }
}
.le-portal-sidebar {
    border-inline-end: 1px solid var(--border-default);
    background: var(--bg-primary);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
@media (max-width: 900px) {
    .le-portal-sidebar {
        border-inline-end: none;
        border-bottom: 1px solid var(--border-default);
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .le-portal-category {
        flex: 1 1 100%;
        text-align: center;
    }
}
.le-portal-category {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    padding: 8px 12px 10px;
    width: 100%;
}
.le-portal-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: start;
    padding: 11px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.le-portal-nav:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.le-portal-nav.is-active {
    background: rgba(31, 111, 235, 0.14);
    color: var(--primary-light);
    box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.25);
}
.le-portal-nav-ico {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}
.le-portal-nav-txt {
    line-height: 1.25;
}
.le-portal-main {
    padding: 20px 22px 24px;
    background: var(--bg-secondary);
}
.le-portal-panel.hidden {
    display: none !important;
}
.le-panel-head h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 800;
}
.le-panel-desc {
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
}
.le-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-default);
    border-radius: 10px;
    background: var(--bg-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.le-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.le-data-table th,
.le-data-table td {
    padding: 12px 14px;
    text-align: start;
    border-bottom: 1px solid var(--border-default);
}
.le-data-table th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 12px;
}
.le-data-table tr:last-child td {
    border-bottom: none;
}
.le-td-muted {
    color: var(--text-tertiary);
    text-align: center;
    padding: 28px !important;
}
.le-mono {
    font-family: ui-monospace, monospace;
    font-size: 11px;
    word-break: break-all;
}
.btn-action-sm {
    font-size: 12px;
    padding: 7px 12px;
    border-radius: 6px;
}
.le-form-row {
    margin-bottom: 14px;
}
.le-form-row-split {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.le-field-grow {
    flex: 1;
    min-width: 160px;
}
.le-field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.le-input,
.le-input-wide {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
}
.le-input-wide {
    max-width: 480px;
}
.le-textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
}
.le-textarea-code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    direction: ltr;
    text-align: left;
}
.le-field-actions {
    display: flex;
    align-items: flex-end;
}
.le-lua-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 960px) {
    .le-lua-grid {
        grid-template-columns: 1fr;
    }
}
.le-lua-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 16px;
}
.le-lua-card-title {
    font-weight: 800;
    margin-bottom: 12px;
    font-size: 14px;
}
.le-check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    cursor: pointer;
}
.le-check-row input {
    margin-top: 3px;
}
.le-license-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.le-file-import {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 10px;
    cursor: pointer;
}
.le-file-import input {
    display: none;
}
.le-obf-stats {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 10px 0;
}
.le-lua-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.le-btn-ghost {
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
}
.le-btn-ghost:hover {
    background: var(--bg-elevated);
    border-color: var(--text-tertiary);
}

/* بوابة الترخيص: شريط أدوات + أزرار */
.le-panel-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}
.le-panel-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.le-toolbar-btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.le-toolbar-btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.le-toolbar-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}
.le-toolbar-btn-ghost {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.35);
    color: #a78bfa;
}
.le-toolbar-btn-ghost:hover {
    background: rgba(139, 92, 246, 0.2);
}
.le-subsection-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}
.le-modal-section {
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 16px 18px;
    background: var(--bg-tertiary);
}
.le-modal-section-title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-primary);
}
.le-portal-main .btn-action {
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}
.le-portal-main .btn-action:hover {
    background: var(--primary-hover);
}
.le-portal-main .le-field-actions .btn-action {
    min-height: 40px;
}

/* ════════════════════════════════════════════════════════════════
   بوابة العميل — مظهر مطابق لجداول التراخيص في الإدارة (أزرار + شارات)
   ════════════════════════════════════════════════════════════════ */
.le-portal-root .le-data-table {
    font-size: 14px;
}
.le-portal-root .le-data-table thead {
    background: var(--bg-tertiary);
}
.le-portal-root .le-data-table th {
    padding: 14px 16px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-default);
}
.le-portal-root .le-data-table td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-muted, #21262d);
    color: var(--text-secondary);
}
.le-portal-root .le-data-table tbody tr:hover {
    background: rgba(88, 166, 255, 0.04);
}
.le-portal-root .le-data-table tbody tr:last-child td {
    border-bottom: none;
}

.le-portal-root .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.le-portal-root .badge.active {
    background: rgba(31, 136, 61, 0.15);
    color: var(--success-light);
    border: 1px solid rgba(31, 136, 61, 0.25);
}
.le-portal-root .badge.inactive {
    background: rgba(207, 34, 46, 0.12);
    color: var(--danger-light);
    border: 1px solid rgba(207, 34, 46, 0.22);
}
.le-portal-root .badge.disabled {
    background: rgba(139, 148, 158, 0.12);
    color: var(--text-tertiary);
    border: 1px solid var(--border-default);
}

.le-portal-root .le-script-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    border: 1px solid rgba(88, 166, 255, 0.22);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    max-width: 100%;
    flex-wrap: wrap;
}
.le-portal-root .le-store-tag {
    display: inline-block;
    margin-inline-start: 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: middle;
}
.le-portal-root .le-ip-code {
    font-family: ui-monospace, 'Courier New', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #79c0ff;
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-default);
}
.le-portal-root .le-key-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.le-portal-root .le-key-inline .le-mono {
    font-size: 12px;
    background: var(--bg-tertiary);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-default);
    color: var(--text-primary);
}

.le-portal-root .tax-actions {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.le-portal-root .btn-icon {
    width: 34px;
    height: 34px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    color: var(--text-primary);
}
.le-portal-root .btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.le-portal-root .le-key-inline > .btn-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 6px;
}
.le-portal-root .tax-actions .btn-icon.edit {
    background: rgba(9, 105, 218, 0.1);
    border-color: rgba(9, 105, 218, 0.3);
    color: #58a6ff;
}
.le-portal-root .tax-actions .btn-icon.edit:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.le-portal-root .tax-actions .btn-icon.del {
    background: rgba(207, 34, 46, 0.1);
    border-color: rgba(207, 34, 46, 0.28);
    color: #f85149;
}
.le-portal-root .tax-actions .btn-icon.del:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.le-portal-root .le-actions-cell {
    min-width: 140px;
}

/* ==========================================
   💬 Discord Integration
   ========================================== */

/* زر الدخول بالديسكورد في صفحة تسجيل الدخول */
.arp-discord-btn {
    margin-top: 9px;
    color: #dfe3ff;
}
.arp-discord-btn svg {
    color: #5865f2;
}
.arp-discord-btn:hover {
    background: #23273a;
    border-color: #5865f2;
}

/* بطاقة الديسكورد في الإعدادات */
.discord-desc {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0 0 20px;
}

.discord-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #5865f2;
    border: 1px solid #5865f2;
    color: #fff;
    font-weight: 600;
}
.discord-btn:hover:not(:disabled) {
    background: #4752c4;
    border-color: #4752c4;
}
.discord-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.discord-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    margin-bottom: 18px;
}

.discord-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #5865f2;
}

.discord-identity-text {
    flex: 1;
    min-width: 0;
}

.discord-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.discord-handle {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-family: var(--font-mono, monospace);
    direction: ltr;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.discord-badge {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
}
.discord-badge.linked {
    background: rgba(59, 165, 93, 0.14);
    color: #3ba55d;
    border: 1px solid rgba(59, 165, 93, 0.35);
}

.discord-warning {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 13px 16px;
    margin-bottom: 18px;
    background: rgba(250, 166, 26, 0.09);
    border: 1px solid rgba(250, 166, 26, 0.3);
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.75;
    color: #faa61a;
}

.discord-join-link {
    color: #fff;
    background: #5865f2;
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.discord-join-link:hover {
    background: #4752c4;
}

.discord-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}
.discord-toggle input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #5865f2;
    cursor: pointer;
    flex-shrink: 0;
}
.discord-toggle input[type="checkbox"]:disabled {
    cursor: wait;
    opacity: 0.6;
}

/* ==========================================
   Account settings (in-app view)
   ========================================== */
.ds-shell {
    max-width: 860px;
    margin: 0 auto 48px;
    animation: fadeIn 0.28s ease;
}
.ds-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px 8px 10px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ds-back:hover {
    background: var(--bg-secondary);
    border-color: var(--border-emphasis);
    color: var(--text-primary);
}
.ds-hero {
    margin-bottom: 22px;
}
.ds-hero-copy h1 {
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin: 0 0 6px;
}
.ds-hero-copy p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}
.ds-grid {
    display: grid;
    gap: 16px;
}
.ds-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 14px;
    overflow: hidden;
}
.ds-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px 0;
}
.ds-card-head h2 {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.ds-card-head p {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.inv-kind-tabs {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ds-card-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}
.ds-card-body {
    padding: 18px 20px 20px;
}
.ds-avatar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}
.ds-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(145deg, #1f6feb, #388bfd);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px var(--bg-secondary), 0 0 0 5px rgba(56, 139, 253, 0.35);
}
.ds-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ds-avatar span {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
}
.ds-avatar-meta {
    min-width: 0;
    flex: 1;
}
.ds-avatar-meta strong {
    display: block;
    font-size: 16px;
    color: var(--text-primary);
}
.ds-avatar-meta > span {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 2px 0 10px;
}
.ds-avatar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ds-form {
    display: grid;
    gap: 14px;
}
.ds-field {
    display: grid;
    gap: 6px;
}
.ds-field span {
    font-size: 12.5px;
    font-weight: 650;
    color: var(--text-secondary);
}
.ds-field input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: 9px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}
.ds-field input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.16);
}
.ds-field input:disabled {
    opacity: 0.62;
    cursor: not-allowed;
}
.ds-field small {
    font-size: 12px;
    color: var(--text-tertiary);
}
.ds-form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}
.ds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.ds-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.ds-btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.ds-btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}
.ds-btn-ghost {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-default);
}
.ds-btn-ghost:hover:not(:disabled) {
    background: var(--bg-hover);
}
.ds-btn-danger-ghost {
    background: transparent;
    color: var(--danger-light);
    border-color: rgba(207, 34, 46, 0.35);
}
.ds-btn-danger-ghost:hover:not(:disabled) {
    background: rgba(207, 34, 46, 0.1);
}
.ds-strength {
    margin-top: 6px;
}
.ds-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.ds-info-item {
    padding: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-muted);
    border-radius: 10px;
}
.ds-info-item span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}
.ds-info-item strong {
    font-size: 13.5px;
    color: var(--text-primary);
    word-break: break-word;
}
.ds-mono {
    font-family: var(--font-mono);
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
}
.ds-discord-card .ds-discord-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    flex-wrap: wrap;
}
.ds-discord-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #5865f2;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.28);
}
.ds-discord-mark svg {
    width: 22px;
    height: 22px;
}
.ds-discord-mark-sm {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    box-shadow: none;
}
.ds-discord-mark-sm svg {
    width: 18px;
    height: 18px;
}
.ds-discord-copy {
    flex: 1;
    min-width: 180px;
}
.ds-discord-copy h2 {
    margin: 0 0 4px;
    font-size: 16px;
}
.ds-discord-copy p {
    margin: 0;
    max-width: 420px;
}
.ds-discord-connect {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: #5865f2;
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 8px 18px rgba(88, 101, 242, 0.25);
    transition: background 0.15s, transform 0.12s;
}
.ds-discord-connect:hover:not(:disabled) {
    background: #4752c4;
}
.ds-discord-connect:disabled {
    opacity: 0.7;
    cursor: wait;
}
.ds-discord-connect svg {
    width: 16px;
    height: 16px;
}
.ds-badge-ok {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #3fb950;
    background: rgba(63, 185, 80, 0.12);
    border: 1px solid rgba(63, 185, 80, 0.28);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}
.ds-discord-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-muted);
    border-radius: 12px;
    margin-bottom: 14px;
}
.ds-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5865f2;
    color: #fff;
    font-weight: 800;
}
.ds-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 13.5px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}
.ds-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.ds-switch-ui {
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #30363d;
    position: relative;
    flex-shrink: 0;
    transition: background 0.15s;
}
.ds-switch-ui::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s;
}
.ds-switch input:checked + .ds-switch-ui {
    background: #5865f2;
}
.ds-switch input:checked + .ds-switch-ui::after {
    transform: translateX(18px);
}
.ds-switch input:disabled + .ds-switch-ui {
    opacity: 0.6;
}

@media (max-width: 720px) {
    .ds-hero-copy h1 { font-size: 22px; }
    .ds-info-grid { grid-template-columns: 1fr; }
    .ds-avatar-row { align-items: flex-start; }
    .ds-discord-connect { width: 100%; justify-content: center; margin-left: 0; }
    .ds-form-actions { justify-content: stretch; }
    .ds-form-actions .ds-btn { width: 100%; }
}

.ds-shell-wide {
    max-width: 1080px;
}
[dir="rtl"] .ds-back svg {
    transform: scaleX(-1);
}

/* ==========================================
   Customer portal home
   ========================================== */
.dashboard-wrapper {
    background:
        radial-gradient(1100px 520px at 8% -8%, rgba(31, 111, 235, 0.18), transparent 58%),
        radial-gradient(860px 380px at 100% 0%, rgba(88, 166, 255, 0.08), transparent 52%),
        var(--bg-primary);
}
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px 24px 48px;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}
#dashboardHomeHeader { order: 1; }
#dhDiscordNudge { order: 2; }
#dhExploreBanner { order: 3; }
#dhAttention { order: 4; }
#dashboardHomeStats { order: 5; }
#dashboardHomePreview { order: 6; }
#dashboardHomeInsights { order: 7; }
#dashboardHomeQuick { order: 8; }
#dashboardHomeStamp { order: 9; }
#leCryptoSection { order: 10; }
#dashboardSettingsView { order: 11; }
#dashboardInvoicesView { order: 12; }
#dashboardProductsSection { order: 20; }
#dashboardSubscriptionsSection { order: 21; }
.dh-hero.page-header {
    margin-bottom: 0;
}
.dh-hero {
    padding: 26px 28px;
    border-radius: 22px;
    margin-bottom: 0;
    border-color: rgba(56, 139, 253, 0.2);
    background:
        linear-gradient(180deg, rgba(22, 27, 34, 0.92) 0%, rgba(13, 17, 23, 0.55) 100%),
        radial-gradient(ellipse at 100% -20%, rgba(31, 111, 235, 0.22), transparent 58%);
    box-shadow: 0 18px 40px rgba(1, 4, 9, 0.18);
}
.dh-hero::before {
    display: block;
    height: 1px;
    background: linear-gradient(90deg, rgba(88, 166, 255, 0.55), transparent 70%);
}
.dh-hero::after {
    display: block;
    top: -80px;
    right: -40px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(31, 111, 235, 0.16) 0%, transparent 70%);
}
.dh-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}
.dh-hero-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}
.dh-hero-identity .user-info-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 22px;
    border: 0;
    box-shadow: 0 0 0 4px rgba(13, 17, 23, 0.85), 0 0 0 6px rgba(56, 139, 253, 0.35);
    overflow: hidden;
    flex-shrink: 0;
}
.dh-kicker-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.dh-kicker {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.dh-brand-pill {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 999px;
    color: #79c0ff;
    background: rgba(56, 139, 253, 0.12);
    border: 1px solid rgba(56, 139, 253, 0.22);
}
.dh-hero .page-title-section h1,
#dhGreeting {
    font-size: 30px;
    font-weight: 760;
    letter-spacing: -0.04em;
    margin: 0 0 6px;
    color: var(--text-primary);
    line-height: 1.15;
}
.dh-hero-email {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 420px;
}
.dh-hero-email:empty {
    display: none;
}
.dh-hero-meta {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.45;
}
.dh-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.dh-hero .verified-badge {
    background: rgba(56, 139, 253, 0.1);
    color: #79c0ff;
    border-color: rgba(56, 139, 253, 0.22);
}
.dh-explore-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    padding: 12px 16px;
    background:
        linear-gradient(180deg, rgba(31, 111, 235, 0.14), rgba(22, 27, 34, 0.92));
    border: 1px solid rgba(56, 139, 253, 0.28);
    border-radius: 16px;
}
.dh-explore-banner.hidden { display: none; }
.dh-explore-mark {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #79c0ff;
    background: rgba(56, 139, 253, 0.16);
    border: 1px solid rgba(56, 139, 253, 0.28);
}
.dh-explore-mark svg { width: 16px; height: 16px; }
.dh-explore-copy {
    min-width: 0;
    flex: 1;
}
.dh-explore-copy strong {
    display: block;
    margin: 0 0 1px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.dh-explore-copy p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-secondary);
}
.dh-explore-banner .ds-btn {
    min-height: 32px;
    height: 32px;
    padding: 0 12px;
    font-size: 12.5px;
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: none;
}
.dh-discord-nudge {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
    padding: 16px 18px;
    background:
        linear-gradient(180deg, rgba(88, 101, 242, 0.14), rgba(22, 27, 34, 0.92));
    border: 1px solid rgba(88, 101, 242, 0.32);
    border-radius: 16px;
}
.dh-discord-nudge.hidden {
    display: none;
}
.dh-discord-nudge-mark {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #dee0fc;
    background: rgba(88, 101, 242, 0.22);
    border: 1px solid rgba(88, 101, 242, 0.35);
}
.dh-discord-nudge-copy {
    min-width: 0;
    flex: 1;
}
.dh-discord-nudge-copy strong {
    display: block;
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 750;
    color: var(--text-primary);
}
.dh-discord-nudge-copy p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}
.dh-discord-nudge-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.dh-discord-nudge-actions .ds-btn {
    min-height: 36px;
    white-space: nowrap;
}
.dh-attention {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(210, 153, 34, 0.08), var(--bg-secondary));
    border: 1px solid rgba(210, 153, 34, 0.28);
    border-radius: 16px;
}
.dh-attention.hidden {
    display: none !important;
}
.dh-attention-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.dh-attention-copy strong {
    font-size: 13px;
    color: var(--text-primary);
}
.dh-attention-copy span {
    font-size: 12.5px;
    color: var(--text-secondary);
}
.dh-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}
button.dh-stat {
    width: 100%;
    text-align: start;
    font-family: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.dh-stat {
    border-radius: 18px;
    padding: 18px 18px 16px;
    background: rgba(22, 27, 34, 0.88);
}
.dh-stat .stat-header {
    margin-bottom: 0;
}
.dh-stat::before {
    display: none;
}
.dh-stat:hover,
.dh-stat:hover .stat-icon {
    transform: none;
    box-shadow: none;
}
.dh-stat:hover {
    border-color: rgba(56, 139, 253, 0.35);
    background: var(--bg-tertiary);
}
.dh-stat.is-active {
    border-color: rgba(56, 139, 253, 0.4);
    background: var(--bg-tertiary);
    box-shadow: inset 0 0 0 1px rgba(56, 139, 253, 0.12);
}
.dh-stat .stat-label {
    font-size: 12px;
    letter-spacing: 0.02em;
}
.dh-stat .stat-value {
    font-size: 28px;
    letter-spacing: -0.04em;
}
.dh-stat .stat-change {
    font-size: 12px;
}
.dh-stat .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    border-radius: 12px;
}
.dh-section-kicker,
.dh-insights-kicker {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.dh-home-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    margin: 0;
}
.dh-preview-panel {
    min-width: 0;
    padding: 18px 18px 16px;
    background: rgba(22, 27, 34, 0.88);
    border: 1px solid var(--border-default);
    border-radius: 18px;
}
.dh-preview-panel.is-subs {
    background: rgba(22, 27, 34, 0.88);
    border-color: var(--border-default);
}
.dh-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.dh-preview-all {
    height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--border-default);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.dh-preview-all:hover {
    color: var(--text-primary);
    border-color: var(--border-emphasis);
    background: var(--bg-hover);
}
.dh-preview-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: calc(54px * 2 + 6px);
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-emphasis) transparent;
}
.dh-preview-list::-webkit-scrollbar {
    width: 6px;
}
.dh-preview-list::-webkit-scrollbar-thumb {
    background: var(--border-emphasis);
    border-radius: 8px;
}
.dh-preview-row {
    width: 100%;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-muted);
    border-radius: 10px;
    color: inherit;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
}
.dh-preview-row:hover {
    background: var(--bg-hover);
    border-color: var(--border-emphasis);
}
.dh-preview-ico {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-muted);
    font-size: 16px;
    line-height: 1;
}
.dh-preview-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dh-preview-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dh-preview-type {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-tertiary);
}
.dh-preview-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.dh-preview-status {
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
    border-radius: 999px;
    padding: 3px 8px;
    background: rgba(63, 185, 80, 0.12);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.28);
}
.dh-preview-status.is-warn {
    background: rgba(210, 153, 34, 0.12);
    color: #d29922;
    border-color: rgba(210, 153, 34, 0.3);
}
.dh-preview-status.is-bad {
    background: rgba(248, 81, 73, 0.12);
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.3);
}
.dh-preview-expiry {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    white-space: nowrap;
}
.dh-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-muted);
    border-radius: 10px;
}
.dh-preview-empty p {
    margin: 0;
    font-size: 13px;
    color: var(--text-tertiary);
}
.dh-insights {
    display: grid;
    grid-template-columns: minmax(220px, 1.05fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin: 4px 0 0;
}
.dh-insights-kicker {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.dh-insight {
    background: rgba(22, 27, 34, 0.88);
    border: 1px solid var(--border-default);
    border-radius: 18px;
    padding: 18px 18px 16px;
    min-width: 0;
}
.dh-insight h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}
.dh-insight-hint {
    margin: 4px 0 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}
.dh-insight h3 + div {
    margin-top: 10px;
}
.dh-insight-list {
    max-height: calc(40px * 2 + 6px);
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-emphasis) transparent;
}
.dh-insight-list::-webkit-scrollbar {
    width: 6px;
}
.dh-insight-list::-webkit-scrollbar-thumb {
    background: var(--border-emphasis);
    border-radius: 8px;
}
.dh-health {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dh-health-score {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.dh-health-score strong {
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    line-height: 1;
}
.dh-health-score span {
    font-size: 12px;
    color: var(--text-secondary);
}
.dh-health-bar {
    height: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-muted);
    border-radius: 99px;
    overflow: hidden;
}
.dh-health-bar i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: #3fb950;
}
.dh-health-bar.warn i { background: #d29922; }
.dh-health-bar.bad i { background: #f85149; }
.dh-health-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.dh-health-meta li {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-muted);
    border-radius: 999px;
    padding: 3px 8px;
}
.dh-insight-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 6px;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-muted);
    border-radius: 10px;
    color: inherit;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
}
.dh-insight-row:last-child { margin-bottom: 0; }
.dh-insight-row:hover {
    background: var(--bg-hover);
    border-color: var(--border-emphasis);
}
.dh-insight-row.is-soon {
    border-color: rgba(210, 153, 34, 0.35);
}
.dh-insight-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dh-insight-meta {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    white-space: nowrap;
}
.dh-insight-empty {
    margin: 10px 0 0;
    font-size: 12.5px;
    color: var(--text-tertiary);
}
.dh-tool-btn {
    height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: 9px;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.dh-tool-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-emphasis);
    background: var(--bg-hover);
}
.dh-stamp {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: -4px 0 8px;
    padding: 0 4px;
    font-size: 12px;
    color: var(--text-tertiary);
}
.dh-stamp time {
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}
.dh-stamp-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
}
.pcard-aside {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pcard-pin {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-tertiary);
    border-radius: 8px;
    cursor: pointer;
}
.pcard-pin:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    border-color: var(--border-muted);
}
.pcard-pin.is-on {
    color: #d29922;
    background: rgba(210, 153, 34, 0.12);
    border-color: rgba(210, 153, 34, 0.28);
}
.pcard.is-pinned {
    border-color: rgba(210, 153, 34, 0.28);
}
.pcard.is-focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.18);
}
.dh-panel {
    border-radius: 18px;
    margin-bottom: 18px;
    background: rgba(22, 27, 34, 0.88);
}
#dashboardHomeQuick.dh-panel {
    margin-bottom: 0;
}
.dh-panel-head {
    padding: 16px 18px;
}
.dh-products-head {
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-start;
}
.dh-products-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.dh-products-title .section-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.dh-products-lead {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
.dh-products-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    margin: 0;
    border-radius: 999px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1;
}
.dh-products-count:empty {
    display: none;
}
.dh-products-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    width: auto;
}
.dh-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: 9px;
    color: var(--text-tertiary);
    min-width: 180px;
}
.dh-search input {
    width: 160px;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
}
.dh-select {
    height: 34px;
    padding: 0 28px 0 10px;
    background-color: var(--bg-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    border: 1px solid var(--border-default);
    border-radius: 9px;
    color: var(--text-primary);
    font-size: 12.5px;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    color-scheme: dark;
    cursor: pointer;
}
.dh-select:focus,
.dh-search:focus-within {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.16);
}
.dh-select option {
    background: #161b22;
    color: #e6edf3;
}
.dh-view-toggle {
    display: inline-flex;
    padding: 3px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-muted);
    border-radius: 9px;
}
.dh-view-btn {
    width: 28px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
}
.dh-view-btn.is-active {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}
.dh-panel .section-title {
    font-size: 15px;
    font-weight: 700;
}
.dh-panel .section-body {
    padding: 16px 18px 18px;
}
.dh-actions {
    gap: 10px;
}
button.dh-action {
    width: 100%;
    text-align: start;
    font-family: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
}
.dh-action {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    padding: 16px;
    gap: 12px;
    transition: background 0.15s, border-color 0.15s;
}
.dh-action:hover {
    transform: none;
    box-shadow: none;
    background: var(--bg-hover);
    border-color: var(--border-emphasis);
}
.dh-action-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-muted);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dh-action .action-icon {
    display: none;
}
.dh-action .action-content h4 {
    margin: 0 0 2px;
    font-size: 14px;
}
.dh-action .action-content p {
    margin: 0;
    font-size: 12.5px;
}
.dh-filters {
    background: var(--bg-tertiary);
    border-color: var(--border-muted);
}
.dh-filters .filter-btn {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-height: 30px;
    white-space: nowrap;
}
.dh-filters .filter-btn:hover {
    background: var(--bg-hover);
}
.dh-filters .filter-btn.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    box-shadow: none;
    font-weight: 700;
}
.dh-products {
    align-items: stretch;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}
.pcard {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(1, 4, 9, 0.12);
}
.pcard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #3fb950;
}
.pcard.status-expiring::before { background: #d29922; }
.pcard.status-expired::before { background: #f85149; }
.pcard.status-disabled::before { background: #f85149; }
.pcard-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}
.pcard-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #2d333b;
    border: 1px solid var(--border-default);
}
.pcard-icon.t-onesync {
    background: rgba(210, 153, 34, 0.16);
    border-color: rgba(210, 153, 34, 0.3);
}
.pcard-id h3 {
    margin: 0 0 5px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pcard-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.pcard-tags span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    background: #21262d;
    border: 1px solid var(--border-muted);
    border-radius: 6px;
    padding: 2px 7px;
}
.pcard-ip {
    font-family: var(--font-mono);
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 500 !important;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pcard-state {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(63, 185, 80, 0.28);
    background: rgba(63, 185, 80, 0.12);
    color: #3fb950;
    white-space: nowrap;
}
.pcard.status-expiring .pcard-state {
    border-color: rgba(210, 153, 34, 0.28);
    background: rgba(210, 153, 34, 0.12);
    color: #d29922;
}
.pcard.status-expired .pcard-state {
    border-color: rgba(248, 81, 73, 0.28);
    background: rgba(248, 81, 73, 0.12);
    color: #f85149;
}
.pcard.status-disabled .pcard-state {
    border-color: rgba(248, 81, 73, 0.28);
    background: rgba(248, 81, 73, 0.12);
    color: #f85149;
}
.pcard-life {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}
.pcard-track {
    height: 4px;
    background: #21262d;
    border-radius: 99px;
    overflow: hidden;
}
.pcard-track i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: #3fb950;
}
.pcard-track i.status-expiring { background: #d29922; }
.pcard-track i.status-expired { background: rgba(248, 81, 73, 0.45); }
.pcard-life > span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}
.pcard-meta {
    margin: 0;
}
.pcard-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-muted);
    font-size: 13px;
}
.pcard-meta > div:last-child { border-bottom: 0; padding-bottom: 0; }
.pcard-meta dt {
    margin: 0;
    color: var(--text-secondary);
    font-weight: 500;
}
.pcard-meta dd {
    margin: 0;
    color: var(--text-primary);
    font-weight: 700;
}
.pcard-order {
    margin-top: auto;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 10px;
}
.pcard-order-top,
.pcard-order-code {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
}
.pcard-order-top {
    margin-bottom: 8px;
}
.pcard-order-top span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.pcard-mini {
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid var(--border-default);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.pcard-mini:hover {
    color: var(--text-primary);
    border-color: var(--border-emphasis);
}
.pcard-order-code code {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: #58a6ff;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pcard-copy {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    border: 1px solid var(--border-default);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
}
.pcard-copy:hover,
.pcard-copy.copied {
    color: #3fb950;
    border-color: rgba(63, 185, 80, 0.35);
}
.pcard-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}
.pcard-foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.pcard-btn {
    height: 40px;
    border: 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    color: #fff;
    white-space: nowrap;
}
.pcard-btn-a { background: #0969da; }
.pcard-btn-a:hover:not(:disabled) { background: #0860ca; }
.pcard-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.pcard-btn-b {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}
.pcard-btn-b:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.dh-products.is-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dh-products.is-list .pcard {
    display: grid;
    grid-template-columns: minmax(200px, 1.2fr) minmax(180px, 1fr) auto;
    align-items: center;
    gap: 12px 16px;
}
.dh-products.is-list .pcard::before,
.dh-products.is-list .pcard-life,
.dh-products.is-list .pcard-meta {
    display: none;
}
.dh-products.is-list .pcard-order,
.dh-products.is-list .pcard-foot {
    margin: 0;
}
.dh-products.is-list .pcard-foot {
    grid-template-columns: auto auto;
}
.dh-products.is-list .pcard-btn {
    min-width: 124px;
    padding: 0 14px;
}
.dh-products.is-list .pcard-aside {
    justify-self: end;
}

@media (max-width: 1100px) {
    .dh-insights {
        grid-template-columns: 1fr;
    }
    .dh-home-preview {
        grid-template-columns: 1fr;
    }
    .dh-products.is-list .pcard {
        grid-template-columns: 1fr;
    }
}

/* Header — three-column premium bar */
.main-header {
    background: rgba(13, 17, 23, 0.82);
    border-bottom: 1px solid rgba(48, 54, 61, 0.75);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.header-container {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 28px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 20px;
}
.header-brand {
    justify-self: start;
    min-width: 0;
}
.header-nav {
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    min-width: 0;
    z-index: 1;
}
.header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.02em;
    transition: transform 0.18s ease;
}
.logo:hover {
    opacity: 1;
    transform: translateY(-1px);
}
.logo-lockup {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
    gap: 1px;
}
.logo-lockup small {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    line-height: 1.15;
    margin: 0;
}
.logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: 0;
    box-shadow: 0 6px 16px rgba(9, 105, 218, 0.28);
    font-size: 15px;
    color: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.logo:hover .logo-icon {
    transform: scale(1.05);
    box-shadow: 0 8px 18px rgba(9, 105, 218, 0.38);
}
.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 4px;
    gap: 2px;
    background: rgba(22, 27, 34, 0.72);
    border: 1px solid rgba(48, 54, 61, 0.9);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}
body.rtl .nav-links {
    margin: 0;
}
.nav-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.045);
    transform: translateY(-1px);
}
.nav-links a.active {
    color: #fff;
    background: rgba(31, 111, 235, 0.2);
    border-color: rgba(56, 139, 253, 0.28);
    box-shadow: 0 6px 16px rgba(9, 105, 218, 0.16);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 12px;
    height: 2px;
    border-radius: 99px;
    background: #79c0ff;
    transform: translateX(-50%);
}
.hdr-search.search-container,
.search-container {
    width: 188px;
    max-width: 188px;
    min-width: 0;
    flex: 0 1 188px;
    transition: width 0.18s ease, max-width 0.18s ease;
}
.hdr-search.search-container:focus-within,
.search-container:focus-within {
    width: 228px;
    max-width: 228px;
}
.search-input {
    height: 38px;
    border-radius: 999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    font-size: 12px;
    padding: 0 12px 0 36px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, width 0.2s ease;
}
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
}
.search-input:hover {
    border-color: var(--border-emphasis);
}
.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    color: var(--text-tertiary);
    pointer-events: none;
    transition: color 0.18s ease;
}
.search-container:focus-within .search-icon {
    color: var(--text-secondary);
}
.hdr-tools {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
    padding-left: 12px;
    margin-left: 2px;
    border-left: 1px solid var(--border-muted);
}
.hdr-slot {
    position: relative;
    display: flex;
    align-items: center;
}
.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.icon-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-emphasis);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.language-btn {
    height: 38px;
    padding: 0 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
    font-family: inherit;
    gap: 7px;
    color: var(--text-primary);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.language-btn:hover,
.language-btn.active {
    background: var(--bg-hover);
    border-color: var(--border-emphasis);
    transform: translateY(-1px);
}
.language-btn:focus {
    outline: none;
}
.language-btn:focus-visible {
    outline: 2px solid rgba(56, 139, 253, 0.55);
    outline-offset: 2px;
}
.language-btn svg {
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.language-btn .hdr-caret {
    width: 11px;
    height: 11px;
    opacity: 0.7;
}
.language-icon {
    display: none;
}
.language-dropdown {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 6px;
    min-width: 196px;
}
.language-option {
    border-radius: 9px;
    padding: 8px 10px;
    transition: background 0.15s ease;
}
.hdr-lang-code {
    width: 28px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}
.user-menu {
    height: 38px;
    padding: 3px 6px 3px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 999px;
    gap: 8px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.user-menu:hover {
    background: var(--bg-hover);
    border-color: var(--border-emphasis);
    transform: translateY(-1px);
}
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 11px;
}
.user-menu-dropdown {
    border-radius: 12px;
    background: var(--bg-secondary);
}
.dashboard-wrapper {
    padding-top: 68px;
}

@media (max-width: 1100px) {
    .header-container {
        padding: 0 20px;
        column-gap: 14px;
    }
    .hdr-search.search-container,
    .search-container {
        width: 168px;
        max-width: 168px;
    }
    .nav-links a {
        padding: 8px 12px;
    }
}

@media (max-width: 900px) {
    .logo-lockup small {
        display: none;
    }
    .hdr-tools {
        padding-left: 8px;
        gap: 6px;
    }
    .language-btn #currentLanguageText {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-container {
        grid-template-columns: minmax(0, 1fr) auto;
        height: 64px;
        padding: 0 16px;
    }
    .header-nav,
    .nav-links {
        display: none;
    }
    .header-actions {
        gap: 8px;
    }
    .hdr-search.search-container,
    .search-container,
    .hdr-search.search-container:focus-within,
    .search-container:focus-within {
        width: 148px;
    }
    .dashboard-wrapper {
        padding-top: 64px;
    }
}

/* ==========================================
   Invoices list
   ========================================== */
.inv-loading {
    padding: 48px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}
.inv-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    align-items: stretch;
}
.inv-stat {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 14px;
    padding: 16px 18px;
}
.inv-stat span {
    display: block;
    font-size: 12px;
    font-weight: 650;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.inv-stat strong {
    display: block;
    font-size: 24px;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}
.inv-stat strong.inv-spent-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: #fff;
}
.inv-stat strong.inv-spent-line span {
    display: inline;
    margin: 0;
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: #fff;
}
.inv-stat strong.inv-spent-line small {
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0;
    color: #8b949e;
}
.inv-list-card .inv-list-body {
    padding: 8px 8px 12px;
    display: grid;
    gap: 8px;
}
.inv-empty {
    padding: 48px 20px;
    text-align: center;
}
.inv-empty h3 {
    margin: 0 0 6px;
    font-size: 16px;
    color: var(--text-primary);
}
.inv-empty p {
    margin: 0 0 16px;
    color: var(--text-secondary);
    font-size: 13.5px;
}
.inv-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
    padding: 14px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: 12px;
}
.inv-row.is-focus {
    border-color: rgba(56, 139, 253, 0.5);
    box-shadow: 0 0 0 1px rgba(56, 139, 253, 0.22);
}
.inv-id {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
}
.inv-name {
    margin: 4px 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}
.inv-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 12.5px;
    color: var(--text-secondary);
}
.inv-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.inv-chip.is-purchase {
    background: rgba(63, 185, 80, 0.12);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.28);
}
.inv-chip.is-renewal {
    background: rgba(210, 153, 34, 0.12);
    color: #d29922;
    border: 1px solid rgba(210, 153, 34, 0.28);
}
.inv-row-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 4px;
    min-width: 88px;
}
.inv-paid {
    font-size: 11px;
    font-weight: 700;
    color: #3fb950;
}
.inv-amount {
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}
.inv-row-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.inv-row-actions .ds-btn {
    min-height: 34px;
    font-size: 12.5px;
}
.inv-delivery {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-muted);
    border-radius: 10px;
}
.inv-delivery code {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .dh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .dh-hero-top {
        flex-direction: column;
        align-items: stretch;
    }
    #dhGreeting {
        font-size: 24px;
    }
    .dh-hero {
        padding: 22px 18px;
    }
    .dh-hero-email {
        max-width: 100%;
    }
    .dh-explore-banner,
    .dh-discord-nudge {
        flex-direction: column;
        align-items: stretch;
    }
    .dh-explore-banner .ds-btn {
        width: 100%;
        justify-content: center;
    }
    .dh-discord-nudge-actions {
        width: 100%;
    }
    .dh-discord-nudge-actions .ds-btn {
        flex: 1;
        justify-content: center;
    }
    .logo-lockup small {
        display: none;
    }
    .dh-hero-actions {
        width: auto;
        align-items: flex-start;
    }
    .dh-attention {
        flex-direction: column;
        align-items: stretch;
    }
    .dh-products-tools {
        margin-left: 0;
        width: 100%;
    }
    .dh-search {
        flex: 1;
        min-width: 0;
    }
    .dh-search input {
        width: 100%;
    }
    .dh-select,
    .dh-tool-btn {
        flex: 1;
        min-width: 0;
    }
    .dh-products.is-list .dh-prod {
        grid-template-columns: 1fr;
    }
    .inv-stats { grid-template-columns: 1fr; }
    .inv-row {
        grid-template-columns: 1fr;
    }
    .inv-row-side {
        align-items: flex-start;
        flex-direction: row;
        justify-content: space-between;
        min-width: 0;
    }
    .dh-panel-head {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .dh-filters {
        width: 100%;
        overflow-x: auto;
    }
}
.inv-sheet {
    width: min(860px, calc(100vw - 32px));
    max-width: 860px;
    padding: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    overflow: hidden;
}
.inv-sheet-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid var(--border-default);
    background: var(--bg-secondary);
}
.inv-sheet-top > div {
    flex: 1;
    min-width: 0;
}
.inv-kicker {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.inv-sheet-top h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -.03em;
    color: var(--text-primary);
}
.inv-type-chip {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--border-muted);
}
.inv-type-chip.is-purchase {
    background: rgba(31, 136, 61, .14);
    color: #3fb950;
    border-color: rgba(63, 185, 80, .25);
}
.inv-type-chip.is-renewal {
    background: rgba(210, 153, 34, .14);
    color: #d29922;
    border-color: rgba(210, 153, 34, .28);
}
.inv-sheet-body {
    padding: 16px 16px 8px;
    max-height: min(72vh, 760px);
    overflow: auto;
    display: grid;
    gap: 12px;
}
.inv-brand-card .ds-card-body { padding-top: 0; }
.inv-brand {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    flex-wrap: wrap;
}
.inv-brand strong {
    display: block;
    font-size: 18px;
    color: var(--primary-light);
    letter-spacing: -.02em;
}
.inv-brand span {
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--text-secondary);
}
.inv-brand-meta {
    text-align: right;
}
.inv-brand-meta span {
    font-size: 11px;
    color: var(--text-tertiary);
}
.inv-brand-meta b {
    display: block;
    margin-top: 4px;
    color: var(--text-primary);
    font-size: 13px;
}
.inv-sheet-grid {
    display: grid;
    grid-template-columns: 1.55fr .85fr;
    gap: 12px;
    align-items: stretch;
}
.inv-sheet-grid > .ds-card {
    display: flex;
    flex-direction: column;
}
.inv-bill, .inv-pay {
    display: grid;
    gap: 4px;
    font-size: 13.5px;
    color: var(--text-secondary);
}
.inv-bill-card .inv-bill {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    padding-top: 8px;
}
.inv-bill-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 8px 0;
    border-top: 1px solid var(--border-default);
}
.inv-bill-row span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.inv-bill-row b {
    font-size: 13.5px;
    font-weight: 650;
    color: var(--text-primary);
    line-height: 1.35;
    word-break: break-word;
}
.inv-bill-row.is-id b {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    letter-spacing: .04em;
}
.inv-muted { color: var(--text-tertiary); font-size: 12.5px; }
.inv-pay {
    align-content: start;
}
.inv-pay-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.inv-pay strong {
    font-size: 26px;
    letter-spacing: -.04em;
    color: var(--text-primary);
}
.inv-paid-pill {
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(31, 136, 61, .16);
    color: #3fb950;
    font-size: 11px;
    font-weight: 700;
}
.inv-table-wrap { overflow-x: auto; }
.inv-table {
    width: 100%;
    border-collapse: collapse;
}
.inv-table th, .inv-table td {
    padding: 10px 8px;
    text-align: start;
    font-size: 13px;
    border-bottom: 1px solid var(--border-default);
}
.inv-table th {
    color: var(--text-tertiary);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.inv-table td { color: var(--text-primary); }
.inv-renew {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(210, 153, 34, .28);
    background: rgba(210, 153, 34, .08);
    border-radius: 10px;
}
.inv-renew span { display: block; font-size: 11px; color: var(--text-tertiary); }
.inv-renew b { color: var(--text-primary); }
.inv-renew-arrow { color: var(--text-tertiary); }
.inv-delivery-box {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--border-default);
    background: var(--bg-tertiary);
    border-radius: 10px;
    display: grid;
    gap: 8px;
}
.inv-delivery-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.inv-delivery-box code {
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--primary-light);
    font-size: 12.5px;
}
.inv-totals {
    margin: 16px 0 0 auto;
    width: min(320px, 100%);
}
.inv-total-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    font-size: 13.5px;
    color: var(--text-secondary);
}
.inv-total-row.is-tax { color: #d29922; }
.inv-total-row.is-final {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-default);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 750;
}
.inv-paid-banner {
    margin-top: 12px;
    text-align: center;
    padding: 9px;
    border-radius: 9px;
    background: rgba(31, 136, 61, .16);
    color: #3fb950;
    font-weight: 700;
    font-size: 13px;
}
.inv-thanks {
    margin: 4px 4px 8px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12.5px;
}
.inv-sheet-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 16px 16px;
    border-top: 1px solid var(--border-default);
    background: var(--bg-secondary);
}
@media (max-width: 720px) {
    .inv-sheet-grid { grid-template-columns: 1fr; }
    .inv-brand-meta { text-align: start; }
    .inv-pay-meta { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .dh-stats { grid-template-columns: 1fr; }
}