/*
 * ╔══════════════════════════════════════════════════════════════════╗
 * ║   ROYAL TOP THEME · v3.0                                         ║
 * ║   تصميم ملكي ذهبي · بلا أحمر · قائمة عائمة · مؤشر منزلق        ║
 * ╚══════════════════════════════════════════════════════════════════╝
 */

/* ═══════════════════════════════════════════════════
   1) DESIGN TOKENS
   ═══════════════════════════════════════════════════ */
:root {
    /* الخلفية والأسطح */
    --bg:            #f7efd9;
    --bg-2:          #f1e4c1;
    --bg-deep:       #ebe0c6;
    --surface:       #ffffff;
    --surface-2:     #fbf6e8;
    --surface-3:     #f4ead0;

    /* النصوص (تباين عالٍ مضمون) */
    --ink:           #1f1408;
    --ink-2:         #4a3622;
    --ink-3:         #8a7560;
    --ink-soft:      #b5a18a;
    --ink-on-gold:   #1f1408;
    --ink-on-dark:   #ffffff;

    /* لوحة الذهب الملكي */
    --gold-25:       #fefbf0;
    --gold-50:       #fdf6e3;
    --gold-100:      #f8e4b3;
    --gold-200:      #f0cf83;
    --gold-300:      #e6b85a;
    --gold-400:      #d4a14a;
    --gold-500:      #b88332;
    --gold-600:      #9a6a25;
    --gold-700:      #7a521a;
    --gold-800:      #5c3d12;
    --gold-glow:     rgba(212, 161, 74, 0.30);
    --gold-glow-2:   rgba(184, 131, 50, 0.45);
    --gold-soft:     rgba(212, 161, 74, 0.10);
    --gold-soft-2:   rgba(184, 131, 50, 0.18);
    --gold-grad:     linear-gradient(135deg, #f0cf83 0%, #d4a14a 45%, #b88332 100%);
    --gold-grad-soft:linear-gradient(135deg, #fdf6e3 0%, #f8e4b3 100%);
    --gold-grad-deep:linear-gradient(135deg, #d4a14a 0%, #b88332 50%, #7a521a 100%);
    --gold-grad-text:linear-gradient(135deg, #b88332 0%, #7a521a 100%);

    /* اللكنات (بدون أحمر) */
    --copper:        #c47b3a;
    --copper-soft:   rgba(196, 123, 58, 0.12);
    --coffee:        #5a3a1c;
    --emerald:       #2e8b57;
    --emerald-soft:  rgba(46, 139, 87, 0.12);
    --amber:         #d97706;
    --amber-2:       #b35a00;
    --amber-soft:    rgba(217, 119, 6, 0.12);
    --rust:          #8a5a2a;          /* نحاسي بني (بدل الأحمر) */
    --rust-soft:     rgba(138, 90, 42, 0.14);
    --sky:           #2563eb;
    --sky-soft:      rgba(37, 99, 235, 0.10);
    --violet:        #7c3aed;
    --violet-soft:   rgba(124, 58, 237, 0.10);
    --teal:          #0d9488;
    --teal-soft:     rgba(13, 148, 136, 0.10);

    /* الحدود */
    --border:        rgba(31, 20, 8, 0.07);
    --border-2:      rgba(31, 20, 8, 0.12);
    --border-strong: rgba(31, 20, 8, 0.20);
    --border-gold:   rgba(212, 161, 74, 0.32);
    --border-gold-2: rgba(184, 131, 50, 0.50);

    /* الزوايا */
    --r-xs:          8px;
    --r-sm:          10px;
    --r-md:          14px;
    --r-lg:          18px;
    --r-xl:          22px;
    --r-2xl:         28px;
    --r-3xl:         36px;
    --r-full:        999px;

    /* الظلال (دافئة) */
    --sh-xs:         0 1px 2px rgba(31, 20, 8, 0.04);
    --sh-sm:         0 2px 6px rgba(31, 20, 8, 0.05), 0 1px 2px rgba(31, 20, 8, 0.04);
    --sh-md:         0 6px 18px rgba(31, 20, 8, 0.06), 0 2px 6px rgba(31, 20, 8, 0.04);
    --sh-lg:         0 14px 36px rgba(31, 20, 8, 0.08), 0 4px 10px rgba(31, 20, 8, 0.04);
    --sh-xl:         0 24px 60px rgba(31, 20, 8, 0.12), 0 8px 20px rgba(31, 20, 8, 0.06);
    --sh-2xl:        0 40px 100px rgba(31, 20, 8, 0.18), 0 12px 28px rgba(31, 20, 8, 0.08);
    --sh-gold:       0 10px 28px rgba(184, 131, 50, 0.28);
    --sh-gold-lg:    0 20px 50px rgba(184, 131, 50, 0.40);
    --sh-inner:      inset 0 1px 0 rgba(255, 255, 255, 0.65);
    --sh-ring:       0 0 0 4px var(--gold-soft);

    /* الانتقالات */
    --t-fast:        160ms cubic-bezier(.4,.0,.2,1);
    --t-med:         260ms cubic-bezier(.4,.0,.2,1);
    --t-slow:        420ms cubic-bezier(.4,.0,.2,1);
    --e-spring:      cubic-bezier(.34, 1.56, .64, 1);
    --e-smooth:      cubic-bezier(.4, 0, .2, 1);
    --e-out:         cubic-bezier(.16, 1, .3, 1);

    /* القياسات */
    --topbar-h:      76px;
    --topbar-gap:    18px;
    --container:     1380px;

    /* أسماء بديلة للتوافق مع الصفحات القديمة */
    --saddle:        var(--gold-600);
    --hg-saddle:     var(--gold-600);
    --hg-clay:       var(--rust);
    --clay:          var(--rust);
    --clay-soft:     var(--rust-soft);
    --hg-coffee:     var(--coffee);
    --hg-coffee-deep:var(--ink);
    --hg-cream:      var(--bg);
    --cream:         var(--bg);
    --hg-cream-2:    var(--bg-2);
    --cream-2:       var(--bg-2);
    --hg-cream-3:    var(--surface-3);
    --cream-3:       var(--surface-3);
    --hg-ink:        var(--ink);
    --hg-sand:       var(--gold-100);
    --paper:         var(--surface);
    --line:          var(--border);
    --line-soft:     var(--border);
    --border-soft:   var(--border);
    --muted:         var(--ink-3);
    --muted-2:       var(--ink-soft);
    --text:          var(--ink);
    --text-2:        var(--ink-2);
    --text-3:        var(--ink-3);
    --text-muted:    var(--ink-3);
    --rose:          var(--rust);
    --rose-soft:     var(--rust-soft);
    --crimson:       var(--rust);
    --crimson-soft:  var(--rust-soft);
    --g-gold:        var(--gold-500);
    --gold:          var(--gold-500);
    --gold-2:        var(--gold-400);
    --gold-3:        var(--gold-300);
    --gold-line:     var(--border-gold);
    --success:       var(--emerald);
    --warning:       var(--amber);
    --danger:        var(--rust);
    --info:          var(--sky);
    --t-fast-2:      var(--t-fast);
}

/* ═══════════════════════════════════════════════════
   2) RESET
   ═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
*::selection { background: var(--gold-200); color: var(--ink); }

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}
html, body {
    margin: 0;
    padding: 0;
    max-width: 100vw;
    overflow-x: hidden;
    font-family: 'Tajawal', 'Cairo', 'Segoe UI', system-ui, -apple-system, sans-serif !important;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink) !important;
    background: var(--bg) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    direction: rtl;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, rgba(240, 207, 131, 0.55), transparent 60%),
        radial-gradient(ellipse 70% 50% at 0% 100%, rgba(196, 123, 58, 0.20), transparent 60%),
        radial-gradient(circle at 50% 50%, rgba(184, 131, 50, 0.04), transparent 65%),
        var(--bg) !important;
    background-attachment: fixed;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Reem Kufi', 'Tajawal', sans-serif;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 .5em;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

p { margin: 0 0 .8em; color: var(--ink-2); }
a { color: var(--gold-600); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--gold-700); }

/* أرقام ثابتة */
.num, .stat-value, .mini-stat .v, td.num, .price, .money, [data-tabular] {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
}
.font-display { font-family: 'Reem Kufi', sans-serif !important; }
.font-quote   { font-family: 'Amiri', serif !important; }

/* ═══════════════════════════════════════════════════
   3) SCROLLBAR
   ═══════════════════════════════════════════════════ */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: rgba(184, 131, 50, 0.28);
    border-radius: 999px;
    border: 2px solid var(--bg);
}
*::-webkit-scrollbar-thumb:hover { background: rgba(184, 131, 50, 0.55); }

/* ═══════════════════════════════════════════════════
   4) APP SHELL
   ═══════════════════════════════════════════════════ */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.sidebar,
.mobile-bottom-nav,
.drawer-backdrop { display: none !important; }

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
}

.app-content,
.content {
    flex: 1;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 24px 28px 80px;
    min-width: 0;
    animation: contentFadeIn .55s var(--e-out);
}
@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════
   5) TOP NAVIGATION — شريط علوي عائم ملكي
   ═══════════════════════════════════════════════════ */
.topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    padding: var(--topbar-gap) 0 0;
    pointer-events: none;
    transition: padding var(--t-med);
}
.topnav.scrolled { padding-top: 8px; }

.topnav-inner {
    pointer-events: auto;
    max-width: calc(var(--container) - 16px);
    margin: 0 auto;
    padding: 0 10px 0 14px;
    height: var(--topbar-h);
    background: rgba(255, 252, 244, 0.78);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--r-2xl);
    box-shadow:
        var(--sh-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    transition: all var(--t-med);
}
.topnav.scrolled .topnav-inner {
    background: rgba(255, 252, 244, 0.93);
    box-shadow: var(--sh-xl), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: rgba(212, 161, 74, 0.22);
}

/* العلامة التجارية */
.tn-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    flex-shrink: 0;
    padding: 6px 8px 6px 14px;
    border-radius: var(--r-xl);
    transition: background var(--t-fast);
    min-width: 0;
}
.tn-brand:hover { background: var(--gold-soft); }
.tn-brand-logo {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--gold-grad);
    display: grid; place-items: center;
    box-shadow: 0 8px 22px var(--gold-glow-2);
    overflow: hidden;
    padding: 4px;
    transition: transform var(--t-med) var(--e-spring);
    flex-shrink: 0;
}
.tn-brand-logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18)); }
.tn-brand:hover .tn-brand-logo { transform: rotate(-8deg) scale(1.08); }
.tn-brand-text {
    display: flex; flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}
.tn-brand-name {
    font-family: 'Reem Kufi', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.tn-brand-sub {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gold-700);
    margin-top: 2px;
    white-space: nowrap;
}

/* القائمة الأفقية — بنمط Pill + مؤشر سحري */
.tn-nav {
    display: flex;
    align-items: center;
    gap: 1px;
    flex: 1;
    min-width: 0;
    padding: 0 6px;
    overflow: hidden;
    position: relative;
}
.tn-magic {
    position: absolute;
    top: 50%;
    height: 38px;
    border-radius: var(--r-md);
    background: var(--gold-soft);
    border: 1px solid transparent;
    transform: translateY(-50%);
    transition: all .42s cubic-bezier(.4, .0, .2, 1);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    box-shadow: inset 0 0 0 1px rgba(212, 161, 74, 0.18);
}
.tn-nav.has-hover .tn-magic { opacity: 1; }
.tn-item {
    position: relative;
    flex-shrink: 0;
}
.tn-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: var(--r-md);
    color: var(--ink-2);
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast);
    white-space: nowrap;
    background: transparent;
    border: none;
    font-family: inherit;
    z-index: 2;
}
.tn-link svg {
    width: 17px; height: 17px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
    transition: transform var(--t-fast) var(--e-spring);
}
.tn-link:hover {
    color: var(--gold-700);
    background: var(--gold-soft);
}
.tn-link:hover svg { transform: rotate(-6deg) scale(1.1); }
.tn-link.active,
.tn-item.active .tn-link {
    color: var(--ink-on-gold);
    background: var(--gold-grad);
    box-shadow: 0 4px 14px var(--gold-glow-2);
}
.tn-link.active svg { color: var(--ink-on-gold); }
.tn-caret {
    width: 11px; height: 11px;
    margin-right: 1px;
    transition: transform var(--t-med);
    opacity: 0.7;
}
.tn-item.open .tn-caret,
.tn-item:hover .tn-caret { transform: rotate(180deg); opacity: 1; }

/* MEGA MENU */
.tn-mega {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    min-width: 280px;
    background: rgba(255, 252, 244, 0.96);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid var(--border-gold);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-2xl);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(.96);
    transform-origin: top right;
    transition: opacity var(--t-med) var(--e-out), transform var(--t-med) var(--e-spring), visibility 0s linear var(--t-med);
    z-index: 110;
}
.tn-item.open > .tn-mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: opacity var(--t-med) var(--e-out), transform var(--t-med) var(--e-spring), visibility 0s linear 0s;
}
@media (hover: hover) {
    .tn-item:hover > .tn-mega {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        transition: opacity var(--t-med) var(--e-out), transform var(--t-med) var(--e-spring), visibility 0s linear 0s;
    }
}
.tn-mega::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 28px;
    width: 14px; height: 14px;
    background: inherit;
    border-top: 1px solid var(--border-gold);
    border-right: 1px solid var(--border-gold);
    transform: rotate(-45deg);
    border-radius: 3px;
}
.tn-mega-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
}
.tn-mega.cols-2 { min-width: 440px; }
.tn-mega.cols-2 .tn-mega-grid { grid-template-columns: 1fr 1fr; gap: 3px; }

.tn-mega-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    color: var(--ink-2);
    text-decoration: none;
    transition: all var(--t-fast);
    position: relative;
    overflow: hidden;
}
.tn-mega-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold-grad-soft);
    opacity: 0;
    transition: opacity var(--t-fast);
    z-index: 0;
}
.tn-mega-link > * { position: relative; z-index: 1; }
.tn-mega-link svg {
    width: 36px; height: 36px;
    padding: 8px;
    background: var(--gold-grad-soft);
    border-radius: 11px;
    stroke: var(--gold-700);
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
    transition: all var(--t-med);
}
.tn-mega-link:hover {
    color: var(--ink);
    transform: translateX(-4px);
}
.tn-mega-link:hover::before { opacity: 1; }
.tn-mega-link:hover svg {
    background: var(--gold-grad);
    stroke: var(--ink-on-gold);
    transform: scale(1.05) rotate(-4deg);
}
.tn-mega-link.active {
    background: var(--gold-grad);
    color: var(--ink-on-gold);
}
.tn-mega-link.active svg {
    background: rgba(255, 255, 255, 0.32);
    stroke: var(--ink-on-gold);
}
.tn-mega-label {
    font-weight: 700;
    font-size: 13.5px;
    white-space: nowrap;
}

/* الأكشن في يسار الشريط */
.tn-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 0;
}

.tn-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 7px 12px;
    width: 230px;
    cursor: pointer;
    transition: all var(--t-fast);
    flex-shrink: 1;
    min-width: 0;
}
.tn-search:hover {
    border-color: var(--border-gold-2);
    background: rgba(253, 246, 227, 0.85);
    box-shadow: var(--sh-sm);
}
.tn-search svg {
    width: 15px; height: 15px;
    color: var(--ink-3);
    stroke-width: 2;
    fill: none;
    stroke: currentColor;
    flex-shrink: 0;
}
.tn-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--ink-2);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    min-width: 0;
    padding: 0;
}
.tn-search input::placeholder { color: var(--ink-3); }
.tn-kbd {
    font-family: 'SF Mono', 'Cairo', monospace;
    font-size: 10.5px;
    color: var(--ink-3);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 5px;
    flex-shrink: 0;
}

.tn-icon-btn {
    position: relative;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--ink-2);
    cursor: pointer;
    transition: all var(--t-fast);
    text-decoration: none;
    flex-shrink: 0;
}
.tn-icon-btn svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 2; fill: none; }
.tn-icon-btn:hover {
    background: var(--gold-grad-soft);
    color: var(--gold-700);
    border-color: var(--border-gold-2);
    transform: translateY(-1px);
    box-shadow: var(--sh-sm);
}
.tn-icon-btn .dot {
    position: absolute;
    top: 6px; left: 6px;
    width: 9px; height: 9px;
    background: var(--amber);
    border: 2px solid rgba(255, 252, 244, 0.95);
    border-radius: 999px;
    animation: pulseGold 2.4s infinite;
}
@keyframes pulseGold {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.50); }
    50%      { transform: scale(1.12); box-shadow: 0 0 0 7px rgba(217, 119, 6, 0); }
}

.tn-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    background: var(--gold-grad);
    color: var(--ink-on-gold) !important;
    border-radius: var(--r-md);
    font-weight: 800;
    font-size: 13.5px;
    text-decoration: none;
    box-shadow: var(--sh-gold);
    transition: all var(--t-fast);
    border: none;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.tn-cta::before {
    content: '';
    position: absolute;
    top: 0; right: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: right .6s var(--e-smooth);
}
.tn-cta:hover::before { right: 200%; }
.tn-cta svg { width: 17px; height: 17px; stroke: var(--ink-on-gold); stroke-width: 2.2; fill: none; flex-shrink: 0; }
.tn-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-gold-lg);
    color: var(--ink-on-gold) !important;
}

/* ملف المستخدم */
.tn-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    cursor: pointer;
    transition: all var(--t-fast);
    position: relative;
    flex-shrink: 0;
    min-width: 0;
}
.tn-user:hover {
    background: var(--gold-grad-soft);
    border-color: var(--border-gold-2);
    box-shadow: var(--sh-sm);
}
.tn-avatar {
    width: 32px; height: 32px;
    border-radius: 999px;
    background: var(--gold-grad);
    display: grid; place-items: center;
    color: var(--ink-on-gold);
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px var(--gold-glow-2);
}
.tn-user-meta {
    line-height: 1.15;
    text-align: right;
    min-width: 0;
}
.tn-user-name {
    font-weight: 700;
    font-size: 12.5px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}
.tn-user-role {
    font-size: 10.5px;
    color: var(--ink-3);
    margin-top: 1px;
    white-space: nowrap;
}

.tn-user-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 230px;
    background: rgba(255, 252, 244, 0.96);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border-gold);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-2xl);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(.96);
    transform-origin: top left;
    transition: all var(--t-med) var(--e-out);
    z-index: 120;
}
.tn-user.open .tn-user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.tn-user-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    color: var(--ink-2);
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    transition: all var(--t-fast);
}
.tn-user-menu a svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.tn-user-menu a:hover { background: var(--gold-grad-soft); color: var(--ink); transform: translateX(-3px); }
.tn-user-menu a.danger { color: var(--amber-2); }
.tn-user-menu a.danger:hover { background: var(--amber-soft); color: var(--amber-2); }
.tn-user-menu .divider { height: 1px; background: var(--border); margin: 4px 0; }

/* الهامبرجر — touch-friendly size */
.tn-hamburger {
    display: none;
    width: 48px; height: 48px;
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px solid var(--border-gold-2);
    border-radius: var(--r-md);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s, background 0.15s, border-color 0.15s;
    box-shadow: var(--sh-sm);
}
.tn-hamburger:hover { background: var(--gold-grad-soft); }
.tn-hamburger:active { transform: scale(0.92); background: var(--gold-soft); }
.tn-hamburger svg { width: 22px; height: 22px; stroke: var(--ink); stroke-width: 2.2; fill: none; }

/* ═══════════════════════════════════════════════════
   6) PAGE BANNER
   ═══════════════════════════════════════════════════ */
.page-banner {
    max-width: var(--container);
    margin: 22px auto 0;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: bannerFade .6s var(--e-out);
}
@keyframes bannerFade {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}
.page-banner-ico {
    width: 54px; height: 54px;
    border-radius: 16px;
    background: var(--gold-grad);
    display: grid; place-items: center;
    font-size: 26px;
    box-shadow: var(--sh-gold);
    color: var(--ink-on-gold);
    flex-shrink: 0;
}
.page-banner-text h1 {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    color: var(--ink);
    line-height: 1.2;
}
.page-banner-text .sub {
    font-size: 13.5px;
    color: var(--ink-3);
    margin-top: 3px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════
   7) MOBILE DRAWER
   ═══════════════════════════════════════════════════ */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(31, 20, 8, 0.50);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--t-med);
}
.drawer {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    height: 100dvh;
    width: 88%;
    max-width: 380px;
    background: var(--surface);
    z-index: 201;
    box-shadow: -25px 0 70px rgba(31, 20, 8, 0.22);
    transform: translateX(105%);
    transition: transform var(--t-slow) var(--e-out);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
body.drawer-open .drawer-overlay { opacity: 1; visibility: visible; }
body.drawer-open .drawer { transform: translateX(0); }

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--gold-grad-soft);
    position: sticky; top: 0;
    z-index: 2;
}
.drawer-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.drawer-brand-logo {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--gold-grad);
    padding: 4px;
    box-shadow: var(--sh-sm);
    flex-shrink: 0;
}
.drawer-brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.drawer-brand-text { line-height: 1.15; min-width: 0; }
.drawer-brand-name { font-family: 'Reem Kufi', sans-serif; font-size: 17px; font-weight: 800; color: var(--ink); }
.drawer-brand-sub { font-size: 11px; color: var(--gold-700); font-weight: 700; margin-top: 2px; }
.drawer-close {
    width: 36px; height: 36px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    display: grid; place-items: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--ink);
    flex-shrink: 0;
    transition: all var(--t-fast);
}
.drawer-close:hover { background: rgba(255, 255, 255, 0.95); transform: rotate(90deg); }

.drawer-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 14px 14px 8px;
    padding: 16px 18px;
    min-height: 60px;
    background: var(--gold-grad);
    border-radius: var(--r-lg);
    color: var(--ink-on-gold) !important;
    text-decoration: none;
    font-weight: 900;
    font-size: 16px;
    box-shadow: var(--sh-gold);
    transition: transform 0.1s, box-shadow 0.2s;
}
.drawer-cta:active { transform: scale(0.97); }
.drawer-cta svg { width: 22px; height: 22px; stroke: var(--ink-on-gold); stroke-width: 2.2; fill: none; }

.drawer-nav { padding: 8px 14px 30px; flex: 1; }
.drawer-section { margin-bottom: 14px; }
.drawer-section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--gold-700);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    padding: 10px 8px 5px;
}
.drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 14px;
    min-height: 52px;
    margin: 3px 0;
    border-radius: var(--r-md);
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: transform 0.1s, background 0.15s, color 0.15s, box-shadow 0.2s;
}
.drawer-link svg { width: 20px; height: 20px; stroke: var(--gold-600); stroke-width: 2; fill: none; flex-shrink: 0; }
.drawer-link:hover { background: var(--gold-grad-soft); color: var(--ink); }
.drawer-link:active { transform: scale(0.97); background: var(--gold-soft); }
.drawer-link.active {
    background: var(--gold-grad);
    color: var(--ink-on-gold);
    box-shadow: 0 4px 12px var(--gold-glow-2);
}
.drawer-link.active svg { stroke: var(--ink-on-gold); }

/* ═══════════════════════════════════════════════════
   8) BUTTONS
   ═══════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    border-radius: var(--r-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--t-fast);
    white-space: nowrap;
    color: var(--ink);
    background: var(--surface);
    user-select: none;
    position: relative;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.disabled { opacity: .50; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--gold-grad);
    color: var(--ink-on-gold);
    border-color: transparent;
    box-shadow: 0 4px 14px var(--gold-glow-2);
}
.btn-primary:hover { box-shadow: 0 10px 28px var(--gold-glow-2); color: var(--ink-on-gold); }

.btn-outline {
    background: var(--surface);
    border-color: var(--border-2);
    color: var(--ink-2);
}
.btn-outline:hover {
    border-color: var(--gold-400);
    background: var(--gold-25);
    color: var(--gold-700);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ink-2);
}
.btn-ghost:hover { background: var(--gold-soft); color: var(--gold-700); }

.btn-glass {
    background: rgba(255, 255, 255, 0.60);
    backdrop-filter: blur(14px);
    border-color: rgba(255, 255, 255, 0.85);
    color: var(--ink);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.85); }

.btn-success { background: var(--emerald); color: #fff; border-color: transparent; }
.btn-success:hover { background: #246e44; color: #fff; }
.btn-danger  { background: var(--rust); color: #fff; border-color: transparent; }
.btn-danger:hover { background: #8a4818; color: #fff; }
.btn-warning { background: var(--amber); color: #fff; border-color: transparent; }
.btn-warning:hover { background: var(--amber-2); color: #fff; }
.btn-info    { background: var(--sky); color: #fff; border-color: transparent; }

.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-lg { padding: 14px 26px; font-size: 15.5px; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn-icon { padding: 10px; width: 40px; height: 40px; }
.btn-icon.btn-sm { width: 32px; height: 32px; padding: 6px; }

.btn-icon-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-2);
    background: var(--surface);
    color: var(--ink-2);
    cursor: pointer;
    transition: all var(--t-fast);
    text-decoration: none;
    font-size: 15px;
}
.btn-icon-act:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); }
.btn-act-print:hover { background: var(--sky-soft); color: var(--sky); border-color: var(--sky); }
.btn-act-wa:hover    { background: rgba(37, 211, 102, 0.13); color: #128c7e; border-color: #25d366; }
.btn-act-view:hover  { background: var(--gold-soft); color: var(--gold-700); border-color: var(--gold-400); }

/* ═══════════════════════════════════════════════════
   9) CARDS
   ═══════════════════════════════════════════════════ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    transition: box-shadow var(--t-med), transform var(--t-med), border-color var(--t-med);
}
.card:hover { box-shadow: var(--sh-md); border-color: var(--border-2); }
.card.no-hover:hover { box-shadow: var(--sh-sm); border-color: var(--border); }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to bottom, var(--surface-2), var(--surface));
}
.card-title {
    font-family: 'Reem Kufi', sans-serif;
    font-size: 16.5px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-title::before {
    content: '';
    width: 4px; height: 18px;
    background: var(--gold-grad);
    border-radius: 999px;
    flex-shrink: 0;
}
.card-body { padding: 22px; }
.card-body.compact { padding: 14px 18px; }
.card-body.no-pad { padding: 0; }
.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    transition: box-shadow var(--t-med);
}
.panel:hover { box-shadow: var(--sh-md); }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to bottom, var(--surface-2), var(--surface));
    gap: 12px;
}
.panel-head h3 { font-family: 'Reem Kufi', sans-serif; font-size: 16px; margin: 0; color: var(--ink); display:flex; align-items:center; gap: 8px; }
.panel-head small { color: var(--ink-3); font-size: 12px; font-weight: 600; margin-top: 2px; display: block; }
.panel-head-meta { text-align: left; font-size: 12px; color: var(--ink-3); }
.panel-head-meta strong { color: var(--gold-700); font-size: 15px; display: block; margin-top: 2px; }
.panel-body { padding: 22px; }

/* ═══════════════════════════════════════════════════
   10) GRID
   ═══════════════════════════════════════════════════ */
.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
}
.col-1  { grid-column: span 1; }
.col-2  { grid-column: span 2; }
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-12 { grid-column: span 12; }

@media (max-width: 1100px) {
    .col-3, .col-4 { grid-column: span 6; }
}
@media (max-width: 760px) {
    .row { grid-template-columns: 1fr; gap: 14px; }
    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-12 { grid-column: 1 / -1; }
}

/* ═══════════════════════════════════════════════════
   11) FORMS
   ═══════════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-weight: 700;
    font-size: 13.5px;
    color: var(--ink);
    margin-bottom: 7px;
}
.req { color: var(--rust); margin-right: 3px; font-weight: 800; }

.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink) !important;
    background: var(--surface) !important;
    border: 1.5px solid var(--border-2) !important;
    border-radius: var(--r-md) !important;
    transition: all var(--t-fast);
    box-shadow: var(--sh-xs);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--gold-400) !important;
    box-shadow: var(--sh-ring), var(--sh-xs) !important;
}
.form-control:disabled, input:disabled, select:disabled, textarea:disabled {
    background: var(--surface-2) !important;
    color: var(--ink-3) !important;
    cursor: not-allowed;
}
textarea {
    min-height: 90px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}
.form-select,
select {
    padding-left: 38px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a7560' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 14px center !important;
    background-size: 14px !important;
}

input[type="checkbox"], input[type="radio"] {
    width: 18px; height: 18px;
    accent-color: var(--gold-500);
    cursor: pointer;
    margin-left: 6px;
}

.form-hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--amber-2); margin-top: 4px; font-weight: 600; }
.input-with-icon { position: relative; }
.input-with-icon input { padding-right: 42px !important; }
.input-with-icon .ico {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--ink-3);
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════
   12) TABLES
   ═══════════════════════════════════════════════════ */
.table-wrap, .enhanced-table {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--sh-sm);
}
.table-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.table-toolbar .search,
.table-toolbar input[type="search"],
.table-toolbar input[type="text"] {
    flex: 1;
    min-width: 200px;
}

table, .tbl {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}
table th, .tbl th {
    text-align: right;
    padding: 13px 16px;
    background: var(--surface-2);
    color: var(--ink);
    font-weight: 800;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-2);
    white-space: nowrap;
}
table td, .tbl td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--ink-2);
    vertical-align: middle;
}
table tbody tr, .tbl tbody tr { transition: background var(--t-fast); }
table tbody tr:hover, .tbl tbody tr:hover { background: var(--gold-25); }
table tbody tr:last-child td, .tbl tbody tr:last-child td { border-bottom: none; }
td.num, th.num, .text-end { text-align: left; }

.progress-cell { min-width: 120px; }
.progress {
    height: 8px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}
.progress > span,
.progress > div {
    display: block;
    height: 100%;
    background: var(--gold-grad);
    border-radius: 999px;
    transition: width var(--t-slow);
}

/* ═══════════════════════════════════════════════════
   13) BADGES & PILLS
   ═══════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--gold-700);
    line-height: 1.4;
}
.badge.success { background: var(--emerald-soft); color: var(--emerald); }
.badge.warning { background: var(--amber-soft);   color: var(--amber-2); }
.badge.danger  { background: var(--rust-soft);    color: var(--rust); }
.badge.info    { background: var(--sky-soft);     color: var(--sky); }
.badge.violet  { background: var(--violet-soft);  color: var(--violet); }
.badge.gold    { background: var(--gold-soft);    color: var(--gold-700); }
.badge.teal    { background: var(--teal-soft);    color: var(--teal); }
.badge.muted   { background: var(--surface-3);    color: var(--ink-3); }

.klj-method-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    background: var(--surface-3);
    color: var(--ink-2);
}

/* ═══════════════════════════════════════════════════
   14) ALERTS — بدون أحمر
   ═══════════════════════════════════════════════════ */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--r-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    border-right: 4px solid var(--gold-500);
    box-shadow: var(--sh-sm);
    margin-bottom: 18px;
    font-weight: 600;
    color: var(--ink) !important;
    animation: alertSlide .4s var(--e-spring);
}
.alert * { color: var(--ink) !important; }
@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════
   15) MODALS
   ═══════════════════════════════════════════════════ */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(31, 20, 8, 0.55);
    backdrop-filter: blur(8px);
    z-index: 300;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px;
    overflow-y: auto;
    animation: fadeIn .25s var(--e-smooth);
}
.modal-bg.open,
.modal-bg.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    width: 100%;
    max-width: 540px;
    background: var(--surface);
    border-radius: var(--r-2xl);
    box-shadow: var(--sh-2xl);
    overflow: hidden;
    animation: modalSlide .4s var(--e-spring);
}
@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-20px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal.modal-lg { max-width: 800px; }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to bottom, var(--surface-2), var(--surface));
}
.modal-title {
    font-family: 'Reem Kufi', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
}
.modal-close {
    width: 34px; height: 34px;
    border-radius: var(--r-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--ink-2);
    font-size: 16px;
    display: grid; place-items: center;
    cursor: pointer;
    transition: all var(--t-fast);
}
.modal-close:hover { background: var(--gold-soft); color: var(--gold-700); transform: rotate(90deg); }
.modal-body { padding: 24px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

/* ═══════════════════════════════════════════════════
   16) STATS / KPI
   ═══════════════════════════════════════════════════ */
.stats, .compact-stats, .kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat, .mini-stat, .stat-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 20px 22px;
    box-shadow: var(--sh-sm);
    position: relative;
    overflow: hidden;
    transition: all var(--t-med);
}
.stat::before, .mini-stat::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: var(--gold-grad);
    opacity: 0.08;
    border-radius: 0 0 0 100%;
    transition: all var(--t-med);
}
.stat:hover, .mini-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-md);
    border-color: var(--border-gold);
}
.stat:hover::before, .mini-stat:hover::before { opacity: 0.18; }

.stat-icon {
    display: inline-grid;
    place-items: center;
    width: 44px; height: 44px;
    background: var(--gold-grad-soft);
    border-radius: var(--r-md);
    margin-bottom: 12px;
    font-size: 20px;
    color: var(--gold-700);
}
.stat-label, .mini-stat .l {
    font-size: 12.5px;
    color: var(--ink-3);
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.stat-value, .mini-stat .v {
    font-size: 26px;
    font-weight: 800;
    color: var(--ink) !important;
    font-family: 'Tajawal', 'Cairo', sans-serif;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.stat-change, .stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--emerald-soft);
    color: var(--emerald);
}
.stat-change.down { background: var(--amber-soft); color: var(--amber-2); }
.stat-change.neutral { background: var(--surface-3); color: var(--ink-3); }

.stat.success { border-right: 4px solid var(--emerald); }
.stat.warning { border-right: 4px solid var(--amber); }
.stat.info    { border-right: 4px solid var(--sky); }
.stat.gold    { border-right: 4px solid var(--gold-500); }
.stat.danger  { border-right: 4px solid var(--rust); }

/* KPI Tile */
.kpi-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 20px;
    box-shadow: var(--sh-sm);
    position: relative;
    overflow: hidden;
    transition: all var(--t-med);
    --accent: var(--gold-500);
}
.kpi-tile::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    height: 3px; width: 100%;
    background: var(--accent);
}
.kpi-tile::after {
    content: '';
    position: absolute;
    top: -40%; left: -10%;
    width: 60%; height: 100%;
    background: radial-gradient(circle, var(--accent), transparent 60%);
    opacity: 0.06;
    transition: opacity var(--t-med);
    pointer-events: none;
}
.kpi-tile:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); }
.kpi-tile:hover::after { opacity: 0.14; }
.kpi-tile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kpi-tile-ico {
    width: 44px; height: 44px;
    border-radius: var(--r-md);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
    display: grid; place-items: center;
    font-size: 20px;
    transition: all var(--t-med) var(--e-spring);
}
.kpi-tile:hover .kpi-tile-ico { transform: rotate(-8deg) scale(1.1); }
.kpi-tile-label { font-size: 13px; color: var(--ink-3); font-weight: 700; margin-bottom: 6px; }
.kpi-tile-val   {
    font-size: 28px; font-weight: 800;
    color: var(--ink) !important;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.kpi-tile-val small { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-right: 4px; }
.kpi-tile-tag   {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 8px; padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px; font-weight: 700;
    background: var(--surface-3); color: var(--ink-3);
}
.kpi-tile-tag.up   { background: var(--emerald-soft); color: var(--emerald); }
.kpi-tile-tag.down { background: var(--amber-soft); color: var(--amber-2); }
.kpi-tile-tag.warn { background: var(--amber-soft); color: var(--amber-2); }
.kpi-tile-foot { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.kpi-tile-foot a { color: var(--gold-700); font-weight: 700; }

/* Bento Layout */
.dash-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    margin-top: 18px;
}
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.bento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 22px;
    box-shadow: var(--sh-sm);
}

/* Bento Hero */
.bento-hero {
    background: var(--gold-grad-deep);
    color: var(--ink-on-dark);
    border-radius: var(--r-2xl);
    padding: 36px 32px;
    box-shadow: var(--sh-gold-lg);
    position: relative;
    overflow: hidden;
}
.bento-hero::after {
    content: '';
    position: absolute;
    top: -60%; left: -10%;
    width: 80%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 60%);
    pointer-events: none;
}
.bento-hero-main { position: relative; z-index: 2; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 13px;
    background: rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.30);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    font-size: 12px; font-weight: 700;
    margin-bottom: 14px;
    color: #fff;
}
.hero-title { font-size: 30px; font-weight: 800; margin: 0 0 8px; color: #fff; line-height: 1.2; }
.hero-desc  { font-size: 15px; color: rgba(255,255,255,0.92); margin: 0 0 20px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════
   17) PAGE HEADER
   ═══════════════════════════════════════════════════ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.page-title {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}
.page-icon {
    width: 52px; height: 52px;
    border-radius: 16px;
    background: var(--gold-grad);
    display: grid; place-items: center;
    font-size: 26px;
    box-shadow: var(--sh-gold);
    color: var(--ink-on-gold);
    flex-shrink: 0;
}
.page-title h1 { font-size: 24px; margin: 0; font-weight: 800; color: var(--ink); }
.page-sub { font-size: 13.5px; color: var(--ink-3); margin-top: 3px; font-weight: 500; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ═══════════════════════════════════════════════════
   18) EMPTY STATES
   ═══════════════════════════════════════════════════ */
.empty, .empty-state, .panel-empty {
    text-align: center;
    padding: 50px 30px;
    color: var(--ink-3);
}
.empty-state-icon, .empty .icon, .panel-empty .ico {
    width: 80px; height: 80px;
    margin: 0 auto 16px;
    background: var(--gold-grad-soft);
    border-radius: var(--r-xl);
    display: grid; place-items: center;
    font-size: 38px;
    box-shadow: var(--sh-sm);
    color: var(--gold-700);
}
.empty h3, .empty-state h3 { font-size: 18px; color: var(--ink); margin: 0 0 6px; }
.empty p, .empty-state p, .panel-empty p {
    font-size: 14px; color: var(--ink-2); margin: 0 0 8px;
    font-weight: 600;
}
.panel-empty small { font-size: 12.5px; color: var(--ink-3); display: block; }

/* ═══════════════════════════════════════════════════
   19) DASHBOARD COMPONENTS
   ═══════════════════════════════════════════════════ */
/* Hero Mesh */
.hero-mesh {
    position: relative;
    background: var(--gold-grad-deep);
    color: var(--ink-on-dark);
    border-radius: var(--r-2xl);
    padding: 36px 36px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: var(--sh-gold-lg);
}
.hero-mesh-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
}
.mesh-1 { top: -30%; right: -10%; width: 60%; height: 80%; background: var(--gold-200); animation: blobFloat 18s infinite ease-in-out; }
.mesh-2 { bottom: -40%; left: -20%; width: 70%; height: 90%; background: var(--gold-400); animation: blobFloat 22s infinite ease-in-out reverse; }
.mesh-3 { top: 20%; left: 30%; width: 50%; height: 60%; background: var(--gold-100); opacity: 0.3; animation: blobFloat 26s infinite ease-in-out; }
@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, -30px) scale(1.15); }
}
.mesh-noise {
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.6;
}
.hero-mesh-content {
    position: relative; z-index: 2;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 28px;
    align-items: center;
}
@media (max-width: 900px) { .hero-mesh-content { grid-template-columns: 1fr; } }
.hero-mesh-left { min-width: 0; }
.hero-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.20);
    border: 1px solid rgba(255,255,255,0.32);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    font-size: 12.5px; font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}
.hero-pill .dot {
    width: 7px; height: 7px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
    animation: pulseGently 2s infinite;
}
@keyframes pulseGently {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}
.hero-mesh-title {
    font-family: 'Reem Kufi', sans-serif;
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 10px;
    color: #fff;
    line-height: 1.15;
}
.hero-mesh-title em {
    font-style: normal;
    background: linear-gradient(135deg, #fdf6e3, #f0cf83);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-mesh-sub {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 22px;
    line-height: 1.7;
    max-width: 540px;
}
.hero-mesh-cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.cta-primary, .seed-banner-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 24px;
    background: #fff;
    color: var(--gold-800) !important;
    border-radius: var(--r-md);
    font-weight: 800;
    font-family: 'Reem Kufi', sans-serif;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(31, 20, 8, 0.18);
    transition: all var(--t-fast);
}
.cta-primary:hover, .seed-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(31, 20, 8, 0.24);
    color: var(--gold-800) !important;
}
.cta-primary .ico { font-size: 18px; }
.cta-primary strong { display: block; font-size: 14px; line-height: 1.2; }
.cta-primary small  { display: block; font-size: 11.5px; opacity: 0.8; font-weight: 600; }
.cta-primary .arrow { transition: transform var(--t-fast); margin-right: 4px; }
.cta-primary:hover .arrow { transform: translateX(-4px); }

.cta-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 20px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(12px);
    border-radius: var(--r-md);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all var(--t-fast);
}
.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff !important;
    transform: translateY(-2px);
}

/* Hero side stat */
.hero-mesh-stat {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(16px);
    border-radius: var(--r-xl);
    padding: 22px 24px;
    color: #fff;
    position: relative;
    z-index: 2;
}
.hero-mesh-stat .hms-label {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.hero-mesh-stat .hms-value {
    font-family: 'Reem Kufi', sans-serif;
    font-size: 38px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.hero-mesh-stat .hms-value span {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-right: 6px;
}
.hero-mesh-stat .hms-meta {
    display: flex; align-items: center; gap: 8px;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12.5px;
}
.hero-mesh-stat .hms-trend {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
}
.hero-mesh-stat .hms-trend.up   { background: rgba(74, 222, 128, 0.25); color: #c6f6d5; }
.hero-mesh-stat .hms-trend.down { background: rgba(251, 191, 36, 0.25); color: #fef3c7; }
.hero-mesh-stat .hms-mini {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.20);
    display: grid; gap: 8px;
}
.hms-mini-row { display: flex; justify-content: space-between; font-size: 13px; }
.hms-mini-row .lbl { color: rgba(255, 255, 255, 0.78); }
.hms-mini-row .val { color: #fff; font-weight: 800; }

/* Seed banner */
.seed-banner {
    position: relative;
    background: var(--gold-grad-deep);
    color: var(--ink-on-dark);
    border-radius: var(--r-2xl);
    padding: 24px 28px;
    margin-bottom: 22px;
    overflow: hidden;
    box-shadow: var(--sh-gold-lg);
    animation: bannerFade .6s var(--e-out);
}
.seed-banner-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.20), transparent 50%);
    pointer-events: none;
    animation: blobFloat 18s ease-in-out infinite alternate;
}
.seed-banner-content {
    position: relative; z-index: 2;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.seed-banner-icon {
    width: 60px; height: 60px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(10px);
    border-radius: var(--r-lg);
    display: grid; place-items: center;
    font-size: 32px;
    color: #fff;
    flex-shrink: 0;
}
.seed-banner-text { flex: 1; min-width: 200px; }
.seed-banner-text strong {
    display: block;
    font-family: 'Reem Kufi', sans-serif;
    font-size: 18px;
    color: #fff;
    margin-bottom: 4px;
    font-weight: 800;
}
.seed-banner-text small {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.6;
}
.seed-banner-btn .arrow { transition: transform var(--t-fast); }
.seed-banner-btn:hover .arrow { transform: translateX(-4px); }

/* Dashboard chart */
.dash-chart { padding: 24px; display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; }
.dch-col { flex: 1; text-align: center; min-width: 0; }
.dch-bar-wrap { height: 140px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 8px; }
.dch-bar {
    width: 32px;
    background: var(--gold-grad);
    border-radius: 10px 10px 0 0;
    transition: height var(--t-slow) var(--e-spring), filter var(--t-fast);
    box-shadow: 0 -4px 14px var(--gold-glow);
    min-height: 8px;
}
.dch-bar:hover { filter: brightness(1.08); }
.dch-bar.is-max { background: var(--gold-grad-deep); box-shadow: 0 -6px 18px var(--gold-glow-2); }
.dch-val { font-size: 12px; font-weight: 800; color: var(--ink); }
.dch-lbl { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; font-weight: 600; }

/* Top list / Invoice list */
.top-list, .inv-list { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; }
.top-row, .inv-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: all var(--t-fast);
    text-decoration: none;
    color: inherit;
}
.top-row:hover, .inv-row:hover {
    background: var(--gold-25);
    border-color: var(--border-gold);
    transform: translateX(-4px);
    box-shadow: var(--sh-sm);
}
.top-rank, .inv-meth {
    width: 38px; height: 38px;
    border-radius: 11px;
    background: var(--gold-grad-soft);
    display: grid; place-items: center;
    font-weight: 800;
    color: var(--gold-700);
    flex-shrink: 0;
    font-size: 15px;
}
.top-body, .inv-body { flex: 1; min-width: 0; }
.top-name { font-weight: 700; color: var(--ink); font-size: 14px; }
.inv-top { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); font-size: 13.5px; }
.inv-num { font-weight: 800; color: var(--ink); font-size: 13.5px; }
.inv-status { font-size: 10.5px; padding: 2px 9px; border-radius: 999px; background: var(--surface-3); color: var(--ink-3); font-weight: 700; }
.inv-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.inv-amt { text-align: left; flex-shrink: 0; }
.inv-amt strong { font-weight: 800; color: var(--gold-700); font-size: 15px; }
.inv-amt small { font-size: 11px; color: var(--ink-3); margin-right: 3px; }
.top-vals { text-align: left; font-size: 12px; color: var(--ink-3); flex-shrink: 0; }
.top-qty { font-weight: 800; color: var(--ink); font-size: 14px; }
.top-bar { height: 4px; background: var(--surface-3); border-radius: 999px; margin-top: 4px; overflow: hidden; }
.top-bar > span, .top-bar > div { display: block; height: 100%; background: var(--gold-grad); border-radius: 999px; }
.top-em {
    width: 38px; height: 38px;
    border-radius: 11px;
    display: grid; place-items: center;
    font-size: 22px;
    flex-shrink: 0;
}

.panel-link {
    color: var(--gold-700);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--t-fast);
}
.panel-link:hover { color: var(--gold-800); transform: translateX(-3px); }

/* ═══════════════════════════════════════════════════
   20) PRODUCT CARDS
   ═══════════════════════════════════════════════════ */
.klj-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.klj-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    transition: all var(--t-med);
    display: flex;
    flex-direction: column;
}
.klj-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-lg);
    border-color: var(--border-gold-2);
}
.klj-card-image {
    height: 150px;
    background: var(--gold-grad-soft);
    display: grid; place-items: center;
    position: relative;
    overflow: hidden;
}
.klj-card-image img { width: 100%; height: 100%; object-fit: cover; }
.klj-card-emoji { font-size: 52px; }
.klj-card-flag {
    position: absolute;
    top: 10px; right: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: var(--emerald-soft);
    color: var(--emerald);
    backdrop-filter: blur(6px);
}
.flag-off { background: rgba(255,255,255,0.85); color: var(--ink-3); }
.flag-low { background: var(--amber-soft); color: var(--amber-2); }
.klj-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.klj-card-cat { font-size: 11px; color: var(--gold-700); font-weight: 700; }
.klj-card-name { font-weight: 700; color: var(--ink); font-size: 14.5px; line-height: 1.3; }
.klj-card-meta { font-size: 12px; color: var(--ink-3); }
.klj-card-code { font-family: 'SF Mono', monospace; font-size: 11px; color: var(--ink-3); }
.klj-card-unit { font-size: 11.5px; color: var(--ink-3); }
.klj-card-prices { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.klj-price-sale { font-weight: 800; color: var(--gold-700); font-size: 17px; }
.klj-price-cost { font-size: 11.5px; color: var(--ink-3); }
.klj-card-stock { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.klj-card-actions {
    display: flex; gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}
.klj-img-uploader {
    position: relative;
    display: grid; place-items: center;
    width: 100%; height: 100%;
    background: var(--gold-grad-soft);
    cursor: pointer;
    transition: all var(--t-fast);
    overflow: hidden;
}
.klj-img-uploader:hover { background: var(--gold-100); }
.klj-img-uploader img { width: 100%; height: 100%; object-fit: cover; }
.klj-img-uploader input[type="file"] { display: none; }

.klj-switch {
    position: relative;
    width: 38px; height: 22px;
    background: var(--surface-3);
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--t-fast);
}
.klj-switch::after {
    content: '';
    position: absolute;
    top: 2px; right: 2px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: all var(--t-fast);
    box-shadow: var(--sh-xs);
}
.klj-switch.on { background: var(--gold-500); }
.klj-switch.on::after { right: 18px; }

/* ═══════════════════════════════════════════════════
   21) UTILITIES
   ═══════════════════════════════════════════════════ */
.text-muted { color: var(--ink-3) !important; }
.text-gold  { color: var(--gold-700) !important; }
.text-success { color: var(--emerald) !important; }
.text-warning { color: var(--amber-2) !important; }
.text-danger  { color: var(--rust) !important; }
.text-end { text-align: end; }
.text-center { text-align: center; }
.text-start { text-align: start; }
.fs-11 { font-size: 11px; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; } .fs-16 { font-size: 16px; } .fs-18 { font-size: 18px; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; } .fw-800 { font-weight: 800; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 8px !important; }  .mb-3 { margin-bottom: 14px !important; }
.mb-4 { margin-bottom: 20px !important; } .mb-5 { margin-bottom: 28px !important; }
.gap-2 { gap: 8px; } .gap-3 { gap: 14px; } .gap-4 { gap: 20px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }

/* ═══════════════════════════════════════════════════
   22) RESPONSIVE — برنامج صديق للمس (raised breakpoints)
   ═══════════════════════════════════════════════════ */
/* Below ~1500px the full 8-group desktop nav stops fitting
   alongside search + actions, so we tier features off in steps. */
@media (max-width: 1500px) {
    .tn-search { width: 180px; }
    .tn-brand-text { display: none; }
    .tn-link { padding: 9px 11px; font-size: 13px; }
}
@media (max-width: 1300px) {
    .tn-search { display: none; }
    .tn-user-meta { display: none; }
    .tn-link { padding: 9px 10px; font-size: 12.5px; gap: 5px; }
    .tn-link span { max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
}
/* Switch to drawer (hamburger) early so touchscreen tablets
   never need to swipe sideways to reach hidden menu items. */
@media (max-width: 1200px) {
    .tn-nav { display: none; }
    .tn-hamburger { display: inline-flex; }
    .tn-cta span { display: none; }
    .tn-cta { padding: 0 12px; }
}
@media (max-width: 760px) {
    .topnav { padding: 10px 8px 0; }
    .topnav-inner { padding: 0 6px 0 10px; height: 64px; border-radius: var(--r-xl); }
    .tn-brand-logo { width: 38px; height: 38px; border-radius: 11px; }
    .app-content, .content { padding: 18px 14px 60px; }
    .page-banner { padding: 0 14px; margin-top: 16px; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .card-body { padding: 16px; }
    .modal-bg { padding: 20px 12px; }
    .hero-mesh-title, .hero-title { font-size: 26px; }
    .hero-mesh, .seed-banner { padding: 24px 18px; }
}

/* ═══════════════════════════════════════════════════
   23) PRINT
   ═══════════════════════════════════════════════════ */
@media print {
    .topnav, .drawer, .drawer-overlay, .no-print, .page-actions, .btn { display: none !important; }
    body { background: #fff !important; }
    .content { padding: 0; }
    .card { border: 1px solid #ccc; box-shadow: none; }
}
