@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700;800&display=swap');

  :root {
    --ink: #18233f;
    --muted: #667085;
    --line: #e7eaf1;
    --surface: #ffffff;
    --surface-soft: #f7f9fd;
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --success: #16a36a;
    --danger: #e5484d;
    --warning: #e89516;
    --info: #0f9fbd;
    --shadow: 0 18px 50px rgba(27, 38, 78, .12);
    --radius: 18px;
  }

  * { box-sizing: border-box; }
  html { min-height: 100%; background: #f4f7ff; }
  body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: "Lexend", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
      radial-gradient(circle at 8% 7%, rgba(129, 140, 248, .22), transparent 27rem),
      radial-gradient(circle at 93% 12%, rgba(45, 212, 191, .16), transparent 25rem),
      #f4f7ff;
  }

  button, input, select, textarea { font: inherit; }
  button { -webkit-tap-highlight-color: transparent; }
  button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(79, 70, 229, .22);
    outline-offset: 2px;
  }
  [hidden] { display: none !important; }

  .app-shell { width: min(1360px, calc(100% - 32px)); margin: 28px auto 42px; }
  .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 78px;
    padding: 13px 18px;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 22px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 12px 34px rgba(51, 62, 119, .09);
    backdrop-filter: blur(14px);
  }
  .header-leading { display: flex; align-items: center; min-width: 0; gap: 9px; }
  .mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    align-content: center;
    gap: 4px;
    border: 0;
    border-radius: 11px;
    padding: 0;
    color: #fff;
    background: linear-gradient(135deg, #5c53ea, #4438c6);
    box-shadow: 0 7px 15px rgba(79, 70, 229, .22);
    cursor: pointer;
    touch-action: manipulation;
  }
  .mobile-menu-toggle > span { display: block; width: 17px; height: 2px; border-radius: 999px; background: currentColor; transition: transform .2s, opacity .2s; }
  .mobile-menu-toggle[aria-expanded="true"] > span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .mobile-menu-toggle[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
  .mobile-menu-toggle[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .sidebar-backdrop { display: none; }
  .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 14px;
    color: white;
    font-size: 17px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffc52c, #f3a400);
    box-shadow: 0 8px 18px rgba(226, 154, 0, .28);
    overflow: hidden;
  }
  .brand-mark img { width: 100%; height: 100%; object-fit: cover; }
  .brand-copy { min-width: 0; }
  .brand-name { display: block; letter-spacing: .08em; font-size: 13px; font-weight: 800; }
  .brand-tagline { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
  .header-controls { display: flex; align-items: center; gap: 13px; }
  .user-menu { display: flex; align-items: center; gap: 10px; }
  .user-chip { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
  .avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--primary); background: #ecebff; font-weight: 800; }
  .theme-toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; user-select: none; white-space: nowrap; }
  .theme-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  .theme-slider { position: relative; width: 38px; height: 22px; flex: 0 0 38px; border-radius: 999px; background: #c5ccda; box-shadow: inset 0 1px 3px rgba(20, 29, 55, .18); transition: background .22s ease; }
  .theme-slider::after { content: "☀"; display: grid; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; place-items: center; border-radius: 50%; color: #e18a05; background: #fff; box-shadow: 0 1px 4px rgba(17, 24, 39, .24); font-size: 10px; transition: transform .22s ease, content .22s ease; }
  .theme-toggle input:checked + .theme-slider { background: var(--primary); }
  .theme-toggle input:checked + .theme-slider::after { content: "☾"; color: #5146d7; transform: translateX(16px); }
  .theme-toggle input:focus-visible + .theme-slider { outline: 3px solid rgba(79,70,229,.25); outline-offset: 3px; }

  .app-preload-progress {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin: 12px 0 0;
    padding: 13px 18px;
    overflow: hidden;
    border: 1px solid rgba(79, 70, 229, .19);
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(239,246,255,.9));
    box-shadow: 0 13px 30px rgba(31, 45, 90, .1), inset 0 1px 0 rgba(255,255,255,.85);
    transition: opacity .3s ease, transform .3s ease;
  }
  .app-preload-progress.is-hiding { opacity: 0; transform: translateY(-8px) scale(.985); }
  .app-preload-visual { position: relative; width: 48px; height: 42px; perspective: 190px; }
  .app-preload-cube {
    position: absolute;
    top: 10px;
    left: 14px;
    width: 22px;
    height: 22px;
    transform-style: preserve-3d;
    animation: app-preload-cube-spin 1.55s linear infinite;
  }
  .app-preload-cube i {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(79, 70, 229, .86);
    background: linear-gradient(135deg, rgba(125, 116, 255, .88), rgba(31, 212, 190, .42));
    box-shadow: inset 0 0 7px rgba(255,255,255,.48), 0 0 10px rgba(79,70,229,.27);
  }
  .app-preload-cube .front { transform: translateZ(11px); }
  .app-preload-cube .back { transform: rotateY(180deg) translateZ(11px); }
  .app-preload-cube .right { transform: rotateY(90deg) translateZ(11px); }
  .app-preload-cube .left { transform: rotateY(-90deg) translateZ(11px); }
  .app-preload-cube .top { transform: rotateX(90deg) translateZ(11px); }
  .app-preload-cube .bottom { transform: rotateX(-90deg) translateZ(11px); }
  .app-preload-orbit {
    position: absolute;
    inset: 5px 0;
    border: 1px solid rgba(19, 178, 174, .65);
    border-radius: 50%;
    transform: rotateX(68deg);
    animation: app-preload-orbit-spin 1.15s linear infinite;
  }
  .app-preload-content { display: grid; min-width: 0; gap: 8px; }
  .app-preload-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .app-preload-heading > div { display: grid; min-width: 0; gap: 2px; }
  .app-preload-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
  .app-preload-heading small { color: var(--muted); font-size: 11px; }
  .app-preload-heading output {
    min-width: 58px;
    color: var(--primary);
    font-size: 20px;
    font-weight: 850;
    text-align: right;
    letter-spacing: -.04em;
  }
  .app-preload-track {
    position: relative;
    height: 13px;
    overflow: hidden;
    border: 1px solid rgba(79,70,229,.2);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(31,42,75,.15), rgba(255,255,255,.72));
    box-shadow: inset 0 3px 7px rgba(35,46,85,.2), 0 3px 8px rgba(79,70,229,.1);
    transform: perspective(260px) rotateX(7deg);
  }
  .app-preload-fill {
    position: absolute;
    z-index: 1;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #18bfb2, #6258ed 58%, #988fff);
    box-shadow: inset 0 2px 3px rgba(255,255,255,.48), 0 0 13px rgba(91,79,231,.62);
    transition: width .42s cubic-bezier(.22,.82,.28,1), background .25s ease;
  }
  .app-preload-fill::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(105deg, transparent 22%, rgba(255,255,255,.72) 44%, transparent 66%);
    transform: translateX(-110%);
    animation: app-preload-shine 1.25s ease-in-out infinite;
  }
  .app-preload-grid {
    position: absolute;
    z-index: 2;
    inset: 0;
    opacity: .32;
    background: repeating-linear-gradient(90deg, transparent 0 9%, rgba(255,255,255,.8) 9% 9.35%);
    pointer-events: none;
  }
  .app-preload-progress.is-complete .app-preload-fill { background: linear-gradient(90deg, #12a86f, #28c88b); }
  .app-preload-progress.has-errors .app-preload-fill { background: linear-gradient(90deg, #e8a019, #e0644e); }
  .app-preload-progress.has-errors .app-preload-heading output { color: var(--warning); }

  @keyframes app-preload-cube-spin { to { transform: rotateX(360deg) rotateY(360deg); } }
  @keyframes app-preload-orbit-spin { to { transform: rotateX(68deg) rotateZ(360deg); } }
  @keyframes app-preload-shine { 60%, 100% { transform: translateX(120%); } }
  .style-picker { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
  .style-picker-label { line-height: 1; }
  .style-picker select {
    width: auto;
    min-width: 58px;
    height: 32px;
    border-color: #dfe4ee;
    border-radius: 999px;
    padding: 4px 25px 4px 10px;
    color: var(--ink);
    background-color: #fff;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
  }

  .view-panel, .dashboard { margin-top: 24px; animation: rise-in .48s cubic-bezier(.2,.8,.2,1) both; }
  .dashboard-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 20px; align-items: start; }
  .dashboard-workspace { min-width: 0; }
  .app-sidebar {
    position: sticky;
    top: 18px;
    display: flex;
    min-height: calc(100vh - 44px);
    flex-direction: column;
    padding: 15px;
    border: 1px solid rgba(221, 226, 237, .94);
    border-radius: 20px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 12px 32px rgba(32, 45, 88, .08);
    backdrop-filter: blur(14px);
  }
  .sidebar-profile { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 5px 5px 15px; border-bottom: 1px solid var(--line); }
  .sidebar-avatar { display: grid; width: 39px; height: 39px; flex: 0 0 39px; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #5c53ea, #1fa99e); box-shadow: 0 7px 15px rgba(79, 70, 229, .2); font-size: 12px; font-weight: 800; }
  .sidebar-profile-copy { min-width: 0; }
  .sidebar-profile-copy strong, .sidebar-profile-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-profile-copy strong { color: var(--ink); font-size: 12px; }
  .sidebar-profile-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 650; }
  .sidebar-nav { display: grid; gap: 6px; margin-top: 14px; }
  .sidebar-link {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    min-height: 44px;
    border: 0;
    border-radius: 11px;
    padding: 9px 10px;
    color: #5f6b82;
    background: transparent;
    font-size: 12px;
    font-weight: 720;
    text-align: left;
    cursor: pointer;
    transition: color .18s, background .18s, box-shadow .18s, transform .18s;
  }
  .sidebar-link:hover { color: var(--primary); background: #f1f2ff; transform: translateX(2px); }
  .sidebar-link.is-active { color: #fff; background: linear-gradient(135deg, #5d54eb, #4539c7); box-shadow: 0 8px 16px rgba(79, 70, 229, .22); }
  .sidebar-link-icon { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border-radius: 8px; color: currentColor; background: rgba(99, 102, 241, .1); font-size: 15px; font-weight: 800; }
  .sidebar-link.is-active .sidebar-link-icon { background: rgba(255,255,255,.16); }
  .sidebar-link-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-footer { display: grid; gap: 5px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
  .sidebar-utility { display: flex; align-items: center; gap: 9px; min-height: 38px; border: 0; border-radius: 9px; padding: 7px 9px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
  .sidebar-utility:hover { color: var(--primary); background: #f1f2ff; }
  .sidebar-utility.danger:hover { color: var(--danger); background: #fff0f1; }
  #historySection, #manageTasksSection, #allReportsSection { margin-top: 0; }
  .login-card { width: min(100%, 470px); margin: 8vh auto 0; padding: 34px; border: 1px solid rgba(255,255,255,.7); border-radius: 26px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
  .login-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 18px; border-radius: 18px; color: var(--primary); background: #eeefff; font-size: 28px; }
  h1, h2, h3, h4, p { margin-top: 0; }
  h1 { margin-bottom: 7px; font-size: clamp(25px, 4vw, 31px); line-height: 1.2; letter-spacing: -.035em; }
  h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
  h3 { margin-bottom: 5px; font-size: 17px; }
  .lead, .section-subtitle { color: var(--muted); line-height: 1.55; }
  .lead { margin-bottom: 26px; font-size: 14px; }
  .section-subtitle { margin-bottom: 0; font-size: 13px; }

  .form-group { margin-bottom: 16px; }
  label { display: block; margin-bottom: 7px; color: #475467; font-size: 13px; font-weight: 700; }
  input, select, textarea {
    width: 100%;
    border: 1px solid #dfe4ee;
    border-radius: 11px;
    padding: 11px 12px;
    color: var(--ink);
    background: #fff;
    transition: border-color .2s, box-shadow .2s, transform .2s;
  }
  textarea { min-height: 94px; resize: vertical; line-height: 1.45; }
  input:hover, select:hover, textarea:hover { border-color: #bdc4d3; }
  input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,229,.11); outline: none; }
  .input-with-icon { position: relative; }
  .input-with-icon > span { position: absolute; top: 50%; left: 13px; transform: translateY(-50%); pointer-events: none; color: #8992a5; }
  .input-with-icon input { padding-left: 39px; }
  .remember-container { display: flex; align-items: center; gap: 9px; margin: 3px 0 20px; }
  .remember-container input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); }
  .remember-container label { margin: 0; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 43px;
    border: 0;
    border-radius: 11px;
    padding: 10px 15px;
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(28, 35, 74, .12);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  }
  .btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 9px 18px rgba(28, 35, 74, .17); filter: brightness(1.02); }
  .btn:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
  .btn:disabled { cursor: wait; opacity: .66; }
  .btn-primary { background: linear-gradient(135deg, #5c53ea, #4438c6); }
  .btn-success { background: linear-gradient(135deg, #1db67b, #118b5e); }
  .btn-danger { background: linear-gradient(135deg, #ee5e62, #d63544); }
  .btn-info { background: linear-gradient(135deg, #15b8d3, #0983af); }
  .btn-warning { color: #633b00; background: linear-gradient(135deg, #ffd66b, #f5ad24); }
  .btn-secondary { color: #475467; background: #edf0f6; box-shadow: none; }
  .btn-secondary:hover:not(:disabled) { background: #e1e6ef; }
  .btn-block { width: 100%; }
  .btn-sm { min-height: 32px; padding: 7px 10px; border-radius: 8px; font-size: 12px; box-shadow: none; }
  .btn-icon { width: 38px; min-width: 38px; min-height: 38px; padding: 0; border-radius: 10px; }

  .welcome-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 22px 24px;
    overflow: hidden;
    position: relative;
    color: #fff;
    border-radius: var(--radius);
    background: linear-gradient(115deg, #3730a3, #5048de 52%, #1fa99e);
    box-shadow: 0 16px 28px rgba(71, 62, 195, .24);
  }
  .welcome-card::after { content: ""; position: absolute; width: 245px; height: 245px; right: -90px; top: -130px; border: 33px solid rgba(255,255,255,.11); border-radius: 50%; }
  .welcome-card h2 { position: relative; z-index: 1; font-size: 23px; }
  .welcome-card p { position: relative; z-index: 1; margin: 6px 0 0; color: rgba(255,255,255,.78); font-size: 14px; }
  .welcome-summary { position: relative; z-index: 1; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
  .welcome-cash { display: grid; min-width: 240px; gap: 2px; padding: 10px 13px; border: 1px solid rgba(255,255,255,.23); border-radius: 13px; background: rgba(7, 11, 24, .22); text-align: right; backdrop-filter: blur(5px); }
  .welcome-cash > span { color: rgba(255,255,255,.72); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
  .welcome-cash strong { color: #fff; font-size: 21px; line-height: 1.2; letter-spacing: -.025em; }
  .welcome-cash small { color: rgba(255,255,255,.7); font-size: 9px; white-space: nowrap; }
  .role-pill { z-index: 1; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 8px 12px; color: #fff; background: rgba(255,255,255,.14); font-size: 12px; font-weight: 750; white-space: nowrap; }

  .content-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .panel { border: 1px solid rgba(221,226,237,.9); border-radius: var(--radius); background: var(--surface); box-shadow: 0 7px 20px rgba(32,45,88,.055); }
  .panel-pad { padding: 23px; }
  .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
  .panel-heading-with-action > .btn { flex: 0 0 auto; }
  .section-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 5px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .section-kicker.success { color: var(--success); }
  .section-kicker.warning { color: var(--warning); }
  .section-kicker.danger { color: var(--danger); }
  .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .form-grid .span-all { grid-column: 1 / -1; }
  .form-grid .form-group { min-width: 0; }
  .field-help { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
  .field-optional { color: var(--muted); font-weight: 500; }
  .task-modal { width: min(94vw, 820px); }
  .form-builder-section { margin-top: 3px; padding-top: 17px; border-top: 1px solid var(--line); }
  .form-builder-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
  .form-builder-title { display: block; color: var(--ink); font-size: 13px; font-weight: 800; }
  .form-builder-toolbar .field-help { max-width: 560px; }
  .form-builder-toolbar .btn { flex: 0 0 auto; }
  .form-builder-list { display: grid; gap: 13px; }
  .form-builder-empty { display: grid; justify-items: center; gap: 5px; padding: 24px 16px; border: 1px dashed #cfd5e2; border-radius: 14px; color: var(--muted); background: var(--surface-soft); text-align: center; }
  .form-builder-empty strong { color: #475467; font-size: 13px; }
  .form-builder-empty span { font-size: 11px; line-height: 1.5; }
  .form-question-card { position: relative; overflow: hidden; padding: 22px 17px 13px; border: 1px solid #dfe4ee; border-left: 5px solid var(--primary); border-radius: 14px; background: #fff; box-shadow: 0 7px 18px rgba(32, 45, 88, .07); }
  .question-drag-handle { position: absolute; top: 4px; left: 50%; color: #a8afbd; font-size: 16px; letter-spacing: 2px; transform: translateX(-50%); }
  .question-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(185px, 230px); gap: 11px; align-items: start; }
  .builder-question-input { border-width: 0 0 2px; border-radius: 0; padding: 11px 9px; background: #f7f8fb; font-weight: 700; }
  .builder-question-input:focus { border-color: var(--primary); box-shadow: none; background: #f4f3ff; }
  .builder-type-select { min-height: 44px; background: #fff; }
  .builder-answer-preview { margin: 15px 2px 8px; padding-bottom: 9px; color: #8a94a8; border-bottom: 1px dotted #cdd3df; font-size: 12px; }
  .builder-options { display: grid; gap: 8px; margin: 14px 0 5px; }
  .builder-option-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 34px; gap: 7px; align-items: center; }
  .builder-option-row input { border-width: 0 0 1px; border-radius: 0; padding: 8px 4px; background: transparent; }
  .builder-option-row input:focus { box-shadow: none; }
  .builder-option-marker { color: #8791a4; font-size: 15px; text-align: center; }
  .builder-add-option { justify-self: start; margin-left: 31px; border: 0; padding: 4px 0; color: var(--primary); background: transparent; font-size: 12px; font-weight: 750; cursor: pointer; }
  .builder-add-option:hover { text-decoration: underline; }
  .question-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #edf0f5; }
  .question-position { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .question-card-actions { display: flex; align-items: center; gap: 5px; }
  .builder-icon-btn { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 8px; color: #667085; background: transparent; font-size: 16px; cursor: pointer; transition: color .16s, background .16s, transform .16s; }
  .builder-icon-btn:hover:not(:disabled) { color: var(--primary); background: #eeefff; transform: translateY(-1px); }
  .builder-icon-btn:disabled { cursor: default; opacity: .3; }
  .builder-option-row .builder-icon-btn { width: 30px; height: 30px; color: #a14b55; }
  .builder-required-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 7px; padding-left: 12px; border-left: 1px solid #dfe3eb; color: #475467; font-size: 11px; cursor: pointer; }
  .builder-required-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  .builder-required-toggle i { position: relative; width: 34px; height: 20px; border-radius: 999px; background: #cbd1dc; box-shadow: inset 0 1px 3px rgba(20, 29, 55, .18); transition: background .2s; }
  .builder-required-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(17, 24, 39, .24); transition: transform .2s; }
  .builder-required-toggle input:checked + i { background: var(--primary); }
  .builder-required-toggle input:checked + i::after { transform: translateX(14px); }
  .builder-required-toggle input:focus-visible + i { outline: 3px solid rgba(79,70,229,.25); outline-offset: 2px; }
  .report-priority { margin-bottom: 4px; padding: 18px; border: 1px solid rgba(79, 70, 229, .2); border-radius: 15px; background: linear-gradient(145deg, rgba(248, 249, 255, .96), rgba(240, 248, 255, .9)); }
  .report-priority-heading { margin-bottom: 12px; }
  .report-priority-heading label { margin-bottom: 3px; font-size: 14px; }
  .report-priority-heading .field-help { margin: 0; }
  .report-priority-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  [data-task-color="green"] { --task-accent: #15966a; --task-soft: #e9f8f0; --task-icon-soft: #d8f0e3; }
  [data-task-color="red"] { --task-accent: #d94a50; --task-soft: #fff0ed; --task-icon-soft: #fbdedb; }
  [data-task-color="amber"] { --task-accent: #c58625; --task-soft: #fff5dc; --task-icon-soft: #fae9bf; }
  [data-task-color="blue"] { --task-accent: #3478d4; --task-soft: #edf5ff; --task-icon-soft: #dcecff; }
  [data-task-color="purple"] { --task-accent: #7157c8; --task-soft: #f2efff; --task-icon-soft: #e5defb; }
  [data-task-color="teal"] { --task-accent: #168c91; --task-soft: #e9f8f7; --task-icon-soft: #d4efed; }
  [data-task-color="gray"] { --task-accent: #667085; --task-soft: #f2f4f7; --task-icon-soft: #e4e7ec; }
  .report-priority-option { display: flex; align-items: center; gap: 12px; min-height: 82px; border: 1px solid #dfe3ee; border-radius: 14px; padding: 13px 15px; color: var(--ink); background: rgba(255, 255, 255, .88); text-align: left; cursor: pointer; transition: border-color .18s, background .18s, box-shadow .18s, transform .18s; }
  .report-priority-option:hover { border-color: var(--task-accent); transform: translateY(-1px); }
  .report-priority-option.is-active { border-color: var(--task-accent); background: var(--task-soft); box-shadow: 0 7px 18px color-mix(in srgb, var(--task-accent) 18%, transparent); }
  .report-priority-option > span:last-child { display: grid; gap: 4px; min-width: 0; }
  .report-priority-option strong { overflow: hidden; font-size: 14px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  .report-priority-option small { color: var(--muted); font-size: 10px; line-height: 1.35; }
  .report-priority-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 13px; color: var(--task-accent); background: var(--task-icon-soft); font-size: 20px; font-weight: 800; }
  .report-priority-empty { grid-column: 1 / -1; padding: 18px; border: 1px dashed #ccd3e1; border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.65); text-align: center; font-size: 12px; }
  .priority-task-setting { padding: 13px 14px; border: 1px solid #e2e6ef; border-radius: 12px; background: var(--surface-soft); }
  .priority-task-toggle { display: flex; align-items: flex-start; gap: 11px; margin: 0; cursor: pointer; }
  .priority-task-toggle input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); }
  .priority-task-toggle span { display: grid; gap: 4px; }
  .priority-task-toggle small { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.4; }
  .priority-order-group { padding: 14px; border: 1px solid #e2e6ef; border-radius: 12px; background: var(--surface-soft); }
  .priority-order-roster { display: grid; gap: 7px; margin-top: 12px; }
  .priority-order-roster-title { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
  .priority-order-roster-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px; }
  .priority-order-item { display: grid; grid-template-columns: 16px 24px 30px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); font-size: 11px; font-weight: 700; cursor: grab; transition: border-color .16s, background .16s, opacity .16s, transform .16s; }
  .priority-order-item:active { cursor: grabbing; }
  .priority-drag-handle { overflow: visible; color: var(--muted); font-size: 13px; letter-spacing: -3px; white-space: nowrap; }
  .priority-order-item b { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 7px; color: #fff; background: var(--task-accent); font-size: 10px; }
  .priority-order-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; color: var(--task-accent); background: var(--task-icon-soft); font-style: normal; font-size: 15px; }
  .priority-order-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .priority-order-actions { display: inline-flex; gap: 3px; overflow: visible; }
  .priority-order-actions button { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--task-accent); background: var(--surface); cursor: pointer; }
  .priority-order-actions button:hover:not(:disabled) { border-color: var(--task-accent); background: var(--task-soft); }
  .priority-order-actions button:disabled { opacity: .28; cursor: default; }
  .priority-order-item.is-current { border-color: var(--task-accent); background: var(--task-soft); }
  .priority-order-item.is-selected-target { box-shadow: inset 0 0 0 1px var(--task-accent); }
  .priority-order-item.is-dragging { opacity: .35; transform: scale(.98); }
  .priority-order-item.is-drop-target { border-color: var(--task-accent); border-style: dashed; background: var(--task-soft); transform: translateY(-2px); }
  .task-visual-editor { display: grid; gap: 13px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
  .task-visual-picker-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr); gap: 14px; }
  .task-picker-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
  .task-icon-picker, .task-color-picker { display: flex; flex-wrap: wrap; gap: 7px; }
  .task-icon-choice { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); font-size: 18px; cursor: pointer; }
  .task-icon-choice:hover, .task-icon-choice.is-selected { border-color: var(--primary); color: var(--primary); background: rgba(79, 70, 229, .08); box-shadow: inset 0 0 0 1px var(--primary); }
  .task-color-choice { width: 31px; height: 31px; border: 4px solid var(--surface); border-radius: 50%; background: var(--task-accent); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
  .task-color-choice:hover, .task-color-choice.is-selected { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--task-accent); transform: scale(.94); }
  .task-visual-preview { display: flex; align-items: center; gap: 11px; min-height: 62px; padding: 10px 12px; border: 1px solid var(--task-accent); border-radius: 12px; background: var(--task-soft); }
  .task-visual-preview-icon { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 11px; color: var(--task-accent); background: var(--task-icon-soft); font-size: 20px; font-weight: 800; }
  .task-visual-preview > span:last-child { display: grid; gap: 3px; min-width: 0; }
  .task-visual-preview strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .task-visual-preview small { color: var(--muted); font-size: 10px; }
  .dynamic-task-form { margin: 2px 0 16px; padding: 17px; border: 1px solid rgba(79, 70, 229, .22); border-radius: 14px; background: linear-gradient(135deg, rgba(238, 239, 255, .78), rgba(239, 255, 252, .72)); animation: unfold .3s ease both; }
  .dynamic-task-form-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
  .dynamic-task-form-kicker { display: inline-block; margin-bottom: 3px; color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .dynamic-task-form h3 { margin-bottom: 3px; color: var(--ink); font-size: 15px; }
  .dynamic-task-form p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
  .dynamic-choice-group { display: grid; gap: 8px; padding: 5px 0; }
  .dynamic-choice-option { display: flex; align-items: center; gap: 9px; margin: 0; padding: 9px 11px; border: 1px solid #dfe4ee; border-radius: 10px; color: var(--ink); background: rgba(255,255,255,.82); font-weight: 550; cursor: pointer; }
  .dynamic-choice-option:hover { border-color: rgba(79,70,229,.45); background: #f7f7ff; }
  .dynamic-choice-option input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); }
  .money-entry-form { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
  .money-entry-actions { display: flex; align-items: center; gap: 15px; margin-top: 16px; }
  .money-entry-actions .btn { min-width: 180px; }
  .money-entry-actions span { color: var(--muted); font-size: 11px; line-height: 1.45; }
  .bank-handover-fields { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(250px, .75fr); gap: 16px; align-items: end; margin: 2px 0 16px; padding: 17px; border: 1px solid rgba(197, 134, 37, .32); border-radius: 14px; background: linear-gradient(135deg, #fff9e9, #fff2ce); }
  .bank-handover-fields[hidden] { display: none; }
  .bank-handover-fields h3, .bank-pending-heading h3 { margin: 2px 0 4px; color: var(--ink); font-size: 15px; }
  .bank-handover-fields p, .bank-pending-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
  .bank-handover-fields .form-group { margin: 0; }
  .bank-pending-section { margin-top: 16px; padding: 18px; border: 1px solid rgba(197, 134, 37, .25); border-radius: 18px; background: linear-gradient(145deg, var(--surface), #fff8e8); }
  .bank-pending-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
  .bank-pending-summary { margin: 14px 0 9px; color: #9a631a; font-size: 11px; font-weight: 800; }
  .bank-pending-list { display: grid; gap: 9px; }
  .bank-pending-empty { padding: 20px 12px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); background: var(--surface-soft); font-size: 12px; text-align: center; }
  .bank-pending-item { display: grid; grid-template-columns: 46px minmax(0, 1.2fr) minmax(120px, .6fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
  .bank-pending-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; color: #9a631a; background: #ffedbd; font-size: 22px; font-weight: 850; }
  .bank-pending-copy, .bank-pending-amount { display: grid; gap: 3px; min-width: 0; }
  .bank-pending-copy strong, .bank-pending-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bank-pending-copy strong, .bank-pending-amount strong { color: var(--ink); font-size: 12px; }
  .bank-pending-copy span, .bank-pending-amount small { color: var(--muted); font-size: 10px; }
  .bank-pending-amount { text-align: right; }
  .bank-pending-confirm { white-space: nowrap; }
  .cash-custody-section { margin-top: 16px; padding: 18px; border: 1px solid rgba(36, 141, 102, .25); border-radius: 18px; background: linear-gradient(145deg, var(--surface), #effbf6); }
  .cash-custody-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
  .cash-custody-heading h3 { margin: 2px 0 4px; color: var(--ink); font-size: 15px; }
  .cash-custody-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
  .cash-custody-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 9px; margin: 14px 0; }
  .cash-custody-summary article { padding: 13px 14px; border: 1px solid rgba(36, 141, 102, .18); border-radius: 13px; background: var(--surface); }
  .cash-custody-summary span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; }
  .cash-custody-summary strong { display: block; margin-top: 5px; color: #13845f; font-size: 21px; }
  .cash-handover-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin: 0 0 14px; padding: 14px; border: 1px dashed rgba(36, 141, 102, .34); border-radius: 14px; background: rgba(255, 255, 255, .55); }
  .cash-handover-form.is-suggested { border-style: solid; border-color: #21a574; box-shadow: 0 0 0 3px rgba(33, 165, 116, .12); animation: cash-handover-highlight 1.2s ease-out; }
  @keyframes cash-handover-highlight { 0% { transform: translateY(4px); opacity: .78; } 100% { transform: translateY(0); opacity: 1; } }
  .cash-handover-form[hidden] { display: none; }
  .cash-handover-form .form-group { margin: 0; }
  .cash-handover-actions { display: flex; align-items: center; gap: 12px; }
  .cash-handover-actions small { color: var(--muted); font-size: 10px; }
  .cash-handover-list { display: grid; gap: 9px; }
  .cash-handover-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(125px, .55fr) auto; gap: 11px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
  .cash-handover-item.is-confirmed { opacity: .72; }
  .cash-handover-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: #13795a; background: #dff7ed; font-size: 20px; font-weight: 850; }
  .cash-handover-copy, .cash-handover-amount { display: grid; gap: 3px; min-width: 0; }
  .cash-handover-copy strong, .cash-handover-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cash-handover-copy strong, .cash-handover-amount strong { color: var(--ink); font-size: 12px; }
  .cash-handover-copy span, .cash-handover-amount small { color: var(--muted); font-size: 10px; }
  .cash-handover-amount { text-align: right; }
  .cash-handover-empty { padding: 18px 12px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); background: var(--surface-soft); font-size: 11px; text-align: center; }
  .quick-contact-field { position: relative; }
  .quick-contact-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .quick-contact-save { min-width: 94px; white-space: nowrap; }
  .quick-contact-suggestions { position: absolute; z-index: 30; top: 52px; right: 0; left: 0; display: grid; max-height: 270px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 16px 38px rgba(26, 31, 50, .2); }
  .quick-contact-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; border-radius: 9px; padding: 10px; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
  .quick-contact-option:hover, .quick-contact-option:focus { outline: 0; background: var(--task-soft, rgba(79,70,229,.08)); }
  .quick-contact-option > span { display: grid; gap: 3px; min-width: 0; }
  .quick-contact-option strong, .quick-contact-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .quick-contact-option strong { font-size: 12px; }
  .quick-contact-option small { color: var(--muted); font-size: 10px; }
  .quick-contact-option b { display: grid; min-width: 25px; height: 25px; place-items: center; border-radius: 8px; color: var(--primary); background: rgba(79,70,229,.1); font-size: 10px; }
  .quick-contact-hint { margin-top: 5px; }
  .builder-contact-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; padding: 10px 0 2px; border-top: 1px dashed var(--line); }
  .builder-contact-actions > span { margin-right: auto; color: var(--muted); font-size: 11px; font-weight: 750; }
  .contact-manager-modal { z-index: 82; width: min(820px, calc(100vw - 28px)); }
  .quick-contact-modal { z-index: 83; width: min(640px, calc(100vw - 28px)); }
  .quick-contact-privacy { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); }
  .contact-manager-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 190px) auto; gap: 10px; align-items: end; }
  .contact-manager-toolbar .form-group { margin: 0; }
  .contact-manager-summary { margin: 14px 0 9px; color: var(--muted); font-size: 11px; font-weight: 750; }
  .contact-manager-list { display: grid; gap: 8px; max-height: min(52vh, 480px); overflow-y: auto; padding-right: 3px; }
  .contact-manager-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
  .contact-manager-item.is-inactive { opacity: .62; }
  .contact-manager-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--primary), var(--primary-dark)); font-size: 12px; font-weight: 850; }
  .contact-manager-copy { display: grid; gap: 3px; min-width: 0; }
  .contact-manager-copy strong, .contact-manager-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .contact-manager-copy strong { color: var(--ink); font-size: 13px; }
  .contact-manager-copy span, .contact-manager-copy small { color: var(--muted); font-size: 10px; }
  .contact-manager-actions { display: flex; gap: 6px; }

  .toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
  .toolbar .btn { flex: 1 1 170px; }
  .stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 3px 0 18px; }
  .stat-card { min-width: 0; padding: 13px; border: 1px solid #e5e8f0; border-radius: 13px; background: linear-gradient(145deg, #fbfcff, #f3f6fc); }
  .stat-label { display: block; min-height: 28px; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.35; }
  .stat-card strong { display: block; margin-top: 7px; color: var(--primary); font-size: 22px; letter-spacing: -.04em; }
  .overview-refresh-control { display: flex; align-items: center; gap: 10px; }
  .overview-refresh-control > span { color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
  #leaderOverviewView.is-loading .stat-card strong,
  #leaderOverviewView.is-loading .cash-metric-card strong {
    position: relative;
    width: min(72%, 150px);
    min-height: 28px;
    overflow: hidden;
    border-radius: 8px;
    color: transparent !important;
    background: rgba(180, 148, 91, .14);
  }
  #leaderOverviewView.is-loading .stat-card strong::before,
  #leaderOverviewView.is-loading .cash-metric-card strong::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
    content: "";
    transform: translateX(-100%);
    animation: overview-loading-shimmer 1.15s ease-in-out infinite;
  }
  #leaderOverviewView.is-loading .cash-flow-chart,
  #leaderOverviewView.is-loading .cash-task-breakdown{
    opacity: .38;
    pointer-events: none;
  }
  @keyframes overview-loading-shimmer {
    to { transform: translateX(100%); }
  }
  .overview-chart-card {
    margin-bottom: 18px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(79, 70, 229, .16);
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff, #f7f8ff 62%, #effcf9);
    box-shadow: 0 9px 24px rgba(37, 46, 91, .07);
  }
  .overview-chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
  .overview-chart-heading h3 { margin: 0 0 4px; font-size: 17px; }
  .overview-chart-heading .section-kicker { margin-bottom: 4px; }
  .overview-chart-summary { flex: 0 0 auto; border-radius: 999px; padding: 7px 10px; color: #5146c8; background: #ecebff; font-size: 10px; font-weight: 800; }
  .overview-activity-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    min-height: 205px;
  }
  .activity-day { display: grid; min-width: 0; grid-template-rows: 20px 128px auto auto auto; justify-items: center; gap: 4px; }
  .activity-value { max-width: 100%; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
  .activity-bar-zone {
    display: flex;
    width: 100%;
    height: 128px;
    align-items: flex-end;
    justify-content: center;
    border-bottom: 1px solid #dfe4ef;
    border-radius: 8px 8px 0 0;
    background: repeating-linear-gradient(
      to top,
      transparent 0,
      transparent 31px,
      rgba(106, 116, 145, .1) 31px,
      rgba(106, 116, 145, .1) 32px
    );
  }
  .activity-bar {
    display: block;
    width: min(72%, 38px);
    min-height: 3px;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #6b63f5, #2bc8b9);
    box-shadow: 0 7px 14px rgba(79, 70, 229, .2);
    transition: filter .18s ease, transform .18s ease;
  }
  .activity-day:hover .activity-bar { filter: brightness(1.06); transform: translateY(-2px); }
  .activity-day.is-today .activity-bar { background: linear-gradient(180deg, #ffbe32, #ef8d21); box-shadow: 0 7px 14px rgba(232, 149, 22, .22); }
  .activity-weekday { color: var(--ink); font-size: 11px; font-weight: 800; }
  .activity-day.is-today .activity-weekday { color: var(--warning); }
  .activity-date, .activity-report-count { color: var(--muted); font-size: 10px; font-weight: 650; white-space: nowrap; }
  .activity-report-count { color: #4f5b73; }
  .overview-chart-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 15px; margin-top: 10px; color: var(--muted); font-size: 10px; }
  .overview-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .overview-chart-legend i { width: 9px; height: 9px; border-radius: 3px; background: linear-gradient(135deg, #6b63f5, #2bc8b9); }
  .overview-chart-empty { grid-column: 1 / -1; align-self: center; padding: 34px 12px; color: var(--muted); font-size: 12px; text-align: center; }
  .cash-dashboard-filter { display: grid; gap: 13px; margin-bottom: 12px; padding: 15px; border: 1px solid rgba(185, 130, 45, .2); border-radius: 15px; background: linear-gradient(135deg, rgba(255, 250, 240, .96), rgba(249, 242, 226, .92)); }
  .cash-range-chips { display: flex; flex-wrap: wrap; gap: 7px; }
  .cash-dashboard-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(145px, 1fr)); gap: 11px; }
  .cash-dashboard-filter-grid .form-group { margin: 0; }
  .cash-dashboard-period { margin: 0 0 10px; }
  .cash-metric-grid { display: grid; gap: 10px; margin-bottom: 10px; }
  .cash-metric-grid-primary { grid-template-columns: minmax(260px, 1.55fr) minmax(220px, 1fr); }
  .cash-metric-grid-primary .cash-metric-card.balance { border: 2px solid var(--success); box-shadow: 0 12px 30px rgba(22,163,106,.16); }
  .cash-metric-grid-primary .cash-metric-card.balance strong { font-size: clamp(28px, 3vw, 42px); line-height: 1.2; }
  .cash-quick-form { margin: 16px 0; padding: 20px; border: 1px solid var(--success); border-radius: 18px; background: var(--surface-soft); }
  .cash-quick-form h3 { margin: 0 0 8px; }
  .cash-quick-amount-words { display: block; min-height: 1.5em; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
  .cash-quick-option { border-color: var(--warning) !important; }
  .cash-workflow-panel { width: 100%; }
  .cash-workflow-panel h3 { margin: 26px 0 12px; }
  .cash-pending-held { display: grid; gap: 10px; margin-top: 18px; padding: 22px 24px; border: 1px solid var(--success); border-radius: 16px; background: var(--surface-soft); }
  .cash-pending-held > span { font-size: 15px; font-weight: 800; }
  .cash-pending-held strong { color: var(--success); font-size: clamp(28px,3vw,40px); line-height: 1.1; }
  .cash-pending-held small { color: var(--muted); font-size: 12px; line-height: 1.5; }
  .cash-approval-copy { flex: 1 1 320px; }
  .cash-approval-copy > span { line-height: 1.45; overflow-wrap: anywhere; }
  .cash-approval-item { align-items: flex-start; padding: 20px; }
  .cash-approval-copy { display: grid; gap: 14px !important; }
  .cash-approval-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
  .cash-approval-heading strong { font-size: clamp(20px,2vw,28px); color: var(--text); font-variant-numeric: tabular-nums; }
  .cash-approval-item.is-receipt .cash-approval-heading strong { color: #047857; }
  .cash-approval-item.is-payment .cash-approval-heading strong { color: #b91c1c; }
  body[data-theme="dark"] .cash-approval-item.is-receipt .cash-approval-heading strong { color: #6ee7b7; }
  body[data-theme="dark"] .cash-approval-item.is-payment .cash-approval-heading strong { color: #fca5a5; }
  .cash-direction-badge,.cash-status-badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 7px; font-size: 11px; font-weight: 800; }
  .cash-direction-badge.receipt { color: #087553; background: #dff3e9; }
  .cash-direction-badge.payment { color: #ae3d49; background: #fae3e2; }
  .cash-status-badge { color: #94600e; background: #fff0d2; }
  .cash-approval-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px 18px; margin: 0; }
  .cash-approval-fields div { min-width: 0; }
  .cash-approval-fields dt { color: var(--muted); font-size: 11px; font-weight: 700; }
  .cash-approval-fields dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 650; }
  .cash-approval-meta { font-size: 10px; }
  .cash-shift-section { margin-top: 30px; padding-top: 8px; border-top: 1px solid var(--line); }
  .cash-shift-heading h3 { margin-bottom: 4px; }
  .cash-shift-form-wrap { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
  .cash-shift-controls { display: grid; grid-template-columns: minmax(170px,.5fr) minmax(220px,1.5fr); gap: 12px; }
  .cash-shift-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 12px 0; }
  .cash-shift-report { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
  .cash-shift-report-head { display: flex; justify-content: space-between; }
  .cash-shift-report-head > div { display: grid; gap: 4px; }
  .cash-shift-report-head strong { font-size: 17px; }
  .cash-shift-report small,.cash-shift-report-head small { color: var(--muted); }
  .cash-shift-totals { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
  .cash-shift-totals > div { display: grid; align-content: start; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
  .cash-shift-totals span { color: var(--muted); font-size: 11px; font-weight: 700; }
  .cash-shift-totals strong { font-size: 18px; overflow-wrap: anywhere; }
  .cash-shift-held-detail,.cash-shift-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
  .cash-shift-rows { display: grid; gap: 0; border-top: 1px solid var(--line); }
  .cash-shift-row { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); }
  .cash-shift-row > div { display: grid; gap: 4px; min-width: 0; }
  .cash-shift-row-meta { text-align: right; }
  .cash-shift-row-meta small { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
  .cash-approval-item .cash-workflow-actions { margin-left: auto; }
  .cash-transfer-tools { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
  .cash-transfer-tools summary { cursor: pointer; font-weight: 800; }
  .cash-transfer-tools .cash-workflow-list { margin-top: 12px; }
  .cash-transfer-tools h3 { margin: 22px 0 10px; }
  .cash-workflow-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
  .cash-workflow-stat { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
  .cash-workflow-stat:first-child { background: var(--success); color: white; }
  .cash-workflow-stat strong { font-size: 20px; }
  .cash-workflow-list { display: grid; gap: 9px; }
  .cash-workflow-item { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
  .cash-workflow-item > div:first-child { display: grid; gap: 5px; min-width: 0; }
  .cash-workflow-item small { color: var(--muted); overflow-wrap: anywhere; }
  .cash-workflow-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .cash-denominations { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 12px 0; }
  .cash-denomination { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
  .cash-denomination input { width: 88px; }
  .cash-count-totals { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 18px 0 10px; }
  .cash-count-total { display: grid; align-content: space-between; gap: 12px; min-width: 0; min-height: 112px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
  .cash-count-total span { color: var(--muted); font-size: 12px; font-weight: 700; }
  .cash-count-total strong { font-size: clamp(18px,2vw,27px); line-height: 1.15; overflow-wrap: anywhere; }
  .cash-count-excess { border-color: rgba(22,163,106,.24); background: rgba(22,163,106,.055); }
  .cash-count-excess.is-active { border-color: var(--success); box-shadow: 0 0 0 2px rgba(22,163,106,.1); }
  .cash-count-excess strong { color: var(--success); }
  .cash-count-shortage { border-color: rgba(220,53,69,.24); background: rgba(220,53,69,.055); }
  .cash-count-shortage.is-active { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(220,53,69,.1); }
  .cash-count-shortage strong { color: var(--danger); }
  .cash-count-result { margin: 0 0 20px; padding: 11px 14px; border-radius: 10px; background: var(--surface-soft); font-weight: 700; }
  .cash-count-result.is-match,.cash-count-result.is-excess { color: var(--success); }
  .cash-count-result.is-shortage { color: var(--danger); }
  .cash-count-history-card { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
  .cash-count-history-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
  .cash-count-history-header > div:first-child { display: grid; gap: 4px; }
  .cash-count-history-header small { color: var(--muted); }
  .cash-count-history-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .cash-count-history-values > div { display: grid; gap: 5px; }
  .cash-count-history-values span { color: var(--muted); font-size: 11px; }
  .cash-count-history-values strong { overflow-wrap: anywhere; }
  .cash-count-history-note { margin: 0; color: var(--muted); font-size: 12px; }
  .cash-count-settings { margin: 0 0 20px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
  .cash-count-settings summary { cursor: pointer; font-weight: 800; }
  .cash-count-settings h3 { margin: 16px 0 8px; font-size: 14px; }
  .cash-setting-option { display: inline-flex; align-items: center; gap: 6px; margin: 7px 16px 7px 0; }
  #cashLeaderTransfer form { margin: 12px 0 20px; }
  @media (max-width: 900px) { .cash-metric-grid-primary { grid-template-columns: repeat(2,minmax(0,1fr)); } .cash-workflow-summary,.cash-count-totals { grid-template-columns: repeat(2,minmax(0,1fr)); } }
  @media (max-width: 600px) { .cash-metric-grid-primary,.cash-workflow-summary,.cash-denominations,.cash-count-totals,.cash-count-history-values,.cash-approval-fields,.cash-shift-controls,.cash-shift-totals { grid-template-columns: 1fr; } .cash-workflow-item { align-items: flex-start; } }
  .cash-custody-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cash-metric-grid-period { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cash-metric-card { position: relative; min-width: 0; min-height: 118px; overflow: hidden; padding: 16px; border: 1px solid #eadfcf; border-radius: 15px; background: linear-gradient(145deg, #fffdf9, #f8f1e6); }
  .cash-metric-card::after { position: absolute; right: -20px; bottom: -31px; width: 74px; height: 74px; border: 12px solid rgba(185, 130, 45, .08); border-radius: 50%; content: ""; }
  .cash-metric-card > span { position: relative; z-index: 1; display: block; min-height: 28px; color: #6f5a40; font-size: 11px; font-weight: 800; line-height: 1.35; }
  .cash-metric-card strong { position: relative; z-index: 1; display: block; margin: 7px 0 5px; overflow: hidden; color: #a66f21; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
  .cash-metric-card small { position: relative; z-index: 1; color: var(--muted); font-size: 9px; line-height: 1.4; }
  .cash-metric-card.receipt { border-color: rgba(21, 150, 106, .32); background: linear-gradient(145deg, #fbfffd, #eaf8f1); }
  .cash-metric-card.receipt strong { color: #15966a; }
  .cash-metric-card.payment { border-color: rgba(217, 74, 80, .28); background: linear-gradient(145deg, #fffdfc, #fff0ed); }
  .cash-metric-card.payment strong { color: #d94a50; }
  .cash-metric-card.bank { border-color: rgba(197, 134, 37, .3); background: linear-gradient(145deg, #fffefa, #fff5dc); }
  .cash-metric-card.bank strong { color: #b57419; }
  .cash-metric-card.bank-pending { border-color: rgba(211, 151, 51, .3); background: linear-gradient(145deg, #fffdfa, #fff0c9); }
  .cash-metric-card.bank-pending strong { color: #c27610; }
  .cash-metric-card.reports strong { color: #7157c8; }
  .cash-metric-card.leader-held strong { color: #6752bd; }
  .cash-metric-card.staff-held strong { color: #13845f; }
  .cash-metric-card.leader-pending strong { color: #c27610; }
  .cash-metric-card.personal-advance strong { color: #d94a50; }
  .cash-dashboard-details { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, .85fr); gap: 12px; margin-top: 15px; }
  .cash-flow-chart-card, .cash-task-card { min-width: 0; padding: 18px; border: 1px solid #eadfcf; border-radius: 16px; background: #fffdf8; box-shadow: 0 8px 20px rgba(91, 65, 32, .06); }
  .cash-flow-chart { display: grid; grid-template-columns: repeat(var(--cash-day-count, 1), minmax(54px, 1fr)); align-items: end; gap: 8px; min-height: 235px; overflow-x: auto; padding: 8px 2px 3px; }
  .cash-flow-day { display: grid; grid-template-rows: 168px auto auto; justify-items: center; gap: 5px; min-width: 54px; }
  .cash-flow-bars { display: flex; width: 100%; height: 168px; align-items: flex-end; justify-content: center; gap: 4px; border-bottom: 1px solid #e6dccb; background: repeating-linear-gradient(to top, transparent 0, transparent 41px, rgba(126, 96, 54, .08) 41px, rgba(126, 96, 54, .08) 42px); }
  .cash-flow-bar { display: block; width: min(24%, 18px); min-height: 2px; border-radius: 6px 6px 2px 2px; transition: filter .16s, transform .16s; }
  .cash-flow-bar:hover { filter: brightness(1.07); transform: translateY(-2px); }
  .cash-flow-bar.receipt { background: linear-gradient(180deg, #79d4ad, #15966a); }
  .cash-flow-bar.payment { background: linear-gradient(180deg, #f19b98, #d94a50); }
  .cash-flow-bar.bank { background: linear-gradient(180deg, #f3d486, #c58625); }
  .cash-flow-bar.bank-pending { background: repeating-linear-gradient(180deg, #ffd878 0, #ffd878 6px, #d59a2d 6px, #d59a2d 12px); }
  .cash-flow-legend i.bank-pending { background: repeating-linear-gradient(135deg, #ffd878 0, #ffd878 4px, #d59a2d 4px, #d59a2d 8px); }
  .cash-flow-day strong { color: var(--ink); font-size: 10px; white-space: nowrap; }
  .cash-flow-day small { color: var(--muted); font-size: 9px; white-space: nowrap; }
  .cash-flow-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; margin-top: 10px; color: var(--muted); font-size: 10px; }
  .cash-flow-legend span { display: inline-flex; align-items: center; gap: 5px; }
  .cash-flow-legend i { width: 8px; height: 8px; border-radius: 50%; }
  .cash-flow-legend i.receipt { background: #15966a; }
  .cash-flow-legend i.payment { background: #d94a50; }
  .cash-flow-legend i.bank { background: #c58625; }
  .cash-task-card h3 { margin: 2px 0 5px; font-size: 17px; }
  .cash-task-breakdown { display: grid; gap: 13px; margin-top: 17px; }
  .cash-task-row { display: grid; gap: 5px; }
  .cash-task-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
  .cash-task-row-heading > span { display: flex; align-items: center; min-width: 0; gap: 7px; }
  .cash-task-row-heading i { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border-radius: 8px; color: var(--task-accent); background: var(--task-icon-soft); font-style: normal; font-size: 13px; }
  .cash-task-row-heading strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .cash-task-row-heading b { flex: 0 0 auto; color: var(--task-accent); font-size: 11px; white-space: nowrap; }
  .cash-task-track { height: 6px; overflow: hidden; border-radius: 999px; background: #eee3d2; }
  .cash-task-track span { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: var(--task-accent); }
  .cash-task-row > small { color: var(--muted); font-size: 9px; }
  .collapsible { margin-top: 17px; animation: unfold .3s ease both; }
  .filter-bar { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) auto; align-items: end; gap: 12px; padding: 15px; border: 1px solid #e8ebf2; border-radius: 13px; background: var(--surface-soft); }
  .filter-bar .form-group { margin: 0; }
  .filter-bar .btn { min-height: 39px; }
  .report-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
  .currency-input-wrap { position: relative; }
  .currency-input-wrap input { width: 100%; padding-right: 42px; }
  .currency-input-suffix { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--muted); pointer-events: none; }
  .grouped-data-summary { margin: 12px 0 16px; }
  .grouped-data-summary h3 { margin: 0 0 9px; font-size: 15px; }
  .modal-divider { margin: 20px 0; border: 0; border-top: 1px solid var(--border); }
  .owner-login-divider { display: flex; align-items: center; gap: 12px; margin: 17px 0; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
  .owner-login-divider::before, .owner-login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
  .owner-key-change-heading { display: grid; gap: 4px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
  .owner-key-change-heading strong { font-size: 15px; }
  .owner-key-change-heading span { color: var(--muted); font-size: 11px; font-weight: 700; }
  .account-filter-bar { display: grid; grid-template-columns: minmax(240px, 1.5fr) minmax(170px, .8fr) minmax(170px, .8fr) auto; align-items: end; gap: 12px; margin: 16px 0; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
  .account-filter-bar .form-group { margin: 0; }
  .account-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
  .account-table-wrap { border: 1px solid var(--border); border-radius: 14px; }
  .account-table { min-width: 880px; }
  .account-table td:last-child, .account-table th:last-child { text-align: center; }
  .account-status-badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 850; }
  .account-status-badge.is-active { color: #08724e; background: rgba(19, 138, 98, .13); }
  .account-status-badge.is-inactive { color: #a13a31; background: rgba(197, 71, 61, .12); }
  .is-inactive-account { opacity: .72; }
  .account-security-card { margin-top: 18px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-soft); }
  #leaderAccountSecurity { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
  #leaderAccountSecurity h3 { margin: 4px 0; }
  #leaderAccountSecurity p { margin: 0; color: var(--muted); }
  .account-security-form-grid { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)) auto; align-items: end; gap: 12px; margin-top: 14px; }
  .account-security-form-grid .form-group { margin: 0; }
  .account-active-toggle { justify-content: flex-start; margin: 12px 0; }
  #ownerSection.is-loading .stat-card strong { color: transparent; position: relative; overflow: hidden; border-radius: 8px; background: rgba(185, 145, 77, .12); }
  #ownerSection.is-loading .stat-card strong::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: overview-shimmer 1.1s infinite; }
  .period-filter-label { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .range-chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
  .range-chip { min-height: 31px; padding: 6px 10px; border: 1px solid #dce0f2; border-radius: 999px; color: #59647b; background: rgba(255, 255, 255, .82); box-shadow: none; font-size: 11px; font-weight: 700; transition: border-color .16s, color .16s, background .16s, transform .16s; }
  .range-chip:hover { border-color: rgba(79, 70, 229, .42); color: var(--primary); transform: translateY(-1px); }
  .range-chip.is-active { border-color: var(--primary); color: #fff; background: linear-gradient(135deg, #5c53ea, #4438c6); box-shadow: 0 5px 11px rgba(79, 70, 229, .2); }
  .period-label { margin: -2px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; }
  .report-period-filter { display: grid; gap: 10px; margin-bottom: 12px; padding: 13px 15px; border: 1px solid rgba(79, 70, 229, .14); border-radius: 13px; background: linear-gradient(135deg, rgba(247, 247, 255, .95), rgba(243, 252, 251, .9)); }
  .report-period-heading { display: flex; align-items: center; gap: 12px; }
  .report-list-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 11px 0; padding: 10px 12px; border: 1px solid #e6e9f0; border-radius: 11px; color: var(--muted); background: #fafbfe; font-size: 11px; }
  .report-list-actions .btn { flex: 0 0 auto; }
  .report-list-buttons { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }

  .table-responsive { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
  .table-responsive + .table-responsive { margin-top: 16px; }
  table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 13px; }
  th { padding: 12px 13px; color: #63708a; border-bottom: 1px solid var(--line); background: #fafbfe; font-size: 11px; letter-spacing: .035em; text-align: left; text-transform: uppercase; white-space: nowrap; }
  td { padding: 12px 13px; border-bottom: 1px solid #eef0f5; color: #33415c; vertical-align: middle; }
  tbody tr { transition: background .16s; }
  tbody tr:hover { background: #f8f9ff; }
  tbody tr:last-child td { border-bottom: 0; }
  .text-left { text-align: left; }
  .text-center { text-align: center; }
  .table-actions { display: flex; justify-content: center; gap: 5px; }
  .pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 44px; padding-top: 10px; }
  .pagination-info { margin-right: auto; color: var(--muted); font-size: 12px; }
  .pagination-size { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
  .pagination-size-select { width: auto; min-width: 96px; min-height: 32px; padding: 4px 28px 4px 10px; font-size: 12px; border-radius: 10px; }
  .name-value { color: var(--ink); font-weight: 750; }
  .empty-cell { padding: 30px 12px; color: var(--muted); text-align: center; }
  .rank-participating-leader td:nth-child(2) { border-left: 3px solid var(--primary); }
  .rank-medal { font-size: 17px; }
  .task-type { display: inline-block; border-radius: 999px; padding: 4px 8px; color: #4f46e5; background: #eeefff; font-size: 11px; font-weight: 750; }
  .task-type.fixed { color: #0d796d; background: #e3f8f3; }
  .task-type.leader-only { color: #8a4d0f; background: #fff0cf; }

  .action-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 20px; }
  .action-bar .btn { flex: 1 1 160px; }
  .modal-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; background: rgba(14, 22, 48, .53); opacity: 0; visibility: hidden; transition: opacity .22s, visibility .22s; backdrop-filter: blur(3px); }
  .modal-overlay.is-open { opacity: 1; visibility: visible; }
  .modal-content { position: fixed; z-index: 81; top: 50%; left: 50%; width: min(94vw, 555px); max-height: calc(100vh - 36px); overflow: auto; padding: 24px; border-radius: 19px; background: white; box-shadow: 0 22px 70px rgba(7,13,36,.32); opacity: 0; visibility: hidden; transform: translate(-50%, -46%) scale(.97); transition: opacity .22s, transform .22s, visibility .22s; }
  .modal-content.is-open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
  .modal-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 21px; }
  .modal-title h3 { margin: 0; font-size: 18px; }
  .modal-actions { display: flex; gap: 9px; margin-top: 20px; }
  .modal-actions .btn { flex: 1; }

  #toastRegion { position: fixed; z-index: 100; top: 20px; right: 20px; display: grid; gap: 9px; width: min(390px, calc(100vw - 40px)); }
  .toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid #e8eaf0; border-radius: 13px; color: #344054; background: rgba(255,255,255,.96); box-shadow: 0 13px 30px rgba(16,24,40,.15); animation: toast-in .3s cubic-bezier(.2,.8,.2,1) both; }
  .toast-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--info); font-size: 12px; font-weight: 800; }
  .toast.success .toast-icon { background: var(--success); }
  .toast.error .toast-icon { background: var(--danger); }
  .toast p { margin: 1px 0 0; font-size: 13px; line-height: 1.4; }
  .toast.is-leaving { animation: toast-out .23s ease forwards; }

  .loading-dot { display: inline-flex; align-items: center; gap: 4px; }
  .loading-dot i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: pulse 1s infinite ease-in-out; }
  .loading-dot i:nth-child(2) { animation-delay: .15s; }
  .loading-dot i:nth-child(3) { animation-delay: .3s; }
  .loading-cell { padding: 28px 12px !important; }
  .tech-loader { display: grid; justify-items: center; gap: 8px; min-width: 180px; color: var(--muted); }
  .tech-loader-scene { position: relative; width: 62px; height: 48px; perspective: 180px; }
  .tech-cube { position: absolute; left: 20px; top: 10px; width: 23px; height: 23px; transform-style: preserve-3d; animation: tech-cube-spin 1.7s linear infinite; }
  .tech-face { position: absolute; inset: 0; border: 1px solid rgba(92, 83, 234, .9); background: linear-gradient(135deg, rgba(118, 109, 255, .78), rgba(24, 216, 191, .34)); box-shadow: inset 0 0 8px rgba(255, 255, 255, .4), 0 0 9px rgba(78, 70, 229, .28); }
  .tech-face.front  { transform: translateZ(11.5px); }
  .tech-face.back   { transform: rotateY(180deg) translateZ(11.5px); }
  .tech-face.right  { transform: rotateY(90deg) translateZ(11.5px); }
  .tech-face.left   { transform: rotateY(-90deg) translateZ(11.5px); }
  .tech-face.top    { transform: rotateX(90deg) translateZ(11.5px); }
  .tech-face.bottom { transform: rotateX(-90deg) translateZ(11.5px); }
  .tech-orbit, .tech-orbit::after { position: absolute; inset: 6px 3px; border: 1px solid rgba(28, 190, 190, .72); border-radius: 50%; content: ""; }
  .tech-orbit { transform: rotateX(70deg) rotateZ(0deg); animation: tech-orbit-spin 1.35s linear infinite; }
  .tech-orbit::after { inset: 0; border-color: rgba(112, 100, 255, .52); transform: rotateY(90deg); }
  .tech-loader-label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .025em; }
  .tech-loader-bar { position: relative; width: min(170px, 70vw); height: 3px; overflow: hidden; border-radius: 999px; background: rgba(113, 124, 151, .19); }
  .tech-loader-bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: -45%; width: 45%; border-radius: inherit; background: linear-gradient(90deg, transparent, #24c8ba, #655af4, transparent); animation: tech-scan 1.18s ease-in-out infinite; } #leaderOverviewView{ position: relative; }
  .overview-tech-loading {
    position: absolute;
    z-index: 18;
    inset: 0;
    display: grid;
    place-items: start center;
    min-height: 280px;
    padding-top: 110px;
    border-radius: 16px;
    background: rgba(255, 252, 246, .78);
    backdrop-filter: blur(3px);
  }
  .overview-tech-loading[hidden] { display: none !important; }
  .overview-tech-loading .tech-loader {
    padding: 18px 26px;
    border: 1px solid rgba(185, 130, 45, .25);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 18px 42px rgba(54, 36, 17, .16);
  }
  body[data-theme="dark"] .overview-tech-loading { background: rgba(13, 17, 27, .72); }
  .mini-tech-loader { display: inline-flex; align-items: center; gap: 3px; height: 13px; }
  .mini-tech-loader i { display: block; width: 4px; height: 4px; border-radius: 1px; background: currentColor; box-shadow: 0 0 5px currentColor; animation: mini-tech-pulse .78s infinite ease-in-out; }
  .mini-tech-loader i:nth-child(2) { animation-delay: .12s; }
  .mini-tech-loader i:nth-child(3) { animation-delay: .24s; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

  /* Giao diện tối: đặt data-theme="dark" trên thẻ body. */
  body[data-theme="dark"] {
    --ink: #f0f4ff;
    --muted: #abb7cf;
    --line: #2a3652;
    --surface: #151e32;
    --surface-soft: #1d2942;
    --primary: #8c84ff;
    --primary-dark: #7067eb;
    background:
      radial-gradient(circle at 8% 7%, rgba(92, 84, 230, .28), transparent 27rem),
      radial-gradient(circle at 93% 12%, rgba(31, 169, 158, .16), transparent 25rem),
      #0c1323;
    color: var(--ink);
    color-scheme: dark;
  }
  html[data-theme="dark"] { background: #0c1323; }
  body[data-theme="dark"] .app-header { border-color: rgba(130, 145, 187, .18); background: rgba(18, 27, 48, .82); box-shadow: 0 12px 34px rgba(0, 0, 0, .22); }
  body[data-theme="dark"] .app-preload-progress {
    border-color: rgba(140, 132, 255, .23);
    background: linear-gradient(135deg, rgba(25, 35, 60, .96), rgba(19, 51, 57, .9));
    box-shadow: 0 13px 30px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.06);
  }
  body[data-theme="dark"] .app-preload-track {
    border-color: rgba(140,132,255,.28);
    background: linear-gradient(180deg, rgba(5,9,20,.72), rgba(36,49,78,.48));
  }
  body[data-theme="dark"] .app-sidebar { border-color: #2b3856; background: rgba(18, 27, 48, .9); box-shadow: 0 12px 32px rgba(0, 0, 0, .2); }
  body[data-theme="dark"] .sidebar-profile,
  body[data-theme="dark"] .sidebar-footer { border-color: #2b3856; }
  body[data-theme="dark"] .sidebar-link { color: #b8c3d8; }
  body[data-theme="dark"] .sidebar-link:hover { color: #d9d6ff; background: #25284d; }
  body[data-theme="dark"] .sidebar-link.is-active { color: #fff; background: linear-gradient(135deg, #756bff, #4e43cf); }
  body[data-theme="dark"] .sidebar-utility:hover { color: #d9d6ff; background: #25284d; }
  body[data-theme="dark"] .sidebar-utility.danger:hover { color: #ffafb5; background: #47252e; }
  body[data-theme="dark"] .login-card,
  body[data-theme="dark"] .modal-content { border-color: #2b3856; background: var(--surface); }
  body[data-theme="dark"] .panel { border-color: #2b3856; box-shadow: 0 7px 20px rgba(0, 0, 0, .14); }
  body[data-theme="dark"] label { color: #c7d0e4; }
  body[data-theme="dark"] input,
  body[data-theme="dark"] select,
  body[data-theme="dark"] textarea { border-color: #35425f; color: var(--ink); background: #10182a; }
  body[data-theme="dark"] input:hover,
  body[data-theme="dark"] select:hover,
  body[data-theme="dark"] textarea:hover { border-color: #566583; }
  body[data-theme="dark"] .btn-secondary { color: #d8e1f2; background: #283550; }
  body[data-theme="dark"] .btn-secondary:hover:not(:disabled) { background: #33425f; }
  body[data-theme="dark"] .filter-bar { border-color: #2d3a57; background: var(--surface-soft); }
  body[data-theme="dark"] .report-period-filter { border-color: rgba(140, 132, 255, .26); background: linear-gradient(135deg, rgba(34, 38, 70, .94), rgba(20, 56, 58, .72)); }
  body[data-theme="dark"] .report-list-actions { border-color: #2d3a57; background: #19243a; }
  body[data-theme="dark"] .range-chip { border-color: #394765; color: #c0cbe0; background: #18243a; }
  body[data-theme="dark"] .range-chip:hover { border-color: #8c84ff; color: #e4e2ff; }
  body[data-theme="dark"] .range-chip.is-active { border-color: #958eff; color: #fff; background: linear-gradient(135deg, #756bff, #4e43cf); }
  body[data-theme="dark"] .table-responsive { border-color: #2b3856; background: var(--surface); }
  body[data-theme="dark"] th { border-bottom-color: #2b3856; color: #b7c2d7; background: #1c2740; }
  body[data-theme="dark"] td { border-bottom-color: #27334f; color: #d5dced; }
  body[data-theme="dark"] tbody tr:hover { background: #1b2740; }
  body[data-theme="dark"] .task-type { color: #b9b4ff; background: #2c2b57; }
  body[data-theme="dark"] .task-type.fixed { color: #8fe5d7; background: #164a47; }
  body[data-theme="dark"] .task-type.leader-only { color: #ffd18b; background: #573710; }
  body[data-theme="dark"] .stat-card { border-color: #2c3956; background: linear-gradient(145deg, #1b2740, #172137); }
  body[data-theme="dark"] .overview-chart-card { border-color: #35425f; background: linear-gradient(145deg, #172137, #1a2540 62%, #173f3e); box-shadow: 0 9px 24px rgba(0, 0, 0, .16); }
  body[data-theme="dark"] .overview-chart-summary { color: #d5d1ff; background: #2c2b57; }
  body[data-theme="dark"] .activity-bar-zone { border-bottom-color: #35425f; background: repeating-linear-gradient(to top, transparent 0, transparent 31px, rgba(163, 176, 204, .1) 31px, rgba(163, 176, 204, .1) 32px); }
  body[data-theme="dark"] .activity-report-count { color: #c2cce0; }
  body[data-theme="dark"] .report-priority { border-color: #35425f; background: linear-gradient(145deg, #172137, #192640); }
  body[data-theme="dark"] .cash-dashboard-filter { border-color: #4d4335; background: linear-gradient(135deg, #1e1914, #261f17); }
  body[data-theme="dark"] .cash-metric-card { border-color: #4d4335; background: linear-gradient(145deg, #1e1914, #261f17); }
  body[data-theme="dark"] .cash-metric-card.receipt { border-color: #285c49; background: linear-gradient(145deg, #16241f, #15362a); }
  body[data-theme="dark"] .cash-metric-card.payment { border-color: #63363a; background: linear-gradient(145deg, #281a1c, #442428); }
  body[data-theme="dark"] .cash-metric-card.bank { border-color: #665032; background: linear-gradient(145deg, #281f15, #44331d); }
  body[data-theme="dark"] .cash-custody-section { border-color: #285c49; background: linear-gradient(145deg, #16241f, #15362a); }
  body[data-theme="dark"] .cash-custody-summary article, body[data-theme="dark"] .cash-handover-item { border-color: #315846; background: #17241f; }
  body[data-theme="dark"] .cash-handover-form { border-color: #315846; background: rgba(9, 24, 18, .45); }
  body[data-theme="dark"] .cash-handover-icon { color: #83dfbc; background: #204a39; }
  body[data-theme="dark"] .cash-flow-chart-card, body[data-theme="dark"] .cash-task-card { border-color: #4d4335; background: #18130f; }
  body[data-theme="dark"] .cash-flow-bars { border-bottom-color: #514431; background: repeating-linear-gradient(to top, transparent 0, transparent 41px, rgba(202, 169, 112, .08) 41px, rgba(202, 169, 112, .08) 42px); }
  body[data-theme="dark"] .cash-task-track { background: #3c3227; }
  body[data-theme="dark"] .report-priority-option { border-color: #35425f; color: var(--ink); background: #10182a; }
  body[data-theme="dark"] [data-task-color="green"] { --task-soft: #15362a; --task-icon-soft: #204a39; }
  body[data-theme="dark"] [data-task-color="red"] { --task-soft: #442428; --task-icon-soft: #562c30; }
  body[data-theme="dark"] [data-task-color="amber"] { --task-soft: #44331d; --task-icon-soft: #584326; }
  body[data-theme="dark"] [data-task-color="blue"] { --task-soft: #1c304a; --task-icon-soft: #25405f; }
  body[data-theme="dark"] [data-task-color="purple"] { --task-soft: #302746; --task-icon-soft: #40335d; }
  body[data-theme="dark"] [data-task-color="teal"] { --task-soft: #17383a; --task-icon-soft: #204b4d; }
  body[data-theme="dark"] [data-task-color="gray"] { --task-soft: #293142; --task-icon-soft: #374154; }
  body[data-theme="dark"] .report-priority-option:hover { border-color: var(--task-accent); }
  body[data-theme="dark"] .report-priority-option.is-active { border-color: var(--task-accent); background: var(--task-soft); }
  body[data-theme="dark"] .report-priority-icon { color: var(--task-accent); background: var(--task-icon-soft); }
  body[data-theme="dark"] .report-priority-empty, body[data-theme="dark"] .priority-task-setting { border-color: #35425f; background: #18243a; }
  body[data-theme="dark"] .dynamic-task-form { border-color: rgba(140, 132, 255, .38); background: linear-gradient(135deg, rgba(45, 43, 87, .82), rgba(22, 69, 67, .64)); }
  body[data-theme="dark"] .form-builder-empty { border-color: #46536e; background: #18243a; }
  body[data-theme="dark"] .form-builder-empty strong { color: #dbe3f3; }
  body[data-theme="dark"] .form-question-card { border-color: #35425f; border-left-color: var(--primary); background: #151f34; box-shadow: 0 7px 18px rgba(0, 0, 0, .18); }
  body[data-theme="dark"] .builder-question-input { background: #10182a; }
  body[data-theme="dark"] .builder-question-input:focus { background: #1c1d3e; }
  body[data-theme="dark"] .builder-type-select { background: #10182a; }
  body[data-theme="dark"] .builder-option-row input { background: transparent; }
  body[data-theme="dark"] .question-card-footer { border-top-color: #2b3856; }
  body[data-theme="dark"] .builder-icon-btn { color: #b8c2d8; }
  body[data-theme="dark"] .builder-icon-btn:hover:not(:disabled) { color: #dcd9ff; background: #2c2b57; }
  body[data-theme="dark"] .builder-required-toggle { border-left-color: #3a4661; color: #c7d0e4; }
  body[data-theme="dark"] .dynamic-choice-option { border-color: #35425f; color: var(--ink); background: rgba(16, 24, 42, .76); }
  body[data-theme="dark"] .dynamic-choice-option:hover { border-color: #8c84ff; background: #202444; }
  body[data-theme="dark"] .toast { border-color: #35415d; color: #e5eaff; background: rgba(24, 34, 55, .97); box-shadow: 0 13px 30px rgba(0, 0, 0, .28); }
  body[data-theme="dark"] .avatar { color: #cbc8ff; background: #2c2b57; }
  body[data-theme="dark"] .theme-slider { background: #53607a; }
  body[data-theme="dark"] .style-picker { color: #abb7cf; }
  body[data-theme="dark"] .style-picker select { border-color: #35425f; color: #f0f4ff; background-color: #10182a; }

  /* ================= HITAOTHOM BRAND SYSTEM ================= */
  html[data-style="brand"] {
    --ink: #24180f;
    --muted: #78664d;
    --line: #ead9bc;
    --surface: #fffaf1;
    --surface-soft: #f8efdf;
    --primary: #b9822d;
    --primary-dark: #8e5f1e;
    --success: #9a792f;
    --danger: #c85145;
    --warning: #d4a657;
    --info: #735b39;
    --shadow: 0 18px 48px rgba(70, 43, 16, .12);
  }
  html[data-style="brand"] { background: #f2e8d8; }
  body[data-style="brand"] {
    color: var(--ink);
    background:
      radial-gradient(circle at 8% 5%, rgba(212, 166, 87, .22), transparent 26rem),
      radial-gradient(circle at 94% 13%, rgba(151, 97, 39, .12), transparent 28rem),
      linear-gradient(180deg, #faf4e8, #f2e8d8);
  }
  body[data-style="brand"] ::selection { color: #1a120c; background: #efd08c; }
  body[data-style="brand"] button:focus-visible, body[data-style="brand"] input:focus-visible, body[data-style="brand"] select:focus-visible, body[data-style="brand"] textarea:focus-visible {
    outline-color: rgba(212, 166, 87, .42);
  }
  body[data-style="brand"] .app-shell { width: min(1420px, calc(100% - 32px)); margin-top: 18px; }
  body[data-style="brand"] .app-header {
    border-color: rgba(212, 166, 87, .24);
    border-radius: 18px;
    color: #f3e8cf;
    background:
      radial-gradient(circle at 6% 0%, rgba(212, 166, 87, .12), transparent 19rem),
      linear-gradient(180deg, rgba(18, 13, 10, .97), rgba(11, 8, 7, .94));
    box-shadow: 0 15px 36px rgba(27, 16, 7, .19);
  }
  body[data-style="brand"] .brand-mark {
    position: relative;
    overflow: visible;
    color: #1a120c;
    border: 1px solid #f0d38f;
    border-radius: 16px 16px 18px 14px;
    background: linear-gradient(145deg, #f7df9f, #d4a657 62%, #b87b28);
    box-shadow: 0 9px 22px rgba(212, 166, 87, .28), inset 0 1px 0 rgba(255, 255, 255, .62);
    font-style: italic;
    letter-spacing: -.08em;
  }
  body[data-style="brand"] .brand-mark::after {
    position: absolute;
    width: 10px;
    height: 6px;
    top: -3px;
    right: 5px;
    border-radius: 10px 2px 10px 2px;
    background: #f3e8cf;
    content: "";
    transform: rotate(-28deg);
  }
  body[data-style="brand"] .brand-name { color: #f3e8cf; letter-spacing: .12em; }
  body[data-style="brand"] .brand-tagline { color: #b9a27b; }
  body[data-style="brand"] .header-controls, body[data-style="brand"] .header-controls .user-chip { color: #d9c69a; }
  body[data-style="brand"] .avatar, body[data-style="brand"] .sidebar-avatar {
    color: #1a120c;
    background: linear-gradient(145deg, #f4d994, #d4a657);
    box-shadow: 0 6px 15px rgba(212, 166, 87, .2);
  }
  body[data-style="brand"] .theme-toggle { color: #cbb891; }
  body[data-style="brand"] .theme-slider { background: #4b3928; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .45); }
  body[data-style="brand"] .theme-toggle input:checked + .theme-slider { background: #d4a657; }
  body[data-style="brand"] .theme-slider::after, body[data-style="brand"] .theme-toggle input:checked + .theme-slider::after { color: #8a5d1f; }
  body[data-style="brand"] .style-picker { color: #cbb891; }
  body[data-style="brand"] .style-picker select { border-color: rgba(212, 166, 87, .34); color: #f3e8cf; background-color: #21170f; }
  body[data-style="brand"] .mobile-menu-toggle {
    color: #1a120c;
    border: 1px solid #f0d38f;
    background: linear-gradient(145deg, #f7df9f, #d4a657);
    box-shadow: 0 8px 18px rgba(212, 166, 87, .24);
  }

  body[data-style="brand"] .app-sidebar {
    border-color: rgba(212, 166, 87, .24);
    color: #f3e8cf;
    background:
      radial-gradient(circle at 30% 0%, rgba(212, 166, 87, .11), transparent 17rem),
      linear-gradient(180deg, #17100c, #0d0907);
    box-shadow: 0 15px 35px rgba(36, 21, 9, .16);
  }
  body[data-style="brand"] .sidebar-profile, body[data-style="brand"] .sidebar-footer { border-color: rgba(212, 166, 87, .18); }
  body[data-style="brand"] .sidebar-profile-copy strong { color: #f3e8cf; }
  body[data-style="brand"] .sidebar-profile-copy span { color: #a99169; }
  body[data-style="brand"] .sidebar-link { color: #c9b58f; }
  body[data-style="brand"] .sidebar-link:hover { color: #f3e8cf; background: rgba(243, 232, 207, .07); }
  body[data-style="brand"] .sidebar-link.is-active {
    color: #1a120c;
    background: linear-gradient(135deg, #f2d68f, #d4a657);
    box-shadow: 0 8px 18px rgba(212, 166, 87, .22);
  }
  body[data-style="brand"] .sidebar-link-icon { color: inherit; background: rgba(212, 166, 87, .12); }
  body[data-style="brand"] .sidebar-link.is-active .sidebar-link-icon { background: rgba(26, 18, 12, .12); }
  body[data-style="brand"] .sidebar-utility { color: #a99169; }
  body[data-style="brand"] .sidebar-utility:hover { color: #f3e8cf; background: rgba(243, 232, 207, .07); }
  body[data-style="brand"] .sidebar-utility.danger { color: #d88c7e; }
  body[data-style="brand"] .sidebar-utility.danger:hover { color: #ffd2c9; background: rgba(200, 81, 69, .13); }

  body[data-style="brand"] .welcome-card {
    border: 1px solid rgba(212, 166, 87, .28);
    color: #f3e8cf;
    background:
      radial-gradient(circle at 92% 15%, rgba(212, 166, 87, .28), transparent 18rem),
      linear-gradient(118deg, #0b0807, #1a110c 58%, #3b2713);
    box-shadow: 0 18px 34px rgba(47, 27, 10, .16);
  }
  body[data-style="brand"] .welcome-card::after { border-color: rgba(243, 232, 207, .07); }
  body[data-style="brand"] .welcome-card p { color: #c9b58f; }
  body[data-style="brand"] .welcome-cash { border-color: rgba(240, 211, 143, .3); background: rgba(9, 6, 4, .42); }
  body[data-style="brand"] .welcome-cash > span, body[data-style="brand"] .welcome-cash small { color: #c9b58f; }
  body[data-style="brand"] .welcome-cash strong { color: #f5d98d; }
  body[data-style="brand"] .role-pill { border-color: rgba(240, 211, 143, .38); color: #f5d98d; background: rgba(212, 166, 87, .12); }
  body[data-style="brand"] .panel {
    border-color: #ead9bc;
    background: rgba(255, 250, 241, .96);
    box-shadow: 0 12px 30px rgba(72, 43, 14, .08);
  }
  body[data-style="brand"] .panel-heading h2, body[data-style="brand"] .panel-heading h3 { letter-spacing: -.03em; }
  body[data-style="brand"] .section-kicker, body[data-style="brand"] .section-kicker.success, body[data-style="brand"] .section-kicker.warning { color: #a66f21; }
  body[data-style="brand"] .section-kicker.danger { color: #b94c41; }
  body[data-style="brand"] .stat-card {
    position: relative;
    overflow: hidden;
    border-color: #e7d6b9;
    background: linear-gradient(145deg, #fffdf8, #f7eddd);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
  }
  body[data-style="brand"] .stat-card::after {
    position: absolute;
    width: 54px;
    height: 54px;
    right: -22px;
    bottom: -26px;
    border: 10px solid rgba(212, 166, 87, .12);
    border-radius: 50%;
    content: "";
  }
  body[data-style="brand"] .stat-card strong { color: #a66f21; }
  body[data-style="brand"] .overview-chart-card{
    border-color: rgba(185, 130, 45, .25);
    background:
      radial-gradient(circle at 100% 100%, rgba(212, 166, 87, .13), transparent 18rem),
      linear-gradient(145deg, #fffdf8, #f7eddd);
    box-shadow: 0 10px 27px rgba(72, 43, 14, .08);
  }
  body[data-style="brand"] .overview-chart-summary{
    color: #754a15;
    background: #f1ddb1;
  }
  body[data-style="brand"] .activity-bar {
    background: linear-gradient(180deg, #f1d58c, #b9822d);
    box-shadow: 0 7px 14px rgba(185, 130, 45, .2);
  }
  body[data-style="brand"] .activity-day.is-today .activity-bar {
    background: linear-gradient(180deg, #fff0bd, #d4a657 60%, #a86b20);
    box-shadow: 0 7px 16px rgba(212, 166, 87, .28);
  }
  body[data-style="brand"] .activity-day.is-today .activity-weekday { color: #a66f21; }
  body[data-style="brand"] .report-priority { border-color: #dfc9a5; background: linear-gradient(145deg, #fffaf0, #f8edd9); }
  body[data-style="brand"] .report-priority-option:hover { border-color: var(--task-accent); }
  body[data-style="brand"] .report-priority-option.is-active { border-color: var(--task-accent); background: var(--task-soft); box-shadow: 0 7px 18px color-mix(in srgb, var(--task-accent) 18%, transparent); }
  body[data-style="brand"] .report-priority-icon { color: var(--task-accent); background: var(--task-icon-soft); }
  body[data-style="brand"][data-theme="dark"] .report-priority { border-color: #5b4730; background: linear-gradient(145deg, #21180f, #2d2115); }
  body[data-style="brand"][data-theme="dark"] .money-entry-form { border-color: #5b4730; background: linear-gradient(145deg, #1b130d, #24190f); }
  body[data-style="brand"][data-theme="dark"] .quick-contact-suggestions { border-color: #5b4730; background: #18110c; }
  body[data-style="brand"][data-theme="dark"] .report-priority-option { border-color: #59452f; color: #f4e7d1; background: #18110c; }
  body[data-style="brand"][data-theme="dark"] .report-priority-option.is-active { border-color: var(--task-accent); background: var(--task-soft); }
  body[data-style="brand"] .overview-chart-legend i { background: linear-gradient(135deg, #f1d58c, #b9822d); }

  body[data-style="brand"] label { color: #5f4c34; }
  body[data-style="brand"] input, body[data-style="brand"] select, body[data-style="brand"] textarea {
    border-color: #dfc9a5;
    color: #2c1d12;
    background: #fffdf8;
  }
  body[data-style="brand"] input:hover, body[data-style="brand"] select:hover, body[data-style="brand"] textarea:hover { border-color: #c79b55; }
  body[data-style="brand"] input:focus, body[data-style="brand"] select:focus, body[data-style="brand"] textarea:focus {
    border-color: #b9822d;
    box-shadow: 0 0 0 3px rgba(212, 166, 87, .16);
  }
  body[data-style="brand"] .input-with-icon > span { color: #9d7c50; }
  body[data-style="brand"] .field-help, body[data-style="brand"] .section-subtitle { color: #806e55; }
  body[data-style="brand"] .btn-primary, body[data-style="brand"] .btn-success, body[data-style="brand"] .btn-warning {
    color: #1a120c;
    border: 1px solid rgba(255, 238, 190, .76);
    background: linear-gradient(145deg, #f4d98f, #d4a657);
    box-shadow: 0 8px 18px rgba(185, 130, 45, .2);
  }
  body[data-style="brand"] .btn-info {
    color: #f3e8cf;
    border: 1px solid rgba(212, 166, 87, .35);
    background: linear-gradient(145deg, #2b1d13, #120d09);
    box-shadow: 0 8px 18px rgba(45, 27, 12, .16);
  }
  body[data-style="brand"] .btn-secondary { color: #5d482f; border: 1px solid #e1cba8; background: #f5ead8; }
  body[data-style="brand"] .btn-danger { color: #fff5f2; background: linear-gradient(135deg, #c85145, #9e3c35); }
  body[data-style="brand"] .btn:hover:not(:disabled) { filter: brightness(1.04); box-shadow: 0 10px 22px rgba(94, 57, 20, .17); }
  body[data-style="brand"] .range-chip {
    border-color: #e0cba9;
    color: #6e5a3f;
    background: rgba(255, 252, 245, .92);
  }
  body[data-style="brand"] .range-chip:hover { border-color: #b9822d; color: #8e5f1e; }
  body[data-style="brand"] .range-chip.is-active {
    border-color: #d4a657;
    color: #1a120c;
    background: linear-gradient(145deg, #f2d68f, #d4a657);
    box-shadow: 0 5px 12px rgba(185, 130, 45, .2);
  } body[data-style="brand"] .report-period-filter {
    border-color: rgba(185, 130, 45, .22);
    background: linear-gradient(135deg, #fcf5e8, #f6ead7);
  }
  body[data-style="brand"] .filter-bar, body[data-style="brand"] .report-list-actions {
    border-color: #e5d3b4;
    background: #faf1e2;
  }
  body[data-style="brand"] .table-responsive { border-color: #e4d2b3; background: #fffaf1; }
  body[data-style="brand"] th { border-bottom-color: #dec69e; color: #80643c; background: #f5ead8; }
  body[data-style="brand"] td { border-bottom-color: #eee0ca; color: #4f3c28; }
  body[data-style="brand"] tbody tr:hover { background: #fbf1e2; }
  body[data-style="brand"] .task-type { color: #7a501c; background: #f1ddb1; }
  body[data-style="brand"] .task-type.fixed { color: #684c20; background: #ead3a5; }
  body[data-style="brand"] .task-type.leader-only { color: #7b3f08; background: #f7d98c; }
  body[data-style="brand"] .modal-overlay { background: rgba(11, 8, 7, .7); backdrop-filter: blur(7px); }
  body[data-style="brand"] .modal-content, body[data-style="brand"] .login-card {
    border: 1px solid #e0c89f;
    background: #fffaf1;
    box-shadow: 0 24px 70px rgba(35, 20, 8, .28);
  }
  body[data-style="brand"] .login-card::before {
    position: absolute;
    height: 3px;
    top: 0;
    right: 24px;
    left: 24px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, transparent, #d4a657, transparent);
    content: "";
  }
  body[data-style="brand"] .dynamic-task-form {
    border-color: rgba(185, 130, 45, .28);
    background: linear-gradient(135deg, #fcf4e5, #f8ead5);
  }
  body[data-style="brand"] .money-entry-form {
    border-color: #e1cba7;
    background: linear-gradient(145deg, #fffaf1, #fbf1e1);
    box-shadow: 0 16px 34px rgba(77, 47, 15, .08);
  }
  body[data-style="brand"] .quick-contact-suggestions { border-color: #dec69e; background: #fffaf1; }
  body[data-style="brand"] .quick-contact-option:hover,
  body[data-style="brand"] .quick-contact-option:focus { background: #f5e5c8; }
  body[data-style="brand"] .form-question-card {
    border-color: #dfc9a5;
    background: #fffdf8;
  }
  body[data-style="brand"] .form-question-card { border-left-color: #d4a657; box-shadow: 0 7px 18px rgba(72, 43, 14, .08); }
  body[data-style="brand"] .builder-icon-btn:hover:not(:disabled) { color: #8e5f1e; background: #f3e1bd; }
  body[data-style="brand"] .builder-required-toggle { border-left-color: #dec9a7; color: #715c40; }
  body[data-style="brand"] .dynamic-choice-option { border-color: #ddc7a4; color: #3d2b1c; background: #fffaf2; }
  body[data-style="brand"] .dynamic-choice-option:hover { border-color: #b9822d; background: #fbefd8; }
  body[data-style="brand"] .toast { border-color: #d4a657; color: #f3e8cf; background: rgba(24, 16, 11, .97); box-shadow: 0 13px 30px rgba(25, 14, 6, .28); }
  body[data-style="brand"] .tech-face { border-color: rgba(212, 166, 87, .95); background: linear-gradient(135deg, rgba(244, 217, 143, .86), rgba(120, 77, 26, .38)); box-shadow: inset 0 0 8px rgba(255, 255, 255, .35), 0 0 9px rgba(212, 166, 87, .28); }
  body[data-style="brand"] .tech-orbit, body[data-style="brand"] .tech-orbit::after { border-color: rgba(212, 166, 87, .76); }
  body[data-style="brand"] .tech-orbit::after { border-color: rgba(244, 217, 143, .48); }
  body[data-style="brand"] .tech-loader-bar::after { background: linear-gradient(90deg, transparent, #f1d58c, #b9822d, transparent); }

  body[data-style="brand"][data-theme="dark"] {
    --ink: #f3e8cf;
    --muted: #bca782;
    --line: #3b2b1c;
    --surface: #15100c;
    --surface-soft: #1d150f;
    --primary: #d4a657;
    --primary-dark: #b9822d;
    --success: #d4a657;
    --warning: #edc875;
    --info: #d9c69a;
    color: var(--ink);
    color-scheme: dark;
    background:
      radial-gradient(circle at 9% 5%, rgba(212, 166, 87, .15), transparent 28rem),
      radial-gradient(circle at 91% 13%, rgba(128, 73, 27, .16), transparent 29rem),
      #0b0807;
  }
  html[data-style="brand"][data-theme="dark"] { background: #0b0807; }
  body[data-style="brand"][data-theme="dark"] .app-header, body[data-style="brand"][data-theme="dark"] .app-sidebar { border-color: rgba(212, 166, 87, .24); background-color: #110c09; }
  body[data-style="brand"] .app-preload-progress {
    border-color: rgba(185,130,45,.25);
    background: linear-gradient(135deg, rgba(255,253,248,.96), rgba(248,234,209,.92));
  }
  body[data-style="brand"] .app-preload-heading output { color: #a86b20; }
  body[data-style="brand"] .app-preload-cube i {
    border-color: rgba(185,130,45,.86);
    background: linear-gradient(135deg, rgba(242,214,143,.92), rgba(185,130,45,.55));
    box-shadow: inset 0 0 7px rgba(255,255,255,.5), 0 0 10px rgba(185,130,45,.32);
  }
  body[data-style="brand"] .app-preload-orbit { border-color: rgba(185,130,45,.7); }
  body[data-style="brand"] .app-preload-fill {
    background: linear-gradient(90deg, #9d6720, #d4a657 58%, #f2d68f);
    box-shadow: inset 0 2px 3px rgba(255,255,255,.5), 0 0 13px rgba(185,130,45,.55);
  }
  body[data-style="brand"][data-theme="dark"] .app-preload-progress {
    border-color: rgba(212,166,87,.25);
    background: linear-gradient(135deg, rgba(29,21,15,.97), rgba(21,14,9,.96));
    box-shadow: 0 13px 30px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.04);
  }
  body[data-style="brand"][data-theme="dark"] .app-preload-track {
    border-color: rgba(212,166,87,.25);
    background: linear-gradient(180deg, rgba(3,2,1,.72), rgba(55,38,22,.48));
  }
  body[data-style="brand"][data-theme="dark"] .sidebar-profile, body[data-style="brand"][data-theme="dark"] .sidebar-footer { border-color: rgba(212, 166, 87, .18); }
  body[data-style="brand"][data-theme="dark"] .sidebar-link { color: #c9b58f; }
  body[data-style="brand"][data-theme="dark"] .sidebar-link:hover { color: #f3e8cf; background: rgba(243, 232, 207, .07); }
  body[data-style="brand"][data-theme="dark"] .sidebar-link.is-active { color: #1a120c; background: linear-gradient(135deg, #f2d68f, #d4a657); }
  body[data-style="brand"][data-theme="dark"] .sidebar-utility:hover { color: #f3e8cf; background: rgba(243, 232, 207, .07); }
  body[data-style="brand"][data-theme="dark"] .sidebar-utility.danger:hover { color: #ffd2c9; background: rgba(200, 81, 69, .13); }
  body[data-style="brand"][data-theme="dark"] .panel, body[data-style="brand"][data-theme="dark"] .login-card, body[data-style="brand"][data-theme="dark"] .modal-content {
    border-color: rgba(212, 166, 87, .22);
    background: linear-gradient(145deg, #17100c, #100b08);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
  }
  body[data-style="brand"][data-theme="dark"] .stat-card {
    border-color: rgba(212, 166, 87, .2);
    background: linear-gradient(145deg, #1d150f, #120d09);
  }
  body[data-style="brand"][data-theme="dark"] .stat-card strong { color: #edc875; }
  body[data-style="brand"][data-theme="dark"] .overview-chart-card{
    border-color: rgba(212, 166, 87, .22);
    background:
      radial-gradient(circle at 100% 100%, rgba(212, 166, 87, .1), transparent 18rem),
      linear-gradient(145deg, #1a120d, #100b08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
  }
  body[data-style="brand"][data-theme="dark"] .overview-chart-summary{ color: #f0d38f; background: rgba(212, 166, 87, .14); }
  body[data-style="brand"][data-theme="dark"] .activity-bar-zone {
    border-bottom-color: rgba(212, 166, 87, .2);
    background: repeating-linear-gradient(to top, transparent 0, transparent 31px, rgba(212, 166, 87, .08) 31px, rgba(212, 166, 87, .08) 32px);
  }
  body[data-style="brand"][data-theme="dark"] .activity-report-count { color: #cfbb96; }
  body[data-style="brand"][data-theme="dark"] label { color: #d9c69a; }
  body[data-style="brand"][data-theme="dark"] input, body[data-style="brand"][data-theme="dark"] select, body[data-style="brand"][data-theme="dark"] textarea {
    border-color: #493520;
    color: #f3e8cf;
    background: #0f0b08;
  }
  body[data-style="brand"][data-theme="dark"] input:hover, body[data-style="brand"][data-theme="dark"] select:hover, body[data-style="brand"][data-theme="dark"] textarea:hover { border-color: #7b582d; }
  body[data-style="brand"][data-theme="dark"] input:focus, body[data-style="brand"][data-theme="dark"] select:focus, body[data-style="brand"][data-theme="dark"] textarea:focus { border-color: #d4a657; box-shadow: 0 0 0 3px rgba(212, 166, 87, .14); }
  body[data-style="brand"][data-theme="dark"] .btn-secondary { color: #d9c69a; border-color: #493520; background: #24190f; }
  body[data-style="brand"][data-theme="dark"] .btn-secondary:hover:not(:disabled) { background: #322317; }
  body[data-style="brand"][data-theme="dark"] .filter-bar, body[data-style="brand"][data-theme="dark"] .report-list-actions, body[data-style="brand"][data-theme="dark"] .report-period-filter {
    border-color: rgba(212, 166, 87, .2);
    background: linear-gradient(135deg, #1a120d, #130d09);
  }
  body[data-style="brand"][data-theme="dark"] .range-chip { border-color: #493520; color: #c9b58f; background: #17100c; }
  body[data-style="brand"][data-theme="dark"] .range-chip:hover { border-color: #d4a657; color: #f3e8cf; }
  body[data-style="brand"][data-theme="dark"] .range-chip.is-active { border-color: #d4a657; color: #1a120c; background: linear-gradient(145deg, #f2d68f, #d4a657); }
  body[data-style="brand"][data-theme="dark"] .table-responsive { border-color: #3b2b1c; background: #120d09; }
  body[data-style="brand"][data-theme="dark"] th { border-bottom-color: #493520; color: #d8bd88; background: #21170f; }
  body[data-style="brand"][data-theme="dark"] td { border-bottom-color: #302116; color: #eadcc1; }
  body[data-style="brand"][data-theme="dark"] tbody tr:hover { background: #1c140e; }
  body[data-style="brand"][data-theme="dark"] .task-type { color: #f0d38f; background: rgba(212, 166, 87, .13); }
  body[data-style="brand"][data-theme="dark"] .task-type.fixed { color: #d6c59f; background: rgba(129, 92, 45, .2); }
  body[data-style="brand"][data-theme="dark"] .task-type.leader-only { color: #ffd18b; background: rgba(205, 135, 40, .22); }
  body[data-style="brand"][data-theme="dark"] .dynamic-task-form{
    border-color: rgba(212, 166, 87, .22);
    color: #d9c69a;
    background: linear-gradient(135deg, #21170f, #17100c);
  }
  body[data-style="brand"][data-theme="dark"] .form-question-card, body[data-style="brand"][data-theme="dark"] .dynamic-choice-option, body[data-style="brand"][data-theme="dark"] .form-builder-empty {
    border-color: #493520;
    background: #130d09;
  }
  body[data-style="brand"][data-theme="dark"] .form-question-card { border-left-color: #d4a657; }
  body[data-style="brand"][data-theme="dark"] .builder-question-input, body[data-style="brand"][data-theme="dark"] .builder-type-select { background: #0f0b08; }
  body[data-style="brand"][data-theme="dark"] .builder-question-input:focus { background: #17100c; }
  body[data-style="brand"][data-theme="dark"] .builder-icon-btn { color: #bca782; }
  body[data-style="brand"][data-theme="dark"] .builder-icon-btn:hover:not(:disabled) { color: #f0d38f; background: #2a1c12; }
  body[data-style="brand"][data-theme="dark"] .builder-required-toggle { border-left-color: #493520; color: #c9b58f; }
  body[data-style="brand"][data-theme="dark"] .dynamic-choice-option { color: #eadcc1; }
  body[data-style="brand"][data-theme="dark"] .dynamic-choice-option:hover { border-color: #d4a657; background: #21170f; }
  body[data-style="brand"][data-theme="dark"] .avatar { color: #1a120c; background: linear-gradient(145deg, #f4d994, #d4a657); }
  body[data-style="brand"][data-theme="dark"] .theme-slider { background: #4b3928; }

  @keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes unfold { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
  @keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }
  @keyframes pulse { 0%, 70%, 100% { transform: scale(.7); opacity: .45; } 35% { transform: scale(1); opacity: 1; } }
  @keyframes tech-cube-spin { from { transform: rotateX(-24deg) rotateY(0deg) rotateZ(0deg); } to { transform: rotateX(336deg) rotateY(360deg) rotateZ(360deg); } }
  @keyframes tech-orbit-spin { from { transform: rotateX(70deg) rotateZ(0deg); } to { transform: rotateX(70deg) rotateZ(360deg); } }
  @keyframes tech-scan { 0% { left: -45%; } 100% { left: 100%; } }
  @keyframes mini-tech-pulse { 0%, 100% { transform: translateY(2px) scale(.72); opacity: .45; } 50% { transform: translateY(-2px) scale(1.15); opacity: 1; } }

  @media (max-width: 1080px) {
    .dashboard-layout { grid-template-columns: 1fr; gap: 14px; }
    .cash-metric-grid-period { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .app-sidebar {
      top: 8px;
      z-index: 30;
      min-height: 0;
      flex-direction: row;
      align-items: center;
      gap: 8px;
      padding: 9px;
      border-radius: 15px;
    }
    .sidebar-profile { display: none; }
    .sidebar-nav { display: flex; min-width: 0; flex: 1 1 auto; gap: 5px; margin: 0; overflow-x: auto; scrollbar-width: thin; }
    .sidebar-link { width: auto; min-width: 132px; flex: 0 0 auto; justify-content: flex-start; }
    .sidebar-link:hover { transform: translateY(-1px); }
    .sidebar-footer { display: flex; flex: 0 0 auto; gap: 3px; margin: 0; padding: 0 0 0 6px; border-top: 0; border-left: 1px solid var(--line); }
    .sidebar-utility { width: 38px; min-width: 38px; justify-content: center; padding: 0; font-size: 14px; }
    .sidebar-utility span:last-child { display: none; }
  }

  @media (max-width: 760px) {
    .app-shell { width: min(100% - 20px, 1360px); margin: 10px auto 28px; }
    .app-header { min-height: 65px; padding: 10px 12px; border-radius: 17px; }
    .app-preload-progress { grid-template-columns: 38px minmax(0, 1fr); gap: 9px; padding: 11px 12px; border-radius: 14px; }
    .app-preload-visual { width: 34px; height: 34px; transform: scale(.78); transform-origin: center; }
    .app-preload-heading { gap: 8px; }
    .app-preload-heading strong { font-size: 11px; }
    .app-preload-heading small { font-size: 9px; }
    .app-preload-heading output { min-width: 44px; font-size: 17px; }
    .brand-mark { width: 38px; height: 38px; flex-basis: 38px; border-radius: 12px; }
    .brand-tagline, .user-chip > span, .theme-label, .style-picker-label { display: none; }
    .login-card { margin-top: 32px; padding: 25px 20px; border-radius: 20px; }
    .panel-pad { padding: 18px; }
    .money-entry-form { padding: 14px; }
    .money-entry-actions { align-items: stretch; flex-direction: column; }
    .money-entry-actions .btn { width: 100%; }
    .bank-handover-fields { grid-template-columns: 1fr; }
    .bank-pending-item { grid-template-columns: 42px minmax(0, 1fr); }
    .bank-pending-amount { text-align: left; }
    .bank-pending-confirm { grid-column: 1 / -1; width: 100%; }
    .cash-handover-item { grid-template-columns: 42px minmax(0, 1fr); }
    .cash-handover-amount { text-align: left; }
    .cash-handover-item .btn { grid-column: 1 / -1; width: 100%; }
    .panel-heading-with-action { flex-direction: column; }
    .panel-heading-with-action > .btn { width: 100%; }
    .overview-refresh-control { width: 100%; justify-content: space-between; }
    .overview-refresh-control .btn { flex: 0 0 auto; }
    .cash-dashboard-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cash-metric-grid-primary { grid-template-columns: 1fr; }
    .cash-custody-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cash-metric-grid-period { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cash-dashboard-details { grid-template-columns: 1fr; }
    .cash-flow-chart-card, .cash-task-card { padding: 15px 12px; }
    .welcome-card { align-items: stretch; flex-direction: column; padding: 18px; border-radius: 15px; }
    .welcome-card h2 { font-size: 19px; }
    .welcome-summary { align-items: stretch; justify-content: space-between; }
    .welcome-cash { min-width: 0; flex: 1; text-align: left; }
    .welcome-cash small { white-space: normal; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-all { grid-column: auto; }
    .report-priority-grid { grid-template-columns: 1fr; }
    .quick-contact-input-row { grid-template-columns: minmax(0, 1fr) 92px; }
    .builder-contact-actions { align-items: stretch; flex-direction: column; }
    .builder-contact-actions > span { margin-right: 0; }
    .builder-contact-actions .btn { width: 100%; }
    .contact-manager-toolbar { grid-template-columns: 1fr; }
    .contact-manager-toolbar .btn { width: 100%; }
    .contact-manager-item { grid-template-columns: 38px minmax(0, 1fr); }
    .contact-manager-avatar { width: 38px; height: 38px; }
    .contact-manager-actions { grid-column: 1 / -1; }
    .contact-manager-actions .btn { flex: 1; }
    .form-builder-toolbar { flex-direction: column; }
    .task-visual-picker-row { grid-template-columns: 1fr; }
    .priority-order-roster-list { grid-template-columns: 1fr; }
    .form-builder-toolbar .btn { width: 100%; }
    .question-editor-grid { grid-template-columns: 1fr; }
    .question-card-footer { align-items: flex-start; flex-direction: column; }
    .question-card-actions { width: 100%; justify-content: flex-end; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-chart-card { padding: 15px 12px; }
    .overview-activity-chart { gap: 6px; min-height: 181px; }
    .activity-day { grid-template-rows: 18px 108px auto auto auto; gap: 3px; }
    .activity-bar-zone { height: 108px; }
    .filter-bar { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .report-summary-grid { grid-template-columns: 1fr; }
    .filter-bar .btn { grid-column: 1 / -1; width: 100%; }
    .report-period-heading { align-items: flex-start; flex-direction: column; }
    .report-list-actions { align-items: stretch; flex-direction: column; }
    .report-list-actions .btn { width: 100%; }
    .modal-content { padding: 20px 17px; }
  }
  @media (max-width: 900px) {
    body { padding-bottom: 0; }
    body.mobile-sidebar-open { overflow: hidden; }
    .app-shell { margin-bottom: 14px; }
    .app-header { position: sticky; z-index: 55; top: 8px; }
    .mobile-menu-toggle { display: grid; }
    .brand-mark { display: none; }
    /*
     * Không giữ animation/transform trên dashboard ở chế độ drawer.
     * Một ancestor có transform sẽ biến sidebar position:fixed thành phần tử
     * bị giới hạn trong dashboard và tạo stacking context thấp hơn backdrop.
     */
    .dashboard { margin-top: 14px; animation: none; transform: none; }
    .dashboard-layout { display: block; }
    .sidebar-backdrop {
      position: fixed;
      z-index: 65;
      inset: 0;
      display: block;
      visibility: hidden;
      background: rgba(12, 19, 35, .48);
      opacity: 0;
      pointer-events: none;
      transition: opacity .22s ease, visibility .22s ease;
      backdrop-filter: blur(2px);
    }
    .sidebar-backdrop.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
    .app-sidebar {
      position: fixed;
      z-index: 70;
      top: 0;
      right: auto;
      bottom: 0;
      left: 0;
      width: min(84vw, 310px);
      height: 100vh;
      height: 100dvh;
      min-height: 100vh;
      min-height: 100dvh;
      align-items: stretch;
      flex-direction: column;
      gap: 0;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      padding: calc(16px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
      border-width: 0 1px 0 0;
      border-radius: 0 22px 22px 0;
      box-shadow: 14px 0 34px rgba(22, 31, 66, .18);
      visibility: hidden;
      transform: translateX(-105%);
      transition: transform .24s cubic-bezier(.2,.8,.2,1), visibility .24s;
    }
    .app-sidebar.is-open { visibility: visible; transform: translateX(0); }
    .sidebar-profile { display: flex; }
    .sidebar-nav { display: grid; flex: 0 0 auto; gap: 6px; margin-top: 14px; overflow: visible; }
    .sidebar-link {
      width: 100%;
      min-width: 0;
      min-height: 46px;
      flex: none;
      flex-direction: row;
      justify-content: flex-start;
      gap: 10px;
      border-radius: 11px;
      padding: 9px 10px;
      text-align: left;
      touch-action: manipulation;
    }
    .sidebar-link-icon { width: 28px; height: 28px; flex-basis: 28px; font-size: 15px; }
    .sidebar-link-label { max-width: none; font-size: 12px; }
    .sidebar-footer { display: grid; gap: 5px; margin-top: auto; padding: 13px 0 0; border-top: 1px solid var(--line); border-left: 0; }
    .sidebar-utility { width: 100%; min-width: 0; height: auto; min-height: 40px; justify-content: flex-start; gap: 9px; padding: 8px 9px; border-radius: 9px; font-size: 11px; }
    .sidebar-utility span:last-child { display: inline; }
    .welcome-card { align-items: flex-start; }
    .welcome-card p { font-size: 12px; }
    .panel-pad { padding: 16px 13px; }
    .pagination { align-items: stretch; flex-wrap: wrap; }
    .pagination-info { width: 100%; margin-right: 0; }
    .pagination-size { width: 100%; justify-content: space-between; }
    .pagination .btn { flex: 1; }
  }
  @media (max-width: 430px) {
    .user-menu .btn-icon { display: none; }
    .cash-dashboard-filter-grid, .cash-metric-grid-period, .cash-custody-metric-grid,
    .cash-custody-summary, .cash-handover-form { grid-template-columns: 1fr; }
    .header-controls { gap: 8px; }
    .style-picker select { width: 52px; min-width: 52px; padding-right: 18px; padding-left: 8px; }
    .role-pill { padding: 6px 8px; font-size: 11px; }
    .toolbar .btn, .action-bar .btn { flex-basis: 100%; }
    .filter-bar { grid-template-columns: 1fr; }
    .filter-bar .btn { grid-column: auto; }
    .overview-chart-heading { flex-direction: column; }
    .overview-chart-summary { align-self: flex-start; }
    .overview-activity-chart { gap: 4px; min-height: 164px; }
    .activity-day { grid-template-rows: 18px 102px auto auto; }
    .activity-bar-zone { height: 102px; }
    .activity-date { display: none; }
    .activity-report-count { font-size: 9px; }
    .overview-chart-legend { justify-content: flex-start; }
    .question-card-actions { flex-wrap: wrap; justify-content: flex-start; }
    .builder-required-toggle { margin-left: 0; }
    .modal-actions { flex-direction: column-reverse; }
  }
  .switch-control {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    font-weight: 800;
  }
  .appearance-settings-modal { width: min(760px, calc(100vw - 28px)); }
  .appearance-logo-preview-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 0 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
  }
  .appearance-logo-preview { width: 64px; height: 64px; flex-basis: 64px; border-radius: 18px; }
  @media (max-width: 900px) { .account-filter-bar,
    .account-security-form-grid { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 640px) {
    .account-filter-bar, .account-security-form-grid, .account-stats-grid { grid-template-columns: 1fr; }
    #leaderAccountSecurity { align-items: flex-start; flex-direction: column; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  }

  /* Báo cáo chi tiết dòng tiền */
  .cash-reconciliation-grid span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
  }
  .cash-report-reconciliation, .cash-report-breakdown-card {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
  }
  .cash-report-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 13px;
  }
  .cash-report-section-heading h3 { margin: 3px 0 0; font-size: 17px; }
  .cash-reconciliation-status {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }
  .cash-reconciliation-status.is-matched { border-color: rgba(16,185,129,.35); color: #059669; background: rgba(16,185,129,.08); }
  .cash-reconciliation-status.is-warning { border-color: rgba(239,68,68,.35); color: #dc2626; background: rgba(239,68,68,.08); }
  .cash-reconciliation-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
  .cash-reconciliation-grid article {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
  }
  .cash-reconciliation-grid strong { display: block; margin-top: 7px; font-size: 18px; }
  .cash-reconciliation-grid small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
  .cash-reconciliation-grid article.total { border-color: rgba(212,169,73,.45); background: rgba(212,169,73,.09); }

  .cash-report-warning {
    margin-top: 14px;
    padding: 11px 13px;
    border: 1px solid rgba(245,158,11,.4);
    border-radius: 12px;
    background: rgba(245,158,11,.1);
    color: #b45309;
    font-size: 11px;
    font-weight: 750;
  }
  .cash-report-breakdown-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .cash-report-breakdown-card { min-width: 0; }
  .cash-report-breakdown-note { margin: -4px 0 12px; color: var(--muted); font-size: 11px; }
  .cash-report-breakdown-table { min-width: 760px; }
  .cash-breakdown-row { cursor: pointer; transition: background .16s ease; }
  .cash-breakdown-row:hover { background: rgba(212,169,73,.09); }
  .cash-ledger-scroll {
    position: relative;
    max-height: min(72vh, 760px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  .cash-ledger-table {
    width: max-content;
    min-width: 1680px;
    table-layout: auto;
  }
  .cash-ledger-table thead th {
    position: sticky;
    z-index: 3;
    top: 0;
    border-right: 1px solid var(--line);
    background: var(--surface-soft);
    box-shadow: 0 1px 0 var(--line);
  }
  .cash-ledger-table tbody tr:nth-child(even) { background: rgba(99, 112, 138, .035); }
  :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color,
  .cash-breakdown-row.cash-ledger-task-color {
    background: var(--cash-row-background, rgba(99, 112, 138, .05));
  }
  :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color td,
  .cash-breakdown-row.cash-ledger-task-color td {
    background: inherit;
  }
  :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color td.is-ledger-frozen {
    background: inherit;
  }
  :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="green"],
  .cash-breakdown-row.cash-ledger-task-color[data-task-color="green"] { --cash-row-background: #e7f7ed; }
  :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="red"],
  .cash-breakdown-row.cash-ledger-task-color[data-task-color="red"] { --cash-row-background: #fdecec; }
  :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="amber"],
  .cash-breakdown-row.cash-ledger-task-color[data-task-color="amber"] { --cash-row-background: #fff5dc; }
  :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="blue"],
  .cash-breakdown-row.cash-ledger-task-color[data-task-color="blue"] { --cash-row-background: #e9f2ff; }
  :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="purple"],
  .cash-breakdown-row.cash-ledger-task-color[data-task-color="purple"] { --cash-row-background: #f0e9ff; }
  :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="teal"],
  .cash-breakdown-row.cash-ledger-task-color[data-task-color="teal"] { --cash-row-background: #e2f8f5; }
  :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="gray"],
  .cash-breakdown-row.cash-ledger-task-color[data-task-color="gray"] { --cash-row-background: #eef1f4; }
  :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color:hover,
  .cash-breakdown-row.cash-ledger-task-color:hover { filter: brightness(.965); }
  body[data-theme="dark"] :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="green"],
  body[data-theme="dark"] .cash-breakdown-row.cash-ledger-task-color[data-task-color="green"] { --cash-row-background: rgba(16, 185, 129, .20); }
  body[data-theme="dark"] :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="red"],
  body[data-theme="dark"] .cash-breakdown-row.cash-ledger-task-color[data-task-color="red"] { --cash-row-background: rgba(248, 113, 113, .20); }
  body[data-theme="dark"] :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="amber"],
  body[data-theme="dark"] .cash-breakdown-row.cash-ledger-task-color[data-task-color="amber"] { --cash-row-background: rgba(245, 158, 11, .18); }
  body[data-theme="dark"] :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="blue"],
  body[data-theme="dark"] .cash-breakdown-row.cash-ledger-task-color[data-task-color="blue"] { --cash-row-background: rgba(96, 165, 250, .20); }
  body[data-theme="dark"] :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="purple"],
  body[data-theme="dark"] .cash-breakdown-row.cash-ledger-task-color[data-task-color="purple"] { --cash-row-background: rgba(168, 85, 247, .20); }
  body[data-theme="dark"] :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="teal"],
  body[data-theme="dark"] .cash-breakdown-row.cash-ledger-task-color[data-task-color="teal"] { --cash-row-background: rgba(45, 212, 191, .18); }
  body[data-theme="dark"] :is(.cash-ledger-table,.recent-transactions-table) tbody tr.cash-ledger-task-color[data-task-color="gray"],
  body[data-theme="dark"] .cash-breakdown-row.cash-ledger-task-color[data-task-color="gray"] { --cash-row-background: rgba(148, 163, 184, .18); }
  .cash-ledger-table tbody tr:hover { background: rgba(212, 169, 73, .09); }
  .cash-ledger-table td {
    vertical-align: top;
    border-right: 1px solid rgba(99, 112, 138, .13);
    line-height: 1.45;
  }
  .cash-ledger-table th.is-ledger-frozen,
  .cash-ledger-table td.is-ledger-frozen {
    position: sticky;
    z-index: 2;
    background: var(--surface);
    background-clip: padding-box;
  }
  .cash-ledger-table thead th.is-ledger-frozen {
    z-index: 6;
    background: var(--surface-soft);
  }
  .cash-ledger-table tbody tr:nth-child(even) td.is-ledger-frozen { background: var(--surface-soft); }
  .cash-ledger-table tbody tr:hover td.is-ledger-frozen { background: #fff6e4; }
  .cash-ledger-table .is-last-frozen { box-shadow: 4px 0 7px rgba(51, 65, 92, .12); }
  .cash-ledger-table th:last-child, .cash-ledger-table td:last-child { border-right: 0; }
  .cash-ledger-table .ledger-col-date { width: 108px; min-width: 108px; white-space: nowrap; }
  .cash-ledger-table .ledger-col-id { width: 118px; min-width: 118px; white-space: nowrap; }
  .cash-ledger-table .ledger-col-staff,
  .cash-ledger-table .ledger-col-reporter { width: 180px; min-width: 180px; }
  .cash-ledger-table .ledger-col-task-code { width: 100px; min-width: 100px; }
  .cash-ledger-table .ledger-col-task { width: 155px; min-width: 155px; }
  .cash-ledger-table .ledger-col-direction { width: 126px; min-width: 126px; }
  .cash-ledger-table .ledger-col-amount { width: 128px; min-width: 128px; }
  .cash-ledger-table .ledger-col-source { width: 150px; min-width: 150px; }
  .cash-ledger-table .ledger-col-quantity { width: 72px; min-width: 72px; text-align: center; }
  .cash-ledger-table .ledger-col-detail {
    width: 210px;
    min-width: 190px;
    max-width: 320px;
  }
  .cash-ledger-table .ledger-col-status { width: 118px; min-width: 118px; }
  .cash-ledger-table .ledger-col-actions { width: 126px; min-width: 126px; }
  .cash-ledger-table .table-actions { flex-wrap: nowrap; }
  .cash-ledger-id {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    letter-spacing: .03em;
  }
  .cash-ledger-field { white-space: pre-line; overflow-wrap: anywhere; }
  .cash-ledger-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .cash-transaction-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: .01em;
  }
  .cash-transaction-amount.is-receipt { color: #047857; background: #e6f5ed; border-color: #bee7d2; }
  .cash-transaction-amount.is-payment { color: #b91c1c; background: #fdece8; border-color: #f7c9c3; }
  .cash-transaction-amount.is-neutral { color: var(--text); background: var(--surface-soft); border-color: var(--line); }
  .cash-transaction-amount.is-receipt::before { content: '+'; font-size: 14px; }
  .cash-transaction-amount.is-payment::before { content: '−'; font-size: 14px; }
  body[data-theme="dark"] .cash-transaction-amount.is-receipt { color: #6ee7b7; background: rgba(4,120,87,.18); border-color: rgba(110,231,183,.25); }
  body[data-theme="dark"] .cash-transaction-amount.is-payment { color: #fca5a5; background: rgba(185,28,28,.18); border-color: rgba(252,165,165,.25); }
  .cash-direction-badge, .cash-ledger-status {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 850;
  }
  .cash-direction-badge.receipt { color: #047857; background: rgba(16,185,129,.13); }
  .cash-direction-badge.payment { color: #b91c1c; background: rgba(239,68,68,.12); }
  .cash-direction-badge.bank { color: #1d4ed8; background: rgba(59,130,246,.12); }
  .cash-direction-badge.bank_pending { color: #b45309; background: rgba(245,158,11,.14); }
  .cash-direction-badge.unclassified { color: #64748b; background: rgba(100,116,139,.12); }
  .cash-ledger-status.confirmed { color: #047857; background: rgba(16,185,129,.12); }
  .cash-ledger-status.pending { color: #b45309; background: rgba(245,158,11,.14); }

  .column-settings-modal { width: min(94vw, 650px); }
  .column-settings-description { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
  .column-display-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 15px; }
  .column-freeze-control {
    margin: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface-soft);
  }
  .column-freeze-control small { display: block; margin-top: 7px; color: var(--muted); line-height: 1.45; }
  .column-settings-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
  .column-settings-toolbar > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .column-visibility-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: min(42vh, 390px);
    overflow: auto;
    padding: 3px;
  }
  .column-visibility-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    cursor: pointer;
  }
  .column-visibility-item:hover { border-color: rgba(212,169,73,.58); background: rgba(212,169,73,.08); }
  .column-visibility-item.is-dragging { opacity: .45; }
  .column-visibility-item.is-drag-over { border-color: #d4a949; box-shadow: 0 0 0 2px rgba(212,169,73,.18); }
  .column-drag-handle { color: var(--muted); font-size: 17px; line-height: 1; cursor: grab; user-select: none; }
  .column-drag-handle:active { cursor: grabbing; }
  .column-visibility-toggle { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
  .column-visibility-toggle input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: #d4a949; }
  .column-visibility-toggle span { min-width: 0; overflow: hidden; color: var(--text); font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
  .column-order-actions { display: flex; gap: 3px; }
  .column-order-button {
    width: 27px;
    height: 27px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 12px;
    cursor: pointer;
  }
  .column-order-button:hover:not(:disabled) { border-color: #d4a949; color: var(--text); }
  .column-order-button:disabled { opacity: .3; cursor: not-allowed; }

  .builder-cash-amount-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid rgba(212,169,73,.38);
    border-radius: 999px;
    background: rgba(212,169,73,.09);
    color: var(--text);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
  }
  .builder-cash-amount-toggle input { width: 14px; height: 14px; accent-color: #d4a949; }
  .builder-cash-amount-toggle:has(input:disabled) { opacity: .45; cursor: not-allowed; }

  body[data-theme="dark"] .cash-report-warning { color: #fbbf24; }
  body[data-theme="dark"] .cash-ledger-table tbody tr:hover td.is-ledger-frozen { background: #1b2740; }
  body[data-theme="dark"] .column-visibility-item { border-color: #35425f; background: #10182a; }
  body[data-theme="dark"] .column-visibility-item:hover { border-color: #8c84ff; background: #1b2740; }
  body[data-style="brand"][data-theme="dark"] .cash-ledger-table tbody tr:hover td.is-ledger-frozen { background: #1c140e; }
  body[data-style="brand"][data-theme="dark"] .column-visibility-item { border-color: #493520; background: #130d09; }
  body[data-style="brand"][data-theme="dark"] .column-visibility-item:hover { border-color: #d4a657; background: #21170f; }

  .recent-transactions-section {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid rgba(22, 163, 74, .24);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(240, 253, 244, .9), rgba(255, 251, 235, .78));
  }
  .recent-transactions-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
  }
  .recent-transactions-heading h3 { margin: 4px 0 3px; font-size: 20px; }
  .recent-transactions-heading p,
  .recent-transactions-summary { margin: 0; color: var(--muted); font-size: 12px; }
  .recent-transactions-table-wrap {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }
  .recent-transactions-table { min-width: 1120px; }
  .recent-transactions-table th { white-space: nowrap; }
  .recent-transactions-table td { max-width: 250px; vertical-align: middle; }
  .recent-transactions-table .recent-transaction-id {
    max-width: 118px;
    overflow: hidden;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .recent-transactions-table .recent-transaction-reference {
    min-width: 110px;
    max-width: 180px;
    overflow-wrap: anywhere;
  }
  .recent-transactions-table .recent-transaction-employee { min-width: 180px; }
  .recent-transactions-table .recent-transaction-content {
    min-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .recent-transactions-table tr.is-newly-saved td {
    animation: recent-saved-highlight 2.8s ease-out;
  }
  .recent-transactions-summary { margin-top: 10px; }
  @keyframes recent-saved-highlight {
    0%, 35% { background: rgba(34, 197, 94, .2); }
    100% { background: transparent; }
  }
  .edit-report-modal { width: min(920px, calc(100vw - 28px)); }
  .edit-report-modal form { max-height: min(74vh, 760px); overflow-y: auto; padding-right: 4px; }
  .edit-report-warning {
    margin-top: 14px;
    padding: 11px 13px;
    border: 1px solid rgba(245, 158, 11, .35);
    border-radius: 12px;
    background: rgba(245, 158, 11, .1);
    color: #92400e;
    font-size: 12px;
    font-weight: 700;
  }
  body[data-theme="dark"] .recent-transactions-section {
    border-color: rgba(52, 211, 153, .26);
    background: linear-gradient(135deg, rgba(6, 78, 59, .2), rgba(120, 53, 15, .14));
  }
  body[data-theme="dark"] .edit-report-warning { color: #fbbf24; }
  body[data-style="brand"][data-theme="dark"] .recent-transactions-section {
    border-color: rgba(212, 166, 87, .3);
    background: linear-gradient(135deg, rgba(34, 197, 94, .08), rgba(59, 35, 17, .72));
  }

  @media (max-width: 760px) {
    .cash-reconciliation-grid { grid-template-columns: 1fr; }
    .cash-report-section-heading { flex-direction: column; }
    .column-visibility-list { grid-template-columns: 1fr; }
    .column-display-controls { grid-template-columns: 1fr; }
    .column-settings-toolbar { align-items: flex-start; flex-direction: column; }
    .column-settings-toolbar > div { justify-content: flex-start; }
    .report-list-actions { align-items: stretch; flex-direction: column; }
    .report-list-buttons { justify-content: stretch; }
    .report-list-buttons .btn { flex: 1 1 auto; }
    .recent-transactions-section { padding: 15px; }
    .recent-transactions-heading { flex-direction: column; }
    .edit-report-modal form { max-height: 70vh; }
  }

  .leader-menu-order-modal { width: min(92vw, 560px); }
  .menu-order-list { display: grid; gap: 8px; max-height: min(48vh, 420px); overflow: auto; padding: 3px; }
  .menu-order-item {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    cursor: grab;
  }
  .menu-order-item:hover { border-color: rgba(212,169,73,.58); background: rgba(212,169,73,.08); }
  .menu-order-item.is-dragging { opacity: .45; }
  .menu-order-item.is-drag-over { border-color: #d4a949; box-shadow: 0 0 0 2px rgba(212,169,73,.18); }
  .menu-order-drag-handle { color: var(--muted); font-size: 17px; line-height: 1; user-select: none; }
  .menu-order-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--primary); background: var(--surface-soft); font-weight: 800; }
  .menu-order-item strong { min-width: 0; overflow: hidden; color: var(--text); font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
  .menu-order-actions { display: flex; gap: 3px; }
  .menu-order-button { width: 27px; height: 27px; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface-soft); font-size: 12px; cursor: pointer; }
  .menu-order-button:hover:not(:disabled) { border-color: #d4a949; color: var(--text); }
  .menu-order-button:disabled { opacity: .3; cursor: not-allowed; }
  body[data-theme="dark"] .menu-order-item { border-color: #35425f; background: #10182a; }
  body[data-theme="dark"] .menu-order-item:hover { border-color: #8c84ff; background: #1b2740; }
  body[data-style="brand"][data-theme="dark"] .menu-order-item { border-color: #493520; background: #130d09; }
  body[data-style="brand"][data-theme="dark"] .menu-order-item:hover { border-color: #d4a657; background: #21170f; }
/* Duyệt và bàn giao tiền */
#cashWorkflowSection { --workflow-accent: #a97420; }
#cashWorkflowSection .cash-pending-held { border-radius: 18px; padding: 22px 24px; border: 1px solid var(--line); border-left: 5px solid var(--workflow-accent); }
#cashWorkflowSection .cash-pending-held strong { font-variant-numeric: tabular-nums; }
#cashWorkflowSection #cashPendingList { margin: 12px 0 26px; }
#cashWorkflowSection #cashPendingList > .field-help { padding: 18px 20px; border: 1px dashed var(--line); border-radius: 14px; background: var(--surface-soft); margin: 0; }
#cashWorkflowSection .cash-shift-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
#cashWorkflowSection .cash-shift-heading { margin-bottom: 20px; }
#cashWorkflowSection .cash-shift-heading h3 { margin: 8px 0; }
#cashWorkflowSection .cash-shift-section > h3 { margin: 22px 0 12px; }
#cashWorkflowSection .cash-shift-report { padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-soft); box-shadow: 0 4px 18px rgba(67,48,21,.05); }
#cashWorkflowSection .cash-shift-report-head { align-items: flex-start; gap: 16px; margin-bottom: 16px; }
#cashWorkflowSection .cash-shift-report-head strong { font-size: 17px; line-height: 1.35; }
#cashWorkflowSection .cash-shift-report-head small { line-height: 1.5; }
#cashWorkflowSection .cash-shift-report-head button { flex-shrink: 0; }
#cashWorkflowSection .cash-shift-totals { gap: 10px; }
#cashWorkflowSection .cash-shift-totals > div { background: var(--surface); border-radius: 12px; padding: 14px; min-width: 0; }
#cashWorkflowSection .cash-shift-totals span { font-size: 12px; }
#cashWorkflowSection .cash-shift-totals strong { font-size: 19px; font-variant-numeric: tabular-nums; }
#cashWorkflowSection .cash-shift-held-detail, #cashWorkflowSection .cash-shift-note { margin: 15px 0; line-height: 1.6; }
#cashWorkflowSection .cash-shift-details { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
#cashWorkflowSection .cash-shift-details summary { cursor: pointer; padding: 14px 16px; font-weight: 800; color: var(--ink); }
#cashWorkflowSection .cash-shift-details summary:hover { background: var(--surface-soft); }
#cashWorkflowSection .cash-shift-details summary:focus-visible { outline: 3px solid var(--workflow-accent); outline-offset: -3px; }
#cashWorkflowSection .cash-shift-rows { border-top: 1px solid var(--line); padding: 0 16px; }
#cashWorkflowSection .cash-shift-row { padding: 15px 0; gap: 16px; }
#cashWorkflowSection .cash-shift-row:last-child { border-bottom: 0; }
#cashWorkflowSection .cash-shift-row > div:first-child { border-left: 3px solid #438267; padding-left: 12px; }
#cashWorkflowSection .cash-shift-row.is-payment > div:first-child { border-left-color: #c47547; }
#cashWorkflowSection .cash-shift-row strong, #cashWorkflowSection .cash-shift-row small { line-height: 1.45; }
#cashWorkflowSection .cash-shift-status { font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--surface-soft); }
#cashWorkflowSection .cash-shift-row-meta small { font-size: 10px; }
@media (max-width: 760px) {
  #cashWorkflowSection .cash-shift-totals { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #cashWorkflowSection .cash-shift-report { padding: 16px; }
  #cashWorkflowSection .cash-shift-report-head { flex-wrap: wrap; }
  #cashWorkflowSection .cash-shift-totals strong { font-size: 16px; }
}
@media (max-width: 420px) {
  #cashWorkflowSection .cash-shift-row { flex-wrap: wrap; }
  #cashWorkflowSection .cash-shift-row-meta { text-align: left; padding-left: 15px; }
  #cashWorkflowSection .cash-pending-held { padding: 18px; }
}
/* Các trường trong chi tiết báo cáo cuối ca */
#cashWorkflowSection .cash-shift-row > .cash-shift-row-main { flex: 1 1 0; min-width: 0; display: block; border-left: 4px solid #10b981; border-radius: 10px; padding: 14px 16px; background: rgba(16,185,129,.09); }
#cashWorkflowSection .cash-shift-row.is-payment > .cash-shift-row-main { border-left-color: #ef4444; background: rgba(239,68,68,.08); }
#cashWorkflowSection .cash-shift-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px 20px; margin: 0; }
#cashWorkflowSection .cash-shift-field { min-width: 0; }
#cashWorkflowSection .cash-shift-field dt { color: var(--muted); font-size: 11px; font-weight: 800; margin: 0 0 4px; }
#cashWorkflowSection .cash-shift-field dd { margin: 0; font-size: 14px; line-height: 1.45; font-weight: 700; overflow-wrap: anywhere; }
#cashWorkflowSection .cash-shift-field:nth-child(3) dd { font-size: 16px; font-weight: 850; font-variant-numeric: tabular-nums; }
#cashWorkflowSection .cash-shift-row.is-receipt .cash-shift-field:nth-child(3) dd { color: #047857; }
#cashWorkflowSection .cash-shift-row.is-payment .cash-shift-field:nth-child(3) dd { color: #b91c1c; }
body[data-theme="dark"] #cashWorkflowSection .cash-shift-row.is-receipt .cash-shift-field:nth-child(3) dd { color: #6ee7b7; }
body[data-theme="dark"] #cashWorkflowSection .cash-shift-row.is-payment .cash-shift-field:nth-child(3) dd { color: #fca5a5; }
@media (max-width: 760px) { #cashWorkflowSection .cash-shift-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 420px) { #cashWorkflowSection .cash-shift-row > .cash-shift-row-main { flex-basis: 100%; } #cashWorkflowSection .cash-shift-fields { gap: 12px; } }
#cashWorkflowSection .cash-shift-row.is-receipt > .cash-shift-row-main:first-child { border-left-color: #10b981; }
#cashWorkflowSection .cash-shift-row.is-payment > .cash-shift-row-main:first-child { border-left-color: #ef4444; }
#cashWorkflowSection .cash-shift-row-meta { align-self: flex-start; }
/* Tách số tiền khỏi thông tin giao dịch */
#cashWorkflowSection .cash-shift-row > .cash-shift-row-main:first-child { display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,auto); gap: 20px; align-items: start; }
#cashWorkflowSection .cash-shift-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
#cashWorkflowSection .cash-shift-row .cash-shift-field:nth-child(3) dd { color: inherit; font-size: 14px; font-weight: 700; }
#cashWorkflowSection .cash-shift-amount { min-width: 0; text-align: right; display: grid; gap: 5px; padding: 2px 0 2px 16px; border-left: 1px solid var(--line); }
#cashWorkflowSection .cash-shift-amount span { color: var(--muted); font-size: 11px; font-weight: 800; }
#cashWorkflowSection .cash-shift-amount strong { font-size: 19px; line-height: 1.3; font-weight: 850; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#cashWorkflowSection .cash-shift-row.is-receipt .cash-shift-amount strong { color: #047857; }
#cashWorkflowSection .cash-shift-row.is-payment .cash-shift-amount strong { color: #b91c1c; }
body[data-theme="dark"] #cashWorkflowSection .cash-shift-row.is-receipt .cash-shift-amount strong { color: #6ee7b7; }
body[data-theme="dark"] #cashWorkflowSection .cash-shift-row.is-payment .cash-shift-amount strong { color: #fca5a5; }
@media (max-width: 600px) { #cashWorkflowSection .cash-shift-row > .cash-shift-row-main:first-child { grid-template-columns: 1fr; gap: 14px; } #cashWorkflowSection .cash-shift-amount { grid-row: 1; text-align: left; border-left: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; } }

.column-order-actions { flex-shrink: 0; }
.column-rename-button { width: auto; min-width: 58px; padding: 0 7px; font-size: 11px; font-weight: 700; }

.column-visibility-item.is-renaming .column-visibility-toggle, .column-visibility-item.is-renaming .column-order-actions { display: none; }
.column-rename-editor { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.column-rename-editor input { flex: 1; width: 0; min-width: 0; height: 28px; padding: 0 7px; border: 1px solid #d4a949; border-radius: 7px; background: var(--surface); color: var(--text); font: inherit; }
.column-rename-editor button { height: 28px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: var(--text); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }

.modal-content.column-settings-modal { width: min(960px, calc(100vw - 28px)); }

/* ===== Đối soát sổ sách (Báo cáo dòng tiền) ===== */
#allReportsSection { --recon-ok: #12805c; --recon-ok-soft: rgba(18,128,92,.10); --recon-warn: #b7791f; --recon-warn-soft: rgba(214,158,46,.14); }
body[data-theme="dark"] #allReportsSection { --recon-ok: #4fd39a; --recon-ok-soft: rgba(79,211,154,.12); --recon-warn: #f2c66d; --recon-warn-soft: rgba(242,198,109,.12); }
#allReportsSection.is-staff-view [data-leader-only] { display: none !important; }
#allReportsSection:not(.is-staff-view) [data-staff-only] { display: none !important; }
#allReportsSection.is-staff-view .cash-report-breakdown-grid { grid-template-columns: 1fr; }

.recon-panel { margin: 18px 0 12px; padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 18px rgba(0,0,0,.04); }
.recon-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.recon-head h3 { margin: 4px 0 4px; font-size: 17px; color: var(--ink); }
.recon-help { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.recon-help-box { display: inline-grid; place-items: center; width: 16px; height: 16px; margin: 0 2px; border-radius: 5px; background: var(--recon-ok); color: #fff; font-size: 11px; font-weight: 800; vertical-align: -2px; }
.recon-score { flex: none; text-align: right; }
.recon-score strong { display: block; font-size: 30px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.recon-score strong.is-complete { color: var(--recon-ok); }
.recon-score span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.recon-bar { display: flex; height: 10px; margin: 14px 0 14px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); box-shadow: inset 0 0 0 1px var(--line); }
.recon-bar-done { background: var(--recon-ok); transition: width .35s ease; }
.recon-bar-stale { background: var(--recon-warn); transition: width .35s ease; }
.recon-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.recon-chip { display: inline-flex; align-items: baseline; gap: 6px; min-height: 36px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.recon-chip:hover { transform: translateY(-1px); border-color: var(--primary); }
.recon-chip:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.recon-chip b { font-variant-numeric: tabular-nums; }
.recon-chip small { color: var(--muted); font-size: 11px; font-weight: 600; }
.recon-chip.is-active { border-color: var(--primary); background: var(--primary); color: #fff; }
.recon-chip.is-active small { color: rgba(255,255,255,.85); }
.recon-chip.done:not(.is-active) b { color: var(--recon-ok); }
.recon-chip.stale:not(.is-active) b { color: var(--recon-warn); }
body[data-style="brand"] .recon-chip.is-active { color: #1a120c; }
body[data-style="brand"] .recon-chip.is-active small { color: rgba(26,18,12,.75); }

/* Cột ô tích */
.cash-ledger-table th.ledger-col-reconcile, .cash-ledger-table td.ledger-col-reconcile { width: 96px; min-width: 96px; text-align: center; vertical-align: middle; }
.recon-check { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; cursor: pointer; }
.recon-check-all { flex-direction: column; gap: 2px; min-height: 0; }
.recon-head-text { font-size: 11px; letter-spacing: .04em; }
.recon-checkbox { position: absolute; width: 1px; height: 1px; opacity: 0; }
.recon-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 2px solid #b8b0a2; border-radius: 8px; background: var(--surface); transition: background .15s, border-color .15s, transform .12s, box-shadow .15s; }
.recon-check:hover .recon-mark { border-color: var(--recon-ok); box-shadow: 0 0 0 4px var(--recon-ok-soft); }
.recon-checkbox:focus-visible + .recon-mark { outline: 3px solid var(--primary); outline-offset: 2px; }
.recon-checkbox:checked + .recon-mark { border-color: var(--recon-ok); background: var(--recon-ok); transform: scale(1.04); }
.recon-checkbox:checked + .recon-mark::after { content: "✓"; color: #fff; font-size: 16px; font-weight: 900; line-height: 1; }
.recon-checkbox:indeterminate + .recon-mark { border-color: var(--recon-ok); background: var(--recon-ok-soft); }
.recon-checkbox:indeterminate + .recon-mark::after { content: ""; width: 12px; height: 3px; border-radius: 2px; background: var(--recon-ok); }
.recon-checkbox:disabled + .recon-mark { opacity: .45; cursor: not-allowed; }
.recon-check:has(.recon-checkbox:disabled) { cursor: not-allowed; }
.is-reconcile-stale .recon-mark { border-color: var(--recon-warn); background: var(--recon-warn-soft); }
.is-reconcile-stale .recon-mark::after { content: "!"; color: var(--recon-warn); font-weight: 900; }
.recon-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.is-reconcile-stale .recon-meta { color: var(--recon-warn); }
.recon-na { color: var(--muted); }
.cash-ledger-table tbody tr.is-reconciled td.ledger-col-reconcile { background: var(--recon-ok-soft); box-shadow: inset 4px 0 0 var(--recon-ok); }
.cash-ledger-table tbody tr.is-reconcile-stale td.ledger-col-reconcile { background: var(--recon-warn-soft); box-shadow: inset 4px 0 0 var(--recon-warn); }

@media (max-width: 720px) {
  .recon-panel { padding: 14px; }
  .recon-head { flex-direction: column; gap: 8px; }
  .recon-score { display: flex; align-items: baseline; gap: 8px; text-align: left; }
  .recon-score strong { font-size: 24px; }
  .recon-filter { display: grid; grid-template-columns: 1fr 1fr; }
  .recon-chip { justify-content: center; flex-wrap: wrap; }
}

/* Báo cáo cuối ca đã xóa */
.cash-shift-deleted { margin-top: 22px; border: 1px dashed var(--line); border-radius: 14px; padding: 4px 16px 12px; background: var(--surface); }
.cash-shift-deleted > summary { cursor: pointer; padding: 12px 0; font-weight: 800; color: var(--muted); list-style-position: inside; }
.cash-shift-deleted[open] > summary { color: inherit; }
.cash-shift-deleted > .field-help { margin: 0 0 12px; }
.cash-shift-report.is-deleted { opacity: .78; border-style: dashed; }
.cash-shift-report.is-deleted .cash-shift-report-head strong { text-decoration: line-through; text-decoration-thickness: 1px; }
.cash-shift-deleted-meta { color: #c0392b !important; font-weight: 700; }
.cash-shift-report-head { gap: 12px; align-items: flex-start; }

/* Cột Dòng tiền: nhãn THU/CHI cùng cỡ chữ với nội dung khác trong bảng */
td.ledger-col-direction .cash-direction-badge { font-size: inherit; letter-spacing: .02em; }
.cash-approval-heading .cash-direction-badge { font-size: 14px; letter-spacing: .02em; }

/* ===== Báo cáo cuối ca dạng thả xuống ===== */
.shift-acc-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shift-acc-new-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: #d63544; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.shift-acc-list { display: grid; gap: 10px; }
.shift-acc { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.shift-acc:hover { box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.shift-acc[open] { border-color: rgba(176,132,58,.55); box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.shift-acc.is-new { border-left: 4px solid #d63544; }
.shift-acc-summary { display: grid; grid-template-columns: minmax(220px,1.3fr) minmax(0,2fr) auto 22px; align-items: center; gap: 16px; padding: 14px 18px; cursor: pointer; list-style: none; }
.shift-acc-summary::-webkit-details-marker { display: none; }
.shift-acc-summary:focus-visible { outline: 2px solid #b0843a; outline-offset: -2px; }
.shift-acc-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.shift-acc-avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #3b2a12; background: linear-gradient(135deg,#f1d79a,#c9974a); }
.shift-acc-who-text { display: grid; gap: 3px; min-width: 0; }
.shift-acc-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.shift-acc-title strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-acc-who-text small { color: var(--muted); font-size: 12px; }
.shift-acc-new { flex: none; padding: 2px 7px; border-radius: 6px; background: #d63544; color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .06em; }
.shift-acc-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.shift-acc-metric { display: grid; gap: 1px; padding: 6px 10px; border-radius: 10px; background: var(--surface-soft); min-width: 0; }
.shift-acc-metric small { color: var(--muted); font-size: 11px; font-weight: 700; }
.shift-acc-metric b { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift-acc-metric em { font-style: normal; color: var(--muted); font-size: 11px; }
.shift-acc-metric.is-receipt b { color: #047857; }
.shift-acc-metric.is-payment b { color: #b91c1c; }
body[data-theme="dark"] .shift-acc-metric.is-receipt b { color: #6ee7b7; }
body[data-theme="dark"] .shift-acc-metric.is-payment b { color: #fca5a5; }
.shift-acc-state { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-soft); white-space: nowrap; }
.shift-acc.is-new .shift-acc-state { color: #d63544; background: rgba(214,53,68,.1); }
.shift-acc-chevron { font-size: 18px; line-height: 1; color: var(--muted); transition: transform .2s; text-align: center; }
.shift-acc[open] .shift-acc-chevron { transform: rotate(180deg); }
.shift-acc-body { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.cash-shift-report.is-in-accordion { padding: 16px 0 0; border: 0; background: transparent; }
.cash-shift-report.is-in-accordion .cash-shift-report-head { justify-content: flex-end; }
.cash-shift-report.is-in-accordion .cash-shift-report-head > div:first-child { display: none; }
.cash-shift-report.is-in-accordion .cash-shift-report-head:not(:has(button)) { display: none; }
.shift-acc.is-deleted { opacity: .8; border-style: dashed; }
.shift-acc.is-deleted .shift-acc-title strong { text-decoration: line-through; text-decoration-thickness: 1px; }
.sidebar-link { position: relative; }
.sidebar-count-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; background: #d63544; color: #fff; font-size: 12px; font-weight: 800; line-height: 1; box-shadow: 0 0 0 2px rgba(0,0,0,.25); }
@media (max-width: 900px) {
  .shift-acc-summary { grid-template-columns: minmax(0,1fr) auto 18px; gap: 10px 12px; padding: 12px 14px; }
  .shift-acc-metrics { grid-column: 1 / -1; grid-row: 2; }
  .shift-acc-body { padding: 0 14px 14px; }
}
@media (max-width: 520px) {
  .shift-acc-metrics { grid-template-columns: 1fr 1fr; }
  .shift-acc-metric.is-held { grid-column: 1 / -1; }
}
.sidebar-count-badge[hidden], .shift-acc-new-pill[hidden] { display: none !important; }

/* =====================================================================
   BỐ CỤC KHUNG TÁCH RỜI (áp dụng cho mọi danh mục)
   - Khung ngoài (.panel.is-split) trong suốt; mỗi khối nội dung là 1 thẻ riêng.
   - .ui-stack: xếp các thẻ theo chiều dọc, cách đều nhau.
   - .ui-card: thẻ chuẩn; .ui-accent-*: viền nhấn màu bên trái.
   ===================================================================== */
#mainApp { --card-gap: 18px; --card-pad: 22px; --card-radius: 18px;
  --card-bg: var(--surface); --card-border: var(--line); --card-shadow: 0 6px 18px rgba(32,45,88,.05);
  --head-accent: #6366f1; }
body[data-theme="dark"] #mainApp { --card-shadow: 0 8px 22px rgba(0,0,0,.18); }
body[data-style="brand"] #mainApp { --card-bg: #fffaf1; --card-border: #ead9bc; --card-shadow: 0 10px 26px rgba(72,43,14,.07); --head-accent: #c9974a; }
body[data-style="brand"][data-theme="dark"] #mainApp { --card-bg: linear-gradient(145deg,#17100c,#100b08); --card-border: rgba(212,166,87,.22); --card-shadow: 0 12px 30px rgba(0,0,0,.25); }

/* Khung ngoài trong suốt */
#mainApp .panel.is-split { border: 0 !important; background: transparent !important; box-shadow: none !important; }
#mainApp .panel.is-split > .panel-pad { padding: 0; }
#mainApp .panel.is-split .collapsible { margin-top: 0; }

/* Ngăn xếp thẻ */
#mainApp .ui-stack:not([hidden]) { display: grid; gap: var(--card-gap); grid-template-columns: minmax(0,1fr); }
#mainApp .ui-stack > * { margin-top: 0 !important; margin-bottom: 0 !important; min-width: 0; }

/* Tiêu đề trang = thẻ đầu trang có vạch nhấn */
#mainApp .ui-stack > .panel-heading {
  position: relative; margin: 0; padding: 18px var(--card-pad) 18px calc(var(--card-pad) + 6px);
  border: 1px solid var(--card-border); border-radius: var(--card-radius);
  background: var(--card-bg); box-shadow: var(--card-shadow); overflow: hidden; align-items: center;
}
#mainApp .ui-stack > .panel-heading::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--head-accent); }
#mainApp .ui-stack > .panel-heading h2, #mainApp .ui-stack > .panel-heading h3 { margin-bottom: 2px; }
#mainApp .ui-stack > .panel-heading .section-subtitle { margin: 0; }

/* Thẻ chuẩn */
#mainApp .ui-card {
  margin: 0; padding: var(--card-pad);
  border: 1px solid var(--card-border); border-radius: var(--card-radius);
  background: var(--card-bg); box-shadow: var(--card-shadow);
}
#mainApp .ui-card[hidden] { display: none !important; }
#mainApp .ui-card.ui-accent-success { border-left: 5px solid #16a34a; }
#mainApp .ui-card.ui-accent-warning { border-left: 5px solid #d4a657; }
body[data-style="brand"] #mainApp .ui-card.ui-accent-success { border-left-color: #9a792f; }

/* Tiêu đề nhỏ trong thẻ */
#mainApp .ui-card-title { display: grid; gap: 3px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--card-border); }
#mainApp .ui-card-title h3 { margin: 0; font-size: 17px; }
#mainApp .ui-card-title .section-kicker { margin: 0; }
#mainApp .ui-card-title .field-help { margin: 2px 0 0; }
#mainApp .ui-card-note { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); }

/* Khối con nằm trong thẻ: bỏ khung riêng để không bị "khung trong khung" */
#mainApp .ui-filter-card > .report-period-filter,
#mainApp .ui-filter-card > .cash-dashboard-filter { margin: 0 0 12px; }
#mainApp .ui-filter-card > .filter-bar { margin: 0; }
#mainApp .ui-filter-card > .cash-dashboard-period { margin: 4px 0 0; }
#mainApp .ui-table-card > .report-list-actions { margin: 0 0 12px; }
#mainApp .ui-table-card > .pagination { margin-top: 14px; }
#mainApp .ui-table-card > .pagination:empty { display: none; }
#mainApp .ui-metrics-card > .cash-metric-grid { margin: 0 0 12px; }
#mainApp .ui-metrics-card > .cash-metric-grid:last-child { margin-bottom: 0; }
#mainApp .cash-shift-section.ui-card { border-top: 1px solid var(--card-border); padding-top: var(--card-pad); }
#mainApp .cash-shift-deleted.ui-card { padding: 6px var(--card-pad) 14px; border-style: dashed; }
#mainApp .cash-pending-held.ui-card { padding: 20px var(--card-pad); }
#mainApp .cash-report-breakdown-grid { gap: var(--card-gap); }
#mainApp .ui-stack > .toolbar { margin: 0; }
#mainApp .ui-stack > .report-summary-grid, #mainApp .ui-stack > .stats-grid { margin: 0; }

/* Thẻ giữ màu nhấn cũ của khối "Bàn giao quỹ" và "Chờ nộp bank" nhưng nền đồng bộ */
#mainApp .cash-custody-section.ui-card, #mainApp .bank-pending-section.ui-card, #mainApp .recent-transactions-section.ui-card,
#mainApp .money-entry-form.ui-card, #mainApp .cash-quick-form.ui-card { background: var(--card-bg); }

@media (max-width: 900px) {
  #mainApp { --card-gap: 14px; --card-pad: 16px; --card-radius: 16px; }
}
@media (max-width: 560px) {
  #mainApp { --card-gap: 12px; --card-pad: 13px; --card-radius: 14px; }
  #mainApp .ui-stack > .panel-heading { flex-wrap: wrap; }
}
#mainApp .grouped-data-summary.ui-card:empty { display: none; }
#mainApp .grouped-data-summary.ui-card > :first-child { margin-top: 0; }
#mainApp .grouped-data-summary.ui-card > :last-child { margin-bottom: 0; }

/* ===== Khung gộp "Thu – Chi theo nhóm & công việc" ===== */
#cashSummaryBoard { --csb-green: #047857; --csb-green-soft: #e7f7ed; --csb-red: #b91c1c; --csb-red-soft: #fbe9e8; --csb-blue: #1d4ed8; --csb-blue-soft: #e8efff; }
body[data-theme="dark"] #cashSummaryBoard { --csb-green: #6ee7b7; --csb-green-soft: rgba(16,185,129,.12); --csb-red: #fca5a5; --csb-red-soft: rgba(239,68,68,.12); --csb-blue: #93c5fd; --csb-blue-soft: rgba(59,130,246,.14); }
.csb-head h3 { font-size: 18px; }
.csb-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.csb-kpi { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-soft); min-width: 0; }
.csb-kpi span { font-size: 12px; font-weight: 700; color: var(--muted); }
.csb-kpi strong { font-size: clamp(18px, 1.7vw, 24px); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csb-kpi small { font-size: 11px; color: var(--muted); }
.csb-kpi.is-receipt { background: var(--csb-green-soft); border-color: transparent; } .csb-kpi.is-receipt strong { color: var(--csb-green); }
.csb-kpi.is-payment { background: var(--csb-red-soft); border-color: transparent; } .csb-kpi.is-payment strong { color: var(--csb-red); }
.csb-kpi.is-bank { background: var(--csb-blue-soft); border-color: transparent; } .csb-kpi.is-bank strong { color: var(--csb-blue); }
.csb-kpi.is-net-positive strong { color: var(--csb-green); } .csb-kpi.is-net-negative strong { color: var(--csb-red); }
.csb-kpi.is-net-positive, .csb-kpi.is-net-negative { border-width: 2px; }
.csb-split { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.csb-col { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface); min-width: 0; }
.csb-col.is-receipt { border-top: 4px solid var(--csb-green); } .csb-col.is-payment { border-top: 4px solid var(--csb-red); }
.csb-col-head { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px dashed var(--line); }
.csb-col-head h4 { margin: 0; font-size: 15px; flex: 1; }
.csb-col-head b { font-size: 16px; font-variant-numeric: tabular-nums; }
.csb-col.is-receipt .csb-col-head b { color: var(--csb-green); } .csb-col.is-payment .csb-col-head b { color: var(--csb-red); }
.csb-dot { width: 10px; height: 10px; border-radius: 50%; }
.csb-col.is-receipt .csb-dot { background: var(--csb-green); } .csb-col.is-payment .csb-dot { background: var(--csb-red); }
.csb-groups { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 360px; overflow: auto; }
.csb-group { display: grid; gap: 5px; }
.csb-group-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.csb-group-name { font-weight: 700; font-size: 13px; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csb-group-top strong { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.csb-bar { height: 7px; border-radius: 999px; background: var(--surface-soft); overflow: hidden; }
.csb-bar i { display: block; height: 100%; border-radius: inherit; }
.csb-col.is-receipt .csb-bar i { background: var(--csb-green); } .csb-col.is-payment .csb-bar i { background: var(--csb-red); }
.csb-group small { font-size: 11px; color: var(--muted); }
.csb-empty { padding: 10px 0; color: var(--muted); font-size: 13px; }
.csb-subhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.csb-subhead h4 { margin: 0; font-size: 15px; }
.csb-subhead span { font-size: 12px; color: var(--muted); }
.csb-task-table tfoot td { font-weight: 800; border-top: 2px solid var(--line); background: var(--surface-soft); }
@media (max-width: 1100px) { .csb-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 760px) { .csb-split { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .csb-kpis { grid-template-columns: 1fr; } }
#cashSummaryBoard .csb-split { margin-bottom: 0; }

/* Ẩn khung "Quỹ theo người giữ / Tiền nhân viên đang bàn giao" ở trang Ghi nhận tiền (theo yêu cầu) */
#cashCustodySection { display: none !important; }

/* GHI NHANH được chọn: nổi bật giống thẻ THU/CHI đang chọn */
.report-priority-option.cash-quick-option.is-active { background: linear-gradient(145deg, #fff7e0, #fdecc2); box-shadow: 0 10px 24px rgba(212,166,87,.25); border-width: 2px; }
body[data-theme="dark"] .report-priority-option.cash-quick-option.is-active { background: rgba(212,166,87,.16); }
.quick-entry-panel .cash-quick-amount-words { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

/* ===== Bảng phân quyền nhân viên ===== */
#editAccountModal.has-permissions { width: min(94vw, 760px); }
.perm-editor { margin: 4px 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.perm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.perm-head h4 { margin: 2px 0 4px; font-size: 16px; }
.perm-head .field-help { margin: 0; max-width: 460px; }
.perm-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.perm-groups { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.perm-group { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; transition: border-color .2s, opacity .2s; }
.perm-group.is-on { border-color: rgba(22,163,74,.45); }
.perm-group.is-off { opacity: .85; }
.perm-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer; }
.perm-group.is-on .perm-group-head { background: rgba(22,163,74,.07); }
.perm-group-title { display: grid; gap: 2px; min-width: 0; }
.perm-group-title strong { font-size: 14px; }
.perm-group-title small { font-size: 11px; color: var(--muted); }
.perm-switch { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.perm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.perm-switch i { width: 40px; height: 22px; border-radius: 999px; background: #c9c3b8; position: relative; transition: background .2s; }
.perm-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.perm-switch input:checked + i { background: #16a34a; }
.perm-switch input:checked + i::after { transform: translateX(18px); }
.perm-switch input:focus-visible + i { outline: 2px solid #b0843a; outline-offset: 2px; }
.perm-switch em { font-style: normal; font-size: 12px; font-weight: 700; min-width: 26px; color: var(--muted); }
.perm-group.is-on .perm-switch em { color: #15803d; }
.perm-actions { display: grid; gap: 2px; padding: 6px 14px 12px; border-top: 1px dashed var(--line); }
.perm-action { display: flex; align-items: flex-start; gap: 9px; padding: 6px 0; cursor: pointer; }
.perm-action input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: #16a34a; flex: none; }
.perm-action span { display: grid; gap: 1px; }
.perm-action b { font-size: 13px; font-weight: 650; }
.perm-action small { font-size: 11px; color: var(--muted); }
.perm-action.is-disabled { cursor: not-allowed; opacity: .55; }
.perm-summary { margin: 10px 0 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.perm-summary.is-changed { color: #b45309; }
body[data-theme="dark"] .perm-switch i { background: #4b4f5c; }
@media (max-width: 640px) { .perm-groups { grid-template-columns: 1fr; } }
.perm-leader-badge { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .02em; color: #92400e; background: rgba(245,158,11,.18); vertical-align: middle; }
body[data-theme="dark"] .perm-leader-badge { color: #fcd34d; background: rgba(245,158,11,.16); }
.perm-none { margin: 0; padding: 8px 14px 12px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.perm-group-title small { line-height: 1.35; }

/* ===== Thanh phân trang: gọn, nhẹ, đồng bộ với dòng "Hiển thị …" ===== */
#mainApp .pagination { gap: 10px; }
#mainApp .pagination .pagination-info { font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
#mainApp .pagination .pagination-size {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  padding-right: 12px; border-right: 1px solid var(--line);
  font-size: 12px; font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0;
}
#mainApp .pagination .pagination-size > span { font-size: 12px; font-weight: 400; color: var(--muted); }
#mainApp .pagination .pagination-size-select {
  width: auto; min-width: 0; height: 30px; min-height: 30px; padding: 0 24px 0 12px;
  font: inherit; font-size: 12px; font-weight: 500; color: var(--ink);
  background-color: transparent; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: none; cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
#mainApp .pagination .pagination-size-select:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); background-color: var(--surface-soft); }
#mainApp .pagination .pagination-size-select:focus-visible { outline: 2px solid color-mix(in srgb, var(--primary) 40%, transparent); outline-offset: 1px; }
#mainApp .pagination .btn {
  height: 30px; min-height: 30px; padding: 0 14px; border-radius: 999px;
  font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--muted);
  background: transparent; border: 1px solid var(--line); box-shadow: none;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
#mainApp .pagination .btn:hover:not(:disabled) { color: var(--ink); background: var(--surface-soft); border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
#mainApp .pagination .btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 900px) {
  #mainApp .pagination .pagination-size { padding-right: 0; border-right: 0; }
}

/* ===== Cài đặt: tab Công việc / Tài khoản / Tuỳ chỉnh ===== */
.ui-config-hidden { display: none !important; }
#mainApp .settings-header-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
#mainApp .settings-header h2 { margin: 2px 0 4px; }
#mainApp .settings-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); }
#mainApp .settings-tab {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px; border: 0; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: transparent; cursor: pointer;
  transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
#mainApp .settings-tab:hover { color: var(--ink); }
#mainApp .settings-tab.is-active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
#mainApp .settings-tab[hidden] { display: none; }
#mainApp .custom-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
#mainApp .custom-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 12px; }
#mainApp .custom-nav-head { margin: 12px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
#mainApp .custom-nav-head:first-child { margin-top: 0; }
#mainApp .custom-nav button {
  text-align: left; padding: 9px 12px; border: 0; border-radius: 10px; font: inherit; font-size: 13px; font-weight: 500;
  color: var(--ink); background: transparent; cursor: pointer;
}
#mainApp .custom-nav button:hover { background: var(--surface-soft); }
#mainApp .custom-nav button.is-active { background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--ink); font-weight: 700; }
#mainApp .custom-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--surface); }
#mainApp .custom-head h3 { margin: 2px 0 10px; }
#mainApp .custom-hint { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.5; }
#mainApp .custom-subhead { margin: 18px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
#mainApp .custom-row {
  display: grid; grid-template-columns: minmax(180px, 38%) minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 9px 10px; border-radius: 10px; border-left: 3px solid transparent;
}
#mainApp .custom-row + .custom-row { border-top: 1px dashed var(--line); }
#mainApp .custom-row.changed { border-left-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent); }
#mainApp .custom-row .cr-label { font-size: 13px; font-weight: 600; color: var(--ink); }
#mainApp .custom-row .cr-label small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 400; color: var(--muted); word-break: break-word; }
#mainApp .custom-row input[type="text"] { width: 100%; min-height: 36px; font-size: 13px; }
#mainApp .custom-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
#mainApp .custom-toggle input { width: 18px; height: 18px; accent-color: var(--primary); }
#mainApp .custom-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
#mainApp .custom-section > .btn { margin: 0 0 14px; }
@media (max-width: 900px) {
  #mainApp .custom-grid { grid-template-columns: 1fr; }
  #mainApp .custom-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  #mainApp .custom-nav-head { width: 100%; margin: 6px 4px 2px; }
  #mainApp .custom-row { grid-template-columns: 1fr; gap: 6px; }
  #mainApp .settings-tabs { width: 100%; }
  #mainApp .settings-tab { flex: 1; justify-content: center; padding: 0 8px; }
}

/* ===== Chốt sổ tháng ===== */
#monthCloseSection .mc-status{font-size:14px;line-height:1.5}
#monthCloseSection .mc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
#monthCloseSection .mc-title-row{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap}
#monthCloseSection .mc-month-pick{margin:0;min-width:160px}
#monthCloseSection .mc-figures{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
#monthCloseSection .mc-strong strong{color:var(--success,#15803d)}
#monthCloseSection .mc-step{margin:18px 0 8px;font-size:15px}
#monthCloseSection .mc-warn{border:1px solid rgba(217,119,6,.45);background:rgba(245,158,11,.10);border-radius:10px;padding:10px 12px;margin:8px 0;font-size:13.5px;line-height:1.5}
#monthCloseSection .mc-warn ul{margin:6px 0 0 18px;padding:0}
#monthCloseSection .mc-ok{color:var(--success,#15803d);font-weight:600}
#monthCloseSection .mc-bad{color:var(--danger,#dc2626);font-weight:600}
#monthCloseSection .mc-radio{display:flex;gap:8px;align-items:flex-start;margin:6px 0;font-size:13.5px;cursor:pointer}
#monthCloseSection .mc-plan p{margin:22px 0 0;line-height:1.7;font-size:13.5px}
#monthCloseSection .mc-carry{color:var(--success,#15803d)}
#monthCloseSection .mc-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:10px}
#monthCloseSection .mc-record{display:grid;gap:4px;font-size:13.5px}
#monthCloseSection .mc-record-head{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
#monthCloseSection .mc-tag{font-size:12px;padding:2px 8px;border-radius:999px;background:rgba(100,116,139,.15)}
#monthCloseSection .mc-tag.is-closed{background:rgba(22,163,74,.14);color:var(--success,#15803d)}
.mc-confirm{position:fixed;inset:0;z-index:4000;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;padding:16px}
.mc-confirm[hidden]{display:none}
.mc-confirm-box{max-width:460px;width:100%;box-shadow:0 20px 50px rgba(0,0,0,.25)}
.mc-confirm-box p{line-height:1.55}
@media (max-width:900px){#monthCloseSection .mc-grid{grid-template-columns:1fr}#monthCloseSection .mc-plan p{margin-top:0}}

  /* ===== Tra cứu chung (kt-search.js) ===== */
  .kts-card { display: grid; gap: 12px; }
  .kts-row-form { display: grid; grid-template-columns: minmax(0, 1fr) 170px 170px auto; gap: 10px; align-items: end; }
  .kts-box { position: relative; display: block; margin: 0; }
  .kts-box .kts-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--muted); pointer-events: none; }
  .kts-box input { width: 100%; min-height: 50px; padding-left: 42px; font-size: 15px; }
  .kts-date { margin: 0; }
  .kts-btns { display: flex; gap: 8px; }
  .kts-tips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
  .kts-tips > span:first-child { font-weight: 700; color: var(--ink); }
  .kts-eg { border: 1px solid var(--line); background: var(--surface-soft); color: var(--ink); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
  .kts-eg:hover { border-color: var(--primary); color: var(--primary); }
  .kts-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
  .kts-groups { display: flex; flex-wrap: wrap; gap: 6px; }
  .kts-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-soft); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
  .kts-chip .kts-n { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--line); font-size: 11.5px; text-align: center; }
  .kts-chip.is-active { border-color: var(--primary); color: var(--primary); background: var(--surface); box-shadow: 0 2px 8px rgba(79, 70, 229, .12); }
  .kts-chip.is-receipt.is-active { border-color: var(--success); color: var(--success); }
  .kts-chip.is-payment.is-active { border-color: var(--danger); color: var(--danger); }
  .kts-chip.is-bank.is-active { border-color: var(--info); color: var(--info); }
  .kts-meta { font-size: 12.5px; color: var(--muted); }
  .kts-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
  .kts-table th { text-align: left; padding: 10px 12px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
  .kts-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  .kts-table th.kts-num, .kts-table td.kts-amount { text-align: right; }
  .kts-row { cursor: pointer; }
  .kts-row:hover td, .kts-row:focus td { background: var(--surface-soft); }
  .kts-row:focus { outline: none; }
  .kts-date strong { display: block; white-space: nowrap; }
  .kts-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
  .kts-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--surface-soft); color: var(--muted); white-space: nowrap; }
  .kts-tag.is-receipt { color: var(--success); background: rgba(22, 163, 106, .12); }
  .kts-tag.is-payment { color: var(--danger); background: rgba(229, 72, 77, .12); }
  .kts-tag.is-bank { color: var(--info); background: rgba(15, 159, 189, .12); }
  .kts-detail .kts-line, .kts-detail .kts-fields { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
  .kts-detail .kts-k { font-weight: 600; color: var(--ink); }
  .kts-amount strong { white-space: nowrap; }
  .kts-amount.is-receipt strong { color: var(--success); } .kts-amount.is-payment strong { color: var(--danger); }
  .kts-empty { text-align: center; padding: 28px 12px !important; }
  .kts-empty strong { display: block; }
  .kts-results mark { background: #fde68a; color: inherit; border-radius: 3px; padding: 0 1px; }
  body[data-theme="dark"] .kts-results mark { background: rgba(250, 204, 21, .35); }
  @media (max-width: 900px) { .kts-row-form { grid-template-columns: 1fr 1fr; } .kts-box, .kts-btns { grid-column: 1 / -1; } .kts-btns .btn { flex: 1; } }

/* Nút xoá tên trong danh sách gợi ý danh bạ (Leader) */
.quick-contact-row { display: flex; align-items: center; gap: 4px; }
.quick-contact-row .quick-contact-option { flex: 1; min-width: 0; }
.quick-contact-remove { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 18px; line-height: 1; cursor: pointer; }
.quick-contact-remove:hover, .quick-contact-remove:focus-visible { outline: 0; color: #b42318; background: rgba(220,38,38,.12); }

/* Khối thu gọn / mở rộng trong Báo cáo dòng tiền */
.kt-collapse-head { cursor: pointer; }
.kt-collapse-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.cash-report-section-heading > .kt-collapse-bar { margin-top: 0; margin-left: auto; }
.kt-collapse-summary { color: var(--muted); font-size: 13px; font-weight: 600; }
.kt-collapse-toggle { margin-left: auto; padding: 6px 14px; border: 1px solid var(--card-border, #ead9bc); border-radius: 999px; color: inherit; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.kt-collapse-toggle:hover, .kt-collapse-toggle:focus-visible { outline: 0; background: rgba(201,151,74,.14); }
.kt-collapse-hidden { display: none !important; }
.kt-collapsible.is-collapsed .csb-kpis { margin-bottom: 0; }

/* Tổng quan: Thu – Chi theo nhóm; Báo cáo dòng tiền: một dòng tóm tắt */
#cashSummaryBoard.is-leader-hidden { display: none !important; }
#mainApp #cashSummaryBoard > .csb-head { position: relative; }
#mainApp #cashSummaryBoard.is-collapsed > .csb-head { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
@media (min-width: 761px) {
  #cashSummaryBoard .csb-head .kt-collapse-bar { position: absolute; right: 0; top: 0; margin: 0; }
}
#mainApp .cash-summary-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 28px; padding: 13px var(--card-pad); }
#mainApp .cash-summary-line:empty { display: none; }
.csl-item { display: inline-flex; align-items: baseline; gap: 7px; font-size: 13px; white-space: nowrap; }
.csl-item i { font-style: normal; font-weight: 600; color: var(--muted); }
.csl-item strong { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.csl-item small { font-size: 11.5px; color: var(--muted); }
.csl-item.is-receipt strong { color: #047857; } .csl-item.is-payment strong { color: #b91c1c; } .csl-item.is-bank strong { color: #1d4ed8; } .csl-item.is-pending strong { color: #a16207; }
body[data-theme="dark"] .csl-item.is-receipt strong { color: #6ee7b7; } body[data-theme="dark"] .csl-item.is-payment strong { color: #fca5a5; } body[data-theme="dark"] .csl-item.is-bank strong { color: #93c5fd; } body[data-theme="dark"] .csl-item.is-pending strong { color: #fcd34d; }

/* Cài đặt → Nhật ký (thanh lọc ngang giống trang công nợ) */
.kt-audit-bar { display: grid; gap: 12px; margin-bottom: 16px; }
.kt-ab-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.kt-ab-row[hidden] { display: none; }
.kt-af-field { display: grid; gap: 6px; min-width: 0; }
.kt-af-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.kt-ab-q { flex: 2 1 240px; }
.kt-ab-q input { width: 100%; min-height: 44px; }
.kt-ab-users { flex: 1 1 190px; }
.kt-seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.kt-seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font: inherit; font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.kt-seg button.is-active { background: var(--surface); color: #8a6420; box-shadow: 0 2px 8px rgba(72,43,14,.1); }
.kt-ab-range[hidden] { display: none; }
.kt-ab-range-in { display: flex; align-items: center; gap: 6px; }
.kt-ab-range-in input { min-width: 150px; }
.kt-ab-range-in > span { color: var(--muted); }
.kt-ab-more { min-height: 44px; white-space: nowrap; }
.kt-ab-more .kt-ab-caret { margin-left: 6px; display: inline-block; transition: transform .15s; }
.kt-ab-more.is-open .kt-ab-caret { transform: rotate(180deg); }
.kt-ab-more-n { color: #8a6420; font-weight: 800; }
.kt-ab-extra { padding-top: 12px; border-top: 1px dashed var(--line); }
.kt-ab-extra > .kt-af-field { flex: 1 1 220px; }
.kt-ab-active { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.kt-ab-active-label { color: var(--muted); font-weight: 600; }
.kt-ab-chips { display: contents; }
.kt-ab-chip { display: inline-flex; align-items: center; gap: 2px; padding: 3px 6px 3px 11px; border-radius: 999px; background: #f6e7c6; color: #6b4612; font-weight: 700; font-size: 12.5px; }
.kt-ab-chip:not(:has(button)) { padding-right: 11px; }
.kt-ab-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.kt-link-btn { border: 0; background: transparent; padding: 0 4px; color: #8a6420; font-weight: 700; font-size: 13px; text-decoration: underline; cursor: pointer; }
.kt-ab-count { margin-left: auto; color: var(--muted); font-size: 13px; }
.kt-ms { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 44px; padding: 6px 30px 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.kt-ms::after { content: '▾'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
.kt-ms.open, .kt-ms:focus-visible { outline: 0; border-color: #c9974a; }
.kt-ms-ph { color: var(--muted); font-size: 14px; padding-left: 4px; }
.kt-ms-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 10px; border-radius: 8px; background: #8a6420; color: #fff; font-size: 12.5px; font-weight: 700; }
.kt-ms-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kt-ms-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; }
.kt-ms-pop { position: absolute; left: -1px; right: -1px; top: calc(100% + 4px); z-index: 30; display: grid; gap: 4px; min-width: 220px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 14px 30px rgba(40,25,10,.18); cursor: default; }
.kt-ms-list { display: grid; gap: 2px; max-height: 240px; overflow: auto; }
.kt-ms-list label { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.kt-ms-list label:hover { background: var(--surface-soft); }
.kt-ms-list input { width: 16px; height: 16px; margin: 0; accent-color: #b8862f; }
.kt-ms-empty { color: var(--muted); font-size: 13px; padding: 4px 6px; }
.kt-audit-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kt-audit-table th { text-align: left; padding: 10px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.kt-audit-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.kt-audit-table td small { display: block; color: var(--muted); font-size: 11.5px; }
.kt-audit-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.kt-audit-empty { text-align: center; color: var(--muted); padding: 28px 12px !important; }
.kt-audit-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-soft); border: 1px solid var(--line); }
.kt-audit-tag.is-add { background: #e7f7ed; color: #047857; border-color: transparent; }
.kt-audit-tag.is-edit { background: #fff4dc; color: #8a5a00; border-color: transparent; }
.kt-audit-tag.is-del { background: #fbe9e8; color: #b91c1c; border-color: transparent; }
.kt-audit-tag.is-ok { background: #e8efff; color: #1d4ed8; border-color: transparent; }
.kt-audit-tag.is-lock { background: #efe7ff; color: #6d28d9; border-color: transparent; }
.kt-audit-content { min-width: 320px; }
.kt-audit-title { font-weight: 700; }
.kt-audit-note, .kt-audit-sub { margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.kt-audit-tx { display: flex; flex-wrap: wrap; gap: 3px 16px; margin-top: 5px; padding: 6px 10px; border-left: 3px solid var(--line); border-radius: 0 8px 8px 0; background: var(--surface-soft); font-size: 12.5px; }
.kt-audit-tx.is-receipt { border-left-color: #15966a; } .kt-audit-tx.is-payment { border-left-color: #d94a50; } .kt-audit-tx.is-bank { border-left-color: #7157c8; }
.kt-audit-kv i, .kt-audit-changes i { margin-right: 5px; font-style: normal; color: var(--muted); }
.kt-audit-kv b { font-weight: 600; word-break: break-word; }
.kt-audit-changes s { color: var(--muted); }
.kt-audit-changes b { font-weight: 700; color: var(--ink); }
.kt-audit-tag.is-entity.is-receipt { background: #e7f7ed; color: #047857; border-color: transparent; }
.kt-audit-tag.is-entity.is-payment { background: #fbe9e8; color: #b91c1c; border-color: transparent; }
.kt-audit-tag.is-entity.is-bank { background: #efe7ff; color: #6d28d9; border-color: transparent; }
.kt-audit-content details { margin-top: 4px; }
.kt-audit-content summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.kt-audit-content ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); word-break: break-word; }
@media (max-width: 720px) {
  .kt-ab-row > * { flex: 1 1 100%; min-width: 0; }
  .kt-seg { display: flex; width: 100%; }
  .kt-seg button { flex: 1 1 0; padding: 7px 4px; font-size: 13px; }
  .kt-ab-range-in input { min-width: 0; flex: 1 1 0; }
  .kt-ab-count { width: 100%; margin-left: 0; }
}

/* ---------- Điện thoại (cn session, 2026-12-01) ---------- */
/* iPhone/iPad (Safari) tự vẽ chữ ngày kiểu "ngày 1 thg 12, 2026" chồng lên lớp dd/mm/yyyy: chỉ ẩn phần chữ gốc.
   Không đổi color vì app.js chép màu chữ của ô sang .kt-date-text. */
@supports (-webkit-touch-callout: none) {
  .kt-date-field input { -webkit-appearance: none; appearance: none; -webkit-text-fill-color: transparent; }
  .kt-date-field input::-webkit-date-and-time-value { opacity: 0; }
}
@media (max-width: 720px) {
  /* < 16px làm iPhone tự phóng to khi chạm vào ô */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea { font-size: 16px !important; }
}
@media (max-width: 600px) {
  .overview-refresh-control { flex-wrap: wrap; min-width: 0; max-width: 100%; }
  .panel-heading-with-action > .overview-refresh-control { width: 100%; }
  .overview-refresh-control .btn { white-space: normal; }
  .kts-row-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kts-row-form > * { min-width: 0; }
  .kts-row-form > .kts-box, .kts-row-form > .kts-btns { grid-column: 1 / -1; }
  .kts-row-form .kt-date-field input { min-width: 0; width: 100%; }
  #styleModeSelect { min-width: 78px; width: auto; }
}

/* Ghi nhận tiền: ô số tiền tính vào sổ quỹ (màu theo mục đang chọn) */
#mainApp .is-money-primary { --mf: var(--task-accent, #c58625); --mf-ink: color-mix(in srgb, var(--mf) 72%, #20160c); }
#mainApp .form-group.is-money-primary > label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#mainApp .money-field-badge { display: inline-flex; align-items: center; padding: 1px 8px; border: 1px solid color-mix(in srgb, var(--mf) 32%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--mf) 9%, transparent); color: var(--mf-ink); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; line-height: 1.6; white-space: nowrap; }
#mainApp .form-group.is-money-primary input { min-height: 48px; padding-left: 14px; border-color: color-mix(in srgb, var(--mf) 45%, transparent); background: color-mix(in srgb, var(--mf) 4%, #fffefb); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; color: var(--mf-ink); box-shadow: inset 3px 0 0 var(--mf); transition: border-color .15s, box-shadow .15s; }
#mainApp .form-group.is-money-primary input::placeholder { font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
#mainApp .form-group.is-money-primary input:focus { outline: 0; border-color: var(--mf); box-shadow: inset 3px 0 0 var(--mf), 0 0 0 3px color-mix(in srgb, var(--mf) 18%, transparent); }
#mainApp .form-group.is-money-primary .currency-input-suffix { font-weight: 700; color: var(--mf-ink); }
#mainApp .form-group.is-money-primary .cash-quick-amount-words { color: var(--mf-ink); font-weight: 600; }
#mainApp .form-group.is-money-secondary input { font-variant-numeric: tabular-nums; }
body[data-theme="dark"] #mainApp .is-money-primary { --mf-ink: color-mix(in srgb, var(--mf) 48%, #fff); }
body[data-theme="dark"] #mainApp .form-group.is-money-primary input { background: color-mix(in srgb, var(--mf) 8%, transparent); }

.quick-extra-fields { display: contents; }
.quick-entry-panel .form-grid:has(> #quickFields:not([hidden]) > .form-group:first-child:not(.span-all)) > .quick-note-group { grid-column: auto; }
.quick-extra-fields[hidden] { display: none; }
.kts-amount .kts-hit { padding: 2px 7px; border-radius: 7px; background: #fff0c2; }
body[data-theme="dark"] .kts-amount .kts-hit { background: rgba(212,166,87,.28); }
/* Nhập tiền thông minh: gợi ý dưới ô số tiền */
.kt-money-hint { position: fixed; z-index: 5000; display: grid; gap: 2px; box-sizing: border-box; padding: 8px 12px; border: 1px solid #e0c48c; border-radius: 10px; background: #fffaf1; color: #4a3418; box-shadow: 0 10px 26px rgba(72,43,14,.16); font-size: 12.5px; line-height: 1.4; }
.kt-money-hint[hidden] { display: none; }
.kt-money-hint strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.kt-money-hint small { font-size: 12px; opacity: .8; }
.kt-money-hint.is-bad { border-color: #e3a19c; color: #a02a22; background: #fff5f3; }
.kt-money-chips { display: flex; gap: 8px; margin-top: 4px; }
.kt-money-chips button { flex: 1; min-height: 40px; border: 1px solid #e0c48c; border-radius: 9px; background: #f6e7c6; color: #5c3d0f; font: inherit; font-weight: 700; cursor: pointer; }
body[data-theme="dark"] .kt-money-hint { border-color: rgba(212,166,87,.4); background: #211812; color: #f4e4c4; box-shadow: 0 10px 26px rgba(0,0,0,.5); }
body[data-theme="dark"] .kt-money-hint.is-bad { border-color: #8f4a45; color: #ffc9c3; background: #34201d; }
body[data-theme="dark"] .kt-money-chips button { border-color: rgba(212,166,87,.4); background: #3a2b1a; color: #f4e4c4; }
@media (max-width: 1280px) {
  .kt-audit-table th, .kt-audit-table td { padding: 9px 8px; }
  .kt-audit-time { white-space: normal; min-width: 78px; }
  .kt-audit-table td small { display: none; }
  .kt-audit-table td:nth-child(2) { max-width: 110px; font-size: 12.5px; }
  .kt-audit-content { min-width: 215px; }
  .kt-audit-tag { white-space: normal; }
  .kt-audit-table th { font-size: 11.5px; }
}
/* Báo cáo cuối ca: Leader duyệt báo cáo (2026-12-04) */
.shift-acc.is-approved .shift-acc-state { color: #047857; background: #e7f7ed; }
.shift-acc.is-new.is-approved { border-left-color: #15966a; }
.shift-acc.is-new.is-approved .shift-acc-new { background: #15966a; }
.cash-shift-approved { margin: 8px 0 0; padding: 7px 12px; border-radius: 9px; background: #e7f7ed; color: #047857; font-size: 13px; font-weight: 700; }
.shift-approve-btn { margin-right: 6px; }
body[data-theme="dark"] .shift-acc.is-approved .shift-acc-state, body[data-theme="dark"] .cash-shift-approved { background: rgba(21,150,106,.18); color: #7fe0b5; }
/* Kiểm đếm: thẻ mệnh giá màu nhẹ theo từng tờ tiền, 3 cột giảm dần (2026-12-04 v2) */
#cashDenominations.cash-denominations { grid-auto-flow: column; grid-template-rows: repeat(var(--denom-rows, 3), auto); gap: 12px; }
#cashDenominations .cash-denomination { --d: #9a8a6a; position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px;
  padding: 14px 14px 14px 14px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--d) 22%, #efe6d6);
  background: linear-gradient(150deg, color-mix(in srgb, var(--d) 11%, #fffdf8) 0%, #fffcf6 62%, #fffaf2 100%);
  box-shadow: 0 1px 2px rgba(60,40,10,.04); transition: border-color .2s, box-shadow .2s, background .2s; cursor: text; }
#cashDenominations .cash-denomination:hover { border-color: color-mix(in srgb, var(--d) 38%, #efe6d6); }
#cashDenominations .cash-denomination-chip { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 900; letter-spacing: -.01em; color: color-mix(in srgb, var(--d) 88%, #1f160c);
  background: color-mix(in srgb, var(--d) 13%, #ffffff); border: 1px solid color-mix(in srgb, var(--d) 14%, transparent); }
#cashDenominations .cash-denomination-label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#cashDenominations .cash-denomination-face { font-weight: 800; font-size: 15.5px; color: color-mix(in srgb, var(--d) 82%, #2b2118); white-space: nowrap; }
#cashDenominations .cash-denomination { border-left: 4px solid color-mix(in srgb, var(--d) 55%, #fff); padding-left: 16px; }
#cashDenominations .cash-denomination.is-filled { border-left-color: var(--d); }
#cashDenominations .cash-denomination-sub { font-size: 12.5px; font-weight: 800; color: color-mix(in srgb, var(--d) 85%, #2b2118); min-height: 1.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#cashDenominations .cash-denomination input { width: 84px; height: 44px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--d) 26%, #e6dccb);
  background: rgba(255,255,255,.85); font-size: 17px; font-weight: 800; text-align: right; padding: 0 12px; color: #2b2118; }
#cashDenominations .cash-denomination-sub:empty { display: none; }
#cashDenominations .cash-denomination input::placeholder { color: #c9bda8; font-weight: 700; }
#cashDenominations .cash-denomination input:focus { outline: none; border-color: color-mix(in srgb, var(--d) 70%, #fff); box-shadow: 0 0 0 4px color-mix(in srgb, var(--d) 16%, transparent); background: #fff; }
#cashDenominations .cash-denomination:focus-within { border-color: color-mix(in srgb, var(--d) 45%, #efe6d6); box-shadow: 0 6px 18px color-mix(in srgb, var(--d) 14%, transparent); }
#cashDenominations .cash-denomination.is-filled { border-color: color-mix(in srgb, var(--d) 42%, #efe6d6);
  background: linear-gradient(150deg, color-mix(in srgb, var(--d) 20%, #fffdf8) 0%, color-mix(in srgb, var(--d) 6%, #fffcf6) 70%); }
#cashDenominations .cash-denomination.is-filled .cash-denomination-chip { background: var(--d); color: #fff; border-color: transparent; }
#cashDenominations .is-d500000 { --d: #2f8ea3; } #cashDenominations .is-d200000 { --d: #c8623d; } #cashDenominations .is-d100000 { --d: #3f8f5a; }
#cashDenominations .is-d50000 { --d: #b8577f; } #cashDenominations .is-d20000 { --d: #3e74b6; } #cashDenominations .is-d10000 { --d: #b98a2e; }
#cashDenominations .is-d5000 { --d: #5d78a3; } #cashDenominations .is-d2000 { --d: #a5714c; } #cashDenominations .is-d1000 { --d: #8a7a66; }
@media (max-width: 600px) { #cashDenominations.cash-denominations { grid-auto-flow: row; grid-template-rows: none; } }
body[data-theme="dark"] #cashDenominations .cash-denomination { background: linear-gradient(150deg, color-mix(in srgb, var(--d) 22%, #1d1610), #1a140e 70%); border-color: color-mix(in srgb, var(--d) 35%, #3a2d1f); }
body[data-theme="dark"] #cashDenominations .cash-denomination-face { color: color-mix(in srgb, var(--d) 50%, #f4e4c4); }
body[data-theme="dark"] #cashDenominations .cash-denomination-sub, body[data-theme="dark"] #cashDenominations .cash-denomination-chip { color: color-mix(in srgb, var(--d) 50%, #f4e4c4); }
body[data-theme="dark"] #cashDenominations .cash-denomination-chip { background: color-mix(in srgb, var(--d) 22%, #1d1610); }
body[data-theme="dark"] #cashDenominations .cash-denomination input { background: #140f0a; color: #f4e4c4; border-color: color-mix(in srgb, var(--d) 35%, #3a2d1f); }
/* Báo cáo cuối ca: ngày ca làm dòng chính, người gửi dòng phụ (2026-12-04) */
.shift-acc-title strong { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.shift-acc-version { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #8a5a00; background: #fff4dc; }
.shift-acc-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-acc-sub .shift-acc-name { font-weight: 700; color: var(--ink, #2b2118); letter-spacing: .01em; }
body[data-theme="dark"] .shift-acc-version { background: rgba(212,166,87,.18); color: #f4d9a6; }
body[data-theme="dark"] .shift-acc-sub .shift-acc-name { color: #f4e4c4; }
/* Kiểm đếm → Đối chiếu với sổ: thẻ màu nhẹ có biểu tượng (2026-12-04) */
.kt-recon .cash-count-total { --c: #9a8a6a; position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 16px 18px 15px;
  border-radius: 18px; border: 1px solid color-mix(in srgb, var(--c) 20%, #eee4d3);
  background: linear-gradient(155deg, color-mix(in srgb, var(--c) 10%, #fffdf8) 0%, #fffcf6 58%, #fffaf2 100%);
  box-shadow: 0 1px 2px rgba(60,40,10,.04); transition: border-color .25s, box-shadow .25s, background .25s, opacity .25s; }
.kt-recon .kt-recon-actual { --c: #b07a2a; } .kt-recon .kt-recon-book { --c: #3e74b6; }
.kt-recon .cash-count-excess { --c: #2f8a5b; } .kt-recon .cash-count-shortage { --c: #c4514c; }
.kt-recon .kt-recon-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kt-recon .kt-recon-head > span:last-child { color: #7a6a55; font-size: 13.5px; font-weight: 800; }
.kt-recon .kt-recon-icon { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  color: color-mix(in srgb, var(--c) 90%, #1f160c); background: color-mix(in srgb, var(--c) 12%, #ffffff); border: 1px solid color-mix(in srgb, var(--c) 12%, transparent); }
.kt-recon .kt-recon-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.kt-recon .cash-count-total strong { font-size: clamp(20px, 2.1vw, 28px); font-weight: 800; letter-spacing: -.015em; line-height: 1.1; color: #241a10; }
.kt-recon .kt-recon-cap { color: #8f806b; font-size: 12.5px; font-weight: 600; }
/* Thừa / Thiếu: mờ khi không có chênh lệch, nổi màu khi đang thừa/thiếu */
.kt-recon .cash-count-excess:not(.is-active), .kt-recon .cash-count-shortage:not(.is-active) { --c: #a79a86; }
.kt-recon .cash-count-excess:not(.is-active) strong, .kt-recon .cash-count-shortage:not(.is-active) strong { color: #b3a690; }
.kt-recon .cash-count-total.is-active { border-color: color-mix(in srgb, var(--c) 38%, #eee4d3); box-shadow: 0 8px 22px color-mix(in srgb, var(--c) 12%, transparent);
  background: linear-gradient(155deg, color-mix(in srgb, var(--c) 15%, #fffdf8) 0%, color-mix(in srgb, var(--c) 4%, #fffcf6) 70%); }
.kt-recon .cash-count-total.is-active strong { color: color-mix(in srgb, var(--c) 92%, #1f160c); }
.kt-recon .cash-count-total.is-active .kt-recon-icon { background: var(--c); color: #fff; border-color: transparent; }
/* Dòng kết luận bên dưới */
.kt-recon ~ .cash-count-result { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; font-size: 14px;
  border: 1px solid #eee4d3; background: #fbf6ec; color: #6b5a45; }
.kt-recon ~ .cash-count-result::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 15%, transparent); }
.kt-recon ~ .cash-count-result.is-match { color: #2f7a52; background: #eef7f1; border-color: #d3eadb; }
.kt-recon ~ .cash-count-result.is-excess { color: #2f7a52; background: #eef7f1; border-color: #d3eadb; }
.kt-recon ~ .cash-count-result.is-shortage { color: #b4433f; background: #fbefed; border-color: #f1d6d2; }
body[data-theme="dark"] .kt-recon .cash-count-total { background: linear-gradient(155deg, color-mix(in srgb, var(--c) 20%, #1d1610), #1a140e 70%); border-color: color-mix(in srgb, var(--c) 30%, #3a2d1f); }
body[data-theme="dark"] .kt-recon .cash-count-total strong { color: #f4e4c4; }
body[data-theme="dark"] .kt-recon .kt-recon-head > span:last-child, body[data-theme="dark"] .kt-recon .kt-recon-cap { color: #c9b796; }
body[data-theme="dark"] .kt-recon .kt-recon-icon { background: color-mix(in srgb, var(--c) 22%, #1d1610); color: color-mix(in srgb, var(--c) 55%, #f4e4c4); }
body[data-theme="dark"] .kt-recon .cash-count-total.is-active strong { color: color-mix(in srgb, var(--c) 55%, #f4e4c4); }
/* Kiểm đếm: thu gọn cỡ chữ, số và ô cho thanh thoát hơn (2026-12-04 v3) */
#cashDenominations.cash-denominations { gap: 10px; }
#cashDenominations .cash-denomination { padding: 9px 10px 9px 14px; border-radius: 13px; border-left-width: 3px; gap: 10px; box-shadow: none; }
#cashDenominations .cash-denomination-face { font-size: 13.5px; font-weight: 700; letter-spacing: .005em; }
#cashDenominations .cash-denomination-sub { font-size: 11.5px; font-weight: 600; }
#cashDenominations .cash-denomination input { width: 112px; height: 34px; border-radius: 9px; font-size: 14.5px; font-weight: 700; padding: 0 10px; }
#cashDenominations .cash-denomination:focus-within { box-shadow: 0 4px 12px color-mix(in srgb, var(--d) 10%, transparent); }
#cashDenominations .cash-denomination input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--d) 14%, transparent); }
.kt-recon.cash-count-totals { gap: 10px; margin: 12px 0 10px; }
.kt-recon .cash-count-total { gap: 7px; padding: 12px 14px 11px; border-radius: 13px; box-shadow: none; }
.kt-recon .kt-recon-head { gap: 8px; }
.kt-recon .kt-recon-head > span:last-child { font-size: 12.5px; font-weight: 700; }
.kt-recon .kt-recon-icon { width: 26px; height: 26px; border-radius: 8px; }
.kt-recon .kt-recon-icon svg { width: 14px; height: 14px; stroke-width: 1.8; }
.kt-recon .cash-count-total strong { font-size: clamp(17px, 1.55vw, 21px); font-weight: 700; letter-spacing: -.01em; }
.kt-recon .kt-recon-cap { font-size: 11.5px; font-weight: 500; }
.kt-recon .cash-count-total.is-active { box-shadow: 0 4px 14px color-mix(in srgb, var(--c) 9%, transparent); }
.kt-recon ~ .cash-count-result { padding: 9px 13px; border-radius: 11px; font-size: 13px; font-weight: 600; gap: 9px; }
.kt-recon ~ .cash-count-result::before { width: 6px; height: 6px; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); }
/* Ô số tờ: đủ rộng cho 6 chữ số, ẩn nút tăng/giảm để không che số */
#cashDenominations .cash-denomination input { -moz-appearance: textfield; appearance: textfield; min-width: 0; }
#cashDenominations .cash-denomination input::-webkit-outer-spin-button, #cashDenominations .cash-denomination input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 1100px) and (min-width: 601px) { #cashDenominations .cash-denomination input { width: 96px; } }

/* Chốt sổ tháng: thẻ số liệu có màu, lựa chọn chênh lệch, kế hoạch bank (2026-12-04) */
#monthCloseSection .mc-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 10px; margin: 12px 0 14px; }
#monthCloseSection .mc-fig { --c: #8a7a66; display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 12px 14px 11px; border-radius: 13px;
  border: 1px solid color-mix(in srgb, var(--c) 22%, #eee4d3); border-top: 3px solid var(--c);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 9%, #fffdf8) 0%, #fffcf6 65%); }
#monthCloseSection .mc-fig-open { --c: #7b6d5a; } #monthCloseSection .mc-fig-in { --c: #2f8a5b; } #monthCloseSection .mc-fig-out { --c: #c4514c; }
#monthCloseSection .mc-fig-bank { --c: #3e74b6; } #monthCloseSection .mc-fig-wait { --c: #b98a2e; } #monthCloseSection .mc-fig-close { --c: #b07a2a; }
#monthCloseSection .mc-fig-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
#monthCloseSection .mc-fig-icon { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  color: color-mix(in srgb, var(--c) 92%, #1f160c); background: color-mix(in srgb, var(--c) 13%, #fff); }
#monthCloseSection .mc-fig-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#monthCloseSection .mc-fig-label { color: #6f604c; font-size: 12.5px; font-weight: 700; line-height: 1.25; }
#monthCloseSection .mc-fig strong { font-size: clamp(16px, 1.45vw, 19.5px); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--c) 88%, #1f160c); }
#monthCloseSection .mc-fig small { color: #9a8b75; font-size: 11.5px; font-weight: 600; }
#monthCloseSection .mc-fig-close { border-color: color-mix(in srgb, var(--c) 45%, #eee4d3);
  background: linear-gradient(160deg, #fbf0da 0%, #fff8ea 70%); box-shadow: 0 6px 18px rgba(176,122,42,.12); }
#monthCloseSection .mc-fig-close .mc-fig-icon { background: var(--c); color: #fff; }
#monthCloseSection .mc-variance { --c: #c4514c; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; margin: 10px 0 12px;
  padding: 11px 16px; border-radius: 13px; border: 1px solid color-mix(in srgb, var(--c) 28%, #f1e4d4); border-left: 4px solid var(--c);
  background: color-mix(in srgb, var(--c) 7%, #fffcf7); }
#monthCloseSection .mc-variance.is-over, #monthCloseSection .mc-variance.is-match { --c: #2f8a5b; }
#monthCloseSection .mc-variance-main { display: flex; align-items: baseline; gap: 8px; }
#monthCloseSection .mc-variance-main span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--c); }
#monthCloseSection .mc-variance-main b { font-size: 18px; font-weight: 700; color: color-mix(in srgb, var(--c) 90%, #1f160c); font-variant-numeric: tabular-nums; white-space: nowrap; }
#monthCloseSection .mc-variance-cmp { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: #7a6a55; }
#monthCloseSection .mc-variance-cmp b { color: #3d2f1f; font-weight: 700; font-variant-numeric: tabular-nums; }
#monthCloseSection .mc-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
#monthCloseSection .mc-opt { display: flex; align-items: flex-start; gap: 11px; margin: 0; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid #eadfcc; background: #fffdf9; transition: border-color .2s, background .2s, box-shadow .2s; font-weight: 400; }
#monthCloseSection .mc-opt:hover { border-color: #d9c39a; }
#monthCloseSection .mc-opt input[type="radio"] { flex: none; width: 17px; height: 17px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: #b07a2a; box-shadow: none; }
#monthCloseSection .mc-opt:has(input:checked) { border-color: #c9a25e; background: #fdf5e6; box-shadow: 0 0 0 3px rgba(201,162,94,.16); }
#monthCloseSection .mc-opt-body { display: grid; gap: 3px; min-width: 0; text-align: left; }
#monthCloseSection .mc-opt-title { font-size: 14px; font-weight: 700; color: #3d2f1f; line-height: 1.35; }
#monthCloseSection .mc-opt-title em { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-style: normal; font-size: 11px; font-weight: 700;
  color: #2f7a52; background: #e6f4ec; vertical-align: 1px; }
#monthCloseSection .mc-opt-sub { font-size: 12.5px; color: #8a7a64; line-height: 1.45; }
#monthCloseSection .mc-plan-rows { display: grid; margin-top: 22px; border: 1px solid #eadfcc; border-radius: 12px; overflow: hidden; background: #fffdf9; }
#monthCloseSection .mc-plan-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 14px; font-size: 13.5px; color: #7a6a55; }
#monthCloseSection .mc-plan-rows > div + div { border-top: 1px dashed #eadfcc; }
#monthCloseSection .mc-plan-rows b { font-weight: 700; color: #3d2f1f; font-variant-numeric: tabular-nums; white-space: nowrap; }
#monthCloseSection .mc-plan-rows .mc-plan-bank { color: #3e74b6; }
#monthCloseSection .mc-plan-rows .is-total { background: #f1f8f3; color: #2f7a52; font-weight: 700; }
#monthCloseSection .mc-plan-rows .is-total b { color: #2f7a52; font-size: 15px; }
#monthCloseSection .mc-warn { border: 1px solid #f0dcb4; border-left: 4px solid #d29a3a; background: #fdf7ea; border-radius: 12px; padding: 10px 14px; color: #6b5233; }
@media (max-width: 900px) { #monthCloseSection .mc-plan-rows { margin-top: 0; } }
@media (max-width: 640px) { #monthCloseSection .mc-opts { grid-template-columns: 1fr; } #monthCloseSection .mc-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body[data-theme="dark"] #monthCloseSection .mc-fig { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 20%, #1d1610), #1a140e 70%); border-color: color-mix(in srgb, var(--c) 32%, #3a2d1f); border-top-color: var(--c); }
body[data-theme="dark"] #monthCloseSection .mc-fig strong { color: color-mix(in srgb, var(--c) 50%, #f4e4c4); }
body[data-theme="dark"] #monthCloseSection .mc-fig-label, body[data-theme="dark"] #monthCloseSection .mc-fig small { color: #c9b796; }
body[data-theme="dark"] #monthCloseSection .mc-opt, body[data-theme="dark"] #monthCloseSection .mc-plan-rows, body[data-theme="dark"] #monthCloseSection .mc-variance { background: #1d1610; border-color: #3a2d1f; }
body[data-theme="dark"] #monthCloseSection .mc-opt-title, body[data-theme="dark"] #monthCloseSection .mc-plan-rows b, body[data-theme="dark"] #monthCloseSection .mc-variance-cmp b { color: #f4e4c4; }
/* Chốt sổ: bảng màu theo cn.hitaothom.com */
#monthCloseSection .mc-fig { border-top-width: 1px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 11%, #fff) 0%, #fffaf1 78%); border-color: color-mix(in srgb, var(--c) 24%, #ead9bc); border-radius: 16px; padding: 13px 15px 12px; }
#monthCloseSection .mc-fig-open { --c: #806e55; } #monthCloseSection .mc-fig-in { --c: #15966a; } #monthCloseSection .mc-fig-out { --c: #c0472f; }
#monthCloseSection .mc-fig-bank { --c: #2f6fb3; } #monthCloseSection .mc-fig-wait { --c: #7a55c7; }
#monthCloseSection .mc-fig-icon { width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, #fff); }
#monthCloseSection .mc-fig-label { color: #806e55; font-weight: 600; font-size: 12px; }
#monthCloseSection .mc-fig strong { font-weight: 800; letter-spacing: -.02em; color: var(--c); }
#monthCloseSection .mc-fig-open strong { color: #24180f; }
#monthCloseSection .mc-fig small { color: #a08d70; font-weight: 500; }
#monthCloseSection .mc-fig-close { --c: #d4a657; border-color: rgba(212,166,87,.3); box-shadow: 0 10px 24px rgba(36,24,15,.18);
  background: radial-gradient(circle at 92% 8%, rgba(212,166,87,.28), transparent 160px), linear-gradient(118deg, #0b0807, #1a110c 60%, #3b2713); }
#monthCloseSection .mc-fig-close .mc-fig-label { color: #e6c27e; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
#monthCloseSection .mc-fig-close strong { color: #fff6dd; }
#monthCloseSection .mc-fig-close small { color: #c9b58f; }
#monthCloseSection .mc-fig-close .mc-fig-icon { background: rgba(212,166,87,.2); color: #e6c27e; }
#monthCloseSection .mc-variance { --c: #c0472f; background: #fbe7e1; border-color: rgba(192,71,47,.24); border-left-color: var(--c); }
#monthCloseSection .mc-variance.is-over, #monthCloseSection .mc-variance.is-match { --c: #15966a; background: #e9f8f0; border-color: rgba(21,150,106,.24); }
#monthCloseSection .mc-variance-main b { color: var(--c); font-weight: 800; }
#monthCloseSection .mc-opt-title em { color: #15966a; background: #e9f8f0; }
#monthCloseSection .mc-plan-rows .mc-plan-bank { color: #2f6fb3; }
#monthCloseSection .mc-plan-rows .is-total { background: #e9f8f0; color: #15966a; }
#monthCloseSection .mc-plan-rows .is-total b { color: #15966a; font-weight: 800; }
#monthCloseSection .mc-fig-close { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "head . num" "head . cap"; align-items: center; column-gap: 14px; row-gap: 2px; padding: 14px 20px; }
#monthCloseSection .mc-fig-close .mc-fig-head { grid-area: head; }
#monthCloseSection .mc-fig-close strong { grid-area: num; justify-self: end; font-size: clamp(20px, 2vw, 25px); }
#monthCloseSection .mc-fig-close small { grid-area: cap; justify-self: end; }
#monthCloseSection .mc-fig-close .mc-fig-label { font-size: 11.5px; }

/* Số: chữ số đều nhau như cn.hitaothom.com */
body { font-variant-numeric: tabular-nums; }

/* Báo cáo cuối ca: bố cục gọn (2026-12-04) */
#cashWorkflowSection .cash-shift-report.is-in-accordion { gap: 10px; padding: 12px 0 0; }
#cashWorkflowSection .cash-shift-report.is-in-accordion .cash-shift-report-head { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0; }
#cashWorkflowSection .cash-shift-report.is-in-accordion .cash-shift-report-head:not(:has(button)):not(:has(.cash-shift-approved)) { display: none; }
#cashWorkflowSection .cash-shift-report-head .cash-shift-approved { margin: 0 auto 0 0; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #e9f8f0; color: #15966a; }
#cashWorkflowSection .cash-shift-report-head .btn { padding: 6px 12px; font-size: 12.5px; min-height: 0; }
#cashWorkflowSection .cash-shift-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
#cashWorkflowSection .cash-shift-totals > div { --c: #806e55; display: grid; gap: 2px; padding: 9px 14px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#cashWorkflowSection .cash-shift-totals > div + div { border-left: 1px solid var(--line); }
#cashWorkflowSection .cash-shift-totals > .is-in { --c: #15966a; } #cashWorkflowSection .cash-shift-totals > .is-out { --c: #c0472f; } #cashWorkflowSection .cash-shift-totals > .is-held { --c: #a66f21; }
#cashWorkflowSection .cash-shift-totals span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
#cashWorkflowSection .cash-shift-totals strong { font-size: 15.5px; font-weight: 700; line-height: 1.25; color: var(--c); white-space: nowrap; overflow-wrap: normal; }
#cashWorkflowSection .cash-shift-totals > .is-net strong { color: var(--ink); }
#cashWorkflowSection .cash-shift-totals small { font-size: 11px; color: var(--muted); }
#cashWorkflowSection .cash-shift-held-detail { margin: -2px 2px 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
#cashWorkflowSection .cash-shift-note { display: flex; gap: 8px; align-items: baseline; margin: 0; padding: 7px 12px; border-radius: 10px; background: var(--surface); border: 1px dashed var(--line); font-size: 13px; line-height: 1.45; color: var(--ink); }
#cashWorkflowSection .cash-shift-note b { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
#cashWorkflowSection .cash-shift-details { margin-top: 0; border-radius: 12px; }
#cashWorkflowSection .cash-shift-details summary { padding: 9px 14px; font-size: 13.5px; font-weight: 700; }
#cashWorkflowSection .cash-shift-rows { padding: 0; }
#cashWorkflowSection .shift-tx { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 14px 9px 11px; border-top: 1px solid var(--line); border-left: 3px solid #15966a; }
#cashWorkflowSection .shift-tx:first-child { border-top: 0; }
#cashWorkflowSection .shift-tx.is-payment { border-left-color: #c0472f; }
#cashWorkflowSection .shift-tx:hover { background: var(--surface-soft); }
#cashWorkflowSection .shift-tx-date { display: grid; justify-items: center; line-height: 1.15; }
#cashWorkflowSection .shift-tx-date b { font-size: 14px; font-weight: 700; color: var(--ink); }
#cashWorkflowSection .shift-tx-date small { font-size: 10.5px; color: var(--muted); }
#cashWorkflowSection .shift-tx-main { display: grid; gap: 3px; min-width: 0; }
#cashWorkflowSection .shift-tx-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
#cashWorkflowSection .shift-tx-task { flex: none; padding: 2px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: #15966a; background: #e9f8f0; }
#cashWorkflowSection .shift-tx.is-payment .shift-tx-task { color: #c0472f; background: #fbe7e1; }
#cashWorkflowSection .shift-tx-content { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--ink); }
#cashWorkflowSection .shift-tx-sub { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12px; color: var(--ink); opacity: .85; }
#cashWorkflowSection .shift-tx-sub i { font-style: normal; color: var(--muted); margin-right: 5px; }
#cashWorkflowSection .shift-tx-id { color: var(--muted); font-size: 11px; }
#cashWorkflowSection .shift-tx-amt { display: grid; justify-items: end; gap: 3px; }
#cashWorkflowSection .shift-tx-amt b { font-size: 15px; font-weight: 700; color: #15966a; white-space: nowrap; }
#cashWorkflowSection .shift-tx.is-payment .shift-tx-amt b { color: #c0472f; }
#cashWorkflowSection .shift-tx-status { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #a66f21; background: #fbf1de; }
#cashWorkflowSection .shift-tx-status.is-approved { color: #15966a; background: #e9f8f0; }
#cashWorkflowSection .shift-tx-status.is-returned, #cashWorkflowSection .shift-tx-status.is-rejected { color: #c0472f; background: #fbe7e1; }
@media (max-width: 640px) {
  #cashWorkflowSection .cash-shift-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #cashWorkflowSection .cash-shift-totals > div:nth-child(3) { border-left: 0; }
  #cashWorkflowSection .cash-shift-totals > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  #cashWorkflowSection .shift-tx { grid-template-columns: 44px minmax(0, 1fr); }
  #cashWorkflowSection .shift-tx-amt { grid-column: 2; justify-items: start; display: flex; gap: 8px; align-items: center; }
  #cashWorkflowSection .shift-tx-content { white-space: normal; }
}
body[data-theme="dark"] #cashWorkflowSection .shift-tx-amt b, body[data-theme="dark"] #cashWorkflowSection .cash-shift-totals > .is-in strong { color: #6fd9ab; }
body[data-theme="dark"] #cashWorkflowSection .shift-tx.is-payment .shift-tx-amt b, body[data-theme="dark"] #cashWorkflowSection .cash-shift-totals > .is-out strong { color: #f19a86; }
body[data-theme="dark"] #cashWorkflowSection .shift-tx-task, body[data-theme="dark"] #cashWorkflowSection .shift-tx-status { background: rgba(255,255,255,.08); }
