
      :root {
        --brand-1: #6b3f1d;
        --brand-2: #a86b2d;
        --brand-3: #d99a4e;
        --brand-4: #f0c98a;
        --brand-light: #fdf6ec;
        --sidebar-w: 280px;
        --sidebar-w-collapsed: 78px;
        --header-h: 64px;
        --bg: #f5f6fa;
        --card-radius: 16px;
        --shadow-sm: 0 2px 8px rgba(107, 63, 29, 0.06);
        --shadow-md: 0 8px 24px rgba(107, 63, 29, 0.08);
      }
      * {
        font-family: "Vazirmatn", system-ui, sans-serif;
      }
      body {
        background: var(--bg);
        color: #2b2b2b;
        overflow-x: hidden;
      }

      .app {
        display: flex;
        min-height: 100vh;
      }

      /* ============ Sidebar ============ */
      .sidebar {
        width: var(--sidebar-w);
        background: #fff;
        border-left: 1px solid #eef0f4;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        display: flex;
        flex-direction: column;
        transition:
          width 0.25s ease,
          transform 0.25s ease;
        box-shadow: var(--shadow-sm);
      }
      .sidebar-brand {
        height: var(--header-h);
        display: flex;
        align-items: center;
        gap: 0.65rem;
        padding: 0 1.25rem;
        border-bottom: 1px solid #eef0f4;
        flex-shrink: 0;
      }
      .sidebar-brand .logo {
        width: 38px;
        height: 38px;
        border-radius: 11px;
        flex-shrink: 0;
        background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
        display: grid;
        place-items: center;
        color: #fff;
        font-size: 1.15rem;
        box-shadow: 0 4px 12px rgba(168, 107, 45, 0.35);
      }
      .sidebar-brand .brand-text {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
      }
      .sidebar-brand .brand-text b {
        font-size: 1.02rem;
        color: var(--brand-1);
      }
      .sidebar-brand .brand-text small {
        font-size: 0.7rem;
        color: #9aa0ac;
      }

      .sidebar-nav {
        flex: 1;
        overflow-y: auto;
        padding: 0.75rem 0.6rem 5rem;
      }
      .sidebar-nav::-webkit-scrollbar {
        width: 6px;
      }
      .sidebar-nav::-webkit-scrollbar-thumb {
        background: #e6e1d8;
        border-radius: 10px;
      }
      .nav-section {
        font-size: 0.7rem;
        font-weight: 700;
        color: #a8aab3;
        padding: 1rem 0.75rem 0.4rem;
        letter-spacing: 0.4px;
      }
      .nav-link {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        padding: 0.6rem 0.75rem;
        border-radius: 11px;
        color: #545a68;
        font-size: 0.875rem;
        font-weight: 500;
        transition: all 0.18s;
        white-space: nowrap;
      }
      .nav-link i.nav-ico {
        font-size: 1.05rem;
        color: #8b8f9a;
        transition: color 0.18s;
        flex-shrink: 0;
        width: 22px;
        text-align: center;
      }
      .nav-link:hover {
        background: var(--brand-light);
        color: var(--brand-1);
      }
      .nav-link:hover i.nav-ico {
        color: var(--brand-2);
      }
      .nav-link.active {
        background: linear-gradient(
          90deg,
          rgba(168, 107, 45, 0.14),
          rgba(168, 107, 45, 0.04)
        );
        color: var(--brand-1);
        font-weight: 600;
      }
      .nav-link.active i.nav-ico {
        color: var(--brand-2);
      }
      .nav-link .badge {
        margin-inline-start: auto;
      }
      .nav-link .caret {
        margin-inline-start: auto;
        font-size: 0.75rem;
        transition: transform 0.2s;
      }
      .nav-link[aria-expanded="true"] .caret {
        transform: rotate(180deg);
      }
      .submenu {
        list-style: none;
        padding: 0.15rem 0.5rem 0.15rem 0;
        margin: 0;
      }
      .submenu .nav-link {
        padding: 0.5rem 0.75rem 0.5rem 2.2rem;
        font-size: 0.82rem;
        color: #6b7080;
        position: relative;
      }
      .submenu .nav-link::before {
        content: "";
        position: absolute;
        right: 1.35rem;
        top: 50%;
        transform: translateY(-50%);
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #d8d8dc;
        transition: background 0.18s;
      }
      .submenu .nav-link:hover::before,
      .submenu .nav-link.active::before {
        background: var(--brand-2);
      }

      body.sb-collapsed .sidebar {
        width: var(--sidebar-w-collapsed);
      }
      body.sb-collapsed .sidebar-brand .brand-text,
      body.sb-collapsed .nav-section,
      body.sb-collapsed .nav-link span,
      body.sb-collapsed .nav-link .badge,
      body.sb-collapsed .nav-link .caret {
        display: none;
      }
      body.sb-collapsed .nav-link {
        justify-content: center;
        padding: 0.7rem;
      }
      body.sb-collapsed .submenu {
        display: none;
      }
      body.sb-collapsed .app-main {
        margin-right: var(--sidebar-w-collapsed);
      }

      /* ============ Main ============ */
      .app-main {
        flex: 1;
        margin-right: var(--sidebar-w);
        transition: margin 0.25s ease;
        min-width: 0;
        display: flex;
        flex-direction: column;
      }
      .topbar {
        height: var(--header-h);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid #eef0f4;
        position: sticky;
        top: 0;
        z-index: 1030;
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0 1.5rem;
      }
      .topbar .search {
        flex: 1;
        max-width: 380px;
        position: relative;
      }
      .topbar .search i {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: #a8aab3;
      }
      .topbar .search input {
        width: 100%;
        border: 1px solid #eef0f4;
        background: #f7f8fb;
        border-radius: 12px;
        padding: 0.55rem 2.5rem 0.55rem 1rem;
        font-size: 0.85rem;
        outline: none;
        transition: 0.18s;
      }
      .topbar .search input:focus {
        background: #fff;
        border-color: var(--brand-3);
        box-shadow: 0 0 0 4px rgba(217, 154, 78, 0.15);
      }

      .lang-switch {
        display: flex;
        gap: 0.15rem;
        background: #f7f8fb;
        border: 1px solid #eef0f4;
        border-radius: 10px;
        padding: 0.2rem;
      }
      .lang-switch a {
        padding: 0.3rem 0.65rem;
        font-size: 0.75rem;
        font-weight: 600;
        color: #6b7080;
        border-radius: 7px;
        text-decoration: none;
        transition: 0.15s;
      }
      .lang-switch a.active {
        background: var(--brand-2);
        color: #fff;
      }
      .lang-switch a:hover:not(.active) {
        background: #fff;
        color: var(--brand-1);
      }

      .icon-btn {
        width: 40px;
        height: 40px;
        border-radius: 11px;
        border: 1px solid #eef0f4;
        background: #fff;
        display: grid;
        place-items: center;
        color: #545a68;
        position: relative;
        transition: 0.18s;
      }
      .icon-btn:hover {
        background: var(--brand-light);
        color: var(--brand-1);
        border-color: var(--brand-4);
      }
      .icon-btn .dot {
        position: absolute;
        top: 8px;
        left: 9px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ef4444;
        border: 2px solid #fff;
      }
      .avatar {
        width: 40px;
        height: 40px;
        border-radius: 11px;
        object-fit: cover;
        border: 2px solid var(--brand-4);
      }

      /* ============ Page ============ */
      .page {
        padding: 1.5rem;
      }
      .page-head {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.25rem;
      }
      .page-head h1 {
        font-size: 1.35rem;
        font-weight: 700;
        color: #1f2430;
        margin: 0;
      }
      .page-head .crumb {
        font-size: 0.78rem;
        color: #9aa0ac;
        margin-top: 0.25rem;
      }
      .page-head .crumb a {
        color: var(--brand-2);
        text-decoration: none;
      }

      /* ============ Stats ============ */
      .stat {
        background: #fff;
        border-radius: var(--card-radius);
        padding: 1.1rem 1.15rem;
        border: 1px solid #eef0f4;
        box-shadow: var(--shadow-sm);
        position: relative;
        overflow: hidden;
        transition:
          transform 0.2s,
          box-shadow 0.2s;
        height: 100%;
      }
      .stat:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
      }
      .stat::after {
        content: "";
        position: absolute;
        top: -30px;
        left: -30px;
        width: 100px;
        height: 100px;
        border-radius: 50%;
        background: var(--brand-light);
        opacity: 0.7;
        z-index: 0;
      }
      .stat .ico {
        width: 46px;
        height: 46px;
        border-radius: 13px;
        display: grid;
        place-items: center;
        font-size: 1.25rem;
        color: #fff;
        position: relative;
        z-index: 1;
        flex-shrink: 0;
      }
      .stat .lbl {
        font-size: 0.78rem;
        color: #8b8f9a;
        font-weight: 500;
      }
      .stat .val {
        font-size: 1.5rem;
        font-weight: 800;
        color: #1f2430;
        line-height: 1.2;
        margin-top: 0.15rem;
      }
      .stat .chg {
        font-size: 0.75rem;
        font-weight: 600;
        margin-top: 0.35rem;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
      }
      .chg.up {
        color: #10b981;
      }
      .chg.down {
        color: #ef4444;
      }
      .bg-grad-1 {
        background: linear-gradient(135deg, #a86b2d, #d99a4e);
      }
      .bg-grad-2 {
        background: linear-gradient(135deg, #10b981, #34d399);
      }
      .bg-grad-3 {
        background: linear-gradient(135deg, #3b82f6, #60a5fa);
      }
      .bg-grad-4 {
        background: linear-gradient(135deg, #8b5cf6, #a78bfa);
      }
      .bg-grad-5 {
        background: linear-gradient(135deg, #ef4444, #f87171);
      }
      .bg-grad-6 {
        background: linear-gradient(135deg, #0891b2, #22d3ee);
      }
      .bg-grad-7 {
        background: linear-gradient(135deg, #f59e0b, #fbbf24);
      }
      .bg-grad-8 {
        background: linear-gradient(135deg, #6b3f1d, #a86b2d);
      }

      /* ============ Cards ============ */
      .card-x {
        background: #fff;
        border-radius: var(--card-radius);
        border: 1px solid #eef0f4;
        box-shadow: var(--shadow-sm);
        height: 100%;
      }
      .card-x .card-x-head {
        padding: 1rem 1.15rem;
        border-bottom: 1px solid #f1f2f6;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
      }
      .card-x .card-x-head h6 {
        font-size: 0.95rem;
        font-weight: 700;
        margin: 0;
        color: #1f2430;
      }
      .card-x .card-x-head .sub {
        font-size: 0.72rem;
        color: #9aa0ac;
        margin-top: 0.15rem;
      }
      .card-x .card-x-body {
        padding: 1.15rem;
      }
      .chart-box {
        position: relative;
        height: 280px;
        width: 100%;
      }
      .chart-box.sm {
        height: 230px;
      }
      .chart-box.lg {
        height: 320px;
      }

      /* ============ Tables ============ */
      .table-x {
        width: 100%;
        font-size: 0.83rem;
      }
      .table-x thead th {
        background: #fafafb;
        color: #8b8f9a;
        font-weight: 600;
        font-size: 0.75rem;
        padding: 0.7rem 1rem;
        border-bottom: 1px solid #eef0f4;
        white-space: nowrap;
      }
      .table-x tbody td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f5f6f9;
        vertical-align: middle;
      }
      .table-x tbody tr:hover {
        background: #fdfaf5;
      }
      .table-x tbody tr:last-child td {
        border-bottom: none;
      }

      .pill {
        padding: 0.28rem 0.65rem;
        border-radius: 20px;
        font-size: 0.72rem;
        font-weight: 600;
        display: inline-block;
      }
      .pill-green {
        background: #e7f8f1;
        color: #0f9d6b;
      }
      .pill-amber {
        background: #fdf4e5;
        color: #b3761f;
      }
      .pill-red {
        background: #fdecec;
        color: #d63b3b;
      }
      .pill-blue {
        background: #e8f1fe;
        color: #2563eb;
      }
      .pill-gray {
        background: #f1f2f6;
        color: #6b7080;
      }
      .pill-purple {
        background: #f1e9fd;
        color: #7c3aed;
      }
      .pill-brown {
        background: #fdf0e2;
        color: #8a4a14;
      }

      .usr {
        display: flex;
        align-items: center;
        gap: 0.6rem;
      }
      .usr img {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        object-fit: cover;
      }
      .usr b {
        font-size: 0.83rem;
        display: block;
        color: #1f2430;
      }
      .usr small {
        font-size: 0.72rem;
        color: #9aa0ac;
      }

      /* ============ Timeline ============ */
      .tl {
        list-style: none;
        padding: 0;
        margin: 0;
        position: relative;
      }
      .tl::before {
        content: "";
        position: absolute;
        right: 11px;
        top: 6px;
        bottom: 6px;
        width: 2px;
        background: #f1f2f6;
      }
      .tl li {
        position: relative;
        padding-right: 2rem;
        padding-bottom: 1.1rem;
      }
      .tl li::before {
        content: "";
        position: absolute;
        right: 6px;
        top: 4px;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: #fff;
        border: 2.5px solid var(--brand-3);
      }
      .tl li.done::before {
        background: var(--brand-2);
        border-color: var(--brand-2);
      }
      .tl li .t {
        font-size: 0.83rem;
        font-weight: 600;
        color: #1f2430;
      }
      .tl li .d {
        font-size: 0.72rem;
        color: #9aa0ac;
        margin-top: 0.1rem;
      }

      /* ============ Progress ============ */
      .prog {
        height: 8px;
        border-radius: 10px;
        background: #f1f2f6;
        overflow: hidden;
      }
      .prog > div {
        height: 100%;
        border-radius: 10px;
      }

      /* ============ Rank list ============ */
      .rank-item {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        padding: 0.7rem 0;
        border-bottom: 1px dashed #f1f2f6;
      }
      .rank-item:last-child {
        border-bottom: none;
      }
      .rank-num {
        width: 30px;
        height: 30px;
        border-radius: 9px;
        display: grid;
        place-items: center;
        font-size: 0.78rem;
        font-weight: 700;
        background: var(--brand-light);
        color: var(--brand-1);
        flex-shrink: 0;
      }
      .rank-num.g1 {
        background: linear-gradient(135deg, #f5c451, #e0a020);
        color: #fff;
      }
      .rank-num.g2 {
        background: linear-gradient(135deg, #cfd3dc, #a8adb8);
        color: #fff;
      }
      .rank-num.g3 {
        background: linear-gradient(135deg, #e0a570, #c07c3e);
        color: #fff;
      }

      /* ============ Calendar ============ */
      .cal {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
        text-align: center;
        font-size: 0.75rem;
      }
      .cal .h {
        color: #9aa0ac;
        font-weight: 600;
        padding: 0.35rem 0;
      }
      .cal .d {
        padding: 0.45rem 0;
        border-radius: 8px;
        color: #545a68;
        cursor: pointer;
        transition: 0.15s;
      }
      .cal .d:hover {
        background: var(--brand-light);
      }
      .cal .d.today {
        background: var(--brand-2);
        color: #fff;
        font-weight: 700;
      }
      .cal .d.mute {
        color: #c8cbd3;
      }

      /* ============ Packaging Cards ============ */
      .pack-card {
        border: 1.5px solid #eef0f4;
        border-radius: 13px;
        padding: 1rem;
        background: #fff;
        transition: 0.18s;
        cursor: pointer;
        height: 100%;
      }
      .pack-card:hover {
        border-color: var(--brand-3);
        box-shadow: 0 4px 16px rgba(168, 107, 45, 0.1);
      }
      .pack-card.active {
        border-color: var(--brand-2);
        background: var(--brand-light);
      }
      .pack-card .pack-ico {
        width: 44px;
        height: 44px;
        border-radius: 11px;
        display: grid;
        place-items: center;
        background: var(--brand-light);
        color: var(--brand-2);
        font-size: 1.25rem;
        margin-bottom: 0.65rem;
      }
      .pack-card.active .pack-ico {
        background: #fff;
      }
      .pack-card h6 {
        font-size: 0.88rem;
        font-weight: 700;
        margin: 0 0 0.35rem;
      }
      .pack-card .meta {
        font-size: 0.75rem;
        color: #8b8f9a;
        line-height: 1.8;
      }
      .pack-card .meta b {
        color: #2b2b2b;
      }

      /* ============ Role chips ============ */
      .role-chip {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.4rem 0.85rem;
        border-radius: 30px;
        font-size: 0.78rem;
        font-weight: 600;
        background: #f7f8fb;
        border: 1px solid #eef0f4;
        color: #545a68;
        transition: 0.15s;
        cursor: pointer;
      }
      .role-chip:hover {
        border-color: var(--brand-3);
        color: var(--brand-1);
      }
      .role-chip.active {
        background: var(--brand-2);
        color: #fff;
        border-color: var(--brand-2);
      }
      .role-chip .cnt {
        background: rgba(255, 255, 255, 0.25);
        padding: 0 0.45rem;
        border-radius: 10px;
        font-size: 0.7rem;
      }
      .role-chip:not(.active) .cnt {
        background: #eef0f4;
        color: #6b7080;
      }

      /* ============ Carton Calculator ============ */
      .calc-row {
        display: flex;
        justify-content: space-between;
        padding: 0.55rem 0;
        border-bottom: 1px dashed #f1f2f6;
        font-size: 0.83rem;
      }
      .calc-row:last-child {
        border-bottom: none;
        font-weight: 700;
        color: var(--brand-1);
        font-size: 0.92rem;
      }
      .calc-row span:first-child {
        color: #8b8f9a;
      }
      .calc-row span:last-child {
        font-weight: 600;
        color: #2b2b2b;
      }
      .calc-total {
        background: var(--brand-light);
        border-radius: 11px;
        padding: 0.85rem 1rem;
        margin-top: 0.5rem;
      }

      /* ============ Progress Pack ============ */
      .pack-tag {
        display: inline-block;
        padding: 0.25rem 0.6rem;
        border-radius: 8px;
        background: var(--brand-light);
        color: var(--brand-1);
        font-size: 0.72rem;
        font-weight: 600;
        margin: 2px;
      }

      /* ============ Overlay ============ */
      .overlay {
        position: fixed;
        inset: 0;
        background: rgba(20, 20, 30, 0.45);
        z-index: 1035;
        display: none;
      }

      @media (max-width: 991px) {
        .sidebar {
          transform: translateX(100%);
        }
        body.sb-open .sidebar {
          transform: translateX(0);
        }
        body.sb-open .overlay {
          display: block;
        }
        .app-main {
          margin-right: 0 !important;
        }
        .lang-switch {
          display: none;
        }
      }
