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

    html {
      font-size: 16px;
      -webkit-text-size-adjust: 100%;
      height: auto;
    }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
      transition: background var(--t), color var(--t);
    }

    /* -- PRIMARY DESIGN TOKENS -- */
    :root {
      --p: #1565C0;
      --pl: #1E88E5;
      --pd: #0D47A1;
      --acc: #29B6F6;
      --ok: #2E7D32;
      --warn: #F57F17;
      --err: #C62828;
      
      /* Light Mode Tokens */
      --bg: #f3f4f6;
      --surface: #ffffff;
      --text: #1f2937;
      --mt: #6b7280;
      --b: #e5e7eb;
      --sh: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
      --shl: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
      
      --r: 12px;
      --rs: 8px;
      --t: .2s ease;
    }

    [data-theme='dark'] {
      --bg: #111827;
      --surface: #1f2937;
      --text: #f3f4f6;
      --mt: #9ca3af;
      --b: #374151;
      --sh: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
      --shl: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
      --pd: #1E88E5;
      --pl: #42A5F5;
    }

    ::-webkit-scrollbar {
      width: 6px
    }

    ::-webkit-scrollbar-thumb {
      background: var(--b);
      border-radius: 4px
    }

    /* -- LOGIN -- */
    #loginScreen {
      position: fixed;
      inset: 0;
      z-index: 9999;
      background: linear-gradient(135deg, var(--pd) 0%, var(--pl) 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px
    }

    .login-box {
      background: #fff;
      border-radius: 20px;
      padding: 40px 32px;
      width: 100%;
      max-width: 380px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
      text-align: center
    }

    .login-logo {
      font-size: 48px;
      margin-bottom: 8px
    }

    .login-title {
      font-size: 1.4rem;
      font-weight: 800;
      color: var(--pd);
      margin-bottom: 4px
    }

    .login-sub {
      font-size: .82rem;
      color: var(--mt);
      margin-bottom: 28px
    }

    .login-input {
      width: 100%;
      padding: 14px;
      border: 2px solid var(--b);
      border-radius: var(--rs);
      font-size: 1rem;
      font-family: inherit;
      outline: none;
      transition: border-color var(--t);
      margin-bottom: 14px;
    }

    .login-input:focus {
      border-color: var(--pl)
    }

    .login-btn {
      width: 100%;
      padding: 15px;
      background: linear-gradient(135deg, var(--pl), var(--pd));
      color: #fff;
      border: none;
      border-radius: var(--r);
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      transition: opacity var(--t)
    }

    .login-btn:hover {
      opacity: .9
    }

    .login-err {
      color: #e53e3e;
      font-size: 0.8rem;
      margin-top: 15px;
      font-weight: 600;
      min-height: 1em;
      text-align: center;
    }

    #appWrap {
      display: none;
      min-height: 100vh;
    }

    /* ── LAYOUT ── */
    #sidebar {
      width: 260px;
      height: 100vh;
      background: #20242d;
      color: #fff;
      display: flex;
      flex-direction: column;
      position: fixed;
      left: 0;
      top: 0;
      z-index: 1000;
      transition: transform var(--t);
      border-right: 1px solid rgba(255,255,255,0.05);
      box-sizing: border-box;
    }

    #mainContent {
      flex: 1;
      margin-left: 260px;
      min-height: 100vh;
      background: #F0F4FA;
      transition: margin var(--t);
    }

    @media (max-width: 900px) {
      #sidebar {
        transform: translateX(-100%);
      }

      #sidebar.open {
        transform: translateX(0);
      }

      #mainContent {
        margin-left: 0;
      }
    }

    /* ── SIDEBAR CONTENT ── */
    .sb-brand {
      padding: 24px 20px;
      display: flex;
      align-items: center;
      gap: 12px;
      flex-shrink: 0; /* Don't shrink logo */
    }

    .sb-brand-logo {
      font-size: 24px;
      background: linear-gradient(135deg, var(--p), var(--pd));
      width: 38px;
      height: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
      color: #fff;
      box-shadow: 0 4px 10px rgba(21, 101, 192, 0.2);
    }

    .sb-brand-text {
      font-weight: 800;
      font-size: 1rem;
      letter-spacing: 0.5px;
      color: #fff;
    }

    .sb-section-title {
      font-size: 0.65rem;
      font-weight: 800;
      color: rgba(255, 255, 255, 0.35);
      text-transform: uppercase;
      letter-spacing: 1.2px;
      padding: 20px 24px 8px;
      margin-top: 5px;
    }

    .sb-menu {
      flex: 1;
      height: 0; /* Critical for scrollable flex items */
      overflow-y: auto;
      overflow-x: hidden;
      padding: 10px 16px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    /* Scrollbar Styling */
    .sb-menu::-webkit-scrollbar {
      width: 5px;
    }
    .sb-menu::-webkit-scrollbar-track {
      background: rgba(0,0,0,0.1);
    }
    .sb-menu::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.2);
      border-radius: 10px;
    }

    .sb-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 24px;
      cursor: pointer;
      font-weight: 600;
      font-size: .88rem;
      color: #fff;
      transition: all .2s;
      position: relative;
    }

    .sb-item:hover {
      color: #fff;
    }

    .sb-item.active {
      background: rgba(255, 255, 255, 0.04);
      color: #fff;
    }

    .sb-item.active::before {
      content: '';
      position: absolute;
      left: 0;
      top: 10px;
      bottom: 10px;
      width: 3px;
      background: var(--p);
      border-radius: 0 4px 4px 0;
    }

    .sb-item-ico {
      font-size: 18px;
      width: 22px;
      text-align: center;
      opacity: 0.7;
    }

    .sb-item.active .sb-item-ico {
      color: var(--p);
      opacity: 1;
    }

    .has-sub {
      justify-content: space-between;
    }

    .sub-arrow {
      font-size: .6rem;
      transition: transform var(--t);
      opacity: 0.4;
    }

    .has-sub.open .sub-arrow {
      transform: rotate(90deg);
    }

    .sb-sub-menu {
      display: none;
      flex-direction: column;
      gap: 2px;
      padding-bottom: 8px;
    }

    .sb-sub-menu.open {
      display: flex;
    }

    .sb-sub-item {
      padding: 10px 12px 10px 58px;
      cursor: pointer;
      font-weight: 500;
      font-size: .85rem;
      color: #fff; /* Pure white as requested */
      transition: all .2s;
    }

    .sb-sub-item:hover {
      background: rgba(255, 255, 255, 0.05);
    }

    .sb-sub-item.active {
      color: #fff;
    }

    .sb-footer {
      padding: 20px 16px;
      border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* -- MODERN HEADER STYLES -- */
    #topHeader {
      position: sticky;
      top: 0;
      z-index: 1001;
      background: var(--surface);
      border-bottom: 1px solid var(--b);
      height: 64px;
      display: flex;
      align-items: center;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
      transition: background var(--t);
    }

    .th-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      padding: 0 24px;
    }

    .th-title {
      font-size: 1.1rem;
      font-weight: 800;
      color: var(--pd);
    }

    .th-right { display: flex; align-items: center; gap: 16px; }

    .th-user {
      display: flex; align-items: center; gap: 12px; padding: 6px 12px;
      border-radius: 12px; cursor: pointer; position: relative;
      transition: background var(--t);
    }
    .th-user:hover { background: var(--bg); }

    .th-avatar {
      width: 36px; height: 36px; background: var(--pd); color: #fff;
      border-radius: 10px; display: flex; align-items: center; justify-content: center;
      font-weight: 800; font-size: 0.9rem;
    }

    .th-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }

    .th-dropdown {
      position: absolute; top: calc(100% + 8px); right: 0; width: 220px;
      background: var(--surface); border: 1px solid var(--b); border-radius: 12px;
      box-shadow: var(--shl); display: none; flex-direction: column; padding: 8px;
      z-index: 1002;
    }
    .th-dropdown.open { display: flex; }
    .th-drop-item {
      padding: 10px 12px; border-radius: 8px; font-size: 0.9rem; font-weight: 600;
      color: var(--text); display: flex; align-items: center; gap: 10px;
      cursor: pointer; transition: background var(--t);
    }
    .th-drop-item:hover { background: var(--bg); color: var(--p); }
    .th-drop-divider { height: 1px; background: var(--b); margin: 8px; }
    .wrap {
      max-width: 900px;
      margin: 0 auto;
      padding: 18px 14px 90px
    }

    /* -- DASH -- */
    .dash {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin-bottom: 20px
    }

    @media(min-width:600px) {
      .dash {
        grid-template-columns: repeat(4, 1fr)
      }
    }

    .kpi {
      background: var(--surface);
      border-radius: var(--r);
      padding: 20px;
      box-shadow: var(--sh);
      border: 1px solid var(--b);
      display: flex;
      flex-direction: column;
      gap: 5px;
      transition: all var(--t);
      position: relative;
      overflow: hidden;
    }

    .kpi::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 4px;
      height: 100%;
      background: var(--p);
    }

    .kpi:hover {
      transform: translateY(-4px);
      box-shadow: var(--shl);
      border-color: var(--pl);
    }

    .kpi.g::before {
      background: var(--ok);
    }

    .kpi.o::before {
      background: var(--warn);
    }

    .kpi.r::before {
      background: var(--err);
    }

    .kpi-lbl {
      font-size: .75rem;
      font-weight: 700;
      color: var(--mt);
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .kpi-val {
      font-size: 1.7rem;
      font-weight: 900;
      color: var(--pd);
      line-height: 1.2;
    }

    .kpi-sub {
      font-size: .8rem;
      color: var(--mt);
      font-weight: 500;
    }

    .kpi-ico {
      position: absolute;
      right: 15px;
      top: 15px;
      font-size: 24px;
      opacity: 0.15;
      transform: scale(1.5);
    }

    /* â”€â”€ FILTER BAR â”€â”€ */
    .fbar {
      display: flex;
      gap: 10px;
      margin-bottom: 14px;
      flex-wrap: wrap
    }

    .srch-wrap {
      position: relative;
      flex: 1;
      min-width: 160px
    }

    .srch-wrap .si {
      position: absolute;
      left: 13px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--mt);
      font-size: 16px;
      pointer-events: none
    }

    .srch {
      width: 100%;
      padding: 13px 13px 13px 40px;
      border: 2px solid var(--b);
      border-radius: var(--r);
      font-size: .95rem;
      font-family: inherit;
      background: #fff;
      outline: none;
      transition: border-color var(--t)
    }

    .srch:focus {
      border-color: var(--pl)
    }

    .day-row {
      display: flex;
      gap: 8px;
      margin-bottom: 14px;
      overflow-x: auto;
      padding-bottom: 4px
    }

    .sbtn {
      flex: 1;
      padding: 10px;
      border: 2px solid var(--b);
      border-radius: 12px;
      background: #fff;
      font-size: .75rem;
      font-weight: 700;
      color: var(--mt);
      cursor: pointer;
      transition: all .2s;
    }

    .sbtn.active {
      border-color: var(--c);
      background: var(--c);
      color: #fff;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .chip {
      padding: 8px 15px;
      border-radius: 20px;
      border: 2px solid var(--b);
      background: #fff;
      font-size: .8rem;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      color: var(--mt);
      transition: all var(--t)
    }

    .chip.active {
      background: var(--p);
      border-color: var(--p);
      color: #fff
    }

    .chip:hover:not(.active) {
      border-color: var(--pl);
      color: var(--p)
    }

    /* â”€â”€ LIST â”€â”€ */
    .sec-hdr {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px
    }

    .sec-ttl {
      font-size: .95rem;
      font-weight: 700
    }

    .cnt-badge {
      background: var(--p);
      color: #fff;
      font-size: .73rem;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: 20px
    }

    .clist {
      display: flex;
      flex-direction: column;
      gap: 10px
    }

    .ccard {
      background: var(--surface);
      border-radius: var(--r);
      padding: 14px;
      box-shadow: var(--sh);
      cursor: pointer;
      border: 2px solid transparent;
      transition: all var(--t);
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      align-items: start
    }

    .ccard:hover {
      border-color: var(--pl);
      transform: translateY(-1px);
      box-shadow: var(--shl)
    }

    .cc-top {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 4px;
      flex-wrap: wrap
    }

    .cc-name {
      font-weight: 700;
      font-size: .95rem
    }

    .badge {
      font-size: .68rem;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 10px;
      flex-shrink: 0
    }

    .bA {
      background: #E8F5E9;
      color: #2E7D32
    }

    .bB {
      background: #E3F2FD;
      color: #1565C0
    }

    .bC {
      background: #FFF8E1;
      color: #F57F17
    }

    .bP {
      background: #F3E5F5;
      color: #7B1FA2
    }

    .bH {
      background: #E0F2F1;
      color: #00695C
    }

    .cc-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      font-size: .78rem;
      color: var(--mt)
    }

    .cc-right {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 6px
    }

    .cc-bal {
      font-weight: 700;
      font-size: .92rem;
      color: var(--err);
      white-space: nowrap
    }

    .cc-bal.z {
      color: var(--ok)
    }

    .cc-last {
      font-size: .72rem;
      color: var(--mt)
    }

    .cc-acts {
      display: flex;
      gap: 6px
    }

    .ibtn {
      width: 38px;
      height: 38px;
      border-radius: 9px;
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 17px;
      transition: all var(--t)
    }

    .ibtn.tel {
      background: #E8F5E9;
      color: #2E7D32
    }

    .ibtn.tel:hover {
      background: #2E7D32;
      color: #fff
    }

    .ibtn.map {
      background: #E3F2FD;
      color: #1565C0
    }

    .ibtn.map:hover {
      background: #1565C0;
      color: #fff
    }

    .np {
      font-size: .73rem;
      color: var(--mt);
      font-style: italic;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 180px;
      margin-top: 4px
    }

    /* â”€â”€ EMPTY â”€â”€ */
    .empty {
      text-align: center;
      padding: 50px 20px;
      color: var(--mt)
    }

    .empty .ei {
      font-size: 44px;
      margin-bottom: 10px
    }

    /* â”€â”€ FAB â”€â”€ */
    .fab {
      position: fixed;
      bottom: 26px;
      right: 20px;
      z-index: 200;
      width: 58px;
      height: 58px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--pl), var(--pd));
      color: #fff;
      border: none;
      cursor: pointer;
      font-size: 26px;
      box-shadow: 0 6px 24px rgba(21, 101, 192, .4);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform var(--t), box-shadow var(--t)
    }

    .fab:hover {
      transform: scale(1.08);
      box-shadow: 0 8px 32px rgba(21, 101, 192, .5)
    }

    .fab:active {
      transform: scale(0.95)
    }

    /* â”€â”€ BOTTOM NAV â”€â”€ */
    .bnav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 150;
      background: #fff;
      border-top: 1px solid var(--b);
      display: flex;
      justify-content: space-around;
      padding: 7px 0 11px;
      box-shadow: 0 -4px 20px rgba(21, 101, 192, .07)
    }

    .ni {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      cursor: pointer;
      padding: 5px 16px;
      border-radius: 8px;
      color: var(--mt);
      font-size: .68rem;
      font-weight: 600;
      transition: color var(--t)
    }

    .ni.active {
      color: var(--p)
    }

    /* -- PROFILE PAGE -- */
    .profile-grid {
      display: grid;
      grid-template-columns: 350px 1fr;
      gap: 24px;
      padding: 10px 0;
    }

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

    .p-card {
      background: var(--surface);
      border-radius: 16px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.03);
      border: 1px solid var(--b);
    }

    .p-avatar-large {
      width: 120px; height: 120px;
      margin: 0 auto;
      background: var(--pd);
      color: #fff;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 3rem;
      font-weight: 800;
      box-shadow: 0 10px 25px rgba(13, 71, 161, 0.2);
      border: 4px solid #fff;
    }

    .p-social-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
      text-align: left;
      padding-top: 20px;
      border-top: 1px solid var(--b);
    }

    .p-social-item {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 0.9rem;
      color: var(--text);
    }

    .p-social-item .si {
      width: 24px;
      opacity: 0.6;
    }

    .p-info-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }

    @media (max-width: 600px) {
      .p-info-grid { grid-template-columns: 1fr; }
    }

    .p-info-item label {
      display: block;
      margin-bottom: 8px;
      color: var(--mt);
      font-weight: 700;
      font-size: 0.8rem;
      text-transform: uppercase;
    }

    .progress-group {
      margin-bottom: 20px;
    }

    .pg-hdr {
      display: flex;
      justify-content: space-between;
      margin-bottom: 8px;
      font-size: 0.85rem;
      font-weight: 600;
    }

    .pg-bar {
      height: 6px;
      background: var(--bg);
      border-radius: 3px;
      overflow: hidden;
    }

    .pg-fill {
      height: 100%;
      border-radius: 3px;
    }

    .text-center { text-align: center; }

    /* -- PAGE CONTAINERS v2.6 -- */
    #dashBody, #profileContainer, #rptContainer, #katContainer, 
    #appMarketContainer, #integrationsContainer, #prodAddContainer,
    #carilerContainer, #satislarContainer, #giderlerContainer,
    #kasaBankaContainer, #invoiceFormContainer, #cariDetailContainer,
    #webSettingsContainer {
        display: none;
    }
    
    .active-page { display: block !important; }

    .ni .ico {
      font-size: 20px
    }

    /* â”€â”€ OVERLAY / MODAL â”€â”€ */
    /* ── OVERLAY / MODAL ── */
    .ovl {
      position: fixed;
      inset: 0;
      background: rgba(10, 20, 60, .6);
      z-index: 1500;
      display: flex;
      align-items: center; /* Changed from flex-end to center for better centering */
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity .25s
    }

    .ovl.open {
      opacity: 1;
      pointer-events: all
    }

    .modal {
      background: #fff;
      border-radius: 22px 22px 0 0;
      width: 100%;
      max-width: 900px;
      max-height: 92vh;
      overflow-y: auto;
      padding: 22px 18px 36px;
      transform: translateY(60px);
      transition: transform .3s cubic-bezier(.34, 1.1, .64, 1)
    }

    .ovl.open .modal {
      transform: translateY(0)
    }

    .mhandle {
      width: 38px;
      height: 5px;
      background: var(--b);
      border-radius: 3px;
      margin: 0 auto 18px
    }

    .mtitle {
      font-size: 1.2rem;
      font-weight: 800;
      margin-bottom: 18px;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap
    }

    /* â”€â”€ FORM â”€â”€ */
    .fgrid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px
    }

    @media(max-width:480px) {
      .fgrid {
        grid-template-columns: 1fr
      }
    }

    .fg {
      display: flex;
      flex-direction: column;
      gap: 5px
    }

    .fg.full {
      grid-column: 1/-1
    }

    .flbl {
      font-size: .73rem;
      font-weight: 600;
      color: var(--mt);
      text-transform: uppercase;
      letter-spacing: .4px
    }

    .fi,
    .fs,
    .fta {
      padding: 12px 13px;
      border: 2px solid var(--b);
      border-radius: var(--rs);
      font-family: inherit;
      font-size: .95rem;
      color: #1A2340;
      background: #fff;
      outline: none;
      transition: border-color var(--t);
      width: 100%
    }

    .fi:focus,
    .fs:focus,
    .fta:focus {
      border-color: var(--pl)
    }

    .fta {
      min-height: 75px;
      resize: vertical
    }

    .fdiv {
      grid-column: 1/-1;
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 4px 0
    }

    .fdiv span {
      font-size: .7rem;
      font-weight: 700;
      color: var(--mt);
      text-transform: uppercase;
      letter-spacing: .5px;
      white-space: nowrap
    }

    .fdiv::before,
    .fdiv::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--b)
    }

    .facts {
      display: flex;
      gap: 10px;
      margin-top: 18px
    }

    .btn-p {
      flex: 1;
      padding: 14px;
      border: none;
      border-radius: var(--r);
      background: linear-gradient(135deg, var(--pl), var(--pd));
      color: #fff;
      font-size: .95rem;
      font-weight: 700;
      cursor: pointer;
      transition: opacity var(--t)
    }

    .btn-p:hover {
      opacity: .9
    }

    .btn-s {
      padding: 14px 18px;
      border: 2px solid var(--b);
      border-radius: var(--r);
      background: #fff;
      color: var(--mt);
      font-size: .95rem;
      font-weight: 600;
      cursor: pointer;
      transition: all var(--t)
    }

    .btn-s:hover {
      border-color: var(--pl);
      color: var(--p)
    }

    .btn-d {
      padding: 14px 15px;
      border: 2px solid var(--err);
      border-radius: var(--r);
      background: transparent;
      color: var(--err);
      font-size: .95rem;
      font-weight: 600;
      cursor: pointer;
      transition: all var(--t)
    }

    .btn-d:hover {
      background: var(--err);
      color: #fff
    }

    /* â”€â”€ SINIF BTNS â”€â”€ */
    .sbg {
      display: flex;
      gap: 7px
    }

    .sbtn {
      flex: 1;
      padding: 11px 7px;
      border-radius: var(--rs);
      font-weight: 700;
      font-size: .85rem;
      cursor: pointer;
      border: 2px solid var(--b);
      background: #fff;
      color: var(--mt);
      transition: all var(--t);
      text-align: center
    }

    .sbtn.aA {
      background: #E8F5E9;
      border-color: #2E7D32;
      color: #2E7D32
    }

    .sbtn.aB {
      background: #E3F2FD;
      border-color: #1565C0;
      color: #1565C0
    }

    .sbtn.aC {
      background: #FFF8E1;
      border-color: #F57F17;
      color: #F57F17
    }

    /* â”€â”€ DETAIL â”€â”€ */
    .dsec {
      margin-bottom: 16px
    }

    .dsec-ttl {
      font-size: .7rem;
      font-weight: 700;
      color: var(--mt);
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 8px;
      padding-bottom: 5px;
      border-bottom: 2px solid var(--bg)
    }

    .dgrid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px
    }

    @media(max-width:400px) {
      .dgrid {
        grid-template-columns: 1fr
      }
    }

    .di {
      display: flex;
      flex-direction: column;
      gap: 2px
    }

    .di.full {
      grid-column: 1/-1
    }

    .dlbl {
      font-size: .7rem;
      color: var(--mt);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .4px
    }

    .dval {
      font-size: .92rem;
      font-weight: 600
    }

    .dval a {
      color: var(--p);
      text-decoration: none
    }

    .dval.big {
      font-size: 1.35rem;
      font-weight: 800;
      color: var(--err)
    }

    .dnote {
      background: var(--bg);
      border-radius: var(--rs);
      padding: 11px;
      font-size: .88rem;
      line-height: 1.5;
      border-left: 3px solid var(--pl)
    }

    .dnote.em {
      color: var(--mt);
      font-style: italic
    }

    .dacts {
      display: flex;
      gap: 10px;
      margin-bottom: 16px
    }

    .dbtn {
      flex: 1;
      padding: 13px;
      border-radius: var(--r);
      border: none;
      font-size: .88rem;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      transition: all var(--t)
    }

    .dbtn.tel {
      background: #E8F5E9;
      color: #2E7D32
    }

    .dbtn.tel:hover {
      background: #2E7D32;
      color: #fff
    }

    .dbtn.map {
      background: #E3F2FD;
      color: #1565C0
    }

    .dbtn.map:hover {
      background: #1565C0;
      color: #fff
    }

    /* â”€â”€ VISIT LOG BUTTON â”€â”€ */
    .btn-log {
      width: 100%;
      padding: 13px;
      background: linear-gradient(135deg, #43A047, #2E7D32);
      color: #fff;
      border: none;
      border-radius: var(--r);
      font-size: .95rem;
      font-weight: 700;
      cursor: pointer;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: opacity var(--t)
    }

    .btn-log:hover {
      opacity: .9
    }

    /* â”€â”€ VISIT LOG FORM (inline) â”€â”€ */
    .vform {
      background: var(--bg);
      border-radius: var(--r);
      padding: 14px;
      margin-bottom: 16px;
      border: 2px solid var(--pl);
      display: none
    }

    .vform.open {
      display: block
    }

    .vform-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 10px
    }

    @media(max-width:480px) {
      .vform-grid {
        grid-template-columns: 1fr
      }
    }

    .vform-acts {
      display: flex;
      gap: 8px;
      margin-top: 10px
    }

    .btn-vsave {
      flex: 1;
      padding: 12px;
      background: var(--p);
      color: #fff;
      border: none;
      border-radius: var(--rs);
      font-size: .9rem;
      font-weight: 700;
      cursor: pointer
    }

    .btn-vcancel {
      padding: 12px 18px;
      border: 2px solid var(--b);
      border-radius: var(--rs);
      background: #fff;
      color: var(--mt);
      font-size: .9rem;
      font-weight: 600;
      cursor: pointer
    }

    /* â”€â”€ TIMELINE â”€â”€ */
    .timeline {
      display: flex;
      flex-direction: column;
      gap: 10px
    }

    .tl-item {
      background: #fff;
      border: 1px solid var(--b);
      border-radius: var(--r);
      padding: 12px 14px;
      position: relative;
      border-left: 4px solid var(--p)
    }

    .tl-item.sat {
      border-left-color: var(--ok)
    }

    .tl-item.num {
      border-left-color: var(--warn)
    }

    .tl-item.yok {
      border-left-color: #9E9E9E
    }

    .tl-hdr {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 6px;
      gap: 8px;
      flex-wrap: wrap
    }

    .tl-date {
      font-size: .73rem;
      color: var(--mt);
      font-weight: 600
    }

    .tl-badge {
      font-size: .68rem;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 8px
    }

    .tl-badge.sat {
      background: #E8F5E9;
      color: #2E7D32
    }

    .tl-badge.num {
      background: #FFF8E1;
      color: #8D6E00
    }

    .tl-badge.yok {
      background: #F5F5F5;
      color: #616161
    }

    .tl-tah {
      font-weight: 700;
      font-size: .88rem;
      color: var(--ok)
    }

    .tl-note {
      font-size: .85rem;
      color: #1A2340;
      line-height: 1.45;
      word-break: break-word
    }

    .gechwk {
      background: #FFF3E0;
      border: 1px solid #FFB300;
      border-radius: var(--rs);
      padding: 10px 12px;
      margin-bottom: 12px;
      font-size: .82rem;
      color: #7B4F00
    }

    .gechwk strong {
      display: block;
      margin-bottom: 4px;
      color: #E65100;
      font-size: .8rem;
      text-transform: uppercase;
      letter-spacing: .4px
    }

    /* â”€â”€ DAILY WIDGETS â”€â”€ */
    .dwrap {
      background: linear-gradient(135deg, var(--pd), var(--p));
      padding: 10px 16px 12px;
      display: flex;
      gap: 10px;
      justify-content: space-around;
    }

    .dw {
      flex: 1;
      background: rgba(255, 255, 255, .15);
      border-radius: 12px;
      padding: 10px 8px;
      text-align: center;
      color: #fff;
    }

    .dw-val {
      font-size: 1.4rem;
      font-weight: 800;
      line-height: 1;
    }

    .dw-lbl {
      font-size: .65rem;
      opacity: .85;
      margin-top: 3px;
      font-weight: 600;
      letter-spacing: .3px;
    }

    /* â”€â”€ WHATSAPP â”€â”€ */
    .ibtn.wa {
      background: #E8F5E9;
      color: #25D366;
    }

    .ibtn.wa:hover {
      background: #25D366;
      color: #fff;
    }

    .dbtn.wa {
      background: #E8F5E9;
      color: #25D366;
    }

    .dbtn.wa:hover {
      background: #25D366;
      color: #fff;
    }

    /* â”€â”€ PHOTO IN LOG â”€â”€ */
    .photo-preview {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 8px;
    }

    .photo-thumb {
      width: 72px;
      height: 72px;
      object-fit: cover;
      border-radius: 8px;
      border: 2px solid var(--b);
      cursor: pointer;
    }

    .tl-photos {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
    }

    /* â”€â”€ MIC BTN â”€â”€ */
    .mic-wrap {
      position: relative;
    }

    .mic-btn {
      position: absolute;
      right: 8px;
      bottom: 8px;
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: none;
      background: var(--p);
      color: #fff;
      font-size: 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all var(--t);
    }

    .mic-btn.recording {
      background: var(--err);
      animation: pulse .8s infinite;
    }

    @keyframes pulse {

      0%,
      100% {
        transform: scale(1)
      }

      50% {
        transform: scale(1.15)
      }
    }

    /* â”€â”€ TOAST â”€â”€ */
    .toast {
      position: fixed;
      bottom: 96px;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: #1A2340;
      color: #fff;
      padding: 11px 22px;
      border-radius: 30px;
      font-size: .88rem;
      font-weight: 600;
      z-index: 999;
      opacity: 0;
      transition: all .3s;
      pointer-events: none;
      white-space: nowrap
    }

    .toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0)
    }

    /* â”€â”€ PHASE 6: SMART SUGGESTIONS â”€â”€ */
    .brain-ico {
      font-size: 1.1rem;
      animation: float 2s ease-in-out infinite;
      cursor: help;
    }

    @keyframes float {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-3px);
      }
    }

    .churn-risk {
      background: #FFF5F5 !important;
      border: 1.5px solid #feb2b2 !important;
    }

    .risk-badge {
      background: var(--err);
      color: #fff;
      padding: 2px 8px;
      border-radius: 6px;
      font-size: .65rem;
      font-weight: 800;
      margin-left: auto;
    }

    .smart-hint {
      background: #E3F2FD;
      border: 1px dashed var(--pl);
      border-radius: var(--rs);
      padding: 12px;
      margin-bottom: 12px;
      font-size: .82rem;
      color: var(--pd);
      line-height: 1.5;
    }

    .smart-hint strong {
      color: #1565C0;
      display: block;
      margin-bottom: 4px;
    }

    .order-sec {
      margin-top: 15px;
      background: #F8FAFC;
      border-radius: var(--rs);
      padding: 12px;
      border: 1px solid var(--b);
    }

    .order-title {
      font-size: .73rem;
      font-weight: 700;
      color: var(--mt);
      text-transform: uppercase;
      margin-bottom: 8px;
    }

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

    .order-row select {
      flex: 1;
      padding: 8px;
      border: 1px solid var(--b);
      border-radius: 6px;
      font-size: .85rem;
    }

    .order-row input {
      width: 60px;
      padding: 8px;
      border: 1px solid var(--b);
      border-radius: 6px;
      font-size: .85rem;
      text-align: center;
    }

    .btn-add-p {
      background: var(--bg);
      border: 1px dashed var(--mt);
      color: var(--mt);
      width: 100%;
      padding: 8px;
      border-radius: 6px;
      font-size: .75rem;
      font-weight: 700;
      cursor: pointer;
    }

    /* â”€â”€ REPORT PAGE â”€â”€ */
    .rpt-wrap {
      padding: 0 0 40px;
    }

    .rpt-date-bar {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 18px;
      align-items: flex-end;
      background: var(--bg);
      padding: 14px;
      border-radius: var(--r);
    }

    .rpt-date-bar label {
      font-size: .72rem;
      font-weight: 700;
      color: var(--mt);
      text-transform: uppercase;
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
      min-width: 120px;
    }

    .rpt-date-bar input[type=date] {
      padding: 10px 12px;
      border: 2px solid var(--b);
      border-radius: var(--rs);
      font-family: inherit;
      font-size: .9rem;
      outline: none;
      background: #fff;
    }

    .rpt-date-bar input[type=date]:focus {
      border-color: var(--pl);
    }

    .btn-rpt-filter {
      padding: 10px 18px;
      background: var(--p);
      color: #fff;
      border: none;
      border-radius: var(--rs);
      font-weight: 700;
      font-size: .9rem;
      cursor: pointer;
      white-space: nowrap;
      height: 40px;
      align-self: flex-end;
    }

    .rpt-card {
      background: #fff;
      border-radius: var(--r);
      padding: 16px;
      margin-bottom: 14px;
      box-shadow: var(--sh);
      border-left: 4px solid var(--p);
    }

    .rpt-card.g {
      border-left-color: var(--ok);
    }

    .rpt-card.o {
      border-left-color: var(--warn);
    }

    .rpt-card.r {
      border-left-color: var(--err);
    }

    .rpt-sec-ttl {
      font-size: .78rem;
      font-weight: 700;
      color: var(--mt);
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 12px;
      padding-bottom: 6px;
      border-bottom: 2px solid var(--bg);
    }

    .rpt-kpi-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 12px;
    }

    .rpt-kpi {
      flex: 1;
      min-width: 90px;
      background: var(--bg);
      border-radius: 10px;
      padding: 11px 8px;
      text-align: center;
    }

    .rpt-kpi-val {
      font-size: 1.2rem;
      font-weight: 800;
      color: var(--text-main);
    }

    .rpt-kpi-lbl {
      font-size: .65rem;
      color: var(--mt);
      font-weight: 600;
      text-transform: uppercase;
      margin-top: 2px;
    }

    .rpt-table {
      width: 100%;
      border-collapse: collapse;
      font-size: .82rem;
    }

    .rpt-table th {
      text-align: left;
      padding: 8px 10px;
      background: var(--bg);
      font-size: .7rem;
      color: var(--mt);
      font-weight: 700;
      text-transform: uppercase;
    }

    .rpt-table td {
      padding: 8px 10px;
      border-bottom: 1px solid var(--bg);
      vertical-align: middle;
    }

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

    .rpt-table tbody tr:hover td {
      background: #f8fbff;
    }

    .conv-badge {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 10px;
      font-size: .72rem;
      font-weight: 700;
    }

    .conv-ok {
      background: #E8F5E9;
      color: #2E7D32;
    }

    .conv-no {
      background: #FFF8E1;
      color: #F57F17;
    }

    /* â”€â”€ LIST STATUS â”€â”€ */
    .citem {
      position: relative;
      transition: all .3s;
    }

    .ccard.visited {
      opacity: 0.6;
      background: #f8f9fa !important;
      border-left: 4px solid var(--ok) !important;
    }

    .ccard.unvisited {
      border-left: 4px solid var(--p);
      box-shadow: 0 4px 10px rgba(21, 101, 192, 0.12);
    }

    .v-check {
      position: absolute;
      top: 12px;
      right: 12px;
      color: var(--ok);
      font-weight: 800;
      font-size: 1.1rem;
      z-index: 10;
    }

    .rpt-cust-sel {
      width: 100%;
      padding: 12px 13px;
      border: 2px solid var(--b);
      border-radius: var(--rs);
      font-family: inherit;
      font-size: .95rem;
      outline: none;
      margin-bottom: 14px;
    }

    .rpt-cust-sel:focus {
      border-color: var(--pl);
    }

    .chart-wrap {
      position: relative;
      height: 220px;
      margin: 10px 0 4px;
    }

    .rpt-empty {
      text-align: center;
      padding: 24px;
      color: var(--mt);
      font-size: .85rem;
    }

    /* â”€â”€ PHASE 4: CATALOG & RISK â”€â”€ */
    .cat-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 12px;
      padding: 10px 0;
    }

    .p-card {
      background: #fff;
      border-radius: var(--r);
      overflow: hidden;
      box-shadow: var(--sh);
      position: relative;
      display: flex;
      flex-direction: column;
    }

    .p-img-box {
      width: 100%;
      aspect-ratio: 1;
      background: #f0f4f8;
      overflow: hidden;
      cursor: zoom-in;
      position: relative;
    }

    .p-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform .3s;
    }

    .p-img:hover {
      transform: scale(1.05);
    }

    .p-info {
      padding: 10px;
      flex-grow: 1;
      display: flex;
      flex-direction: column;
    }

    .p-name {
      font-weight: 700;
      font-size: .88rem;
      color: var(--pd);
      margin-bottom: 4px;
    }

    .p-meta {
      font-size: .72rem;
      color: var(--mt);
      font-weight: 600;
    }

    .p-price {
      font-size: .95rem;
      font-weight: 800;
      color: var(--p);
      margin-top: auto;
      padding-top: 6px;
    }

    .risk-badge {
      background: #fee2e2;
      color: #dc2626;
      border: 1px solid #fca5a5;
      padding: 2px 6px;
      border-radius: 4px;
      font-size: .65rem;
      font-weight: 800;
      margin-left: 6px;
      vertical-align: middle;
      animation: blink 1.5s infinite;
    }

    @keyframes blink {
      0% {
        opacity: 1;
      }

      50% {
        opacity: 0.6;
      }

      100% {
        opacity: 1;
      }
    }

    .cc-name.risky {
      color: #dc2626;
      text-shadow: 0 0 1px rgba(220, 38, 38, 0.2);
    }

    /* Presentation Mode */
    .pres-ovl {
      position: fixed;
      inset: 0;
      background: rgba(26, 35, 64, 0.98);
      z-index: 1000;
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: #fff;
      padding: 20px;
    }

    .pres-img {
      max-width: 90%;
      max-height: 70vh;
      border-radius: 20px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
      object-fit: contain;
    }

    .pres-name {
      font-size: 1.8rem;
      font-weight: 800;
      margin-top: 25px;
    }

    .pres-price {
      font-size: 2.2rem;
      font-weight: 900;
      color: #4CAF50;
      margin-top: 10px;
    }

    /* Van Stock / Selection */
    .stk-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px;
      border-bottom: 1px solid var(--b);
    }

    .stk-name {
      flex-grow: 1;
      font-weight: 600;
      font-size: .88rem;
    }

    .stk-val {
      font-weight: 800;
      color: var(--p);
      min-width: 40px;
      text-align: right;
    }

    .stk-warn {
      color: #dc2626;
      font-size: .7rem;
      font-weight: 800;
      margin-left: 8px;
    }

    /* Setting items */
    .set-item {
      display: flex;
      align-items: center;
      gap: 15px;
      padding: 16px;
      background: #fff;
      border-radius: var(--r);
      margin-bottom: 12px;
      box-shadow: var(--sh);
      cursor: pointer;
      transition: transform .2s;
    }

    .set-item:active {
      transform: scale(0.97);
    }

    /* Competitor Intel Styles */
    .comp-sec {
      margin-top: 15px;
      border: 1px dashed var(--b);
      padding: 12px;
      border-radius: var(--r);
      background: #f8fafc;
    }

    .comp-ttl {
      font-size: .75rem;
      font-weight: 800;
      color: var(--mt);
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .threat-badge {
      background: #fee2e2;
      color: #b91c1c;
      font-size: .65rem;
      padding: 2px 6px;
      border-radius: 4px;
      font-weight: 700;
      border: 1px solid #fecaca;
    }

    .comp-checklist {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 10px;
    }

    .comp-ch-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: .8rem;
      cursor: pointer;
      background: #fff;
      padding: 6px 10px;
      border-radius: 8px;
      border: 1px solid var(--b);
    }

    .comp-ch-item input {
      accent-color: var(--p);
    }

    .tag-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
    }

    .tag-item {
      font-size: .7rem;
      padding: 4px 8px;
      border-radius: 20px;
      background: #edf2f7;
      color: #4a5568;
      cursor: pointer;
      border: 1px solid transparent;
      transition: all .2s;
    }

    .tag-item.active {
      background: var(--p);
      color: #fff;
      border-color: var(--p);
    }

    .shelf-prev {
      display: flex;
      gap: 5px;
      overflow-x: auto;
      margin-top: 8px;
    }

    .shelf-img {
      width: 60px;
      height: 60px;
      object-fit: cover;
      border-radius: 4px;
      border: 1px solid var(--b);
    }

    .set-ico {
      font-size: 24px;
      width: 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg);
      border-radius: 12px;
    }

    .set-det {
      flex-grow: 1;
    }

    .set-ttl {
      font-weight: 700;
      color: var(--pd);
      font-size: .95rem;
    }

    .set-sub {
      font-size: .75rem;
      color: var(--mt);
    }

    .btn-backup {
      background: #1A2340;
      color: #fff;
      width: 100%;
      border: none;
      padding: 16px;
      border-radius: var(--r);
      font-weight: 800;
      font-size: 1rem;
      margin-top: 10px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }

    /* ════ PRODUCT FORM GRID ════ */
    .prod-form-grid {
      padding: 32px;
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 32px;
      align-items: start;
    }

    @media (max-width: 900px) {
      .prod-form-grid {
        grid-template-columns: 1fr;
        padding: 20px;
      }
    }

    .prod-card {
      background: #fff;
      border-radius: 16px;
      padding: 24px;
      border: 1px solid var(--b);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    }

    .prod-card-title {
      font-size: 1.15rem;
      font-weight: 800;
      color: var(--pd);
      border-bottom: 2px solid var(--bg);
      padding-bottom: 12px;
      margin-bottom: 20px;
    }

    .input-bg {
      background: #f8fafc !important;
      border: 1px solid #e2e8f0 !important;
      border-radius: 10px !important;
      padding: 12px 16px !important;
      font-size: .95rem !important;
      transition: border-color .2s, box-shadow .2s;
    }

    .input-bg:focus {
      border-color: var(--p) !important;
      background: #fff !important;
      box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1) !important;
    }

    .input-with-icon {
      position: relative;
      display: flex;
      align-items: center;
    }

    .input-with-icon input {
      padding-right: 45px !important;
      width: 100%;
    }

    .input-suffix {
      position: absolute;
      right: 16px;
      color: var(--mt);
      font-weight: 700;
      font-size: .9rem;
      pointer-events: none;
    }

    .image-dropzone {
      padding: 40px 20px;
      background: #f8fafc;
      border: 2px dashed #cbd5e0;
      border-radius: 16px;
      text-align: center;
      cursor: pointer;
      transition: all .2s;
    }

    .image-dropzone:hover {
      background: #f1f5f9;
      border-color: var(--p);
    }

    /* Toggle Switch */
    .toggle-switch {
      position: relative;
      display: inline-block;
      width: 48px;
      height: 26px;
    }

    .toggle-switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .toggle-switch .slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #cbd5e0;
      transition: .4s;
      border-radius: 26px;
    }

    .toggle-switch .slider:before {
      position: absolute;
      content: "";
      height: 20px;
      width: 20px;
      left: 3px;
      bottom: 3px;
      background-color: white;
      transition: .4s;
      border-radius: 50%;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .toggle-switch input:checked+.slider {
      background-color: #10B981;
    }

    .toggle-switch input:checked+.slider:before {
      transform: translateX(22px);
    }

    /*  TABS & CATEGORIES  */
    .tabs {
      display: flex;
      gap: 12px;
      margin-bottom: 24px;
      overflow-x: auto;
      padding-bottom: 8px;
      -ms-overflow-style: none;
      scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar {
      display: none;
    }

    .tab-btn {
      padding: 10px 20px;
      border-radius: 12px;
      background: #fff;
      border: 1px solid var(--b);
      color: var(--mt);
      font-weight: 600;
      font-size: .9rem;
      cursor: pointer;
      white-space: nowrap;
      transition: all var(--t);
      outline: none;
    }

    .tab-btn:hover {
      border-color: var(--pl);
      color: var(--p);
    }

    .tab-btn.active {
      background: var(--p);
      color: #fff !important;
      border-color: var(--p);
      box-shadow: 0 4px 12px rgba(21, 101, 192, 0.2);
    }


    /*  MOBİLE RESPONSIVENESS (PHASE 11)  */
    .m-hdr {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 60px;
      background: #1A2340;
      color: #fff;
      align-items: center;
      padding: 0 16px;
      z-index: 1100;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    /* ════ V13 Logo Standard Product Enhancements ════ */
    .p-tabs {
        display: flex;
        gap: 8px;
        margin-bottom: 20px;
        border-bottom: 2px solid var(--b);
        padding-bottom: 0px;
        position: sticky;
        top: 0;
        background: var(--surface);
        z-index: 5;
    }

    .p-tab {
        padding: 12px 20px;
        font-weight: 700;
        font-size: 0.85rem;
        color: var(--mt);
        cursor: pointer;
        border-bottom: 3px solid transparent;
        transition: all var(--t);
        white-space: nowrap;
    }

    .p-tab:hover {
        color: var(--p);
    }

    .p-tab.active {
        color: var(--p);
        border-bottom-color: var(--p);
    }

    .p-tab-content {
        display: none;
        animation: fadeIn 0.3s ease;
    }

    .p-tab-content.active {
        display: block;
    }

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

    .p-table-wrap {
        background: #f8fafc;
        border: 1px solid var(--b);
        border-radius: 12px;
        overflow: hidden;
        margin-top: 10px;
    }

    .p-table {
        width: 100%;
        border-collapse: collapse;
    }

    .p-table th {
        background: #f1f5f9;
        text-align: left;
        padding: 10px 12px;
        font-size: 0.75rem;
        font-weight: 800;
        color: var(--mt);
        text-transform: uppercase;
        border-bottom: 1px solid var(--b);
    }

    .p-table td {
        padding: 8px 12px;
        border-bottom: 1px solid var(--b);
        font-size: 0.9rem;
    }

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

    .p-calc-box {
        margin-top: 6px;
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--ok);
        background: #ecfdf5;
        padding: 4px 10px;
        border-radius: 6px;
        display: inline-block;
    }

    .p-calc-box.err {
        color: var(--err);
        background: #fef2f2;
    }

    .p-search-result {
        background: #fff;
        border: 1px solid var(--b);
        border-radius: 10px;
        padding: 8px 12px;
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 8px;
        cursor: pointer;
        transition: all var(--t);
    }

    .p-search-result:hover {
        background: #f0f9ff;
        border-color: var(--pl);
    }

    .p-search-img {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        object-fit: cover;
    }

    .p-search-info {
        flex: 1;
    }

    .p-tag {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: var(--bg);
        border-radius: 6px;
        padding: 4px 8px;
        margin: 2px;
        font-size: 0.8rem;
        font-weight: 600;
    }

    .p-tag .remove {
        cursor: pointer;
        color: var(--err);
        font-weight: 900;
    }

    .btn-icon-s {
        width: 30px;
        height: 30px;
        border-radius: 6px;
        border: 1px solid var(--b);
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all var(--t);
    }

    .btn-icon-s:hover {
        background: var(--bg);
        color: var(--err);
    }

    .m-hmb {
      background: none;
      border: none;
      color: #fff;
      font-size: 24px;
      cursor: pointer;
      padding: 8px;
    }

    .m-logo {
      flex: 1;
      text-align: center;
      font-weight: 800;
      font-size: 1.1rem;
      letter-spacing: 1px;
    }

    .m-actions {
      display: flex;
      gap: 15px;
    }

    .m-act-ico {
      font-size: 20px;
      cursor: pointer;
    }

    #sbOvl {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(2px);
      z-index: 1050;
      transition: opacity .3s;
    }

    #sbOvl.active {
      display: block;
    }

    .m-bot-nav {
      display: none;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 70px;
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(10px);
      border-top: 1px solid var(--b);
      display: none;
      /* Hidden by default, shown in media query */
      justify-content: space-around;
      align-items: center;
      z-index: 1100;
      padding-bottom: env(safe-area-inset-bottom);
    }

    .m-bot-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      color: var(--mt);
      cursor: pointer;
      flex: 1;
    }

    .m-bot-ico {
      font-size: 20px;
    }

    .m-bot-lbl {
      font-size: 0.65rem;
      font-weight: 600;
    }

    .m-bot-plus {
      width: 48px;
      height: 48px;
      background: var(--p);
      color: #fff;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      box-shadow: 0 4px 12px rgba(21, 101, 192, 0.4);
      margin-top: -30px;
      border: 4px solid #fff;
    }

    @media (max-width: 768px) {
      .m-hdr {
        display: flex;
      }

      .m-bot-nav {
        display: flex;
      }

      #mainContent {
        margin-left: 0;
        margin-top: 60px;
        padding-bottom: 90px; /* Increased for mobile nav */
      }

      /* Fix for Modal and Overlay overlap */
      .ovl {
        z-index: 2000 !important; /* Must be higher than m-bot-nav (1100) */
      }

      .modal {
        padding-bottom: 110px !important; /* More space for scroll */
        max-height: 88vh !important;
      }

      /* Floating Action Button mobile fix */
      .fab {
        bottom: 90px !important;
        right: 16px !important;
        z-index: 1200 !important; /* Above navbar but below modal ovl */
      }

      /* Quick Actions (Add Menu) padding fix */
      [id$="Ovl"] .modal, 
      #addMenuOvl .modal {
         padding-bottom: 120px !important;
      }

      #sidebar {
        z-index: 1200;
        box-shadow: 10px 0 30px rgba(0,0,0,0.2);
        transform: translateX(-100%);
      }

      #sidebar.open {
        transform: translateX(0);
      }

      .hdr {
        display: none;
      }

      /* Hide desktop header */
      .dwrap {
        margin-top: 10px;
      }

      /* Table Responsiveness */
      .wrap,
      .clist,
      .report-table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
      }

      table {
        min-width: 600px;
      }
    }

    /* ── FINANSAL MODÜLLER ── */
    .fin-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
    }

    .fin-card {
      background: #fff;
      border-radius: 16px;
      padding: 24px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
      border: 1px solid var(--b);
    }

    .fin-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
    }

    .fin-table th {
      background: #f8fafc;
      padding: 12px 15px;
      font-size: .75rem;
      font-weight: 700;
      color: var(--mt);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      border-bottom: 2px solid var(--bg);
      text-align: left;
    }

    .fin-table td {
      padding: 15px;
      font-size: .9rem;
      border-bottom: 1px solid var(--bg);
      color: var(--pd);
      font-weight: 500;
    }

    .fin-table tr:hover td {
      background: #f0f7ff;
    }

    .val-pos {
      color: var(--ok);
      font-weight: 700;
      text-align: right;
    }

    .val-neg {
      color: var(--err);
      font-weight: 700;
      text-align: right;
    }

    .val-neutral {
      color: var(--pd);
      font-weight: 700;
      text-align: right;
    }

    .invoice-form-paper label {
      font-family: 'Inter', sans-serif;
    }

    .inv-row-input {
      width: 100%;
      padding: 10px;
      border: 1px solid var(--b);
      border-radius: 8px;
      font-size: .9rem;
      outline: none;
    }

    .inv-row-input:focus {
      border-color: var(--p);
    }

    /* DataGrid Helper classes */
    .dg-btn {
      padding: 6px 12px;
      border-radius: 8px;
      font-size: .75rem;
      font-weight: 700;
      cursor: pointer;
      border: none;
      transition: all .2s;
    }

    .dg-btn-view {
      background: #eff6ff;
      color: #1e40af;
    }

    .dg-btn-edit {
      background: #fefce8;
      color: #854d0e;
    }

    @media (max-width: 768px) {
      .invoice-form-paper {
        padding: 20px;
      }

      .fin-table-wrap {
        overflow-x: auto;
      }
    }

    /* ════ RBAC PERSONEL YÖNETİMİ ════ */
    .perm-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 0;
      border-bottom: 1px solid var(--b);
      gap: 16px;
    }
    .perm-row:last-child { border-bottom: none; }

    .staff-tr:hover td { background: #f0f7ff; }
    .staff-tr td {
      padding: 12px 16px;
      border-bottom: 1px solid #f1f5f9;
      vertical-align: middle;
    }
    .staff-badge {
      display: inline-block;
      padding: 3px 10px;
      border-radius: 20px;
      font-size: .72rem;
      font-weight: 700;
    }
    .staff-badge.admin { background: #eff6ff; color: #1e40af; }
    .staff-badge.staff { background: #f0fdf4; color: #15803d; }
    .role-badge {
      display: inline-block;
      background: #faf5ff;
      color: #6b21a8;
      border: 1px solid #e9d5ff;
      padding: 3px 10px;
      border-radius: 20px;
      font-size: .72rem;
      font-weight: 700;
    }
    .role-perm-chip {
      display: inline-block;
      background: #f1f5f9;
      color: #475569;
      padding: 2px 8px;
      border-radius: 4px;
      font-size: .67rem;
      font-weight: 600;
      margin: 2px;
    }

/* ───── SAHA SATIŞ & KANBAN STYLES ───── */
.kanban-board {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
}

.kanban-col {
    min-width: 280px;
    width: 280px;
    background: #f8fafc; /* Lighter background */
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    border: 1px solid rgba(0,0,0,0.04);
}

.k-col-hdr {
    padding: 16px;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--pd);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(0,0,0,0.03);
}

.k-col-cnt {
    background: var(--p);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.k-cards {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.k-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border-left: 4px solid #ced4da; /* Default gray */
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s;
    position: relative;
    cursor: pointer;
}

.k-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.k-card.status-success { border-left-color: #2fb344; }
.k-card.status-danger { border-left-color: #d63939; }

.k-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--mt);
}

.k-meta {
    font-size: 0.75rem;
    color: var(--mt);
    opacity: 0.7;
}

.k-bal {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.k-bal.neg { background: #fff5f5; color: #d63939; }
.k-bal.pos { background: #f0fff4; color: #2fb344; }

.k-action-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 32px;
    height: 32px;
    background: var(--p);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(21, 101, 192, 0.2);
}

/* Dashboard Chart Bars */
#sahaSalesChart {
    align-items: flex-end;
}

.chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.chart-bar {
    width: 35px;
    background: linear-gradient(to top, var(--p), var(--pl));
    border-radius: 6px 6px 0 0;
    position: relative;
    transition: height 0.5s ease;
}

.chart-bar:hover { opacity: 0.8; }

.chart-val {
    position: absolute;
    top: -20px;
    width: 100%;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--mt);
}

.chart-lbl {
    margin-top: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--mt);
}

/* Live Feed Items */
.feed-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(0,0,0,0.02);
}

.feed-ico {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.feed-det { flex: 1; }
.feed-ttl { font-size: 0.85rem; font-weight: 700; color: var(--mt); }
.feed-sub { font-size: 0.75rem; color: var(--mt); opacity: 0.7; }

/* Route Planning Filters */
.tab-btn {
    padding: 8px 16px;
    border-radius: 12px;
    border: 2px solid var(--b);
    background: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--mt);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--p);
    border-color: var(--p);
    color: #fff;
}

/* ───── KANBAN EXTRA STYLES ───── */
.k-col-hdr.today-highlight {
    background: var(--p) !important;
    color: #fff !important;
    border-radius: 12px 12px 0 0;
}

.k-col-hdr.today-highlight .k-col-cnt {
    background: #fff !important;
    color: var(--p) !important;
}

.kanban-col.unassigned {
    background: #fdfdfd;
    border: 1px dashed #ccc;
}

.k-card.status-success { border-left-color: #2fb344 !important; } /* Sipariş Alındı */
.k-card.status-danger { border-left-color: #d63939 !important; }  /* Alım Yok (Pas Geçildi) */
.k-card.status-warning { border-left-color: #f59e0b !important; } /* Sadece Numune */

/* Today Wide View Fix */
#kanbanBoard .kanban-col[style*="flex:1"],
#kanbanBoard .kanban-col[style*="flex: 1"] {
    min-width: 500px;
}

@media (max-width: 768px) {
    #kanbanBoard .kanban-col[style*="flex:1"],
    #kanbanBoard .kanban-col[style*="flex: 1"] {
        min-width: 100%;
        margin-right: 0;
    }
}

/* ───── MODERN VISIT DETAIL MODAL (Image 1 Style) ───── */
/* Legacy visit-modal classes removed - merged into V6 section at the end */

.v-modal-hdr {
    padding: 20px 24px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}

.v-modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.v-sec-ttl {
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.v-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.v-lbl { font-size: 0.7rem; color: #94a3b8; font-weight: 600; margin-bottom: 4px; }
.v-val { font-size: 0.9rem; color: #1e293b; font-weight: 700; }

.v-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 24px;
}

.v-btn-call, .v-btn-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.v-btn-call { background: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }
.v-btn-wa { background: #f0fdf4; color: #16a34a; border: 1px solid #dcfce7; }

.v-comp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.v-comp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.v-note-btn {
    width: 100%;
    background: #2fb344;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    cursor: pointer;
}

.v-modal-ftr {
    padding: 15px 24px;
    background: #f8fafc;
    display: flex;
    gap: 12px;
}

.v-ftr-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.v-ftr-cancel { background: #fff; color: #64748b; border: 1px solid #e2e8f0; }
.v-ftr-edit { background: #1565C0; color: #fff; }
.v-ftr-del { width: 48px; background: #fff; border: 1px solid #ef4444; color: #ef4444; border-radius: 12px; }

/* Quick Add Button in Rut Header */
.rut-add-btn {
    width: 36px;
    height: 36px;
    background: var(--p);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.rut-add-btn:hover { transform: scale(1.1); }

/* --- NEW RUT PANOSU KANBAN STYLES --- */
.kanban-col {
    background: #eef2f7;
    border-radius: 16px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    max-height: 75vh;
    border: 1px solid var(--b);
}

.k-col-hdr {
    padding: 14px 18px;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--pd);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid var(--b);
    position: sticky;
    top: 0;
    z-index: 10;
}

.k-col-cnt {
    background: var(--bg);
    color: var(--mt);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.k-cards {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Custom Scrollbar for Kanban Cols */
.k-cards::-webkit-scrollbar { width: 4px; }
.k-cards::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.k-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    border-left: 5px solid #cbd5e1; /* Default Gray */
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.k-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: var(--p); }

.k-card.status-success { border-left-color: var(--ok); }
.k-card.status-danger { border-left-color: var(--err); }
.k-card.status-warning { border-left-color: var(--warn); }

.k-name { font-weight: 700; font-size: 0.9rem; color: var(--text); margin-bottom: 4px; }
.k-meta { font-size: 0.75rem; color: var(--mt); display: flex; align-items: center; gap: 4px; }
.k-bal { font-size: 0.85rem; font-weight: 800; margin-top: 8px; }
.k-bal.neg { color: var(--err); }
.k-bal.pos { color: var(--ok); }

.k-quick-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.k-card:hover .k-quick-actions { opacity: 1; }

.qa-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--bg);
    border: 1px solid var(--b);
    cursor: pointer;
    transition: all 0.2s;
}

.qa-btn:hover { background: var(--p); color: #fff; border-color: var(--p); }

.today-highlight { background: #e0f2fe; color: #0369a1; border-bottom: 1px solid #bae6fd; }

.rut-tabs .tab-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 10px;
    background: #fff;
    border: 1.5px solid var(--b);
    color: var(--mt);
}

.rut-tabs .tab-btn.active {
    background: var(--pd);
    color: #fff;
    border-color: var(--pd);
}

/* Mobile Adjustments for Kanban */
@media (max-width: 600px) {
    .kanban-col { min-width: 100%; max-height: none; }
    .kanban-board { flex-direction: column; }
}

.tag-btn {
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 4px;
    margin-bottom: 4px;
}

.tag-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.tag-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #2563eb;
}

/* --- Visit Modal & Form Styles (V6) --- */
.visit-modal {
    background: #fff;
    border-radius: 28px;
    width: 95%;
    max-width: 850px;
    box-shadow: 0 40px 100px -20px rgba(15, 23, 42, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    position: relative;
    z-index: 2005;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ovl.open .visit-modal {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .visit-modal {
        border-radius: 24px 24px 0 0;
        width: 100%;
        max-width: none;
        max-height: 95vh;
        transform: translateY(100%);
    }
    .ovl.open .visit-modal {
        transform: translateY(0);
    }
}

.v-modal-hdr {
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}

.v-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.v-modal-ftr {
    padding: 15px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 10px;
}

.v-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.v-sec-ttl {
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    margin: 20px 0 10px 0;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v-lbl {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.v-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.v-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.v-action-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.v-btn-call, .v-btn-wa {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.v-btn-call { background: #f0f7ff; color: #3b82f6; border: 1px solid #dbeafe; }
.v-btn-wa { background: #f0fdf4; color: #22c55e; border: 1px solid #dcfce7; }

.v-btn-call:hover { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.v-btn-wa:hover { background: #22c55e; color: #fff; border-color: #22c55e; }

.v-note-btn {
    width: 100%;
    padding: 15px;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-bottom: 15px;
}

.v-note-btn:hover { background: #047857; transform: translateY(-1px); }

.v-ftr-btn {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.v-ftr-cancel { background: #fff; border-color: #e2e8f0; color: #64748b; }
.v-ftr-edit { background: #2563eb; color: #fff; }
.v-ftr-del { background: #fff; border-color: #fee2e2; color: #ef4444; max-width: 50px; }

.v-comp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 15px;
}

.v-comp-item {
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v-comp-item input { margin: 0; }

/* ── PRODUCT QUICK ADD STYLES (V14) ── */
.flbl-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.flbl-wrap .flbl {
    margin-bottom: 0;
}

.btn-quick-add {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--p);
    background: #f0f7ff;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    border: 1px solid #dbeafe;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-quick-add:hover {
    background: var(--p);
    color: #fff !important;
    border-color: var(--p);
    box-shadow: 0 4px 8px rgba(21, 101, 192, 0.2);
}

.btn-quick-add::before {
    content: '+';
    font-size: 0.9rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .btn-quick-add {
        padding: 4px 10px;
    }
}

/* ── PRODUCT TABS STYLES (V13) ── */
.p-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--b);
    overflow-x: auto;
    padding-bottom: 5px;
}

.p-tab {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--mt);
    cursor: pointer;
    border-radius: 12px 12px 0 0;
    transition: all 0.2s;
    white-space: nowrap;
}

.p-tab:hover {
    background: #f1f5f9;
    color: var(--pd);
}

.p-tab.active {
    background: var(--p);
    color: #fff;
}

.p-tab-content {
    display: none;
    animation: fadeIn .3s ease;
}

.p-tab-content.active {
    display: block;
}

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

/* ── PRODUCT FORM GRID & CARDS ── */
.prod-form-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

.prod-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--b);
}

.prod-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--pd);
    margin: 0 0 20px 0;
    display: flex;
    justify-content: space-between;
}

.p-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--b);
    border-radius: 12px;
}

.p-table {
    width: 100%;
    border-collapse: collapse;
}

.p-table th {
    background: #f8fafc;
    padding: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mt);
    text-align: left;
    border-bottom: 1px solid var(--b);
}

.p-table td {
    padding: 10px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--b);
}

.btn-add-p {
    background: #f1f5f9;
    color: var(--p);
    border: 1px dashed var(--p);
    padding: 10px;
    width: 100%;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}

.btn-add-p:hover {
    background: #e0e7ff;
}

/* ── STOCK MOVEMENTS (V15) STYLES ── */
.mov-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--b);
    margin-bottom: 25px;
    align-items: flex-end;
}

.mov-f-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mov-f-item label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mt);
    text-transform: uppercase;
}

.mov-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mov-badge.in { background: #f0fdf4; color: #15803d; border: 1px solid #dcfce7; }
.mov-badge.out { background: #fef2f2; color: #b91c1c; border: 1px solid #fee2e2; }
.mov-badge.transfer { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }

.mov-table-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--b);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.mov-table {
    width: 100%;
    border-collapse: collapse;
}

.mov-table th {
    background: #f8fafc;
    padding: 15px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--mt);
    text-align: left;
    border-bottom: 2px solid var(--bg);
    white-space: nowrap;
}

.mov-table td {
    padding: 15px;
    font-size: 0.85rem;
    color: var(--pd);
    border-bottom: 1px solid var(--bg);
}

.mov-table tr:hover td {
    background: #f1f5f9;
}

.mov-doc-id {
    font-weight: 700;
    color: var(--p);
    text-decoration: none;
    cursor: pointer;
}

.mov-doc-id:hover {
    text-decoration: underline;
}

.mov-qty.pos { color: #15803d; font-weight: 700; }
.mov-qty.neg { color: #b91c1c; font-weight: 700; }

@media (max-width: 768px) {
    .mov-filter-bar {
        padding: 15px;
        gap: 10px;
    }
    .mov-f-item {
        flex: 1 1 140px;
    }
}

/* ── FINANCIAL DETAIL (EKSTRE) STYLES (V16) ── */
.fin-bal-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.fin-bal-card {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--b);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fin-bal-card.debt { border-left: 5px solid #ef4444; }
.fin-bal-card.credit { border-left: 5px solid #10b981; }
.fin-bal-card.balance { border-left: 5px solid var(--p); }

.fin-bal-card label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--mt);
    text-transform: uppercase;
}

.fin-bal-card div {
    font-size: 1.5rem;
    font-weight: 800;
}

.ekstre-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--bg);
    padding-bottom: 10px;
}

.ekstre-tab {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--mt);
    transition: all 0.2s;
}

.ekstre-tab:hover { background: #f1f5f9; }
.ekstre-tab.active { background: var(--p); color: #fff; }

.ekstre-table {
    width: 100%;
    border-collapse: collapse;
}

.ekstre-table th {
    background: #f8fafc;
    padding: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--mt);
    text-align: left;
    border-bottom: 2px solid var(--bg);
}

.ekstre-table td {
    padding: 12px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--bg);
    color: var(--pd);
}

.row-type-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}

.row-type-badge.invoice { background: #fef2f2; color: #b91c1c; }
.row-type-badge.payment { background: #f0fdf4; color: #15803d; }
.row-type-badge.other { background: #f1f5f9; color: #475569; }

.ekstre-amt { font-weight: 700; }
.ekstre-amt.neg { color: #b91c1c; }
.ekstre-amt.pos { color: #15803d; }


