:root {
      --black: #000000;
      --ink: #0f1117;
      --ink2: #3d4152;
      --ink3: #8b90a0;
      --rule: #e8eaef;
      --rule2: #f2f4f8;
      --paper: #ffffff;
      --paper2: #f7f8fc;
      --paper3: #eef0f6;
      --accent: #1a237e;
      --accent-l: #3949ab;
      --green: #1b5e20;
      --green-l: #e8f5e9;
      --red: #b71c1c;
      --red-l: #ffebee;
      --amber: #e65100;
      --amber-l: #fff3e0;
      --blue-l: #e8eaf6;
      --shadow: 0 1px 4px rgba(15, 17, 23, .07), 0 4px 16px rgba(15, 17, 23, .05);
      --shadow-lg: 0 8px 32px rgba(15, 17, 23, .12);
      --r: 12px;
    }

    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: 'DM Sans', sans-serif;
      background: var(--paper2);
      color: var(--ink);
      min-height: 100vh;
    }

    /* ════════ SPLASH ════════ */
    #splashScreen {
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: var(--paper);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 20px;
    }

    #splashScreen.hiding {
      animation: splashFadeOut .5s ease forwards;
    }

    @keyframes splashFadeOut {
      from {
        opacity: 1;
        transform: scale(1);
      }

      to {
        opacity: 0;
        transform: scale(1.04);
      }
    }

    .splash-logo {
      width: 360px;
      height: 130px;
      background: rgb(255, 255, 255);
      border-radius: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    .splash-logo img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      border-radius: 24px;
    }

    .splash-logo-placeholder {
      font-family: 'DM Mono', monospace;
      font-size: 32px;
      font-weight: 700;
      color: #fff;
      letter-spacing: .04em;
    }

    .splash-brand {
      font-family: 'Playfair Display', serif;
      font-size: 26px;
      color: #000000;
    }

    .splash-sub {
      font-size: 12px;
      color: rgba(0, 0, 0, 0.5);
      text-transform: uppercase;
      letter-spacing: .1em;
    }

    .splash-dots {
      display: flex;
      gap: 8px;
      margin-top: 12px;
    }

    .splash-dots span {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: rgb(255, 0, 0);
      animation: dotPulse 1.2s ease-in-out infinite;
    }

    .splash-dots span:nth-child(2) {
      animation-delay: .2s;
    }

    .splash-dots span:nth-child(3) {
      animation-delay: .4s;
    }

    @keyframes dotPulse {

      0%,
      100% {
        background: rgba(255, 255, 255, .25);
        transform: scale(.85);
      }

      50% {
        background: rgba(255, 255, 255, .9);
        transform: scale(1.1);
      }
    }

    /* ════════ LOGIN ════════ */
    #loginScreen {
      min-height: 100vh;
      display: none;
      align-items: center;
      justify-content: flex-end;
      padding-right: 8%;
      background: url('/static/promoflix_bg.png') center/cover no-repeat;
    }

    #loginScreen.visible {
      display: flex;
      animation: fadeUp .3s ease;
    }

    .login-card {
      background: var(--paper);
      border: 1px solid var(--rule);
      border-radius: 20px;
      padding: 48px 40px;
      width: 380px;
      box-shadow: var(--shadow-lg);
    }

    @media(max-width:700px) {
      #loginScreen {
        justify-content: center;
        padding-right: 0;
        padding: 24px;
      }
    }

    .login-logo {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 32px;
    }

    .login-logo-mark {
      width: 40px;
      height: 40px;
      background: var(--accent);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: 700;
      font-family: 'DM Mono', monospace;
      font-size: 14px;
    }

    .login-logo-text {
      font-family: 'Playfair Display', serif;
      font-size: 20px;
    }

    .login-title {
      font-family: 'Playfair Display', serif;
      font-size: 26px;
      margin-bottom: 6px;
    }

    .login-sub {
      font-size: 13px;
      color: var(--ink3);
      margin-bottom: 28px;
    }

    .login-error {
      display: none;
      align-items: center;
      gap: 8px;
      padding: 10px 14px;
      background: var(--red-l);
      border: 1px solid #f5c6c6;
      border-radius: 8px;
      font-size: 12px;
      color: var(--red);
      margin-bottom: 16px;
    }

    .login-error.visible {
      display: flex;
      animation: fadeUp .2s ease;
    }

    .lf {
      margin-bottom: 16px;
    }

    .lf label {
      display: block;
      font-size: 11px;
      font-weight: 600;
      color: var(--ink3);
      text-transform: uppercase;
      letter-spacing: .06em;
      margin-bottom: 6px;
    }

    .lf input {
      width: 100%;
      padding: 12px 14px;
      border: 1.5px solid var(--rule);
      border-radius: 8px;
      font-size: 14px;
      font-family: 'DM Sans', sans-serif;
      color: var(--ink);
      background: var(--paper2);
      outline: none;
      transition: border-color .2s, box-shadow .2s;
    }

    .lf input:focus {
      border-color: var(--accent-l);
      box-shadow: 0 0 0 3px rgba(57, 73, 171, .12);
      background: var(--paper);
    }

    .lf input.shake {
      animation: shake .35s ease;
      border-color: var(--red);
      box-shadow: 0 0 0 3px rgba(183, 28, 28, .1);
    }

    @keyframes shake {

      0%,
      100% {
        transform: translateX(0)
      }

      20% {
        transform: translateX(-6px)
      }

      40% {
        transform: translateX(6px)
      }

      60% {
        transform: translateX(-4px)
      }

      80% {
        transform: translateX(4px)
      }
    }

    .login-btn {
      width: 100%;
      padding: 13px;
      background: var(--accent);
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      font-family: 'DM Sans', sans-serif;
      cursor: pointer;
      margin-top: 8px;
      transition: opacity .2s;
    }

    .login-btn:hover:not(:disabled) {
      opacity: .88;
    }

    .login-btn:disabled {
      opacity: .55;
      cursor: not-allowed;
    }

    /* ════════ APP SHELL ════════ */
    #appShell {
      display: none;
    }

    .layout {
      display: flex;
      min-height: 100vh;
    }

    /* ════════ SIDEBAR ════════ */
    .sidebar {
      width: 220px;
      flex-shrink: 0;
      background: var(--paper);
      border-right: 1px solid var(--rule);
      display: flex;
      flex-direction: column;
      padding: 24px 0;
      position: sticky;
      top: 0;
      height: 100vh;
      overflow-y: auto;
    }

    .sb-logo {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 20px 24px;
      border-bottom: 1px solid var(--rule);
      margin-bottom: 16px;
    }

    .sb-mark {
      width: 60px;
      height: 60px;
      border-radius: 8px;
      overflow: hidden;
      flex-shrink: 0;
      background: var(--amber-l);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .sb-name {
      font-family: 'Playfair Display', serif;
      font-size: 16px;
    }

    .sb-nav {
      flex: 1;
      padding: 0 10px;
    }

    .sb-section {
      font-size: 10px;
      font-weight: 700;
      color: var(--ink3);
      text-transform: uppercase;
      letter-spacing: .08em;
      padding: 12px 12px 6px;
    }

    .sb-item {
      display: flex;
      align-items: center;
      padding: 9px 12px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 500;
      color: var(--ink2);
      transition: all .15s;
      margin-bottom: 2px;
    }

    .sb-item:hover {
      background: var(--paper2);
      color: var(--ink);
    }

    .sb-item.active {
      background: var(--blue-l);
      color: var(--accent);
      font-weight: 600;
    }

    .sb-item svg {
      width: 18px;
      height: 18px;
      margin-right: 10px;
      flex-shrink: 0;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .sb-footer {
      padding: 16px 20px 0;
      border-top: 1px solid var(--rule);
    }

    .sb-admin {
      font-size: 11px;
      color: var(--ink3);
      margin-bottom: 6px;
    }

    .sb-logout {
      font-size: 12px;
      color: var(--red);
      cursor: pointer;
      font-weight: 500;
    }

    .sb-logout:hover {
      text-decoration: underline;
    }

    /* ════════ MAIN ════════ */
    .main {
      flex: 1;
      overflow-y: auto;
      min-width: 0;
    }

    .pg {
      display: none;
      padding: 32px;
    }

    .pg.active {
      display: block;
      animation: fadeUp .2s ease;
    }

    @keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(6px)
      }

      to {
        opacity: 1;
        transform: translateY(0)
      }
    }

    .pg-hdr {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 28px;
      gap: 16px;
    }

    .pg-title {
      font-family: 'Playfair Display', serif;
      font-size: 28px;
      line-height: 1.2;
    }

    .pg-sub {
      font-size: 13px;
      color: var(--ink3);
      margin-top: 4px;
    }

    .refresh-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
      border: 1.5px solid var(--rule);
      border-radius: 8px;
      background: var(--paper);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      color: var(--ink2);
      font-family: 'DM Sans', sans-serif;
      transition: all .15s;
      white-space: nowrap;
    }

    .refresh-btn:hover {
      border-color: var(--accent-l);
      color: var(--accent);
    }

    .refresh-btn svg {
      width: 14px;
      height: 14px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    /* ════════ KPI CARDS ════════ */
    .kpi-row {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 16px;
      margin-bottom: 28px;
    }

    .kpi {
      background: var(--paper);
      border: 1px solid var(--rule);
      border-radius: var(--r);
      padding: 20px;
      box-shadow: var(--shadow);
    }

    .kpi-lbl {
      font-size: 11px;
      font-weight: 600;
      color: var(--ink3);
      text-transform: uppercase;
      letter-spacing: .06em;
      margin-bottom: 10px;
    }

    .kpi-val {
      font-size: 36px;
      font-weight: 700;
      font-family: 'DM Mono', monospace;
      line-height: 1;
      margin-bottom: 4px;
    }

    .kpi-sub {
      font-size: 12px;
      color: var(--ink3);
    }

    .kpi.blue .kpi-val {
      color: var(--accent);
    }

    .kpi.green .kpi-val {
      color: var(--green);
    }

    .kpi.red .kpi-val {
      color: var(--red);
    }

    .kpi.amber .kpi-val {
      color: var(--amber);
    }

    /* ════════ TABLE ════════ */
    .sec-title {
      font-size: 12px;
      font-weight: 700;
      color: var(--ink2);
      text-transform: uppercase;
      letter-spacing: .06em;
      margin-bottom: 12px;
    }

    .tbl-wrap {
      background: var(--paper);
      border: 1px solid var(--rule);
      border-radius: var(--r);
      overflow: hidden;
      box-shadow: var(--shadow);
      margin-bottom: 24px;
      overflow-x: auto;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 600px;
    }

    thead {
      background: var(--paper2);
    }

    th {
      padding: 11px 16px;
      text-align: left;
      font-size: 11px;
      font-weight: 700;
      color: var(--ink3);
      text-transform: uppercase;
      letter-spacing: .06em;
      border-bottom: 1px solid var(--rule);
      white-space: nowrap;
    }

    td {
      padding: 12px 16px;
      font-size: 13px;
      color: var(--ink2);
      border-bottom: 1px solid var(--rule2);
      vertical-align: middle;
    }

    tr:last-child td {
      border-bottom: none;
    }

    tbody tr:hover td {
      background: var(--paper2);
    }

    .td-bold {
      font-weight: 600;
      color: var(--ink);
    }

    .mono {
      font-family: 'DM Mono', monospace;
      font-size: 12px;
    }

    /* ════════ BADGES ════════ */
    .badge {
      display: inline-block;
      padding: 3px 9px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
    }

    .b-won {
      background: var(--green-l);
      color: var(--green);
    }

    .b-lost {
      background: var(--red-l);
      color: var(--red);
    }

    .b-neg {
      background: var(--amber-l);
      color: var(--amber);
    }

    .b-vis {
      background: var(--blue-l);
      color: var(--accent);
    }

    .b-quo {
      background: var(--blue-l);
      color: var(--accent-l);
    }

    .b-upd {
      background: #f3e5f5;
      color: #6a1b9a;
    }

    .b-overdue {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      background: var(--red);
      color: #fff;
      border-radius: 4px;
      font-weight: 700;
      text-transform: uppercase;
      font-size: 10px;
      margin-left: 6px;
      padding: 1px 5px;
      vertical-align: middle;
      line-height: 1.4;
    }

    /* ════════ FILTERS ════════ */
    .filters {
      display: flex;
      gap: 10px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    .f-input {
      padding: 8px 12px;
      border: 1.5px solid var(--rule);
      border-radius: 8px;
      font-size: 13px;
      font-family: 'DM Sans', sans-serif;
      color: var(--ink2);
      background: var(--paper);
      outline: none;
      flex: 1;
      min-width: 180px;
      transition: border-color .15s;
    }

    .f-select {
      padding: 8px 12px;
      border: 1.5px solid var(--rule);
      border-radius: 8px;
      font-size: 13px;
      font-family: 'DM Sans', sans-serif;
      color: var(--ink2);
      background: var(--paper);
      outline: none;
      cursor: pointer;
      transition: border-color .15s;
    }

    .f-input:focus,
    .f-select:focus {
      border-color: var(--accent-l);
    }

    /* Tom Select Customization */
    .ts-wrapper.f-select {
      padding: 0 !important;
      border: none !important;
      background: transparent !important;
      min-width: 220px;
    }

    .ts-control {
      border: 1.5px solid var(--rule) !important;
      border-radius: 8px !important;
      padding: 8px 12px !important;
      font-size: 13px !important;
      font-family: 'DM Sans', sans-serif !important;
      background: var(--paper) !important;
      box-shadow: none !important;
      display: flex !important;
      align-items: center !important;
      transition: border-color .15s, box-shadow .15s !important;
      min-height: 40px !important;
    }

    .ts-wrapper.focus .ts-control {
      border-color: var(--accent-l) !important;
      box-shadow: 0 0 0 3px rgba(57, 73, 171, .12) !important;
    }

    .ts-dropdown {
      border-radius: 12px !important;
      border: 1px solid var(--rule) !important;
      box-shadow: var(--shadow-lg) !important;
      font-family: 'DM Sans', sans-serif !important;
      margin-top: 6px !important;
      z-index: 2000 !important;
      padding: 4px !important;
      background: var(--paper) !important;
    }

    .ts-dropdown .option {
      padding: 8px 12px !important;
      border-radius: 6px !important;
      cursor: pointer !important;
    }

    .ts-dropdown .active {
      background-color: var(--blue-l) !important;
      color: var(--accent) !important;
    }

    .ts-control .item {
      background: var(--blue-l) !important;
      color: var(--accent) !important;
      border: none !important;
      border-radius: 6px !important;
      font-weight: 600 !important;
      padding: 2px 8px !important;
      margin: 2px !important;
      display: inline-flex !important;
      align-items: center !important;
      gap: 4px !important;
    }

    .ts-control .item .remove {
      border-left: 1px solid rgba(26, 35, 126, 0.1) !important;
      margin-left: 4px !important;
    }

    .ts-wrapper.multi .ts-control>input {
      display: inline-block !important;
    }

    .ts-wrapper .ts-control>input::placeholder {
      color: var(--ink3) !important;
      opacity: 0.8;
    }

    /* ════════ ACTIVITY FEED ════════ */
    .feed {
      display: flex;
      flex-direction: column;
    }

    .fi {
      display: flex;
      gap: 14px;
      padding: 14px 20px;
      border-bottom: 1px solid var(--rule2);
      align-items: flex-start;
    }

    .fi:last-child {
      border-bottom: none;
    }

    .fi-dot-col {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding-top: 3px;
      flex-shrink: 0;
    }

    .fi-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
    }

    .fi-line {
      width: 1.5px;
      flex: 1;
      background: var(--rule);
      margin-top: 4px;
      min-height: 20px;
    }

    .fi:last-child .fi-line {
      display: none;
    }

    .fi-body {
      flex: 1;
      min-width: 0;
    }

    .fi-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 8px;
      margin-bottom: 3px;
    }

    .fi-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--ink);
    }

    .fi-time {
      font-size: 11px;
      color: var(--ink3);
      font-family: 'DM Mono', monospace;
      white-space: nowrap;
    }

    .fi-detail {
      font-size: 12px;
      color: var(--ink3);
    }

    .fi-exec {
      font-size: 11px;
      color: var(--ink3);
      margin-top: 2px;
    }

    /* ════════ EXEC CARDS ════════ */
    .exec-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 16px;
    }

    .exec-card {
      background: var(--paper);
      border: 1px solid var(--rule);
      border-radius: var(--r);
      padding: 20px;
      box-shadow: var(--shadow);
      cursor: pointer;
      transition: all .15s;
    }

    .exec-card:hover {
      border-color: var(--accent-l);
      box-shadow: var(--shadow-lg);
      transform: translateY(-2px);
    }

    .exec-card-hdr {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 16px;
    }

    .exec-av {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--blue-l);
      color: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      font-weight: 700;
      flex-shrink: 0;
    }

    .exec-card-name {
      font-size: 15px;
      font-weight: 700;
      color: var(--ink);
    }

    /* ── COMING SOON OVERLAY ── */
    .cs-target-wrap {
      position: relative;
      display: inline-block;
      width: auto;
    }

    .cs-target-wrap-block {
      position: relative;
      display: block;
      width: 100%;
    }

    .cs-target-overlay {
      position: absolute;
      inset: -2px;
      background: rgba(255, 255, 255, 0.4);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10;
      pointer-events: all;
      border-radius: 10px;
    }

    .cs-target-badge {
      background: var(--accent);
      color: #fff;
      padding: 3px 8px;
      border-radius: 20px;
      font-weight: 700;
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      box-shadow: var(--shadow);
      white-space: nowrap;
    }

    .exec-card-sub {
      font-size: 11px;
      color: var(--ink3);
      margin-top: 2px;
    }

    .exec-stats-row {
      display: flex;
      gap: 12px;
      margin-bottom: 14px;
    }

    .exec-stat {
      flex: 1;
      text-align: center;
    }

    .exec-stat-val {
      font-size: 22px;
      font-weight: 700;
      font-family: 'DM Mono', monospace;
    }

    .exec-stat-lbl {
      font-size: 10px;
      color: var(--ink3);
      text-transform: uppercase;
      letter-spacing: .05em;
      margin-top: 2px;
    }

    .ep-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
    }

    .ep-lbl {
      font-size: 11px;
      color: var(--ink2);
      width: 90px;
      flex-shrink: 0;
    }

    .ep-bar {
      flex: 1;
      height: 6px;
      background: var(--rule);
      border-radius: 3px;
      overflow: hidden;
    }

    .ep-fill {
      height: 100%;
      border-radius: 3px;
      transition: width .6s ease;
    }

    .ep-pct {
      font-size: 11px;
      font-family: 'DM Mono', monospace;
      color: var(--ink2);
      width: 34px;
      text-align: right;
    }

    .ep-fill.blue {
      background: var(--accent);
    }

    .ep-fill.green {
      background: var(--green);
    }

    .set-target-btn {
      width: 100%;
      margin-top: 14px;
      padding: 8px;
      border: 1.5px dashed var(--accent-l);
      border-radius: 8px;
      background: var(--blue-l);
      color: var(--accent);
      font-size: 12px;
      font-weight: 600;
      font-family: 'DM Sans', sans-serif;
      cursor: pointer;
      transition: all .15s;
    }

    .set-target-btn:hover {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }

    /* ════════ EXEC DETAIL ════════ */
    .detail-back {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--accent);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      margin-bottom: 20px;
      border: none;
      background: none;
      font-family: 'DM Sans', sans-serif;
      padding: 0;
    }

    .detail-back svg {
      width: 16px;
      height: 16px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2.5;
      stroke-linecap: round;
    }

    .period-tabs {
      display: flex;
      gap: 4px;
      background: var(--paper3);
      border-radius: 10px;
      padding: 4px;
      margin-bottom: 24px;
      width: fit-content;
    }

    .period-tab {
      padding: 6px 18px;
      border-radius: 7px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: none;
      background: none;
      font-family: 'DM Sans', sans-serif;
      color: var(--ink3);
      transition: all .15s;
    }

    .period-tab.active {
      background: var(--paper);
      color: var(--accent);
      box-shadow: var(--shadow);
    }

    .chart-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-bottom: 24px;
    }

    .chart-card {
      background: var(--paper);
      border: 1px solid var(--rule);
      border-radius: var(--r);
      padding: 16px;
      box-shadow: var(--shadow);
    }

    .chart-title {
      font-size: 12px;
      font-weight: 700;
      color: var(--ink2);
      text-transform: uppercase;
      letter-spacing: .06em;
      margin-bottom: 12px;
    }

    .target-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-bottom: 24px;
    }

    .target-kpi {
      background: var(--paper);
      border: 1px solid var(--rule);
      border-radius: var(--r);
      padding: 16px;
      box-shadow: var(--shadow);
      text-align: center;
    }

    .tk-label {
      font-size: 10px;
      font-weight: 700;
      color: var(--ink3);
      text-transform: uppercase;
      letter-spacing: .05em;
      margin-bottom: 8px;
    }

    .tk-val {
      font-size: 28px;
      font-weight: 700;
      font-family: 'DM Mono', monospace;
      line-height: 1;
    }

    .tk-target {
      font-size: 11px;
      color: var(--ink3);
      margin-top: 4px;
    }

    .tk-bar {
      height: 4px;
      background: var(--rule);
      border-radius: 2px;
      overflow: hidden;
      margin-top: 8px;
    }

    .tk-fill {
      height: 100%;
      border-radius: 2px;
      transition: width .6s ease;
    }

    /* ════════ MODALS ════════ */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(15, 17, 23, .45);
      z-index: 500;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }

    .modal-overlay.open {
      display: flex;
      animation: fadeUp .2s ease;
    }

    .modal {
      background: var(--paper);
      border-radius: 16px;
      width: 560px;
      max-width: 100%;
      max-height: 88vh;
      overflow-y: auto;
      box-shadow: var(--shadow-lg);
    }

    .modal-hdr {
      padding: 24px 24px 16px;
      border-bottom: 1px solid var(--rule);
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      position: sticky;
      top: 0;
      background: var(--paper);
      z-index: 1;
    }

    .modal-title {
      font-family: 'Playfair Display', serif;
      font-size: 20px;
    }

    .modal-sub {
      font-size: 12px;
      color: var(--ink3);
      margin-top: 3px;
    }

    .modal-close {
      background: var(--paper2);
      border: 1px solid var(--rule);
      border-radius: 50%;
      width: 30px;
      height: 30px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      color: var(--ink3);
      flex-shrink: 0;
      transition: all .15s;
    }

    .modal-close:hover {
      background: var(--red-l);
      color: var(--red);
      border-color: var(--red);
    }

    .modal-body {
      padding: 20px 24px 28px;
    }

    .modal-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-bottom: 8px;
    }

    .mf label {
      font-size: 10px;
      font-weight: 700;
      color: var(--ink3);
      text-transform: uppercase;
      letter-spacing: .06em;
      display: block;
      margin-bottom: 4px;
    }

    .mf .val {
      font-size: 14px;
      font-weight: 500;
      color: var(--ink);
    }

    .modal-sec {
      font-size: 12px;
      font-weight: 700;
      color: var(--ink2);
      text-transform: uppercase;
      letter-spacing: .06em;
      margin: 20px 0 10px;
      padding-top: 16px;
      border-top: 1px solid var(--rule);
    }

    .tl-item {
      display: flex;
      gap: 12px;
      padding: 10px 0;
      border-bottom: 1px solid var(--rule2);
    }

    .tl-item:last-child {
      border-bottom: none;
    }

    .tl-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
      margin-top: 4px;
    }

    .tl-body .tl-status {
      font-size: 13px;
      font-weight: 500;
      margin-bottom: 2px;
    }

    .tl-body .tl-meta {
      font-size: 11px;
      color: var(--ink3);
    }

    .target-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(15, 17, 23, .45);
      z-index: 600;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }

    .target-modal-overlay.open {
      display: flex;
      animation: fadeUp .2s ease;
    }

    .target-modal {
      background: var(--paper);
      border-radius: 16px;
      width: 420px;
      max-width: 100%;
      box-shadow: var(--shadow-lg);
    }

    .tm-hdr {
      padding: 20px 24px 16px;
      border-bottom: 1px solid var(--rule);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .tm-title {
      font-family: 'Playfair Display', serif;
      font-size: 18px;
    }

    .tm-close {
      background: var(--paper2);
      border: 1px solid var(--rule);
      border-radius: 50%;
      width: 28px;
      height: 28px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      color: var(--ink3);
    }

    .tm-body {
      padding: 20px 24px 24px;
    }

    .tm-field {
      margin-bottom: 16px;
    }

    .tm-field label {
      font-size: 11px;
      font-weight: 700;
      color: var(--ink3);
      text-transform: uppercase;
      letter-spacing: .06em;
      display: block;
      margin-bottom: 6px;
    }

    .tm-field input {
      width: 100%;
      padding: 10px 12px;
      border: 1.5px solid var(--rule);
      border-radius: 8px;
      font-size: 14px;
      font-family: 'DM Sans', sans-serif;
      color: var(--ink);
      background: var(--paper2);
      outline: none;
      transition: border-color .15s;
    }

    .tm-field input:focus {
      border-color: var(--accent-l);
      background: var(--paper);
    }

    .tm-field .hint {
      font-size: 11px;
      color: var(--ink3);
      margin-top: 4px;
    }

    .tm-save {
      width: 100%;
      padding: 12px;
      background: var(--accent);
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      font-family: 'DM Sans', sans-serif;
      cursor: pointer;
      margin-top: 4px;
      transition: opacity .2s;
    }

    .tm-save:hover {
      opacity: .88;
    }

    /* ════════ LOADING / EMPTY ════════ */
    .loading {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 48px;
    }

    .spin {
      width: 24px;
      height: 24px;
      border: 2.5px solid var(--rule);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin .7s linear infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg)
      }
    }

    .empty {
      text-align: center;
      padding: 48px 24px;
      color: var(--ink3);
      font-size: 13px;
    }

    @media(max-width:900px) {
      .kpi-row {
        grid-template-columns: 1fr 1fr;
      }

      .sidebar {
        width: 180px;
      }
    }

    @media(max-width:640px) {
      .sidebar {
        display: none;
      }

      .pg {
        padding: 16px;
      }

      .kpi-row {
        grid-template-columns: 1fr 1fr;
      }
    }

    @media(max-width:700px) {
      .chart-row {
        grid-template-columns: 1fr;
      }

      .target-grid {}
    }

    /* SOMS Admin Styles */
    .branch-form-card,
    .user-form-card {
      background: var(--paper);
      border: 1px solid var(--rule);
      border-radius: 12px;
      padding: 20px;
      margin-bottom: 24px;
      max-width: 600px;
    }

    .branch-list-card,
    .user-list-card {
      background: var(--paper);
      border: 1px solid var(--rule);
      border-radius: 12px;
      padding: 20px;
    }

    .checkbox-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 10px;
      margin-top: 8px;
    }

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

    .user-actions {
      display: flex;
      gap: 8px;
    }

    .btn-danger {
      background: var(--red) !important;
      color: #fff !important;
    }

    .btn-danger:hover {
      background: #c62828 !important;
    }

    .btn-secondary {
      background: var(--ink3);
      color: #fff;
    }

    .btn-secondary:hover {
      background: var(--ink2);
    }

    .lf select {
      width: 100%;
      padding: 12px 14px;
      border: 1.5px solid var(--rule);
      border-radius: 8px;
      font-size: 14px;
      font-family: 'DM Sans', sans-serif;
      color: var(--ink);
      background: var(--paper2);
      outline: none;
      transition: border-color .2s, box-shadow .2s;
    }

    .lf select:focus {
      border-color: var(--accent-l);
      box-shadow: 0 0 0 3px rgba(57, 73, 171, .12);
      background: var(--paper);
    }
