html { font-size:14px; }
    @media (min-width:1440px) {
      html { font-size:13px; }
    }
    * { box-sizing:border-box; }
    body {
      margin:0;
      background:var(--background);
      color:#0f172a;
      min-height:100vh;
      display:flex;
      flex-direction:column;
      transition:background .4s ease, color .3s ease;
    }
    body.auth-locked { overflow:hidden; }
    #appShell { flex:1; display:flex; flex-direction:column; min-height:100vh; }
    body.auth-locked #appShell { display:none; }
    a { color:inherit; text-decoration:none; }

    header.app-header {
      background:var(--topbar);
      color:#fff;
      display:flex;
      align-items:center;
      justify-content:space-between;
      padding:10px 24px;
      box-shadow:0 4px 12px rgba(0,0,0,.15);
      position:sticky;
      top:0;
      z-index:20;
    }
    .header-left { display:flex; align-items:center; gap:18px; }
    .app-logo { display:flex; align-items:center; gap:12px; font-weight:700; font-size:18px; text-transform:uppercase; letter-spacing:.08em; background:none; border:none; color:inherit; padding:0; cursor:pointer; }
    .app-logo img { width:34px; height:34px; border-radius:6px; background:#fff; }
    .header-nav { display:flex; align-items:center; gap:12px; }
    .header-nav button {
      background:transparent;
      border:none;
      color:rgba(255,255,255,.85);
      padding:6px 16px;
      border-radius:999px;
      font-size:14px;
      font-weight:500;
      cursor:pointer;
      transition:background .2s ease;
    }
    .header-nav button.active,
    .header-nav button:hover { background:rgba(255,255,255,.18); color:#fff; }
    .header-right { display:flex; align-items:center; gap:12px; }
    .logout-btn {
      background:rgba(15,23,42,.3);
      border:1px solid rgba(255,255,255,.6);
      color:#fff;
      border-radius:999px;
      padding:8px 16px;
      font-weight:600;
      cursor:pointer;
      transition:opacity .2s ease, background .2s ease;
    }
    .logout-btn:hover { background:rgba(15,23,42,.45); opacity:.95; }
    .icon-pill {
      width:34px; height:34px;
      border-radius:50%;
      background:rgba(255,255,255,.15);
      display:inline-flex;
      align-items:center;
      justify-content:center;
      cursor:pointer;
      border:none;
      color:#fff;
      font-size:16px;
    }
    .icon-pill:hover { background:rgba(255,255,255,.25); }
    .upgrade-btn {
      background:#f97316;
      border:none;
      color:#fff;
      font-weight:600;
      padding:8px 18px;
      border-radius:999px;
      cursor:pointer;
      box-shadow:0 6px 18px rgba(249,115,22,.25);
    }
    .upgrade-btn:hover { opacity:.9; }

    body.dark-mode header.app-header {
      background:linear-gradient(90deg,rgba(15,23,42,.95) 0%,rgba(49,46,129,.92) 100%);
      color:#e2e8f0;
      box-shadow:0 14px 32px rgba(8,13,26,.6);
    }
    body.dark-mode .header-nav button { color:rgba(226,232,255,.8); }
    body.dark-mode .header-nav button:hover,
    body.dark-mode .header-nav button.active { background:rgba(148,163,233,.18); color:#f8fafc; }
    body.dark-mode .icon-pill { background:rgba(148,163,233,.16); color:#e0e7ff; }
    body.dark-mode .icon-pill:hover { background:rgba(129,140,248,.28); }
    body.dark-mode .logout-btn {
      background:rgba(30,41,59,.55);
      border:1px solid rgba(148,163,233,.45);
      color:#f8fafc;
    }
    body.dark-mode .logout-btn:hover { background:rgba(45,55,99,.65); }

    .layout { display:flex; flex:1; overflow:hidden; }
    aside {
      position:relative;
      width:240px;
      background:linear-gradient(188deg,#1d2744 0%,#2a58d6 65%,#5f8ff7 120%);
      color:var(--sidebar-text);
      display:flex;
      flex-direction:column;
      overflow-y:auto;
      box-shadow:10px 0 28px rgba(21,33,68,.22);
      border-right:1px solid rgba(255,255,255,.14);
      isolation:isolate;
    }
    aside::before {
      content:'';
      position:absolute;
      inset:-6%;
      background:
        linear-gradient(190deg,rgba(255,255,255,.14) 0%,rgba(15,23,42,.38) 100%),
        radial-gradient(140% 120% at -35% 30%,rgba(255,255,255,.24) 0%,rgba(56,189,248,.32) 38%,rgba(29,78,216,.2) 55%,rgba(255,255,255,0) 74%);
      background-size:100% 100%,160% 160%;
      background-position:center,-20% 15%;
      backdrop-filter:blur(18px) saturate(120%);
      opacity:.9;
      pointer-events:none;
    }
    aside::after {
      content:'';
      position:absolute;
      inset:0;
      box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);
      pointer-events:none;
    }
    @keyframes sidebarSweep {}
    body.dark-mode aside {
      background:linear-gradient(188deg,#060b1d 0%,#1c2250 60%,#2f3389 120%);
      box-shadow:12px 0 36px rgba(3,6,18,.6);
    }
    body.dark-mode aside::before {
      inset:-6%;
      background:
        linear-gradient(190deg,rgba(79,70,229,.24) 0%,rgba(12,18,36,.85) 100%),
        radial-gradient(150% 130% at -40% 35%,rgba(165,180,252,.22) 0%,rgba(99,102,241,.32) 36%,rgba(37,99,235,.25) 54%,rgba(15,23,42,0) 76%);
      background-size:100% 100%,170% 170%;
      background-position:center,-25% 12%;
    }
    body.dark-mode aside::after { box-shadow:inset 0 0 0 1px rgba(99,102,241,.25); }
    aside > * { position:relative; z-index:1; }
    .sidebar-inner { display:flex; flex-direction:column; gap:18px; padding:24px 0 32px; }
    .user-panel { padding:0 24px; }
    .user-panel__card {
      position:relative;
      display:flex;
      align-items:center;
      gap:18px;
      padding:20px 22px;
      border-radius:20px;
      background:linear-gradient(140deg,rgba(29,43,83,.78) 0%,rgba(73,143,255,.28) 100%);
      border:1px solid rgba(255,255,255,.18);
      box-shadow:0 18px 40px rgba(19,33,72,.35);
      backdrop-filter:blur(20px);
      transition:transform .3s cubic-bezier(.18,.89,.32,1.28), box-shadow .3s ease;
    }
    .user-panel__card::after {
      content:'';
      position:absolute;
      inset:0;
      border-radius:inherit;
      pointer-events:none;
      background:radial-gradient(120% 120% at 10% 10%,rgba(255,255,255,.22) 0%,rgba(255,255,255,0) 60%);
      opacity:.65;
    }
    .user-panel__card:hover {
      transform:translateY(-2px);
      box-shadow:0 24px 48px rgba(8,15,34,.52);
    }
    .user-panel__avatar {
      position:relative;
      flex-shrink:0;
      display:inline-flex;
      z-index:1;
    }
.user-panel__avatar img {
      width:52px;
      height:52px;
      border-radius:50%;
      border:2px solid rgba(255,255,255,.32);
      box-shadow:0 12px 26px rgba(15,23,42,.42);
      object-fit:cover;
    }
    .user-panel__status {
      position:absolute;
      top:-6px;
      right:-10px;
      display:inline-flex;
      align-items:center;
      gap:6px;
      padding:4px 10px;
      border-radius:999px;
      font-size:11px;
      font-weight:600;
      letter-spacing:.04em;
      text-transform:uppercase;
      color:#bbf7d0;
      background:rgba(34,197,94,.22);
      border:1px solid rgba(255,255,255,.22);
      box-shadow:0 10px 22px rgba(8,15,34,.45);
      backdrop-filter:blur(12px);
    }
    .user-panel__status::before {
      content:'';
      width:6px;
      height:6px;
      border-radius:50%;
      background:#22c55e;
      box-shadow:0 0 12px rgba(34,197,94,.58);
    }
    .user-panel__status.status-offline {
      color:#fde68a;
      background:rgba(250,204,21,.2);
    }
    .user-panel__status.status-offline::before {
      background:#facc15;
      box-shadow:0 0 12px rgba(250,204,21,.45);
    }
    .user-panel__status.status-error {
      color:#fecaca;
      background:rgba(248,113,113,.22);
    }
    .user-panel__status.status-error::before {
      background:#f87171;
      box-shadow:0 0 12px rgba(248,113,113,.5);
    }
    .user-panel__info {
      position:relative;
      z-index:1;
      flex:1;
      display:flex;
      flex-direction:column;
      gap:10px;
      color:var(--sidebar-text);
    }
    .user-panel__top {
      display:flex;
      align-items:center;
      gap:12px;
    }
    .user-panel__name {
      font-weight:600;
      font-size:15px;
      letter-spacing:.01em;
      color:#f8fafc;
      flex:1;
    }
    .user-panel__name a { color:inherit; text-decoration:none; }
    .user-panel__subtext {
      font-size:12px;
      color:rgba(226,232,255,.72);
      display:flex;
      gap:8px;
      align-items:center;
    }
    .user-panel__action {
      width:34px;
      height:34px;
      border-radius:12px;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      background:rgba(15,23,42,.35);
      border:1px solid rgba(255,255,255,.22);
      color:#e0f2fe;
      cursor:pointer;
      transition:background .2s ease, box-shadow .2s ease, transform .2s ease;
    }
    .user-panel__action:hover {
      background:rgba(14,165,233,.35);
      box-shadow:0 12px 26px rgba(14,165,233,.32);
      transform:translateY(-1px) scale(1.04);
    }
    .user-panel__action:focus-visible {
      outline:2px solid rgba(125,211,252,.9);
      outline-offset:2px;
    }
    .user-panel__lang { font-size:11px; color:rgba(248,250,252,.6); display:flex; align-items:center; gap:6px; }
    .user-panel__lang { display:none; }
    body.dark-mode .user-panel__card {
      background:linear-gradient(150deg,rgba(19,30,58,.84) 0%,rgba(52,68,139,.58) 100%);
      border:1px solid rgba(129,140,248,.32);
      box-shadow:0 28px 54px rgba(3,6,18,.68);
    }
    body.dark-mode .user-panel__card::after { background:radial-gradient(130% 140% at 12% 12%,rgba(148,163,233,.4) 0%,rgba(79,70,229,0) 55%); opacity:.55; }
    body.dark-mode .user-panel__status { color:#bbf7d0; background:rgba(34,197,94,.18); border-color:rgba(148,233,180,.35); }
    body.dark-mode .user-panel__status::before { box-shadow:0 0 12px rgba(74,222,128,.55); }
    body.dark-mode .user-panel__status.status-offline { color:#facc15; background:rgba(250,204,21,.12); border-color:rgba(250,204,21,.32); }
    body.dark-mode .user-panel__status.status-error { color:#fecaca; background:rgba(248,113,113,.18); border-color:rgba(248,113,113,.32); }
    body.dark-mode .user-panel__subtext { color:rgba(199,210,254,.8); }
    .sidebar-search { padding:0 24px; display:flex; flex-direction:column; gap:10px; }
    .sidebar-search__label { font-size:11px; text-transform:uppercase; letter-spacing:.12em; color:rgba(248,250,252,.55); }
    .sidebar-search .input-group {
      position:relative;
      display:flex;
      align-items:center;
      border-radius:14px;
      background:rgba(255,255,255,.08);
      border:1px solid rgba(255,255,255,.12);
      padding-left:34px;
      box-shadow:0 8px 18px rgba(15,23,42,.22);
    }
    .sidebar-search .input-group::before {
      content:'🔍';
      position:absolute;
      left:12px;
      color:rgba(248,250,252,.65);
      font-size:13px;
    }
    .sidebar-search input {
      width:100%;
      border:none;
      background:transparent;
      color:var(--sidebar-text);
      padding:10px 12px 10px 4px;
      font-size:13px;
    }
    .sidebar-search input::placeholder { color:rgba(248,250,252,.45); }
    .sidebar-search input:focus { outline:none; }
    .sidebar-search .search-filters { display:flex; gap:10px; color:rgba(248,250,252,.6); font-size:10px; text-transform:uppercase; letter-spacing:.05em; }
    .sidebar-search .search-filters label { display:flex; align-items:center; gap:6px; cursor:pointer; }
    body.dark-mode .sidebar-search__label { color:rgba(199,210,254,.6); }
    body.dark-mode .sidebar-search .input-group {
      background:rgba(15,23,42,.65);
      border:1px solid rgba(99,102,241,.28);
      box-shadow:0 18px 36px rgba(6,10,24,.6);
    }
    body.dark-mode .sidebar-search .input-group::before { color:rgba(165,180,252,.75); }
    body.dark-mode .sidebar-search input { color:#f8fafc; }
    body.dark-mode .sidebar-search input::placeholder { color:rgba(165,180,252,.55); }
    body.dark-mode .sidebar-search .search-filters { color:rgba(165,180,252,.65); }
    .sidebar-menu { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
    .sidebar-menu__title {
      padding:18px 26px 6px;
      font-size:11px;
      font-weight:600;
      text-transform:uppercase;
      letter-spacing:.32em;
      color:rgba(226,232,255,.55);
    }
    .sidebar-menu__title:first-child { padding-top:6px; }
    .sidebar-menu__title:not(:first-child) { margin-top:6px; }
    .sidebar-menu li { width:100%; }
    .sidebar-menu a {
      display:flex;
      align-items:center;
      gap:14px;
      padding:12px 18px;
      margin:0 16px;
      border-radius:14px;
      color:rgba(236,241,255,.88);
      text-decoration:none;
      transition:background .2s ease, color .2s ease, box-shadow .2s ease;
      font-size:15px;
      font-weight:600;
      letter-spacing:.3px;
      backdrop-filter:blur(0px);
      position:relative;
    }
    .sidebar-menu a::before {
      content:'';
      position:absolute;
      left:-12px;
      top:8px;
      bottom:8px;
      width:4px;
      border-radius:999px;
      background:linear-gradient(180deg,#38BDF8 0%,#1D4ED8 100%);
      box-shadow:0 0 14px rgba(56,189,248,.45);
      opacity:0;
      transform:translateX(-12px);
      transition:opacity .28s ease, transform .3s cubic-bezier(.22,.61,.36,1);
      pointer-events:none;
    }
    .sidebar-menu a .menu-icon {
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width:20px;
      height:20px;
      color:rgba(226,232,255,.85);
      transition:transform .12s ease, color .12s ease;
    }
    .sidebar-menu a .menu-icon svg { width:20px; height:20px; stroke:currentColor; }
    .sidebar-menu a:hover {
      background:rgba(255,255,255,.12);
      color:#fff;
      box-shadow:0 12px 24px rgba(15,23,42,.28);
    }
    .sidebar-menu a:hover .menu-icon { color:#fff; transform:scale(1.05); }
    .sidebar-menu a.module-link.active {
      background:linear-gradient(135deg,#3b82f6,#60a5fa);
      color:#fff;
      box-shadow:0 18px 32px rgba(59,130,246,.35);
    }
    .sidebar-menu a.module-link.active .menu-icon { color:#fff; transform:scale(1.05); }
    .sidebar-menu a.module-link.active::before,
    .sidebar-menu li.open > a::before {
      opacity:1;
      transform:translateX(0);
    }
    .sidebar-submenu { list-style:none; margin:4px 0 6px 36px; padding:0; display:flex; flex-direction:column; gap:6px; max-height:0; opacity:0; transform:translateY(-6px); pointer-events:none; overflow:hidden; transition:max-height .32s ease, opacity .24s ease, transform .24s ease; }
    .sidebar-submenu__link { display:block; font-size:14px; font-weight:500; letter-spacing:.2px; color:rgba(236,241,255,.75); padding:6px 12px; border-radius:10px; transition:background .2s ease, color .2s ease; }
    .sidebar-submenu__link:hover { background:rgba(255,255,255,.1); color:#fff; }
    .sidebar-submenu__link.active { background:linear-gradient(135deg,rgba(59,130,246,.22),rgba(96,165,250,.34)); color:#fff; }
    .sidebar-menu .menu-caret { margin-left:auto; font-size:12px; opacity:.7; transition:transform .2s ease, opacity .2s ease; }
    .sidebar-menu li.open > a .menu-caret { transform:rotate(180deg); opacity:1; }
    .sidebar-menu li.open > a .menu-icon { color:#fff; transform:scale(1.05); }
    .sidebar-menu li.open > .sidebar-submenu { max-height:420px; opacity:1; transform:translateY(0); pointer-events:auto; }
    .sidebar-theme-toggle { padding:18px 20px 12px; }
    .sidebar-theme-toggle button {
      width:100%;
      display:flex;
      align-items:center;
      gap:12px;
      padding:12px 14px;
      border-radius:16px;
      background:rgba(255,255,255,.12);
      border:1px solid rgba(255,255,255,.18);
      color:#f8fafc;
      font-size:13px;
      font-weight:600;
      letter-spacing:.3px;
      cursor:pointer;
      transition:background .2s ease, border .2s ease, transform .2s ease;
    }
    .sidebar-theme-toggle button:hover { background:rgba(255,255,255,.18); transform:translateY(-1px); }
    .sidebar-theme-toggle button:focus-visible {
      outline:2px solid rgba(56,189,248,.8);
      outline-offset:3px;
    }
    .theme-toggle__icons { position:relative; width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; }
    .theme-toggle__icon { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; transition:opacity .25s ease, transform .25s ease; }
    .theme-toggle__icon svg { width:22px; height:22px; stroke-width:1.6; }
    .theme-toggle__icon--moon { opacity:0; transform:scale(.8) rotate(-12deg); }
    .theme-toggle__label { flex:1; text-align:left; }
    .theme-toggle__caption { font-size:11px; opacity:.7; }
    body.dark-mode .sidebar-menu__title { color:rgba(199,210,254,.65); }
    body.dark-mode .sidebar-menu a {
      color:rgba(226,232,255,.88);
      background:rgba(15,23,42,0);
      border:none;
    }
    body.dark-mode .sidebar-menu a .menu-icon { color:rgba(199,210,254,.85); }
    body.dark-mode .sidebar-menu a:hover {
      background:rgba(79,70,229,.28);
      color:#f8fafc;
      box-shadow:0 18px 36px rgba(17,24,39,.45);
    }
    body.dark-mode .sidebar-menu a:hover .menu-icon { color:#f8fafc; }
    body.dark-mode .sidebar-menu a.module-link.active {
      background:linear-gradient(135deg,#4f46e5,#38bdf8);
      box-shadow:0 22px 44px rgba(31,41,55,.6);
    }
    body.dark-mode .sidebar-menu a::before { box-shadow:0 0 16px rgba(56,189,248,.55); }
    body.dark-mode .sidebar-submenu__link { color:rgba(199,210,254,.72); }
    body.dark-mode .sidebar-submenu__link:hover,
    body.dark-mode .sidebar-submenu__link.active { background:rgba(79,70,229,.35); color:#f8fafc; }
    body.dark-mode .sidebar-theme-toggle button {
      background:rgba(79,70,229,.28);
      border:1px solid rgba(129,140,248,.45);
      color:#e0e7ff;
      box-shadow:0 14px 32px rgba(15,23,42,.45);
    }
    body.dark-mode .sidebar-theme-toggle button:hover { background:rgba(99,102,241,.38); }
    body.dark-mode .theme-toggle__icon--sun { opacity:0; transform:scale(.75) rotate(18deg); }
    body.dark-mode .theme-toggle__icon--moon { opacity:1; transform:scale(1) rotate(0deg); }
    body.dark-mode .theme-toggle__label { color:#e0e7ff; }
    .sidebar-campus-selector { padding:12px 20px 0; display:flex; gap:8px; align-items:center; }
    .sidebar-campus-selector select {
      flex:1 1 auto;
      min-width:0;
      background:rgba(17,25,35,.6);
      border:1px solid rgba(148,163,184,.28);
      border-radius:12px;
      padding:9px 34px 9px 12px;
      color:var(--sidebar-text);
      font-size:13px;
      outline:none;
      margin:0;
      appearance:none;
      -webkit-appearance:none;
      background-image:url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23dbeafe' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
      background-repeat:no-repeat;
      background-position:right 12px center;
      background-size:12px;
      box-sizing:border-box;
      box-shadow:0 10px 24px rgba(15,23,42,.25);
    }
    .sidebar-campus-selector select:focus { border-color:#38bdf8; box-shadow:none; }
    .sidebar-campus-action { flex-shrink:0; font-size:12px; padding:8px 12px; border-radius:12px; background:rgba(59,130,246,.85); color:#fff; border:none; cursor:pointer; white-space:nowrap; box-shadow:0 10px 20px rgba(59,130,246,.35); transition:transform .2s ease, box-shadow .2s ease; }
    .sidebar-campus-action:hover { transform:translateY(-1px); box-shadow:0 14px 28px rgba(59,130,246,.4); }

    main {
      flex:1;
      overflow:auto;
      padding:24px 28px;
      background:linear-gradient(160deg,rgba(255,255,255,.95) 0%,rgba(235,242,255,.96) 100%);
    }
    #content {
      background:var(--surface);
      border-radius:18px;
      border:1px solid var(--border-soft);
      box-shadow:0 26px 46px rgba(23,40,80,.08);
      min-height:60vh;
      padding:28px;
    }
    body.dark-mode #content {
      background:var(--surface-card);
      border-color:var(--border-soft);
      box-shadow:0 32px 64px rgba(3,6,18,.55);
    }
    @keyframes loading-spin {
      from { transform:rotate(0deg); }
      to { transform:rotate(360deg); }
    }

    .loading,
    .loading-message {
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:center;
      gap:14px;
      padding:60px 0;
      color:var(--text-soft);
      text-align:center;
      font-size:15px;
    }

    .loading::before,
    .loading-message::before {
      content:'';
      width:28px;
      height:28px;
      border-radius:50%;
      border:3px solid var(--spinner-track);
      border-top-color:var(--accent);
      animation:loading-spin .8s linear infinite;
    }

    .loading-inline {
      display:inline-flex;
      align-items:center;
      gap:8px;
      color:inherit;
      font-size:inherit;
    }

    .loading-inline::before {
      content:'';
      width:16px;
      height:16px;
      border-radius:50%;
      border:2px solid var(--spinner-track);
      border-top-color:var(--accent);
      animation:loading-spin .8s linear infinite;
    }
    .dashboard { display:flex; flex-direction:column; gap:20px; }
    .dashboard-header h2 { margin:0; font-size:21px; }
    .dashboard-header p { margin:4px 0 0; color:var(--text-soft); font-size:13px; }
    .dashboard-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; }
    .stat-card { position:relative; padding:18px 20px; border-radius:16px; color:var(--stat-ink,#fff); overflow:hidden; box-shadow:var(--stat-shadow,0 10px 20px rgba(15,23,42,.18)); min-width:160px; background:var(--stat-bg,linear-gradient(135deg,#1d4ed8,#2563eb)); border:1px solid var(--stat-border,rgba(37,99,235,.16)); }
    .stat-card::before { content:''; position:absolute; inset:-40% auto auto -20%; width:180px; height:180px; background:var(--stat-glow,radial-gradient(circle at center, rgba(255,255,255,.16), transparent 60%)); opacity:.9; transform:rotate(8deg); }
    .stat-card::after { content:''; position:absolute; inset:auto 8px 8px auto; width:120px; height:120px; background:radial-gradient(circle at 50% 50%, rgba(255,255,255,.14), transparent 70%); opacity:.7; filter:blur(2px); }
    .stat-card > * { position:relative; z-index:1; }
    .stat-value { font-size:28px; font-weight:700; }
    .stat-label { margin-top:4px; text-transform:uppercase; font-size:11px; letter-spacing:.07em; opacity:.85; }
    .stat-icon { position:absolute; right:18px; bottom:16px; font-size:36px; opacity:.36; color:var(--stat-icon,rgba(255,255,255,.85)); }
    .stat-card--blue { --stat-bg:linear-gradient(135deg,#1d4ed8,#2563eb); --stat-border:rgba(37,99,235,.22); --stat-shadow:0 14px 30px rgba(37,99,235,.25); --stat-glow:radial-gradient(circle at 50% 50%, rgba(96,165,250,.35), transparent 65%); }
    .stat-card--teal { --stat-bg:linear-gradient(135deg,#0ea5e9,#2563eb); --stat-border:rgba(14,165,233,.22); --stat-shadow:0 14px 30px rgba(14,165,233,.24); --stat-glow:radial-gradient(circle at 40% 40%, rgba(125,211,252,.35), transparent 65%); }
    .stat-card--purple { --stat-bg:linear-gradient(135deg,#6366f1,#4338ca); --stat-border:rgba(99,102,241,.22); --stat-shadow:0 14px 30px rgba(99,102,241,.25); --stat-glow:radial-gradient(circle at 60% 40%, rgba(165,180,252,.32), transparent 65%); }
    .stat-card--pink { --stat-bg:linear-gradient(135deg,#ec4899,#d946ef); --stat-border:rgba(236,72,153,.22); --stat-shadow:0 14px 30px rgba(236,72,153,.24); --stat-glow:radial-gradient(circle at 40% 40%, rgba(244,114,182,.28), transparent 65%); }
    .section-title { margin:0; font-size:18px; color:var(--text-strong); }
    .class-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:16px; }
    .class-card { --class-accent:var(--accent); border:1px solid var(--border-soft); border-radius:16px; background:linear-gradient(160deg, rgba(37,99,235,.04), rgba(14,165,233,.02)), var(--surface-card); display:flex; flex-direction:column; box-shadow:0 14px 26px rgba(15,23,42,.08); position:relative; overflow:hidden; }
    .class-card::before { content:''; position:absolute; inset:0; border-radius:16px; border-left:4px solid var(--class-accent); opacity:.9; pointer-events:none; z-index:0; }
    .class-card > * { position:relative; z-index:1; }
    .class-card header { padding:14px 16px; border-bottom:1px solid var(--border-soft); display:flex; justify-content:space-between; align-items:center; background:linear-gradient(90deg, rgba(37,99,235,.08), rgba(37,99,235,.02)); }
    .class-card header h3 { margin:0; font-size:16px; color:var(--text-strong); }
    .class-card header .class-code { font-size:12px; color:var(--accent); font-weight:700; background:var(--surface-subtle); border-radius:999px; padding:4px 10px; border:1px solid var(--accent-soft); }
    .class-body { padding:14px 16px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; font-size:13px; }
    .class-body > div { color:var(--text-strong); }
    .class-body strong { color:var(--text-muted); font-weight:700; }
    .class-body .days { grid-column:1 / -1; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
    .class-card footer { padding:12px 16px; border-top:1px solid var(--border-soft); display:flex; justify-content:space-between; gap:10px; background:linear-gradient(90deg, rgba(37,99,235,.04), rgba(37,99,235,.0)); align-items:center; flex-wrap:wrap; }
    .class-card footer .btn-secondary { border-radius:12px; }
    .class-card footer .btn-danger, .class-card footer .btn-primary { border-radius:12px; }
    .class-card:hover { box-shadow:0 18px 32px rgba(15,23,42,.12); transform:translateY(-1px); transition:transform .16s ease, box-shadow .16s ease; }
    .fee-reminder-card,
    .debt-reminder-card,
    .absence-reminder-card { border:1px solid var(--line); border-radius:20px; padding:18px 20px; background:var(--surface-card); box-shadow:0 22px 40px rgba(15,23,42,.08); display:flex; flex-direction:column; gap:14px; }
    .fee-reminder-header { display:flex; flex-direction:column; gap:10px; }
    .fee-reminder-title { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; }
    .fee-reminder-title h3 { margin:0; font-size:18px; color:var(--text-strong); }
    .fee-reminder-title p { margin:6px 0 0; font-size:13px; color:var(--text-soft); }
    .fee-reminder-filters { display:flex; gap:8px; flex-wrap:wrap; }
    .fee-reminder-filter { border:1px solid var(--line); border-radius:999px; padding:5px 12px; background:var(--surface-subtle); color:var(--text-muted); font-weight:600; font-size:12px; cursor:pointer; transition:all .15s ease; }
    .fee-reminder-filter.is-active { background:var(--accent-soft,#dbeafe); border-color:var(--accent-soft,#bfdbfe); color:var(--accent-strong,#1d4ed8); box-shadow:0 10px 24px rgba(37,99,235,.18); }
    .fee-reminder-filter__count { margin-left:6px; font-size:12px; color:var(--text-soft); }
    .fee-reminder-meta-bar { display:flex; align-items:center; gap:12px; }
    .fee-reminder-total { font-size:13px; font-weight:600; color:var(--text-strong); }
    .fee-reminder-body { display:flex; flex-direction:column; gap:12px; }
    .fee-reminder-list { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:12px; }
    .fee-reminder-row { border:1px solid var(--line); border-radius:16px; padding:12px 14px; display:flex; flex-direction:column; gap:10px; background:var(--surface-subtle); }
    .fee-reminder-row__main { flex:1; min-width:0; }
    .fee-reminder-name { margin:0; font-size:15px; font-weight:600; color:var(--text-strong); }
    .fee-reminder-meta { display:flex; flex-wrap:wrap; gap:6px; font-size:13px; color:var(--text-soft); margin-top:4px; }
    .fee-reminder-meta span + span::before { content:'•'; margin-right:6px; margin-left:2px; color:var(--text-muted); }
    .fee-reminder-cycle { margin-top:4px; font-size:13px; color:var(--text-muted); }
    .fee-reminder-row__side { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:10px; }
    .fee-reminder-badge { font-size:12px; font-weight:600; padding:4px 10px; border-radius:999px; background:rgba(252,211,77,.3); color:#b45309; }
    .fee-reminder-badge--mid { background:rgba(251,146,60,.28); color:#c2410c; }
    .fee-reminder-badge--late { background:rgba(248,113,113,.3); color:#b91c1c; }
    .debt-badge--active { background:rgba(110,231,183,.25); color:#047857; }
    .debt-badge--inactive { background:rgba(148,163,184,.35); color:#475569; }
    .fee-reminder-amount { font-size:14px; font-weight:700; }
    .fee-reminder-amount--due { color:#b91c1c; }
    .fee-reminder-amount--ok { color:var(--text-soft); font-weight:600; }
    .fee-reminder-link { border:none; background:none; padding:0; color:var(--accent,#2563eb); font-size:13px; font-weight:600; cursor:pointer; }
    .fee-reminder-link:hover { text-decoration:underline; }
    .fee-reminder-empty { border:1px dashed var(--line); border-radius:14px; padding:18px; text-align:center; color:var(--text-soft); font-size:13px; }
    .debt-reminder-note { font-size:13px; color:var(--text-soft); font-weight:600; }
    .debt-reminder-actions { display:flex; justify-content:flex-end; align-items:center; margin-top:4px; }
    .debt-reminder-toggle { font-size:12px; color:var(--text-muted); display:flex; align-items:center; gap:6px; }
    .absence-badge--unexcused { background:rgba(248,113,113,.3); color:#b91c1c; }
    .absence-badge--excused { background:rgba(129,140,248,.25); color:#4338ca; }
    .absence-badge--active { background:rgba(110,231,183,.25); color:#047857; }
    .absence-badge--inactive { background:rgba(148,163,184,.35); color:#475569; }
    .btn-primary {
      background:linear-gradient(135deg,var(--accent),var(--accent-strong));
      color:var(--accent-contrast);
      border:none;
      border-radius:999px;
      padding:9px 18px;
      cursor:pointer;
      font-weight:600;
      font-size:13px;
      box-shadow:0 12px 26px var(--accent-shadow);
      transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
    }
    .btn-primary.btn-compact {
      padding:6px 14px;
      font-size:12px;
      border-radius:12px;
      min-height:36px;
      box-shadow:0 8px 20px rgba(37,99,235,.18);
    }
    .module--teacher-attendance .module-header {
      display:flex;
      justify-content:space-between;
      gap:16px;
      flex-wrap:wrap;
      align-items:flex-end;
      margin-bottom:20px;
    }
    .module--teacher-attendance .filter-toolbar {
      display:flex;
      gap:12px;
      flex-wrap:wrap;
      align-items:flex-end;
    }
    .module--teacher-attendance .section-card {
      background:var(--surface-card,#fff);
      border:1px solid var(--border-soft,#e2e8f0);
      border-radius:20px;
      padding:24px;
      margin-bottom:24px;
      box-shadow:0 18px 40px rgba(15,23,42,.06);
    }
    .module--teacher-attendance .section-card__header {
      display:flex;
      justify-content:space-between;
      align-items:flex-start;
      gap:16px;
      flex-wrap:wrap;
      margin-bottom:16px;
    }
    .module--teacher-attendance .section-card__subtitle {
      margin:4px 0 0;
      font-size:13px;
      color:var(--text-soft,#64748b);
    }
    .module--teacher-attendance .filters-row {
      display:flex;
      gap:12px;
      flex-wrap:wrap;
      align-items:flex-end;
    }
    .module--teacher-attendance .filter-summary {
      font-size:13px;
      color:var(--text-soft,#64748b);
      margin-top:8px;
      margin-bottom:16px;
    }
    .module--teacher-attendance .filter-summary--tight {
      margin-top:-8px;
    }
    .module--teacher-attendance [data-role="range-note"] {
      margin-top:4px;
      font-size:13px;
      color:var(--text-soft,#64748b);
      display:block;
    }
    .module--teacher-attendance .stats-grid {
      display:grid;
      grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
      gap:16px;
    }
    .module--teacher-attendance .section-card__header .btn-primary.btn-compact {
      align-self:flex-end;
      font-size:12px;
      padding:6px 16px;
    }
    }
    .btn-primary:hover { transform:translateY(-1px); box-shadow:0 16px 32px var(--accent-shadow); opacity:.95; }
    .btn-primary.btn-loading,
    .btn-outline.btn-loading,
    .btn-secondary.btn-loading {
      cursor:wait;
      opacity:.85;
      transform:none;
      box-shadow:inherit;
    }
    .btn-secondary {
      background:var(--surface-soft);
      color:var(--text-strong);
      border:1px solid var(--border-soft);
      border-radius:12px;
      padding:8px 16px;
      cursor:pointer;
      font-weight:600;
      font-size:12px;
      transition:background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
    }
    .btn-secondary:hover {
      background:var(--surface-highlight);
      border-color:var(--accent);
      color:var(--accent);
      transform:translateY(-1px);
    }
    .btn-danger {
      background:linear-gradient(135deg,#f87171,#ef4444);
      color:#fff;
      border:none;
      border-radius:999px;
      padding:9px 18px;
      cursor:pointer;
      font-weight:600;
      font-size:13px;
      box-shadow:0 12px 28px rgba(239,68,68,.28);
      transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
    }
    .btn-danger:hover { transform:translateY(-1px); box-shadow:0 16px 34px rgba(239,68,68,.32); opacity:.95; }
    .day-pill {
      display:inline-flex;
      align-items:center;
      justify-content:center;
      background:var(--surface-highlight);
      color:var(--accent);
      border-radius:999px;
      padding:2px 10px;
      font-size:12px;
      border:1px solid var(--accent-soft);
    }
    .day-pill.active { background:var(--accent); color:var(--accent-contrast); border-color:transparent; }
    .class-card .shift-time { color:var(--text-soft); font-size:11px; }
    .students-active__table-message {
      padding:32px 16px;
      color:var(--text-soft);
      text-align:center;
    }
    .students-active__table-message.loading-message {
      padding:32px 16px;
    }
    .students-active__modal-status.loading-message {
      padding:24px 0;
    }
    .dayoff-class-selector { display:flex; flex-direction:column; gap:12px; }
    .dayoff-class-actions { display:flex; gap:12px; flex-wrap:wrap; }
    .dayoff-chip-container { display:flex; flex-wrap:wrap; gap:8px; min-height:32px; }
    .dayoff-chip { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; background:#eef2ff; color:#1e3a8a; font-size:12px; }
    .dayoff-chip__remove { border:none; background:transparent; color:#1e3a8a; cursor:pointer; font-size:14px; line-height:1; }
    .dayoff-modal { position:fixed; inset:0; background:rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; padding:24px; z-index:80; opacity:0; pointer-events:none; transition:opacity .2s ease; }
    .dayoff-modal[aria-hidden="false"] { opacity:1; pointer-events:auto; }
    .dayoff-modal__dialog { background:var(--surface-card); border-radius:18px; width:min(720px, 90vw); max-height:90vh; display:flex; flex-direction:column; box-shadow:0 30px 60px rgba(15,23,42,.25); }
    .dayoff-modal__header { display:flex; justify-content:space-between; align-items:center; padding:18px 24px; border-bottom:1px solid #e2e8f0; }
    .dayoff-modal__close { border:none; background:transparent; font-size:24px; cursor:pointer; color:#64748b; }
    .dayoff-modal__body { padding:16px 24px; overflow-y:auto; display:flex; flex-direction:column; gap:16px; }
    .dayoff-modal__filter input { width:100%; border:1px solid rgba(99,102,241,.28); border-radius:12px; padding:10px 12px; font-size:14px; background:var(--surface-soft); color:var(--text-strong); }
    .dayoff-modal__list { display:flex; flex-direction:column; gap:12px; }
    .dayoff-modal__row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:14px; align-items:center; padding:10px 12px; border:1px solid rgba(99,102,241,.25); border-radius:12px; background:var(--surface-soft); cursor:pointer; box-shadow:0 20px 36px rgba(6,10,24,.5); }
    .dayoff-modal__row input { transform:scale(1.1); }
    .dayoff-modal__row-main { display:flex; flex-direction:column; gap:4px; }
    .dayoff-modal__row-title { font-weight:600; color:var(--text-strong); }
    .dayoff-modal__row-code { font-size:12px; color:var(--text-soft); }
    .dayoff-modal__row-weekdays { display:flex; gap:6px; flex-wrap:wrap; }
    .dayoff-badge { display:inline-flex; padding:2px 8px; border-radius:999px; background:rgba(99,102,241,.28); color:#e0e7ff; font-size:11px; }
    .dayoff-modal__footer { padding:16px 24px; border-top:1px solid rgba(99,102,241,.25); display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
    .dayoff-modal__summary { font-size:13px; color:var(--text-soft); }
    .dayoff-modal__actions { display:flex; gap:12px; }
    .empty { padding:60px 0; text-align:center; color:#94a3b8; }

    .module { display:flex; flex-direction:column; gap:24px; }

    .module--transactions { background:var(--surface-card); border-radius:24px; padding:28px 26px; border:1px solid var(--line); box-shadow:0 20px 40px rgba(15,23,42,.14); display:flex; flex-direction:column; gap:24px; }
    .transactions-module-header { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; flex-wrap:wrap; }
    .transactions-module-header h2 { margin:0; font-size:24px; font-weight:700; color:var(--text-strong); }
    .transactions-module-header .module-subtitle { margin-top:6px; color:var(--text-soft); font-size:13px; }
    .transactions-metrics { display:flex; gap:16px; flex-wrap:wrap; align-items:stretch; }
    .transactions-metric { background:var(--surface-soft); border:1px solid var(--line); border-radius:16px; padding:14px 18px; min-width:160px; display:flex; flex-direction:column; gap:4px; box-shadow:0 8px 24px rgba(15,23,42,.08); }
    .transactions-metric__label { font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); }
    .transactions-metric__value { font-size:20px; font-weight:700; color:var(--text-strong); }
    .transactions-filters-card { background:var(--surface-soft); border:1px solid var(--line); border-radius:18px; padding:18px 20px; box-shadow:0 12px 30px rgba(15,23,42,.12); }
    .transactions-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; align-items:end; }
    .transactions-field { display:flex; flex-direction:column; gap:6px; }
    .transactions-field label { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); font-weight:600; }
    .transactions-field input,
    .transactions-field select { border:1px solid var(--line); border-radius:12px; padding:11px 14px; font-size:14px; color:var(--text-strong); background:var(--surface-card); transition:border-color .15s ease, box-shadow .15s ease; }
    .transactions-field input:focus,
    .transactions-field select:focus { outline:none; border-color:#1f65d6; box-shadow:0 0 0 3px rgba(31,101,214,.18); }
    .transactions-actions { display:flex; gap:10px; align-items:center; }
    .transactions-actions button { border-radius:12px; padding:10px 18px; font-weight:600; cursor:pointer; border:none; transition:transform .15s ease, box-shadow .15s ease; }
    .transactions-actions .primary { background:#1f65d6; color:#fff; box-shadow:0 10px 22px rgba(31,101,214,.28); }
    .transactions-actions .primary:hover { transform:translateY(-2px); box-shadow:0 16px 28px rgba(31,101,214,.28); }
    .transactions-actions .secondary { background:var(--surface-card); border:1px solid var(--line); color:var(--text-muted); }
    .transactions-actions .ghost { background:transparent; border:1px dashed #cbd5f5; color:#1f65d6; }
    .transactions-table-wrapper { border:1px solid var(--line); border-radius:20px; overflow:hidden; box-shadow:0 18px 38px rgba(15,23,42,.12); background:var(--surface-card); }
    .transactions-table { width:100%; border-collapse:collapse; min-width:1080px; }
    .transactions-table thead {
      background:#e5edff;
      color:#1e3a8a;
      text-transform:uppercase;
      font-size:11px;
      letter-spacing:.08em;
      border-bottom:2px solid rgba(79,70,229,.25);
    }
    .transactions-table th {
      padding:14px 16px;
      font-weight:600;
      background:transparent;
    }
    .transactions-table td {
      padding:16px;
      border-bottom:1px solid rgba(226,232,240,.7);
      font-size:14px;
      vertical-align:top;
      color:var(--text-strong);
      background:var(--surface-card);
    }
    .transactions-table tbody tr:nth-child(even) { background:#f7f9ff; }
    .transactions-table tbody tr:hover { background:#f8fafc; }
    .transactions-ref { font-weight:600; color:#111827; }
    .transactions-note { color:#64748b; font-size:12px; margin-top:6px; }
    .transactions-student { font-weight:600; }
    .transactions-subtle { color:#64748b; font-size:12px; margin-top:4px; display:block; }
    .transactions-dates { display:flex; flex-direction:column; gap:4px; font-size:13px; }
    .transactions-dates span { display:block; }
    .transactions-amount { text-align:right; font-weight:700; font-size:16px; color:#0f172a; }
    .transactions-method { display:inline-flex; align-items:center; padding:4px 12px; border-radius:999px; background:#eef2ff; color:#1e3a8a; font-size:12px; font-weight:600; margin-top:6px; }
    .transactions-method.cash { background:#fef3c7; color:#92400e; }
    .transactions-method.transfer { background:#dcfce7; color:#166534; }
    .transactions-method.pos { background:#e0f2fe; color:#0c4a6e; }
    .transactions-method.balance { background:#fce7f3; color:#9d174d; }
    .transactions-method.wallet { background:#ede9fe; color:#5b21b6; }
    .transactions-empty { padding:52px 0; text-align:center; color:#94a3b8; }
    .transactions-empty { padding:40px 0; text-align:center; color:#94a3b8; }
    .module-header { display:flex; justify-content:space-between; align-items:center; }
    .module-header h2 { margin:0; font-size:22px; }
    .module-header p { margin:4px 0 0; color:#64748b; font-size:14px; }
    .module-body.two-column { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1.2fr); gap:24px; }
    .module-table { width:100%; border-collapse:collapse; background:var(--surface-card); border-radius:16px; overflow:hidden; box-shadow:0 10px 30px rgba(15,23,42,.08); }
    .module-table th, .module-table td { padding:14px 16px; border-bottom:1px solid var(--line); text-align:left; font-size:14px; }
    .module-table th { text-transform:uppercase; font-size:12px; color:var(--text-soft); letter-spacing:.08em; background:var(--surface-soft); }
    .module-table tbody tr.active { background:var(--surface-highlight); }
    .module-table tbody tr:hover { background:var(--surface-subtle); }
    .module-table .title { font-weight:600; color:var(--text-strong); }
    .module-table .subtitle { font-size:12px; color:var(--text-soft); }
    .module-table .actions { display:flex; gap:8px; }
    .module-message { padding:60px 0; text-align:center; color:#94a3b8; }
    .module-message-inline { margin-top:12px; font-size:13px; color:#22c55e; }
    .module-message-inline.error { color:#dc2626; }
    body.dark-mode main { background:radial-gradient(160% 120% at 50% -10%,rgba(11,18,38,.94) 0%,rgba(5,9,24,.94) 100%); }
    body.dark-mode .module--transactions,
    body.dark-mode .transactions-filters-card,
    body.dark-mode .transactions-table-wrapper,
    body.dark-mode .transactions-empty,
    body.dark-mode .transactions-metric,
    body.dark-mode .module-table,
    body.dark-mode .module-table th,
    body.dark-mode .module-table td {
      background:var(--surface);
      border-color:var(--line);
      color:#e2e8f0;
      box-shadow:0 26px 58px rgba(6,10,24,.6);
      backdrop-filter:blur(18px);
    }
    body.dark-mode .module-table th { color:#cbd5f5; background:rgba(20,27,56,.86); }
    body.dark-mode .module-table tbody tr:hover { background:rgba(88,80,220,.18); }
    body.dark-mode .transactions-module-header h2 { color:#e2e8f0; }
    body.dark-mode .transactions-module-header .module-subtitle { color:rgba(199,210,254,.7); }
    body.dark-mode .transactions-metric__label { color:rgba(165,180,252,.75); }
    body.dark-mode .transactions-metric__value { color:#f8fafc; }
    body.dark-mode .transactions-field label { color:rgba(165,180,252,.75); }
    body.dark-mode .transactions-field input,
    body.dark-mode .transactions-field select {
      background:rgba(17,24,39,.7);
      color:#e2e8f0;
      border:1px solid rgba(99,102,241,.35);
    }
    body.dark-mode .transactions-field input:focus,
    body.dark-mode .transactions-field select:focus {
      border-color:#818cf8;
      box-shadow:0 0 0 3px rgba(129,140,248,.25);
    }
    body.dark-mode .transactions-actions .secondary {
      background:rgba(17,24,39,.72);
      border:1px solid rgba(99,102,241,.32);
      color:#e2e8f0;
    }
    body.dark-mode .transactions-actions .ghost {
      border-color:rgba(129,140,248,.28);
      color:#93c5fd;
    }
    body.dark-mode .transactions-table thead { background:rgba(28,33,68,.88); color:#cbd5f5; }
    body.dark-mode .transactions-table th,
    body.dark-mode .transactions-table td { border-bottom:1px solid rgba(99,102,241,.25); }
    body.dark-mode .transactions-table td { background:transparent; color:#e2e8f0; }
    body.dark-mode .transactions-table tbody tr:hover { background:rgba(79,70,229,.18); }
    body.dark-mode .transactions-subtle { color:rgba(165,180,252,.75); }
    body.dark-mode .transactions-method { background:rgba(56,189,248,.16); color:#bae6fd; }
    body.dark-mode .transactions-method.cash { background:rgba(250,204,21,.18); color:#facc15; }
    body.dark-mode .transactions-method.transfer { background:rgba(34,197,94,.18); color:#bbf7d0; }
    body.dark-mode .transactions-method.pos { background:rgba(59,130,246,.18); color:#bfdbfe; }
    body.dark-mode .transactions-method.balance { background:rgba(249,168,212,.18); color:#fbcfe8; }
    body.dark-mode .transactions-method.wallet { background:rgba(165,180,252,.16); color:#e0e7ff; }
    body.dark-mode .transactions-empty { color:#a5b4fc; }
    .tag { display:inline-flex; align-items:center; padding:4px 10px; border-radius:999px; font-size:12px; }
    .tag.success { background:#22c55e; color:#fff; }
    .btn-outline { border:1px solid #cbd5f5; color:#2563eb; background:var(--surface-soft); padding:8px 14px; border-radius:10px; cursor:pointer; font-size:13px; }
    .btn-outline:hover { background:#e0f2fe; }
    .btn-outline.danger { color:#dc2626; border-color:#fecaca; background:#fff5f5; }
    .btn-outline.danger:hover { background:#fee2e2; }
    .module .form { background:var(--surface-card); border-radius:16px; padding:24px; box-shadow:0 10px 30px rgba(15,23,42,.08); border:1px solid var(--line); }
    .module .form label { display:block; font-weight:600; margin-top:12px; margin-bottom:6px; color:var(--text-strong); }
    .module .form input { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:10px; font-size:14px; color:var(--text-strong); background:var(--surface-card); }
    .module .form .checkbox { display:flex; align-items:center; gap:8px; font-weight:500; margin-top:12px; }
    .module .form .form-actions { display:flex; gap:12px; margin-top:18px; }

    .module .form textarea { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:12px; font-size:14px; color:var(--text-strong); background:var(--surface-card); }
    .module .form select { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:10px; font-size:14px; background:var(--surface-card); color:var(--text-strong); }
    .module .grid.two { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; }
    .module .grid.three { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; }
    .module .grid.checkbox-grid label { font-weight:500; }
    .autocomplete-field { position:relative; }
    .autocomplete-suggestions { position:absolute; top:calc(100% + 6px); left:0; right:0; background:var(--surface-card); border:1px solid var(--line); border-radius:12px; box-shadow:0 22px 40px rgba(15,23,42,.18); max-height:240px; overflow-y:auto; padding:6px 0; z-index:60; display:none; }
    .autocomplete-suggestions.show { display:block; }
    .autocomplete-option { width:100%; border:none; background:transparent; text-align:left; padding:8px 14px; display:flex; flex-direction:column; gap:4px; cursor:pointer; font-size:14px; color:var(--text-strong); }
    .autocomplete-option:hover,
    .autocomplete-option.active { background:#e0f2fe; }
    .autocomplete-name { font-weight:600; }
    .autocomplete-meta { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--text-soft); }
    .autocomplete-code { font-weight:600; color:#2563eb; }
    .autocomplete-hint { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:999px; background:var(--surface-subtle); color:var(--text-muted); font-size:12px; }
    .autocomplete-empty { padding:10px 14px; font-size:13px; color:#94a3b8; }

    .module.module-programs .list { overflow-x:auto; }
    .module.module-programs .form { position:sticky; top:0; align-self:start; }
    .module.module-programs input[type="number"],
    .module.module-programs input[type="text"],
    .module.module-programs select { font-size:14px; }
    .module-loading { display:inline-flex; align-items:center; gap:6px; justify-content:flex-start; width:auto; min-height:22px; margin-bottom:4px; opacity:0; transition:opacity .2s ease; pointer-events:none; color:var(--text-soft); font-size:12px; font-weight:500; }
    .module-loading.is-active { opacity:1; }
    .module-loading .spinner { width:16px; height:16px; border-width:2px; }
    .btn-refresh { display:inline-flex; align-items:center; gap:6px; padding:10px 14px; border-radius:999px; border:1px solid rgba(37,99,235,.3); background:rgba(59,130,246,.08); color:#2563eb; font-weight:600; font-size:13px; cursor:pointer; transition:background .2s ease, transform .1s ease; }
    .btn-refresh:hover { background:rgba(59,130,246,.15); }
    .btn-refresh:active { transform:translateY(1px); }

    .module .form.wide { grid-column:1 / -1; }

    .module.module-groups .module-actions { display:flex; gap:12px; align-items:center; }
    .group-stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin:22px 0 18px; }
    .group-stat { background:var(--surface-card); border-radius:14px; padding:16px; box-shadow:0 12px 28px rgba(15,23,42,.08); display:flex; flex-direction:column; gap:6px; }
    .group-stat .label { font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); }
    .group-stat strong { font-size:20px; color:var(--text-strong); font-weight:700; }

    .module-toolbar { background:var(--surface-card); border-radius:16px; padding:16px 18px; box-shadow:0 16px 32px rgba(15,23,42,.08); margin-bottom:22px; display:flex; flex-wrap:wrap; gap:16px; }
    .filters-row { display:flex; flex-wrap:wrap; gap:12px; width:100%; align-items:center; }
    .filters-left { display:flex; flex-wrap:wrap; gap:12px; flex:1 1 auto; }
    .filters-left .search-field { flex:2 1 280px; display:flex; }
    .filters-left .search-field input { width:100%; }
    .filters-left input[type="search"],
    .filters-left select { padding:8px 12px; border:1px solid var(--line); border-radius:10px; font-size:13px; background:var(--surface-card); width:100%; color:var(--text-strong); }
    .filters-left select { flex:1 1 160px; max-width:200px; }
    .filters-right { display:flex; align-items:center; justify-content:flex-end; flex:0 0 auto; }
    .filters-right button { padding:8px 16px; border:1px solid var(--line); border-radius:10px; font-size:13px; background:#f8fafc; cursor:pointer; font-weight:600; }

    .groups-layout { display:grid; grid-template-columns:minmax(0,2.2fr) minmax(340px,0.95fr); gap:20px; align-items:start; }
    .group-list-column { display:flex; flex-direction:column; gap:20px; }
    .group-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:12px; }
    .group-card { --group-accent:#2563eb; position:relative; background:linear-gradient(160deg, rgba(37,99,235,.025), rgba(37,99,235,.01)), var(--surface-card); border-radius:14px; padding:10px; box-shadow:0 10px 24px rgba(15,23,42,.06); border:1px solid #e6ecf5; display:flex; flex-direction:column; gap:10px; overflow:hidden; }
    .group-card::before { content:''; position:absolute; inset:0; border-radius:14px; border-left:3px solid var(--group-accent); opacity:.7; pointer-events:none; }
    .group-card::after { content:''; position:absolute; inset:-34% -16% auto auto; width:150px; height:150px; background:radial-gradient(circle at 50% 50%, rgba(37,99,235,.07), transparent 65%); opacity:.6; pointer-events:none; }
    .group-card > * { position:relative; z-index:1; }
    .group-card:hover { transform:translateY(-1px); box-shadow:0 14px 28px rgba(15,23,42,.1); border-color:rgba(37,99,235,.14); transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
    .group-card.active { border-color:#0ea5e9; box-shadow:0 22px 42px rgba(14,165,233,.22); --group-accent:#0ea5e9; }
    .group-card__header { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
    .group-card__title { display:flex; flex-direction:column; gap:4px; min-width:0; }
    .group-card__header h3 { margin:0; font-size:15px; line-height:1.2; color:var(--text-strong); overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; }
    .group-pill-row { display:flex; flex-wrap:wrap; gap:4px; }
    .group-pill { display:inline-flex; align-items:center; gap:4px; padding:5px 9px; border-radius:999px; background:var(--surface-subtle); color:var(--text-strong); font-size:11px; font-weight:600; border:1px solid var(--border-soft); }
    .group-pill.subtle { background:var(--surface-soft); color:var(--text-muted); }
    .group-pill.code-pill { background:rgba(37,99,235,.08); color:#1d4ed8; border-color:rgba(37,99,235,.3); }
    .group-tag { display:inline-flex; align-items:center; padding:4px 10px; border-radius:10px; font-size:11px; font-weight:700; letter-spacing:.02em; color:#1e3a8a; border:1px solid #d7e3ff; background:#eaf2ff; box-shadow:none; }
    .group-tag.status-active { background:#eaf2ff; color:#0b63ce; border-color:#c7dafd; }
    .group-tag.status-upcoming { background:#fff7ed; color:#b45309; border-color:#f5d6ad; }
    .group-tag.status-finished { background:#f5f7fb; color:#475569; border-color:#e3e7ee; }
    .group-tag.status-paused { background:#fef2f2; color:#b91c1c; border-color:#f6c6c6; }
    .group-card__body { display:flex; flex-direction:column; gap:8px; }
    .group-highlights { display:flex; flex-wrap:wrap; gap:6px; }
    .group-highlight { flex:1 1 140px; min-width:0; padding:8px 10px; border-radius:12px; border:1px solid var(--border-soft); background:var(--surface-soft); display:flex; flex-direction:column; gap:4px; }
    .meta-label { font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-soft); margin-bottom:4px; display:block; }
    .group-highlight .meta-label { margin-bottom:0; }
    .meta-value { font-size:14px; color:var(--text-strong); font-weight:600; }
    .group-meta-line { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
    .meta-chip { display:inline-flex; align-items:center; padding:4px 8px; border-radius:10px; background:var(--surface-soft); border:1px solid var(--border-soft); font-size:11px; color:var(--text-strong); font-weight:600; }
    .group-schedule { background:var(--surface-soft); border-radius:12px; padding:10px; display:flex; flex-direction:column; gap:8px; border:1px solid var(--border-soft); }
    .group-schedule.compact { border-style:solid; }
    .group-schedule-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
    .group-schedule-inline { display:flex; flex-wrap:wrap; gap:6px; }
    .schedule-chip { display:inline-flex; align-items:center; gap:4px; padding:4px 8px; border-radius:9px; background:var(--surface-card); border:1px solid var(--border-soft); font-size:11px; color:var(--text-muted); }
    .group-schedule-empty { font-size:12px; color:var(--text-soft); }
    .chip-count { padding:3px 8px; border-radius:999px; background:var(--surface-card); border:1px solid var(--border-soft); font-size:10px; color:var(--text-muted); }
    .group-people { display:flex; flex-wrap:wrap; gap:6px; }
    .person-chip { display:inline-flex; align-items:center; gap:6px; padding:5px 9px; border-radius:12px; background:rgba(37,99,235,.1); color:#1d4ed8; font-weight:600; font-size:11px; }
    .person-chip .dot { width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.7; }
    .person-chip.muted { background:var(--surface-subtle); color:var(--text-muted); }
    .group-note { font-size:11px; color:var(--text-muted); background:var(--surface-subtle); border-radius:9px; padding:8px; border:1px solid var(--border-soft); display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
    .group-card__actions { display:flex; gap:8px; flex-wrap:nowrap; justify-content:flex-end; }
    .group-card__actions button { flex:1 1 auto; min-width:0; padding:8px 10px; font-size:13px; border-radius:12px; }
    .group-card__actions .btn-primary { background:linear-gradient(135deg,#2b6fea,#2563eb); box-shadow:0 8px 18px rgba(37,99,235,.16); }
    .group-card__actions .btn-primary:hover { box-shadow:0 10px 22px rgba(37,99,235,.2); }
    .group-card__actions .btn-outline { border-radius:12px; }
    .group-form { position:sticky; top:24px; align-self:start; max-width:420px; width:100%; margin-left:auto; }
    .group-form .grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    .form-section { margin-top:18px; padding:16px; border-radius:14px; border:1px solid var(--line); background:var(--surface-soft); display:flex; flex-direction:column; gap:12px; }
    .form-section__title { font-weight:600; color:var(--text-strong); font-size:14px; }
    .schedule-row, .dayoff-row { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
    .schedule-row select, .dayoff-row input { padding:8px 10px; border:1px solid var(--line); border-radius:8px; font-size:13px; background:var(--surface-card); color:var(--text-strong); }
    .dayoff-row input[type="date"] { min-width:160px; }
    .module-message-inline.muted { color:#94a3b8; }

    .module-staff .staff-layout {
      display:grid;
      grid-template-columns:minmax(360px,0.6fr) minmax(560px,1fr);
      gap:20px;
      align-items:flex-start;
      padding:16px 24px 24px;
      width:100%;
      max-width:none;
      margin:0 auto;
    }
    .staff-left { display:flex; flex-direction:column; gap:20px; width:100%; background:none; color:inherit; }
    .staff-panel { background:var(--surface-card); border-radius:18px; border:1px solid var(--border-soft); box-shadow:0 10px 22px rgba(15,23,42,.08); padding:18px; display:flex; flex-direction:column; gap:16px; }
    body.dark-mode .staff-panel { background:var(--surface); border-color:var(--border-soft); box-shadow:0 26px 48px rgba(6,10,24,.55); }
    .staff-panel__headline { display:flex; flex-direction:column; gap:4px; }
    .staff-panel__title { font-size:13px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--text-strong); }
    .staff-panel__hint { font-size:12px; color:var(--text-soft); }
    .staff-search { position:relative; }
    .staff-search input { width:100%; padding:12px 42px 12px 16px; border-radius:12px; border:1px solid #d8dee9; background:var(--surface-soft); font-size:13px; transition:border-color .2s ease, box-shadow .2s ease, background .2s ease; color:var(--text-strong); }
    .staff-search input:focus { outline:none; border-color:#2563eb; box-shadow:0 0 0 3px rgba(37,99,235,.18); background:var(--surface-card); }
    .staff-search::after { content:'🔍'; position:absolute; right:14px; top:50%; transform:translateY(-50%); font-size:15px; opacity:.45; pointer-events:none; }
    .staff-role-filters { display:flex; flex-wrap:wrap; gap:8px; }
    .staff-tag { border:1px solid var(--border-soft); background:var(--surface-card); color:var(--text-strong); padding:6px 12px; border-radius:999px; font-size:12px; font-weight:500; cursor:pointer; transition:all .2s ease; }
    .staff-tag:hover { border-color:#2563eb; color:#2563eb; }
    .staff-tag.active { background:var(--accent); color:var(--accent-contrast); border-color:var(--accent); box-shadow:0 8px 20px var(--accent-shadow); }
    .staff-list-wrapper { border-radius:18px; background:var(--surface-card); border:1px solid var(--border-soft); padding:10px; box-shadow:0 14px 30px rgba(15,23,42,.08); }
    .staff-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
    .staff-list-item { border-radius:16px; border:1px solid var(--border-soft); background:var(--surface); transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
    .staff-list-item:hover { border-color:#2563eb; box-shadow:0 14px 28px rgba(37,99,235,.12); transform:translateY(-1px); }
    .staff-list-item.selected { border-color:#2563eb; box-shadow:0 16px 32px rgba(37,99,235,.18); }
    .staff-row { width:100%; border:none; background:none; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:14px; align-items:center; padding:14px 16px; cursor:pointer; text-align:left; }
    .staff-row:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
    .staff-avatar { width:46px; height:46px; border-radius:16px; background:linear-gradient(135deg,#2563eb,#1d4ed8); color:#fff; font-weight:600; font-size:15px; display:flex; align-items:center; justify-content:center; box-shadow:0 12px 22px rgba(37,99,235,.25); }
    .staff-row-main { display:flex; flex-direction:column; gap:8px; }
    .staff-row-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
    .staff-name { font-size:16px; font-weight:600; color:var(--text-strong); }
    .staff-status { padding:4px 10px; border-radius:999px; font-size:12px; font-weight:600; text-transform:capitalize; }
    .staff-status.status-active { background:#dcfce7; color:#15803d; }
    .staff-status.status-inactive { background:#fef3c7; color:#b45309; }
    .staff-status.status-blocked { background:#fee2e2; color:#b91c1c; }
    .staff-status.status-retired { background:#e2e8f0; color:#475569; }
    .staff-status.status-null { background:#f1f5f9; color:#475569; }
    .staff-row-meta { display:flex; flex-wrap:wrap; gap:6px; font-size:12px; color:var(--text-soft); }
    .staff-meta { display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; background:var(--surface-subtle); color:var(--text-muted); font-weight:500; }
    .staff-meta.staff-blank { background:transparent; border:1px dashed #cbd5f5; color:#94a3b8; }
    .staff-row-tags { display:flex; flex-wrap:wrap; gap:6px; }
    .staff-chip { display:inline-flex; align-items:center; padding:3px 10px; border-radius:10px; background:rgba(37,99,235,.12); color:#1d4ed8; font-size:12px; font-weight:500; }
    .staff-row-extra { display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--text-muted); text-align:right; }
    .staff-row-extra span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:140px; }
    .staff-list .module-message { padding:24px 16px; text-align:center; border:1px dashed #dce3ef; border-radius:14px; color:var(--text-soft); background:var(--surface-soft); }
    .staff-body-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; font-size:13px; color:var(--text-muted); }
    .staff-body-grid .label { font-weight:600; color:var(--text-strong); display:block; margin-bottom:4px; }
    .staff-permission-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:8px; font-size:12px; color:var(--text-muted); }
    .staff-permission-list span { display:flex; align-items:center; padding:6px 10px; border-radius:10px; background:var(--surface-card); border:1px solid var(--border-soft); }
    .staff-notes { background:var(--surface-card); border:1px solid var(--border-muted); border-radius:12px; padding:12px 14px; font-size:13px; color:var(--text-muted); line-height:1.5; }
    .staff-actions { display:flex; justify-content:flex-end; }
    .staff-actions button { padding:8px 16px; border-radius:10px; border:1px solid #2563eb; background:#2563eb; color:#fff; font-size:13px; font-weight:600; cursor:pointer; transition:opacity .2s ease, transform .2s ease; }
    .staff-actions button:hover { opacity:.9; transform:translateY(-1px); }
    .module-staff .staff-form { background:var(--surface-card); border-radius:24px; border:1px solid var(--border-soft); box-shadow:0 26px 48px rgba(15,23,42,.12); overflow:hidden; position:sticky; top:20px; display:flex; flex-direction:column; }
    body-dark-mode .module-staff .staff-form { background:var(--surface); border-color:var(--border-soft); box-shadow:0 32px 64px rgba(6,10,24,.6); }
    @media (max-width: 1100px) {
      .module-staff .staff-layout { grid-template-columns:minmax(0,1fr); padding:16px; }
    .module-staff .staff-form { position:relative; top:auto; }
    }

    @media (max-width: 1400px) {
      .groups-layout { grid-template-columns:1fr; }
      .group-form { position:relative; top:auto; max-width:none; margin:0; }
    }

    @media (max-width: 640px) {
      .group-form .grid.two { grid-template-columns:1fr; }
    }
    .staff-form form { display:flex; flex-direction:column; min-height:100%; }
    .staff-form-header { padding:24px 28px 18px; border-bottom:1px solid var(--border-soft); display:flex; flex-direction:column; gap:6px; }
    .staff-form-header .form-title { margin:0; font-size:20px; font-weight:600; color:var(--text-strong); }
    .staff-form-subtitle { margin:0; font-size:13px; color:var(--text-soft); }
    .staff-form-body { padding:24px 28px; display:flex; flex-direction:column; gap:24px; }
    .staff-form-section { display:flex; flex-direction:column; gap:16px; }
    .staff-form-section h4 { margin:0; font-size:15px; font-weight:600; color:var(--text-strong); }
    .staff-form-section p.section-description { margin:0; font-size:13px; color:var(--text-soft); }
    .staff-form-section .section-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
    .staff-form-section label { display:flex; flex-direction:column; gap:8px; font-size:13px; font-weight:600; color:var(--text-strong); }
    .staff-form-section input,
    .staff-form-section select,
    .staff-form-section textarea { border:1px solid var(--line); border-radius:12px; padding:10px 12px; background:var(--surface-card); font-size:13px; transition:border-color .2s ease, box-shadow .2s ease, background .2s ease; color:var(--text-strong); }
    .staff-form-section input:focus,
    .staff-form-section select:focus,
    .staff-form-section textarea:focus { outline:none; border-color:var(--accent); background:var(--surface-card); box-shadow:0 0 0 3px var(--accent-soft); }
    .staff-form-section textarea { resize:vertical; min-height:120px; }
    .staff-role-options,
    .staff-permission-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px; max-height:220px; overflow:auto; padding:0; }
    .staff-permission-options { max-height:none; }
    .staff-permission-toggle { border:1px dashed var(--border-soft); border-radius:16px; padding:12px 16px; background:var(--surface-soft); }
    .staff-permission-toggle summary { cursor:pointer; font-weight:600; color:var(--accent-strong); display:flex; align-items:center; gap:8px; list-style:none; }
    .staff-permission-toggle summary::-webkit-details-marker { display:none; }
    .staff-permission-toggle[open] summary { margin-bottom:12px; }
    .staff-role-options label,
    .staff-permission-options label { display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--surface-card); font-size:12px; font-weight:500; color:var(--text-strong); transition:background .16s ease, color .16s ease, border-color .16s ease; }
    .staff-role-options input,
    .staff-permission-options input { accent-color:var(--accent); width:16px; height:16px; }
.staff-flags { display:flex; flex-wrap:wrap; gap:10px; }
    .staff-flags .checkbox { margin:0; border:1px solid var(--line); background:var(--surface-card); border-radius:12px; padding:10px 12px; font-size:12px; font-weight:500; color:var(--text-strong); transition:background .16s ease, color .16s ease, border-color .16s ease; }
    .staff-flags .checkbox.checked { background:var(--accent); color:var(--accent-contrast); border-color:var(--accent); box-shadow:0 10px 24px var(--accent-shadow); }
    .staff-flags .checkbox input { width:16px; height:16px; accent-color:var(--accent); }
    body.dark-mode .staff-flags .checkbox { background:var(--surface); border-color:var(--border-soft); }
    body.dark-mode .staff-flags .checkbox.checked { background:var(--accent); color:var(--accent-contrast); border-color:var(--accent); }
    .staff-form .crm-field-hint { font-size:12px; font-weight:400; color:var(--text-soft); }
    .staff-form-footer { margin-top:auto; padding:20px 28px; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:12px; }
    .staff-form-footer .form-actions { display:flex; flex-wrap:wrap; gap:12px; }
    .staff-form-footer .module-message-inline { font-size:13px; color:var(--text-strong); }
    .module-message-inline.error { color:#dc2626; }

    .auth-overlay {
      position:fixed;
      inset:0;
      display:grid;
      grid-template-columns:repeat(2,minmax(0,1fr));
      background:linear-gradient(135deg,#0f172a,#1d2746);
      overflow:hidden;
      z-index:80;
      opacity:0;
      pointer-events:none;
      transition:opacity .25s ease;
      color:#fff;
    }
    .auth-overlay::before {
      content:"";
      position:absolute;
      inset:-20%;
      background:radial-gradient(circle at 30% 20%, rgba(56,189,248,.45), transparent 60%),
                  radial-gradient(circle at 70% 80%, rgba(249,115,22,.4), transparent 55%);
      filter:blur(20px);
      opacity:.9;
      z-index:0;
    }
    body.auth-locked .auth-overlay {
      opacity:1;
      pointer-events:auto;
    }
    .auth-brand {
      position:relative;
      z-index:1;
      padding:60px 80px;
      display:flex;
      flex-direction:column;
      justify-content:center;
      gap:24px;
    }
    .auth-brand__logo {
      display:flex;
      align-items:center;
      gap:14px;
      font-size:28px;
      font-weight:700;
      letter-spacing:.08em;
      text-transform:uppercase;
    }
    .auth-brand__logo span {
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width:46px;
      height:46px;
      border-radius:14px;
      background:rgba(255,255,255,.15);
      font-size:20px;
      font-weight:600;
    }
    .auth-brand__tagline {
      max-width:420px;
      font-size:18px;
      line-height:1.55;
      color:rgba(255,255,255,.88);
    }
    .auth-brand__tagline strong { color:#fbbf24; }
    .auth-brand__illustration {
      margin-top:20px;
      border-radius:24px;
      border:1px solid rgba(255,255,255,.14);
      padding:26px 30px;
      backdrop-filter:blur(12px);
      background:rgba(15,23,42,.35);
      max-width:420px;
      display:flex;
      flex-direction:column;
      gap:12px;
      font-size:14px;
    }
    .auth-brand__illustration h3 { margin:0; font-size:18px; font-weight:600; color:#f8fafc; }
    .auth-brand__pill-row { display:flex; gap:8px; flex-wrap:wrap; }
    .auth-brand__pill { padding:6px 12px; border-radius:999px; background:rgba(148,163,184,.28); font-size:12px; letter-spacing:.04em; text-transform:uppercase; }
    .auth-card {
      position:relative;
      z-index:1;
      display:flex;
      align-items:center;
      justify-content:center;
      padding:60px 80px;
    }
    .auth-card__inner {
      width:min(420px, 100%);
      background:#f8fafc;
      border-radius:24px;
      padding:40px 36px;
      box-shadow:0 32px 64px rgba(15,23,42,.35);
      display:flex;
      flex-direction:column;
      gap:22px;
      color:#0f172a;
    }
    .auth-card__header h2 { margin:0; font-size:26px; font-weight:700; color:#0f172a; }
    .auth-card__header p { margin:8px 0 0; font-size:14px; color:#475569; }
    .auth-form { display:flex; flex-direction:column; gap:18px; }
    .auth-field { display:flex; flex-direction:column; gap:8px; font-size:13px; color:#475569; }
    .auth-field span { font-weight:600; letter-spacing:.03em; text-transform:uppercase; }
    .auth-field input {
      padding:12px 14px;
      border-radius:12px;
      border:1px solid #d0d7ef;
      font-size:14px;
      background:#fff;
      transition:border-color .2s ease, box-shadow .2s ease;
    }
    .auth-field input:focus {
      border-color:#2563eb;
      box-shadow:0 0 0 3px rgba(37,99,235,.2);
      outline:none;
    }
    .auth-error { min-height:20px; font-size:13px; color:#ef4444; }
    .auth-actions { display:flex; gap:14px; align-items:center; }
    .auth-actions .btn-primary {
      flex:1;
      padding:14px;
      background:linear-gradient(135deg,#2563eb,#1d4ed8);
      border:none;
      border-radius:12px;
      color:#fff;
      font-weight:600;
      cursor:pointer;
      box-shadow:0 18px 32px rgba(37,99,235,.32);
      transition:transform .15s ease, box-shadow .15s ease;
    }
    .auth-actions .btn-primary:hover {
      transform:translateY(-1px);
      box-shadow:0 22px 40px rgba(37,99,235,.45);
    }
    .auth-actions .link-alt {
      background:none;
      border:none;
      color:#2563eb;
      font-size:13px;
      cursor:pointer;
      padding:0;
      font-weight:600;
    }
    .auth-hint { margin:0; font-size:12px; color:#94a3b8; text-align:center; }
    @media (max-width:960px) {
      .auth-overlay { grid-template-columns:1fr; overflow:auto; }
      .auth-brand { padding:40px 32px 20px; align-items:flex-start; gap:18px; }
      .auth-card { padding:20px 24px 40px; }
      .auth-card__inner { width:100%; }
    }


    .settings-overlay {
      position:fixed;
      inset:0;
      background:rgba(15,23,42,.4);
      display:flex;
      align-items:flex-start;
      justify-content:flex-start;
      padding:80px 0 80px 120px;
      opacity:0;
      pointer-events:none;
      transition:opacity .2s ease;
      z-index:30;
    }
    .settings-overlay.active { opacity:1; pointer-events:auto; }
    .settings-panel {
      width:320px;
      background:var(--surface-panel);
      color:var(--text-strong);
      border-radius:16px;
      border:1px solid var(--border-soft);
      box-shadow:var(--modal-shadow);
      overflow:hidden;
    }
    .settings-panel__header {
      padding:18px 24px;
      font-size:16px;
      font-weight:600;
      border-bottom:1px solid var(--border-soft);
      display:flex;
      justify-content:space-between;
      align-items:center;
    }
    .settings-panel__header button {
      background:transparent;
      border:none;
      color:var(--text-soft);
      font-size:20px;
      cursor:pointer;
    }
    .settings-list { padding:16px 0; display:flex; flex-direction:column; }
    .settings-list button {
      background:transparent;
      border:none;
      color:inherit;
      text-align:left;
      padding:12px 20px 12px 18px;
      cursor:pointer;
      display:block;
      width:100%;
      border-radius:12px;
      transition:background .2s ease, box-shadow .2s ease;
    }
    .settings-item__label {
      display:block;
      font-weight:500;
      font-size:15px;
      letter-spacing:.15px;
      color:var(--text-strong);
    }
    .settings-list button .subtitle {
      display:block;
      font-size:12px;
      color:var(--text-soft);
      margin-top:2px;
    }
    .settings-list button:hover,
    .settings-list button.active {
      background:rgba(255,255,255,.12);
      color:var(--text-strong);
      box-shadow:0 12px 28px rgba(15,23,42,.12);
    }
    .settings-list button:hover .settings-item__label,
    .settings-list button.active .settings-item__label {
      color:var(--accent-strong);
    }
    .settings-item__title {
      display:flex;
      align-items:center;
      gap:12px;
    }
    .settings-item__icon {
      width:30px;
      height:30px;
      border-radius:10px;
      background:rgba(255,255,255,.16);
      display:inline-flex;
      align-items:center;
      justify-content:center;
      color:var(--text-soft);
      box-shadow:0 6px 14px rgba(15,23,42,.1);
      transition:background .2s ease, color .2s ease, transform .2s ease;
    }
    .settings-item__icon svg { width:18px; height:18px; stroke:currentColor; }
    .settings-list button:hover .settings-item__icon,
    .settings-list button.active .settings-item__icon {
      background:rgba(255,255,255,.9);
      color:var(--accent-strong);
      transform:translateX(1px);
    }
    .settings-item__label {
      font-weight:500;
    }
    body.dark-mode .settings-item__icon {
      background:rgba(248,250,252,.12);
      color:var(--text-soft);
      box-shadow:0 6px 16px rgba(0,0,0,.35);
    }
    body.dark-mode .settings-list button:hover,
    body.dark-mode .settings-list button.active {
      background:rgba(56,189,248,.1);
      box-shadow:0 12px 28px rgba(0,0,0,.45);
    }
    body.dark-mode .settings-list button:hover .settings-item__icon,
    body.dark-mode .settings-list button.active .settings-item__icon {
      background:rgba(56,189,248,.18);
      color:#e0f2ff;
    }


    .module-group-detail { padding-bottom:48px; }
    .module-group-detail .group-detail-layout { display:flex; flex-direction:column; gap:24px; margin:0; padding:0; max-width:100%; }
    .module-group-detail .group-info-layout { display:grid; grid-template-columns:minmax(240px, 320px) minmax(0,1fr); gap:24px; align-items:flex-start; }
    .module-group-detail .group-info-summary { display:flex; flex-direction:column; gap:16px; position:sticky; top:16px; }
    .module-group-detail .group-info-body { display:flex; flex-direction:column; gap:20px; }
    .module-group-detail .summary-eduspace { background:var(--surface-card); border:1px solid var(--border-muted); border-radius:8px; padding:18px 20px; display:flex; flex-direction:column; gap:14px; box-shadow:0 18px 36px rgba(6,10,24,.55); }
    .module-group-detail .summary-eduspace__header h3 { margin:0; font-size:20px; color:var(--text-strong); }
    .module-group-detail .summary-eduspace__header p { margin:4px 0 0; font-size:13px; color:var(--text-soft); }
    .module-group-detail .summary-eduspace__stats { display:flex; flex-direction:column; gap:6px; margin:0; }
    .module-group-detail .summary-eduspace__stats div { display:flex; justify-content:space-between; align-items:center; font-size:13px; color:var(--text-muted); }
    .module-group-detail .summary-eduspace__stats dt { font-weight:600; color:var(--text-soft); }
    .module-group-detail .summary-eduspace__stats dd { margin:0; font-weight:600; }
    .module-group-detail .summary-eduspace__stats .weekday-badges { display:flex; gap:6px; }
    .module-group-detail .summary-eduspace__stats .weekday-badges span { background:#0b65c2; color:#fff; border-radius:4px; padding:2px 8px; font-size:11px; box-shadow:0 10px 20px rgba(11,101,194,.35); }
    .module-group-detail .summary-eduspace__schedule { display:flex; flex-direction:column; gap:6px; }
    .module-group-detail .schedule-chip { background:linear-gradient(135deg,#2563eb,#0b65c2); color:#fff; border:none; border-radius:4px; padding:6px 10px; font-size:12px; text-align:left; cursor:default; box-shadow:0 16px 26px rgba(11,101,194,.35); }
    .module-group-detail .schedule-empty { color:var(--text-soft); font-size:12px; }
    .module-group-detail .summary-eduspace__checkbox { font-size:12px; color:var(--text-soft); display:flex; gap:6px; align-items:center; }
    .module-group-detail .summary-eduspace__link { font-size:12px; color:#0b65c2; text-decoration:none; }
    .module-group-detail .summary-eduspace__link:hover { text-decoration:underline; }
    .module-group-detail .summary-eduspace__buttons { display:flex; flex-direction:column; gap:8px; }
    .module-group-detail .eduspace-btn { border:none; border-radius:4px; padding:10px 16px; font-size:13px; font-weight:600; cursor:pointer; }
    .module-group-detail .eduspace-btn.primary { background:#0b65c2; color:#fff; }
    .module-group-detail .eduspace-btn.secondary { background:#d9e3f4; color:#1f2a37; }
    .module-group-detail .eduspace-btn.danger { background:#f2994a; color:#fff; }
    .module-group-detail .eduspace-btn:hover { opacity:.92; }
    .module-group-detail .summary-eduspace__footer { font-size:12px; color:var(--text-soft); text-transform:uppercase; letter-spacing:.05em; }
    .module-group-detail .summary-message { min-height:18px; font-size:12px; color:#93c5fd; }
    .module-group-detail .group-detail-main { display:flex; flex-direction:column; gap:20px; }
    .module-group-detail .btn-primary { background:#2563eb; color:#fff; border:none; border-radius:12px; padding:9px 20px; font-weight:600; cursor:pointer; box-shadow:0 10px 20px rgba(37,99,235,.25); transition:transform .15s ease, box-shadow .15s ease; }
    .module-group-detail .btn-primary:hover { transform:translateY(-1px); box-shadow:0 12px 24px rgba(37,99,235,.28); }
    .module-group-detail .btn-link { background:transparent; border:none; color:#60a5fa; font-weight:500; cursor:pointer; padding:0 6px; }
    .module-group-detail .group-students-panel { display:flex; flex-direction:column; gap:18px; }
    .module-group-detail .students-toolbar { display:flex; justify-content:flex-start; align-items:center; gap:12px; }
    .module-group-detail .students-search { display:flex; gap:12px; align-items:center; }
    .module-group-detail .students-search input { width:320px; border-radius:4px; border:1px solid rgba(99,102,241,.28); padding:10px 12px; font-size:13px; background:var(--surface-card); color:var(--text-strong); }
    .module-group-detail .students-search input:focus { outline:none; border-color:#0b65c2; box-shadow:0 0 0 2px rgba(11,101,194,.2); }
    .module-group-detail .students-search .search-btn { background:linear-gradient(135deg,#2563eb,#0b65c2); color:#fff; border:none; border-radius:4px; padding:10px 18px; font-size:13px; font-weight:600; cursor:pointer; box-shadow:0 16px 28px rgba(11,101,194,.35); }
    .module-group-detail .students-search .search-btn:hover { opacity:.92; }
    .module-group-detail .students-search .search-clear { background:transparent; border:none; color:#0b65c2; font-size:12px; cursor:pointer; }
    .module-group-detail .students-table-wrapper { background:var(--surface-card); border-radius:14px; border:1px solid var(--border-soft); overflow:hidden; box-shadow:0 14px 28px rgba(15,23,42,.18); }
    .module-group-detail table.students-table { width:100%; border-collapse:separate; border-spacing:0; background:var(--surface-card); }
    .module-group-detail table.students-table thead { background:var(--surface-subtle); color:var(--text-strong); font-weight:700; font-size:13px; box-shadow:inset 0 -1px var(--border-soft); position:sticky; top:0; z-index:1; }
    .module-group-detail table.students-table th,
    .module-group-detail table.students-table td { padding:12px 14px; text-align:left; border-bottom:1px solid var(--border-soft); font-size:13px; }
    .module-group-detail table.students-table td { color:var(--text-strong); background:transparent; transition:color .18s ease; }
    .module-group-detail table.students-table tbody tr { background:var(--surface-card); transition:background .18s ease, box-shadow .18s ease; }
    .module-group-detail table.students-table tbody tr:nth-child(even) { background:var(--surface-soft); }
    .module-group-detail table.students-table tbody tr:hover { background:var(--surface-highlight); box-shadow:inset 0 0 0 1px rgba(37,99,235,.08); }
    .module-group-detail .students-col-select { width:48px; text-align:center; }
    .module-group-detail .students-col-code .students-code { font-weight:600; color:var(--text-strong); margin-bottom:4px; }
    .module-group-detail .students-code-actions { display:flex; gap:6px; font-size:12px; color:#0b65c2; }
    .module-group-detail .students-col-name { font-weight:700; letter-spacing:.04em; color:var(--text-strong); }
    .module-group-detail .students-col-phone { font-family:'Roboto Mono', monospace; font-size:13px; color:var(--text-muted); }
    .module-group-detail .students-col-date { font-size:13px; color:var(--text-soft); }
    .module-group-detail .students-col-payment { min-width:150px; }
    .module-group-detail .students-badge { display:inline-flex; align-items:center; justify-content:center; padding:5px 12px; border-radius:999px; font-size:11px; font-weight:700; margin-bottom:4px; text-transform:uppercase; box-shadow:0 10px 18px rgba(15,23,42,.12); }
    .module-group-detail .students-badge-paid { background:linear-gradient(135deg,#22c55e,#16a34a); color:#fff; }
    .module-group-detail .students-badge-pending { background:linear-gradient(135deg,#f43f5e,#ef4444); color:#fff; }
    .module-group-detail .students-badge-partial { background:linear-gradient(135deg,#f59e0b,#f97316); color:#fff; }
    .module-group-detail .students-badge-muted { background:linear-gradient(135deg,rgba(99,102,241,.18),rgba(37,99,235,.12)); color:#334155; }
    .module-group-detail .students-col-payment a { color:#0b65c2; font-size:12px; font-weight:600; }
    .module-group-detail .students-payment-note { font-size:12px; color:var(--text-soft); margin-top:4px; }
    .module-group-detail .students-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding-top:12px; }
    .module-group-detail .students-footer-left { display:flex; gap:10px; }
    .module-group-detail .students-footer-left .btn-outline { background:#0b65c2; color:#fff; border:none; border-radius:4px; padding:8px 16px; font-size:13px; cursor:pointer; }
    .module-group-detail .students-footer-left .btn-outline + .btn-outline { background:#adb5bd; }
    .module-group-detail .students-footer-right { display:flex; gap:10px; align-items:center; }
    .module-group-detail .students-footer-right select { border-radius:4px; border:1px solid var(--border-soft); padding:8px 12px; font-size:13px; background:var(--surface-card); color:var(--text-strong); transition:border-color .18s ease, box-shadow .18s ease; }
    .module-group-detail .students-footer-right .btn-outline { background:linear-gradient(135deg,#2563eb,#0b65c2); color:#fff; border:none; border-radius:6px; padding:8px 18px; font-size:13px; box-shadow:0 16px 28px rgba(11,101,194,.35); }
    .module-group-detail .students-helper { font-size:12px; color:#93c5fd; min-height:18px; }

    .module-group-detail .attendance-panel { display:flex; flex-direction:column; gap:16px; }
    .module-group-detail .attendance-filter { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
    .module-group-detail .attendance-filter label { display:flex; align-items:center; gap:6px; font-size:13px; color:var(--text-soft); }
    .module-group-detail .attendance-filter input[type="date"] { border:1px solid rgba(99,102,241,.28); border-radius:6px; padding:8px 12px; font-size:13px; background:var(--surface-card); color:var(--text-strong); }
    .module-group-detail .attendance-filter .attendance-toggle { margin-left:auto; font-size:12px; color:var(--text-soft); }
    .module-group-detail .attendance-table-wrapper { overflow:auto; border:1px solid rgba(99,102,241,.22); border-radius:14px; background:var(--surface-card); max-width:100%; box-shadow:0 28px 52px rgba(6,10,24,.55); }
    .module-group-detail table.attendance-table { width:100%; border-collapse:collapse; min-width:960px; }
    .module-group-detail table.attendance-table th,
    .module-group-detail table.attendance-table td { border:1px solid rgba(99,102,241,.22); padding:12px 14px; font-size:12px; text-align:center; background:var(--surface-card); color:var(--text-strong); }
    .module-group-detail table.attendance-table thead th { background:var(--surface-subtle); color:var(--text-soft); font-weight:600; position:sticky; top:0; }
    .module-group-detail table.attendance-table tbody tr:nth-child(even) { background:var(--surface-soft); }
    .module-group-detail table.attendance-table tbody tr:hover { background:var(--surface-subtle); }
    .module-group-detail table.attendance-table .att-cell--makeup-completed { background:rgba(14,165,233,.12); color:#0369a1; font-weight:600; }
    .module-group-detail table.attendance-table .att-cell--makeup-completed::after { content:'★'; margin-left:4px; font-size:10px; vertical-align:middle; color:#0284c7; }
    .module-group-detail .att-student-header { text-align:left; width:220px; }
    .module-group-detail .att-student { text-align:left; }
    .module-group-detail .att-name { font-weight:700; color:var(--text-strong); display:block; margin-bottom:4px; }
    .module-group-detail .att-progress { display:inline-block; background:linear-gradient(135deg,#22c55e,#059669); color:#fff; border-radius:4px; padding:2px 6px; font-size:11px; font-weight:600; box-shadow:0 12px 22px rgba(34,197,94,.32); }
    .module-group-detail .attendance-header { display:flex; flex-direction:column; gap:4px; align-items:center; font-size:12px; color:var(--text-soft); }
    .module-group-detail .attendance-header__title { font-weight:600; }
    .module-group-detail .attendance-header__subtitle { color:var(--text-soft); }
    .module-group-detail .attendance-edit { border:none; background:transparent; color:#0b65c2; font-size:11px; cursor:pointer; }
    .module-group-detail .attendance-edit:hover { text-decoration:underline; }
    .module-group-detail .att-status-present { color:#15803d; font-size:14px; font-weight:700; }
    .module-group-detail .att-status-absent { color:#dc2626; font-size:14px; font-weight:700; }
    .module-group-detail .att-status-late,
    .module-group-detail .att-status-excused,
    .module-group-detail .att-status-unexcused,
    .module-group-detail .att-status-makeup,
    .module-group-detail .att-status-pending { color:var(--text-strong); font-size:13px; }
    .module-group-detail .att-status-empty { color:var(--text-soft); font-size:12px; }
    .module-group-detail .att-cell { min-width:70px; }
    .module-group-detail .att-cell--inactive { background:var(--surface-subtle); color:var(--text-soft); }
    .module-group-detail .att-empty { text-align:center; color:var(--text-soft); padding:18px; background:var(--surface-soft); border-radius:12px; box-shadow:0 18px 36px rgba(6,10,24,.45); }
    .module-group-detail .attendance-footer { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; color:var(--text-soft); }
    .module-group-detail .attendance-footer-left { display:flex; gap:10px; }
    .module-group-detail .attendance-footer-left .att-btn { background:linear-gradient(135deg,#2563eb,#0b65c2); color:#fff; border:none; border-radius:6px; padding:8px 16px; font-size:13px; font-weight:600; cursor:pointer; box-shadow:0 18px 32px rgba(11,101,194,.35); }
    .module-group-detail .attendance-footer-left .att-btn:hover { opacity:.92; }
    .module-group-detail .attendance-footer-right { display:flex; gap:6px; }
    .module-group-detail .pager-btn { border:1px solid rgba(99,102,241,.32); background:var(--surface-card); border-radius:50%; width:32px; height:32px; display:inline-flex; align-items:center; justify-content:center; font-size:13px; cursor:pointer; color:var(--text-strong); }
    .module-group-detail .pager-btn.active { background:linear-gradient(135deg,#4f46e5,#38bdf8); color:#fff; border-color:transparent; box-shadow:0 16px 28px rgba(17,24,39,.55); }
    body.attendance-modal-open { overflow:hidden; }
    .attendance-modal { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(15,23,42,.38); backdrop-filter:blur(12px); z-index:120; opacity:0; pointer-events:none; transition:opacity .32s cubic-bezier(.16,1,.3,1); --att-start-x:0px; --att-start-y:24px; --att-start-scale:.82; }
    .attendance-modal.is-active { opacity:1; pointer-events:auto; }
    .attendance-modal.is-leaving { opacity:0; pointer-events:none; }
    .attendance-modal__dialog { width:min(1100px,95vw); max-height:95vh; background:var(--surface-card); border-radius:18px; display:flex; flex-direction:column; box-shadow:0 32px 80px rgba(15,23,42,.32); overflow:hidden; transform-origin:center center; transform:translate3d(var(--att-start-x),var(--att-start-y),0) scale(var(--att-start-scale)); opacity:0; transition:transform .4s cubic-bezier(.16,1,.3,1), opacity .28s ease; }
    .attendance-modal.is-active .attendance-modal__dialog { transform:translate3d(0,0,0) scale(1); opacity:1; }
    .attendance-modal.is-leaving .attendance-modal__dialog { transform:translate3d(var(--att-start-x),var(--att-start-y),0) scale(calc(var(--att-start-scale) * 0.9)); opacity:0; }
    .attendance-modal__header { display:flex; justify-content:space-between; align-items:center; padding:20px 26px; border-bottom:1px solid var(--border-soft); font-size:18px; font-weight:600; color:var(--text-strong); background:var(--surface-soft); }
    .attendance-modal__close { border:none; background:transparent; font-size:28px; cursor:pointer; color:var(--text-soft); transition:color .18s ease; }
    .attendance-modal__close:hover { color:var(--text-strong); }
    .attendance-modal__body { padding:18px 24px; overflow:auto; display:flex; flex-direction:column; gap:18px; background:var(--surface-soft); color:var(--text-strong); }
    .attendance-modal__form { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; }
    .attendance-modal__form--primary { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
    .attendance-modal__form label { display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--text-soft); }
    .attendance-modal__form input,
    .attendance-modal__form select { border:1px solid var(--border-soft); border-radius:6px; padding:8px 10px; font-size:13px; background:var(--surface-card); color:var(--text-strong); transition:border-color .18s ease, box-shadow .18s ease; }
    .attendance-modal__form input:focus,
    .attendance-modal__form select:focus { outline:none; border-color:#2563eb; box-shadow:0 0 0 2px rgba(37,99,235,.16); }
    .attendance-modal__classField select { margin-bottom:4px; }
    .attendance-modal__shiftHint { font-size:12px; color:var(--text-soft); min-height:16px; display:inline-flex; align-items:center; }
    .attendance-modal__note { grid-column:1 / -1; }
    .attendance-modal__note textarea { border:1px solid var(--border-soft); border-radius:8px; padding:10px 12px; min-height:90px; resize:vertical; font-size:13px; background:var(--surface-card); color:var(--text-strong); }
    .attendance-modal__advanced { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
    .attendance-modal__advanced input[readonly] { background:var(--surface-soft); color:var(--text-muted); cursor:not-allowed; }
    .attendance-modal__toggle { align-self:flex-start; }
    .attendance-modal__table { overflow:auto; border:1px solid var(--border-soft); border-radius:10px; background:var(--surface-card); }
    .attendance-modal__table table { width:100%; border-collapse:collapse; min-width:720px; }
    .attendance-modal__table th,
    .attendance-modal__table td { border:1px solid var(--border-soft); padding:8px; font-size:12px; text-align:left; vertical-align:middle; color:var(--text-strong); background:transparent; }
    .attendance-modal__table th { background:var(--surface-subtle); font-weight:600; }
    .att-modal-radio label { display:block; font-size:12px; color:var(--text-strong); }
    .att-modal-flags label { display:block; font-size:12px; color:var(--text-soft); }
    .att-modal-flags .att-modal-flag--permission.is-permitted { color:#1f8b5f; font-weight:600; }
    .att-modal-flags .att-modal-flag--permission.is-unexcused { color:#c0392b; font-weight:600; }
    .att-modal-row--makeup-completed { background: rgba(14,165,233,.08); }
    .att-modal-row--makeup-completed .att-modal-radio label { color:#0369a1; font-weight:600; }
    .att-modal-badge { display:inline-block; margin-left:6px; padding:2px 6px; border-radius:999px; font-size:11px; font-weight:600; }
    .att-modal-badge--makeup { background: rgba(14,165,233,.2); color:#0369a1; }
    .att-modal-score input { width:60px; border:1px solid var(--border-soft); border-radius:4px; padding:4px 6px; font-size:12px; background:var(--surface-card); color:var(--text-strong); transition:border-color .18s ease, box-shadow .18s ease; }
    .att-modal-score input:focus { outline:none; border-color:#2563eb; box-shadow:0 0 0 2px rgba(37,99,235,.16); }
    .att-modal-note textarea { width:160px; border:1px solid var(--border-soft); border-radius:4px; padding:6px; font-size:12px; resize:vertical; background:var(--surface-card); color:var(--text-strong); transition:border-color .18s ease, box-shadow .18s ease; }
    .att-modal-note textarea:focus { outline:none; border-color:#2563eb; box-shadow:0 0 0 2px rgba(37,99,235,.16); }
    .attendance-modal__footer { padding:16px 24px; border-top:1px solid var(--border-soft); display:flex; justify-content:flex-end; gap:10px; background:var(--surface-card); }
    .attendance-modal__message { font-size:12px; color:var(--accent-primary, #0b65c2); }
    body.dark-mode .attendance-modal { background:rgba(10,15,28,.55); }
    body.dark-mode .attendance-modal__dialog {
      background:var(--surface);
      box-shadow:0 40px 90px rgba(8,12,28,.75);
      border:1px solid rgba(129,140,248,.24);
      color:#e2e8f0;
    }
    body.dark-mode .attendance-modal__header {
      background:rgba(17,24,39,.88);
      border-bottom:1px solid rgba(129,140,248,.25);
      color:#e2e8f0;
    }
    body.dark-mode .attendance-modal__close { color:#a5b4fc; }
    body.dark-mode .attendance-modal__close:hover { color:#f8fafc; }
    body.dark-mode .attendance-modal__body {
      background:rgba(12,18,34,.92);
      color:#e2e8f0;
    }
    body.dark-mode .attendance-modal__form label { color:#cbd5f5; }
    body.dark-mode .attendance-modal__form input,
    body.dark-mode .attendance-modal__form select {
      background:rgba(17,24,39,.78);
      border:1px solid rgba(99,102,241,.35);
      color:#f8fafc;
    }
    body.dark-mode .attendance-modal__form input:focus,
    body.dark-mode .attendance-modal__form select:focus {
      outline:none;
      border-color:#818cf8;
      box-shadow:0 0 0 2px rgba(129,140,248,.3);
    }
    body.dark-mode .attendance-modal__shiftHint { color:#a5b4fc; }
    body.dark-mode .attendance-modal__advanced input[readonly] {
      background:rgba(17,24,39,.65);
      color:#a5b4fc;
      border:1px solid rgba(99,102,241,.3);
    }
    body.dark-mode .attendance-modal__table { border-color:rgba(99,102,241,.25); }
    body.dark-mode .attendance-modal__table th,
    body.dark-mode .attendance-modal__table td {
      border-color:rgba(99,102,241,.2);
      background:rgba(17,24,39,.82);
      color:#e2e8f0;
    }
    body.dark-mode .attendance-modal__table th { background:rgba(28,33,68,.88); color:#cbd5f5; }
    body.dark-mode .att-modal-radio label,
    body.dark-mode .att-modal-flags label { color:#cbd5f5; }
    body.dark-mode .att-modal-score input,
    body.dark-mode .att-modal-note textarea {
      background:rgba(17,24,39,.78);
      border:1px solid rgba(99,102,241,.32);
      color:#f8fafc;
    }
    body.dark-mode .attendance-modal__footer { border-top:1px solid rgba(99,102,241,.25); }
    body.dark-mode .attendance-modal__message { color:#93c5fd; }
    .att-btn { background:#0b65c2; color:#fff; border:none; border-radius:4px; padding:8px 16px; font-size:13px; font-weight:600; cursor:pointer; }
    .att-btn:hover { opacity:.92; }
    .att-btn.danger { background:#f04438; }
    .module-group-detail .group-detail-breadcrumb { margin-bottom:12px; }
    .module-group-detail .group-detail-context { display:flex; flex-wrap:wrap; gap:4px 12px; margin-top:10px; font-size:12px; color:#64748b; align-items:center; }
    .module-group-detail .group-detail-context .context-name { font-weight:600; color:#1f2937; font-size:13px; margin-right:4px; }
    .module-group-detail .group-detail-context .context-item { display:inline-flex; align-items:center; gap:4px; color:#64748b; }
    .module-group-detail .group-detail-context .context-item::before { content:'•'; color:#e2e8f0; margin-right:6px; font-size:11px; }
    .module-group-detail .group-detail-context .context-item:first-of-type::before { content:''; margin:0; }
    .module-group-detail .group-detail-context .context-label { color:#94a3b8; font-weight:500; }
    .module-group-detail .group-detail-context .context-value { color:#334155; font-weight:500; }
    .module-group-detail .detail-card { background:var(--surface-card); border-radius:18px; padding:20px 24px; border:1px solid rgba(148,163,184,.16); box-shadow:0 32px 60px rgba(6,10,24,.55); display:flex; flex-direction:column; gap:12px; }
    .module-group-detail .group-summary-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; color:#e0e7ff; }
    .module-group-detail .group-summary-header h3 { margin:0; font-size:18px; font-weight:700; }
    .module-group-detail .group-summary-grid { display:grid; }
    .module-group-detail .group-detail-message { font-size:13px; color:#22c55e; margin-top:8px; }
    .module-group-detail .group-detail-message.error { color:#dc2626; }
    .module-group-detail .group-detail-tabs { background:var(--surface-card); border-radius:22px; border:1px solid rgba(148,163,184,.16); box-shadow:0 32px 60px rgba(6,10,24,.55); overflow:hidden; }
    .module-group-detail .group-tab-list { display:flex; gap:10px; padding:18px 22px 0; border-bottom:1px solid rgba(148,163,184,.16); flex-wrap:wrap; }
    .module-group-detail .group-tab-button { border:none; background:transparent; padding:10px 20px; border-radius:999px; font-weight:600; color:var(--text-soft); cursor:pointer; font-size:14px; }
    .module-group-detail .group-tab-button.active { background:linear-gradient(135deg,#4f46e5,#38bdf8); color:#fff; box-shadow:0 20px 36px rgba(17,24,39,.55); }
    .module-group-detail .group-tab-panels { padding:22px 24px 26px; display:flex; flex-direction:column; gap:20px; }
    .module-group-detail .group-tab-panel { display:none; flex-direction:column; gap:20px; color:var(--text-strong); }
    .module-group-detail .group-tab-panel.active { display:flex; }
    .module-group-detail .group-tab-panel .group-detail-empty { padding:28px; border-radius:16px; border:1px dashed rgba(99,102,241,.35); background:var(--surface-soft); text-align:center; color:var(--text-soft); font-size:13px; box-shadow:0 16px 32px rgba(6,10,24,.45); }
    .module-group-detail .detail-card-title { font-size:13px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#93c5fd; }
    .module-group-detail .detail-table { width:100%; border-collapse:separate; border-spacing:0; border-radius:16px; overflow:hidden; box-shadow:0 26px 48px rgba(6,10,24,.55); }
    .module-group-detail .detail-table thead { background:rgba(28,33,68,.9); }
    .module-group-detail .detail-table th { padding:14px 18px; text-align:left; font-size:12px; color:#cbd5f5; letter-spacing:.08em; text-transform:uppercase; }
    .module-group-detail .detail-table td { padding:14px 18px; font-size:13px; color:var(--text-strong); border-top:1px solid rgba(99,102,241,.22); background:rgba(17,24,39,.82); }
    .module-group-detail #groupDetailForm label { font-weight:600; color:var(--text-strong); font-size:13px; margin-bottom:6px; display:block; }
    body.dark-mode .group-card {
      background:rgba(17,24,39,.82);
      border:1px solid rgba(99,102,241,.25);
      box-shadow:0 26px 52px rgba(6,10,24,.6);
    }
    body.dark-mode .group-card:hover { box-shadow:0 34px 60px rgba(8,12,30,.7); }
    body.dark-mode .group-card.active { border-color:#38bdf8; box-shadow:0 30px 58px rgba(56,189,248,.45); }
    body.dark-mode .group-card__header h3 { color:#e2e8f0; }
    body.dark-mode .group-card__info,
    body.dark-mode .group-card__meta,
    body.dark-mode .group-card__meta span,
    body.dark-mode .group-card__body,
    body.dark-mode .group-card__actions { color:#cbd5f5; }
    body.dark-mode .group-card__meta .meta-label,
    body.dark-mode .group-card .meta-label { color:#94a3ff; }
    body.dark-mode .group-card__actions .btn-link { color:#93c5fd; }
    body.dark-mode .group-pill { background:rgba(99,102,241,.14); border-color:rgba(99,102,241,.24); color:#e2e8f0; }
    body.dark-mode .group-pill.subtle { background:rgba(148,163,184,.12); color:#cbd5f5; }
    body-dark-mode .group-pill.code-pill { background:rgba(59,130,246,.18); border-color:rgba(59,130,246,.35); color:#bfdbfe; }
    body.dark-mode .group-highlight { background:rgba(17,24,39,.9); border-color:rgba(99,102,241,.26); }
    body.dark-mode .group-schedule { background:rgba(17,24,39,.88); border-color:rgba(99,102,241,.22); }
    body.dark-mode .schedule-chip { background:rgba(17,24,39,.92); border-color:rgba(99,102,241,.24); color:#cbd5f5; }
    body.dark-mode .chip-count { background:rgba(148,163,184,.14); border-color:rgba(148,163,184,.3); color:#e2e8f0; }
    body.dark-mode .person-chip { background:rgba(59,130,246,.22); color:#bfdbfe; }
    body.dark-mode .person-chip.muted { background:rgba(148,163,184,.18); color:#e2e8f0; }
    body.dark-mode .group-note { background:rgba(17,24,39,.92); border-color:rgba(99,102,241,.24); color:#cbd5f5; }
    body.dark-mode .group-tag { background:rgba(148,163,184,.22); border-color:rgba(148,163,184,.36); color:#e2e8f0; }
    body.dark-mode .group-tag.status-active { background:rgba(59,130,246,.22); border-color:rgba(96,165,250,.35); color:#dbeafe; }
    body.dark-mode .group-tag.status-upcoming { background:rgba(251,191,36,.18); border-color:rgba(251,191,36,.32); color:#fde68a; }
    body-dark-mode .group-tag.status-finished { background:rgba(148,163,184,.26); border-color:rgba(148,163,184,.4); color:#e2e8f0; }
    body-dark-mode .group-tag.status-paused { background:rgba(248,113,113,.2); border-color:rgba(248,113,113,.32); color:#fecdd3; }
    body.dark-mode .module-group-detail .group-detail-context { color:#a5b4fc; }
    body.dark-mode .module-group-detail .group-detail-context .context-name { color:#f8fafc; }
    body.dark-mode .module-group-detail .group-detail-context .context-item::before { color:rgba(99,102,241,.4); }
    body.dark-mode .module-group-detail .detail-card,
    body.dark-mode .module-group-detail .group-detail-tabs,
    body.dark-mode .module-group-detail .group-tab-panels,
    body.dark-mode .module-group-detail .group-tab-panel .group-detail-empty {
      background:rgba(17,24,39,.82);
      border-color:rgba(99,102,241,.22);
      box-shadow:0 28px 58px rgba(6,10,24,.55);
      color:#e2e8f0;
    }
    body.dark-mode .module-group-detail .group-summary-header { color:#e0e7ff; }
    body.dark-mode .module-group-detail .group-tab-list { border-bottom:1px solid rgba(99,102,241,.22); }
    body.dark-mode .module-group-detail .group-tab-button { color:#a5b4fc; }
    body.dark-mode .module-group-detail .group-tab-button.active {
      background:linear-gradient(135deg,#4f46e5,#38bdf8);
      color:#f8fafc;
      box-shadow:0 20px 40px rgba(17,24,39,.6);
    }
    body.dark-mode .module-group-detail .detail-table thead { background:rgba(28,33,68,.9); }
    body.dark-mode .module-group-detail .detail-table th {
      color:#cbd5f5;
      border-bottom:1px solid rgba(99,102,241,.2);
    }
    body.dark-mode .module-group-detail .detail-table td {
      background:rgba(17,24,39,.85);
      color:#e2e8f0;
      border-top:1px solid rgba(99,102,241,.18);
    }
    body.dark-mode .module-group-detail #groupDetailForm label { color:#cbd5f5; }
    body.dark-mode .module-group-detail input,
    body.dark-mode .module-group-detail select,
    body.dark-mode .module-group-detail textarea {
      background:rgba(17,24,39,.78);
      color:#f8fafc;
      border:1px solid rgba(99,102,241,.28);
      box-shadow:none;
    }
    body.dark-mode .module-group-detail input:focus,
    body.dark-mode .module-group-detail select:focus,
    body.dark-mode .module-group-detail textarea:focus {
      outline:none;
      border-color:#818cf8;
      box-shadow:0 0 0 2px rgba(129,140,248,.28);
    }
    body.dark-mode .module-group-detail .detail-table tbody tr:hover { background:rgba(67,56,202,.18); }
    .module-group-detail #groupDetailForm [data-field] { width:100%; border-radius:14px; border:1px solid #d4dbe9; background:var(--surface-soft); padding:12px 14px; font-size:14px; color:var(--text-strong); transition:all .18s ease; }
    .module-group-detail #groupDetailForm textarea { resize:vertical; min-height:90px; }
    .module-group-detail #groupDetailForm[data-editing="true"] [data-field] { background:var(--surface-card); border-color:#bcd0ff; box-shadow:none; }
    .module-group-detail #groupDetailForm[data-editing="true"] [data-field]:focus { outline:none; border-color:#2563eb; box-shadow:0 0 0 3px rgba(37,99,235,.18); }
    .module-group-detail #groupDetailForm[data-editing="false"] [data-field] { cursor:default; }
    .module-group-detail #groupDetailForm[data-editing="false"] [data-field]::placeholder { color:transparent; }
    .module-group-detail #groupDetailForm select[data-field] { appearance:none; background-image:url('data:image/svg+xml,%3Csvg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M1 1.5L6 6.5L11 1.5" stroke="%236274F2" stroke-width="1.6" stroke-linecap="round"/%3E%3C/svg%3E'); background-repeat:no-repeat; background-position:right 14px center; background-size:12px; padding-right:34px; }
    .module-group-detail .detail-form-actions { display:flex; align-items:center; gap:16px; margin-top:18px; }
    .module-group-detail .detail-form-edit-actions { display:flex; gap:12px; }
    .module-group-detail .detail-form-edit-actions .btn-outline { border-radius:999px; }
    .module-group-detail .detail-form-actions .btn-outline.primary { color:#2563eb; border-color:#2563eb; }
    .module-group-detail .detail-form-actions .btn-outline.primary:hover { background:#2563eb; color:#fff; }
    .module-group-detail .detail-form-actions .btn-outline.muted { color:var(--text-soft); border-color:var(--border-soft); background:var(--surface-card); transition:background .18s ease, color .18s ease, border-color .18s ease; }
    .module-group-detail .detail-form-actions .btn-outline.muted:hover { background:var(--surface-subtle); color:var(--text-strong); }
    .module-group-detail .dayoff-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:14px; }
    .module-group-detail .dayoff-list li { padding:16px 18px; border:1px solid var(--border-soft); border-radius:16px; background:var(--surface-card); box-shadow:inset 0 0 0 1px rgba(148,163,184,.08); transition:background .18s ease, border-color .18s ease; }
    .module-group-detail .dayoff-list li:hover { background:var(--surface-highlight); }
    .module-group-detail .dayoff-date { font-weight:600; color:var(--accent-primary, #1d4ed8); margin-bottom:6px; }
    .module-group-detail .dayoff-reason { font-size:13px; color:var(--text-soft); line-height:1.5; }
    .module-group-detail .group-detail-note .group-detail-empty { margin:0; }
    @media (max-width:1024px) {
      .module-group-detail .group-detail-layout { padding:0 12px; }
      .module-group-detail .group-info-layout { grid-template-columns:1fr; }
      .module-group-detail .group-info-summary { position:static; }
      .module-group-detail .group-info-summary .detail-card, .module-group-detail .group-info-summary .schedule-card { box-shadow:0 14px 28px rgba(15,23,42,.08); }
      .module-group-detail .group-detail-tabs { border-radius:18px; }
    }

    .module-calendar .calendar-toolbar { display:flex; justify-content:space-between; align-items:center; background:var(--surface-card); border-radius:16px; border:1px solid var(--border-soft); padding:16px 20px; box-shadow:0 12px 24px rgba(15,23,42,.08); margin-bottom:18px; gap:12px; flex-wrap:wrap; }
    .module-calendar .calendar-toolbar-left { display:flex; gap:12px; flex-wrap:wrap; }
    .module-calendar .calendar-week-label { font-weight:600; font-size:16px; color:var(--text-strong); }
    .module-calendar .calendar-table-wrapper { overflow-x:auto; background:var(--surface-card); border-radius:20px; border:1px solid var(--border-soft); box-shadow:0 18px 34px rgba(15,23,42,.08); }
    .module-calendar .calendar-table { width:100%; border-collapse:separate; border-spacing:0; min-width:840px; }
    .module-calendar .calendar-table thead { background:var(--surface-soft); }
    .module-calendar .calendar-table th, .module-calendar .calendar-table td { padding:14px 16px; border-bottom:1px solid var(--line); vertical-align:top; background:var(--surface-card); color:var(--text-strong); }
    .module-calendar .calendar-head-shift { width:200px; font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); }
    .module-calendar .calendar-shift { background:var(--surface-soft); font-size:13px; color:var(--text-strong); width:200px; }
    .module-calendar .calendar-shift-name { font-weight:700; margin-bottom:4px; }
    .module-calendar .calendar-shift-time, .module-calendar .calendar-shift-count { font-size:12px; color:var(--text-soft); display:flex; align-items:center; gap:6px; }
    .module-calendar .calendar-icon { display:inline-flex; width:16px; justify-content:center; }
    .module-calendar .calendar-day { text-align:center; color:var(--text-strong); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
    .module-calendar .calendar-day .calendar-day-date { font-size:14px; font-weight:600; margin-top:4px; }
    .module-calendar .calendar-day .calendar-day-count { margin-top:6px; font-size:11px; color:var(--text-soft); }
    .module-calendar .calendar-day.is-today { background:#2563eb; color:#fff; }
    .module-calendar .calendar-day.is-today .calendar-day-date { color:#fff; }
    .module-calendar .calendar-cell { min-width:140px; background:var(--surface-card); }
    .module-calendar .calendar-cell-empty { padding:20px 0; text-align:center; color:var(--text-soft); font-size:12px; }
    .module-calendar .calendar-card { position:relative; border-left:4px solid var(--accent,#2563eb); background:var(--surface-soft); border-radius:12px; padding:12px 14px; margin-bottom:12px; box-shadow:0 8px 18px rgba(15,23,42,.08); display:flex; flex-direction:column; gap:8px; color:var(--text-strong); }
    .module-calendar .calendar-card-badge { position:absolute; top:0; right:0; width:18px; height:18px; background:#ef4444; color:#fff; font-size:11px; display:flex; align-items:center; justify-content:center; border-bottom-left-radius:6px; }
    .module-calendar .calendar-card--attended { box-shadow:0 10px 22px rgba(220,38,38,.18); }
    .module-calendar .calendar-card header { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
    .module-calendar .calendar-card h4 { margin:0; font-size:14px; font-weight:700; color:var(--text-strong); }
    .module-calendar .calendar-code { font-size:11px; color:var(--text-soft); background:var(--surface-subtle); border-radius:999px; padding:2px 8px; }
    .module-calendar .calendar-meta { font-size:12px; color:var(--text-soft); display:flex; align-items:center; gap:6px; }
    .module-calendar .calendar-meta + .calendar-meta { margin-top:-4px; }
    .module-calendar .calendar-filter { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-soft); }
    .module-calendar .calendar-filter input { width:16px; height:16px; cursor:pointer; }
    body.dark-mode .module-calendar .calendar-toolbar {
      background:var(--surface);
      border:1px solid var(--border-soft);
      box-shadow:0 24px 48px rgba(6,10,24,.6);
      color:var(--text-strong);
    }
    body.dark-mode .module-calendar .calendar-week-label { color:var(--text-strong); }
    body.dark-mode .module-calendar .calendar-toolbar-left button { color:var(--text-soft); }
    body.dark-mode .module-calendar .calendar-table-wrapper {
      background:var(--surface);
      border:1px solid var(--border-soft);
      box-shadow:0 26px 56px rgba(6,10,24,.55);
    }
    body.dark-mode .module-calendar .calendar-table thead { background:var(--surface); }
    body.dark-mode .module-calendar .calendar-table th,
    body.dark-mode .module-calendar .calendar-table td {
      border-bottom:1px solid var(--border-soft);
      color:var(--text-strong);
      background:var(--surface);
    }
    body.dark-mode .module-calendar .calendar-head-shift { color:var(--text-soft); }
    body.dark-mode .module-calendar .calendar-shift {
      background:var(--surface);
      color:var(--text-strong);
    }
    body.dark-mode .module-calendar .calendar-shift-time,
    body.dark-mode .module-calendar .calendar-shift-count { color:var(--text-soft); }
    body.dark-mode .module-calendar .calendar-day { color:var(--text-strong); }
    body.dark-mode .module-calendar .calendar-day .calendar-day-count { color:var(--text-soft); }
    body.dark-mode .module-calendar .calendar-cell { background:var(--surface); }
    body.dark-mode .module-calendar .calendar-cell-empty { color:var(--text-soft); }
    body.dark-mode .module-calendar .calendar-card {
      background:var(--surface-soft);
      box-shadow:0 20px 40px rgba(6,10,24,.55);
      border-left-color:var(--accent,#4f46e5);
      color:var(--text-strong);
    }
    body.dark-mode .module-calendar .calendar-card h4 { color:var(--text-strong); }
    body.dark-mode .module-calendar .calendar-code { background:rgba(99,102,241,.28); color:var(--text-strong); }
    body.dark-mode .module-calendar .calendar-meta { color:var(--text-soft); }
    body.dark-mode .module-calendar .calendar-filter { color:var(--text-soft); }
    body.dark-mode .module-calendar .calendar-filter input { accent-color:#4f46e5; }
    body.dark-mode .module-calendar .calendar-day.is-today { background:linear-gradient(135deg,#4f46e5,#38bdf8); color:#f8fafc; }
    body.dark-mode .module-calendar .calendar-day.is-today .calendar-day-date { color:#f8fafc; }
    @media (max-width:1024px) {
      .module-calendar .calendar-table { min-width:720px; }
      .module-calendar .calendar-head-shift, .module-calendar .calendar-shift { width:160px; }
    }

    .module-crm .module-header-actions, .module-wait-students .module-header-actions { display:flex; gap:12px; flex-wrap:wrap; }
    .crm-overview, .wait-summary { margin:18px 0 12px; }
    .crm-summary-grid, .wait-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; }
    .crm-summary-card, .wait-summary-card { position:relative; padding:16px; border-radius:18px; border:1px solid var(--border-soft); background:var(--surface-card); box-shadow:0 16px 36px rgba(15,23,42,.08); }
    .crm-summary-label, .wait-summary-label { font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); }
    .crm-summary-value, .wait-summary-value { font-size:26px; font-weight:700; color:var(--text-strong); margin-top:8px; }
    .crm-summary-percent, .wait-summary-percent { position:absolute; right:16px; bottom:16px; font-size:12px; color:#2563eb; }
    .crm-summary-empty, .wait-summary-empty { padding:18px; text-align:center; color:var(--text-soft); border:1px dashed var(--border-muted); border-radius:16px; }
    .crm-reminder-panel { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; margin-top:16px; }
    .crm-reminder-card { background:var(--surface-card); border-radius:16px; border:1px solid var(--border-soft); box-shadow:0 12px 24px rgba(15,23,42,.06); padding:14px; display:flex; flex-direction:column; gap:10px; }
    .crm-reminder-title { font-size:13px; font-weight:600; color:var(--text-strong); }
    .crm-reminder-empty { font-size:12px; color:var(--text-soft); }
    .crm-reminder-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
    .crm-reminder-list li { display:flex; justify-content:space-between; font-size:12px; color:var(--text-soft); padding:6px 8px; border-radius:10px; background:var(--surface-soft); }
    .crm-reminder-name { font-weight:600; color:var(--text-strong); }
    .crm-reminder-meta { color:#2563eb; }
    .crm-next-action-field { display:flex; flex-direction:column; gap:6px; }
    .crm-next-action-buttons { display:flex; gap:8px; flex-wrap:wrap; }
    .crm-next-action-buttons button { border:none; background:var(--surface-highlight); color:var(--text-strong); border-radius:999px; padding:6px 12px; font-size:12px; cursor:pointer; transition:.2s; }
    .crm-next-action-buttons button:hover { background:#0ea5e9; color:#fff; }
    .crm-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:16px; align-items:end; margin-bottom:18px; }
    .wait-filters { margin-bottom:18px; }
    .crm-filter label, .wait-filter label { display:block; font-size:13px; color:var(--text-soft); margin-bottom:6px; font-weight:500; }
    .crm-filter select, .crm-filter input, .wait-filter select, .wait-filter input { width:100%; border:1px solid var(--border-soft); border-radius:12px; padding:10px 12px; font-size:14px; background:var(--surface-card); color:var(--text-strong); }
    .crm-filter input::placeholder, .wait-filter input::placeholder { color:var(--text-soft); }
    .crm-layout { display:grid; grid-template-columns:minmax(0, 1.9fr) minmax(0, 1fr); gap:24px; align-items:stretch; }
    .wait-layout { gap:20px; }

    .wait-filters__panel { background:var(--surface-card); border:1px solid var(--border-soft); border-radius:20px; padding:18px 20px; box-shadow:0 12px 28px rgba(15,23,42,.05); display:flex; flex-direction:column; gap:16px; }
    .wait-filters__row { display:flex; flex-wrap:wrap; gap:16px; }
    .wait-filters__row .wait-filter { flex:1 1 200px; min-width:180px; }
    .wait-filters__row--search .wait-filter { flex:1 1 100%; }
    .wait-filter--search input { padding:12px 14px; }
    @media (max-width: 768px) {
      .wait-filters__panel { padding:16px; gap:14px; }
      .wait-filters__row { gap:12px; }
    }

    .crm-pane, .wait-pane { background:var(--surface-card); border-radius:20px; border:1px solid var(--border-soft); box-shadow:0 20px 40px rgba(15,23,42,.08); display:flex; flex-direction:column; min-height:480px; }

    .wait-deposit-modal { display:flex; flex-direction:column; gap:24px; }
    .wait-deposit-columns { display:flex; flex-direction:column; gap:18px; }
    .wait-deposit-panel { background:var(--surface-card); border-radius:18px; border:1px solid var(--border-soft); box-shadow:0 14px 28px rgba(15,23,42,.08); padding:18px; display:flex; flex-direction:column; gap:16px; }
    .wait-deposit-panel header h4 { margin:0; font-size:15px; font-weight:700; color:var(--text-strong); }
    .wait-deposit-program-list { display:flex; flex-direction:column; gap:12px; }
    .wait-deposit-program { display:flex; align-items:flex-start; gap:14px; padding:14px 16px; border:1px solid var(--border-soft); border-radius:14px; background:var(--surface-soft); transition:border-color .2s, box-shadow .2s, background .2s; cursor:pointer; }
    .wait-deposit-program input { margin-top:5px; }
    .wait-deposit-program__body { display:flex; flex-direction:column; gap:6px; }
    .wait-deposit-program__title { font-size:14px; font-weight:600; color:#0f172a; }
    .wait-deposit-program__meta { display:flex; flex-wrap:wrap; gap:12px; font-size:12px; color:#475569; }
    .wait-deposit-program--active { border-color:#2563eb; background:#fff; box-shadow:0 0 0 3px rgba(37,99,235,.12); }
    .wait-deposit-empty { font-size:13px; color:#94a3b8; text-align:center; padding:20px; border:1px dashed rgba(148,163,184,.4); border-radius:14px; }
    .wait-deposit-summary__list { display:flex; flex-direction:column; gap:12px; margin:0; }
    .wait-deposit-summary__list div { display:flex; justify-content:space-between; align-items:center; font-size:13px; color:#475569; }
    .wait-deposit-summary__list dt { margin:0; font-weight:500; }
    .wait-deposit-summary__list dd { margin:0; font-weight:600; color:#0f172a; }
    .wait-deposit-summary__row--accent dd { color:#dc2626; }
    .wait-deposit-form { display:flex; flex-direction:column; gap:18px; }
    .wait-deposit-form__grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; }
    .wait-deposit-form label { display:flex; flex-direction:column; gap:6px; font-size:13px; color:#475569; }
    .wait-deposit-form input[type="number"], .wait-deposit-form input[type="date"], .wait-deposit-form select { border:1px solid rgba(148,163,184,.35); border-radius:12px; padding:10px 12px; font-size:14px; background:#fff; color:#0f172a; }
    .wait-deposit-form textarea { border:1px solid rgba(148,163,184,.35); border-radius:12px; padding:12px; font-size:14px; resize:vertical; min-height:90px; }
    .wait-deposit-method { border:1px solid rgba(148,163,184,.35); border-radius:14px; padding:14px 18px; display:flex; flex-wrap:wrap; gap:14px; background:#fff; }
    .wait-deposit-method legend { font-weight:600; color:#0f172a; padding:0 6px; }
    .wait-deposit-method label { display:inline-flex; align-items:center; gap:8px; font-size:13px; }
    .wait-deposit-note textarea { min-height:90px; }
    @media (min-width: 960px) {
      .wait-deposit-columns { flex-direction:row; }
      .wait-deposit-panel--programs, .wait-deposit-panel--summary { flex:1; }
    }

    .crm-lead-detail .crm-detail-header { padding-bottom:10px; border-bottom:1px solid rgba(148,163,184,.2); }
    .crm-lead-detail .crm-detail-actions { padding-bottom:8px; border-bottom:1px solid rgba(148,163,184,.15); gap:10px; }
    .crm-lead-detail .crm-detail-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:18px; font-size:13px; color:var(--text-soft); }
    .crm-lead-detail .crm-detail-grid .label { display:block; margin-bottom:4px; font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); }
    .crm-lead-detail .crm-detail-note { background:var(--surface-card); border:1px solid var(--border-soft); border-radius:14px; padding:16px 18px; box-shadow:0 12px 24px rgba(15,23,42,.08); }
    .crm-lead-detail .crm-detail-note__content { font-size:13px; color:var(--text-soft); line-height:1.6; padding:3px 0; }
    .crm-lead-detail .crm-log-section { padding-top:4px; }
    .crm-pane__title, .wait-pane__title { padding:18px 20px; border-bottom:1px solid var(--line); font-weight:600; color:#0f172a; }
    .crm-pane { min-height:520px; height:auto; overflow:hidden; }
    .crm-lead-detail { background:var(--surface-soft); padding:24px 26px; border-radius:18px; border:1px solid var(--border-soft); box-shadow:0 18px 36px rgba(15,23,42,.08); display:flex; flex-direction:column; gap:20px; min-height:0; max-height:calc(100vh - 320px); overflow-y:auto; }
    .crm-lead-list { flex:1; overflow-y:auto; padding:18px; display:flex; flex-direction:column; gap:12px; min-height:0; max-height:calc(100vh - 320px); }
    .wait-list { flex:1; overflow:auto; padding:18px; display:flex; flex-direction:column; gap:12px; }
    .crm-empty, .wait-empty { padding:60px 0; text-align:center; color:#94a3b8; font-size:14px; }
    @media (max-width: 1280px) {
      .crm-layout { grid-template-columns:minmax(0, 1.6fr) minmax(0, 1fr); }
    }
    @media (max-width: 1100px) {
      .crm-layout { grid-template-columns:1fr; }
      .crm-pane { min-height:0; overflow:visible; }
      .crm-lead-detail,
      .crm-lead-list { max-height:none; }
    }

    .crm-lead-item { border:1px solid var(--border-soft); border-radius:16px; background:var(--surface-soft); padding:12px 14px 14px; display:flex; flex-direction:column; gap:8px; cursor:pointer; transition:.2s ease; }
    .crm-lead-item--overdue { border-color:#f97316; box-shadow:0 14px 28px rgba(249,115,22,.18); }
    .crm-lead-row { display:flex; gap:18px; align-items:stretch; }
    .crm-lead-main { flex:0 0 60%; display:flex; flex-direction:column; gap:14px; }
    .crm-lead-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
    .crm-lead-contact { display:inline-flex; align-items:center; gap:6px; font-size:12px; padding:4px 10px; border-radius:999px; background:var(--surface-soft); color:var(--text-strong); }
    .crm-lead-contact.crm-lead-phone { background:#e0f2fe; color:#0369a1; }
    .crm-lead-contact.crm-lead-email { background:#ede9fe; color:#5b21b6; }
    .crm-lead-contact.crm-lead-campus { background:#fef3c7; color:#92400e; }
    .crm-lead-history { flex:1; background:var(--surface-soft); border:1px dashed var(--border-muted); border-radius:12px; padding:12px 14px; display:flex; flex-direction:column; gap:8px; min-width:240px; }
    .crm-lead-history-label { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); font-weight:600; }
    .crm-lead-history-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
    .crm-lead-history-list li { display:flex; gap:10px; align-items:flex-start; }
    .crm-lead-history-entry { display:flex; flex-direction:column; gap:4px; }
    .crm-lead-history-dot { width:8px; height:8px; border-radius:50%; background:#2563eb; margin-top:6px; flex-shrink:0; box-shadow:0 0 0 4px rgba(37,99,235,.12); }
    .crm-lead-history-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); }
    .crm-lead-history-chip { display:inline-flex; align-items:center; padding:2px 8px; border-radius:999px; background:#e0e7ff; color:#312e81; font-weight:600; }
    .crm-lead-history-chip.status { background:#2563eb; color:#fff; }
    .crm-lead-history-bullet { color:rgba(100,116,139,.55); }
    .crm-lead-history-text { font-size:13px; color:var(--text-strong); line-height:1.45; }
    .crm-lead-history-empty { font-size:12px; color:var(--text-soft); }
    .crm-lead-history-more { border:none; background:#cfe5ff; color:var(--text-strong); align-self:flex-start; padding:6px 12px; border-radius:999px; font-size:12px; cursor:pointer; transition:.2s ease; }
    .crm-lead-history-more:hover { background:#2563eb; color:#fff; }
    .crm-lead-item:hover { border-color:#2563eb; box-shadow:0 18px 34px rgba(37,99,235,.16); transform:translateY(-1px); }
    .crm-lead-item.active { border-color:#2563eb; background:var(--surface-highlight); box-shadow:0 24px 44px rgba(14,165,233,.24); }
    .crm-lead-overdue { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:#b45309; background:#fef3c7; border-radius:10px; padding:6px 10px; }
    .wait-item { border:1px solid var(--border-soft); border-radius:14px; background:var(--surface-soft); padding:12px 14px; display:flex; flex-direction:column; gap:10px; cursor:pointer; transition:.2s ease; }
    .wait-item:hover { border-color:rgba(34,197,94,.6); box-shadow:0 18px 34px rgba(34,197,94,.16); transform:translateY(-1px); }
    .wait-item.active { border-color:rgba(34,197,94,.65); background:rgba(34,197,94,.08); box-shadow:0 24px 44px rgba(22,163,74,.18); }

    .crm-lead-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
    .crm-lead-heading { display:flex; flex-direction:column; gap:4px; }
    .crm-lead-name, .wait-name { font-size:15px; font-weight:600; color:var(--text-strong); }
    .crm-lead-phone { font-size:12px; color:var(--text-strong); }
    .crm-lead-sub, .wait-sub { font-size:13px; color:var(--text-soft); display:flex; flex-direction:column; gap:2px; }
    .crm-lead-tags, .wait-tag { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
    .crm-tag { display:inline-flex; align-items:center; padding:4px 10px; border-radius:999px; background:#2563eb; color:#fff; font-size:12px; font-weight:600; }
    .crm-tag.light { background:transparent; border:1px solid currentColor; }
    .crm-tag.small { font-size:11px; padding:2px 8px; background:#0ea5e9; }
    .wait-item__header { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
    .wait-item__identity { display:flex; flex-direction:column; gap:4px; }
    .wait-tag { display:inline-flex; align-items:center; padding:4px 10px; border-radius:999px; background:#2563eb; color:#fff; font-size:12px; font-weight:600; }

    .crm-lead-info { display:flex; gap:18px; font-size:12px; color:var(--text-soft); }
    .crm-lead-info-col { flex:1; display:flex; flex-direction:column; gap:6px; }
    .crm-lead-info-col span { display:block; text-transform:uppercase; letter-spacing:.08em; font-size:11px; color:var(--text-soft); margin-bottom:4px; }
    .crm-lead-info-col strong { display:block; color:var(--text-strong); font-size:13px; }
    .crm-lead-note { font-weight:500; color:#0f172a; line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
    .wait-item__chips { display:flex; flex-wrap:wrap; gap:8px; }
    .wait-chip { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; border:1px solid var(--border-soft); background:var(--surface-card); font-size:12px; color:var(--text-strong); }
    .wait-chip strong { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); }
    .wait-chip.wait-chip-paid { border-color:#22c55e; background:#dcfce7; color:#166534; }
    .wait-chip.wait-chip-partial { border-color:#f59e0b; background:#fef3c7; color:#92400e; }
    .wait-chip.wait-chip-pending { border-color:#ef4444; background:#fee2e2; color:#991b1b; }
    .wait-item__note { font-size:12px; color:var(--text-soft); background:var(--surface-card); border-radius:10px; padding:8px 10px; border:1px solid var(--border-soft); line-height:1.45; }
    .wait-payment-fieldset { border:1px solid var(--border-soft); border-radius:12px; padding:12px 14px; margin-bottom:12px; background:var(--surface-card); }
    .wait-payment-fieldset legend { font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); padding:0 6px; }

    .crm-detail, .wait-detail { flex:1; overflow:auto; padding:24px 26px; display:flex; flex-direction:column; gap:20px; background:var(--surface-soft); border-radius:18px; }
    .crm-detail-header, .wait-detail-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
    .crm-detail-header h3, .wait-detail-header h3 { margin:0; font-size:20px; color:var(--text-strong); }
    .crm-detail-sub, .wait-detail-sub { display:flex; gap:8px; flex-wrap:wrap; color:var(--text-soft); font-size:13px; }
    .crm-detail-tags { display:flex; gap:8px; flex-wrap:wrap; }
    .crm-detail-actions, .wait-detail-actions { display:flex; gap:12px; flex-wrap:wrap; }
    .crm-detail-actions .btn-outline { border-color:#2563eb; color:#2563eb; }
    .wait-detail-actions .btn-outline { border-color:#22c55e; color:#22c55e; }
    .crm-detail-grid, .wait-detail-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:18px; font-size:13px; color:var(--text-soft); }
    .crm-detail-grid .label, .wait-detail-grid .label { display:block; margin-bottom:4px; font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); }
    .crm-detail-note, .wait-detail-note { background:var(--surface-card); border:1px solid var(--border-soft); border-radius:12px; padding:16px 18px; box-shadow:0 8px 16px rgba(15,23,42,.08); }
    .crm-detail-note__title, .wait-detail-note__title { font-size:13px; font-weight:600; color:var(--text-strong); margin-bottom:8px; }
    .crm-detail-note__content, .wait-detail-note__content { font-size:13px; color:var(--text-soft); line-height:1.6; padding:4px 0; }
    .wait-detail-sections { display:flex; flex-direction:column; gap:16px; }
    .wait-detail-card { background:var(--surface-card); border:1px solid var(--border-soft); border-radius:16px; padding:16px 18px; box-shadow:0 12px 26px rgba(15,23,42,.12); }
    .wait-detail-card h4 { margin:0 0 10px; font-size:14px; color:var(--text-strong); }
    .wait-detail-card__grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; }
    .wait-detail-item span { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); margin-bottom:4px; }
    .wait-detail-item strong { font-size:13px; color:var(--text-strong); }
    .convert-heading { margin-bottom:18px; }
    .convert-heading h4 { margin:0 0 4px; font-size:20px; color:var(--text-strong); }
    .convert-heading p { margin:0; color:var(--text-soft); font-size:13px; }
    .convert-section { background:var(--surface-card); border:1px solid var(--border-soft); border-radius:16px; padding:16px 18px; margin-bottom:18px; box-shadow:0 12px 26px rgba(15,23,42,.12); }
    .convert-section legend { font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); margin-bottom:12px; }
    .convert-field { display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--text-soft); min-width:200px; }
    .convert-field span { text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); font-size:11px; }
    .convert-field input { border:1px solid var(--border-soft); border-radius:12px; padding:10px 12px; font-size:13px; color:var(--text-strong); background:var(--surface-card); }
    .convert-section textarea { border:1px solid var(--border-soft); border-radius:12px; padding:10px 12px; font-size:13px; min-height:68px; background:var(--surface-card); color:var(--text-strong); }
    .convert-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin-bottom:14px; }
    .convert-metric { border:1px solid var(--border-soft); border-radius:14px; padding:12px 14px; background:var(--surface-soft); display:flex; flex-direction:column; gap:4px; text-align:center; }
    .convert-metric span { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-soft); }
    .convert-metric strong { font-size:16px; color:var(--text-strong); }
    .convert-metric--accent { background:#fff7ed; border-color:#f97316; }
    .convert-metric--accent strong { color:#dc2626; }
    .convert-empty { font-size:13px; color:var(--text-soft); }

    .crm-log-section, .wait-history-section { display:flex; flex-direction:column; gap:14px; }
    .crm-log-header, .wait-history-header { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
    .crm-log-header h4, .wait-history-header h4 { margin:0; font-size:16px; color:var(--text-strong); }
    .crm-log-list, .wait-history-list { display:flex; flex-direction:column; gap:12px; }
    .crm-log-item, .wait-history-item { border:1px solid var(--border-soft); border-radius:14px; padding:14px 16px; background:var(--surface-card); box-shadow:0 10px 26px rgba(15,23,42,.06); display:flex; flex-direction:column; gap:10px; }
    .crm-log-item header, .wait-history-item header { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; font-size:12px; color:var(--text-soft); }
    .crm-log-meta, .wait-history-meta { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
    .crm-log-staff { color:var(--text-strong); font-weight:600; }
    .crm-log-content, .wait-history-note { font-size:13px; color:var(--text-strong); line-height:1.5; }
    .crm-log-next { font-size:12px; color:#2563eb; font-weight:600; }
    .crm-log-empty, .crm-log-loading, .wait-history-empty, .wait-history-loading { padding:24px 0; text-align:center; color:var(--text-soft); font-size:13px; }

    body.crm-modal-open { overflow:hidden; }
    .crm-modal { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(15,23,42,.45); backdrop-filter:blur(12px); z-index:90; opacity:0; pointer-events:none; transition:opacity .32s cubic-bezier(.16,1,.3,1); --modal-start-x:0px; --modal-start-y:24px; --modal-start-scale:.82; }
    .crm-modal.is-active { opacity:1; pointer-events:auto; }
    .crm-modal.is-leaving { opacity:0; pointer-events:none; }
    .crm-modal__dialog { width:min(720px,92vw); max-height:92vh; overflow:hidden; border-radius:20px; background:var(--surface-card); box-shadow:0 28px 64px rgba(15,23,42,.28); display:flex; flex-direction:column; transform-origin:center center; transform:translate3d(var(--modal-start-x),var(--modal-start-y),0) scale(var(--modal-start-scale)); opacity:0; transition:transform .4s cubic-bezier(.16,1,.3,1), opacity .28s ease; }
    .crm-modal.is-active .crm-modal__dialog { transform:translate3d(0,0,0) scale(1); opacity:1; }
    .crm-modal.is-leaving .crm-modal__dialog { transform:translate3d(var(--modal-start-x),var(--modal-start-y),0) scale(calc(var(--modal-start-scale) * 0.9)); opacity:0; }
    body.wait-modal-open { overflow:hidden; }
    .wait-modal { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(15,23,42,.45); backdrop-filter:blur(10px); z-index:90; opacity:0; pointer-events:none; transition:opacity .32s cubic-bezier(.16,1,.3,1); --wait-start-x:0px; --wait-start-y:24px; --wait-start-scale:.82; }
    .wait-modal.is-active { opacity:1; pointer-events:auto; }
    .wait-modal.is-leaving { opacity:0; pointer-events:none; }
    .wait-modal__dialog { width:min(720px,92vw); max-height:92vh; overflow:hidden; border-radius:20px; background:var(--surface-card); box-shadow:0 28px 64px rgba(15,23,42,.28); display:flex; flex-direction:column; transform-origin:center center; transform:translate3d(var(--wait-start-x),var(--wait-start-y),0) scale(var(--wait-start-scale)); opacity:0; transition:transform .4s cubic-bezier(.16,1,.3,1), opacity .28s ease; }
    .wait-modal.is-active .wait-modal__dialog { transform:translate3d(0,0,0) scale(1); opacity:1; }
    .wait-modal.is-leaving .wait-modal__dialog { transform:translate3d(var(--wait-start-x),var(--wait-start-y),0) scale(calc(var(--wait-start-scale) * 0.9)); opacity:0; }
    .wait-modal__dialog.wait-modal__dialog--wide { width:min(960px,96vw); }
    .crm-modal__header, .wait-modal__header { padding:20px 24px; border-bottom:1px solid var(--border-soft); font-size:18px; font-weight:600; color:var(--text-strong); display:flex; justify-content:space-between; align-items:center; }
    .crm-modal__close, .wait-modal__close { border:none; background:transparent; font-size:26px; cursor:pointer; color:var(--text-soft); }
    .crm-modal__body, .wait-modal__body { display:flex; flex-direction:column; gap:20px; padding:20px 24px 24px; overflow:auto; background:var(--surface-card); color:var(--text-strong); }
    .crm-modal__content, .wait-modal__content { display:flex; flex-direction:column; gap:16px; }
    .crm-modal__footer, .wait-modal__footer { display:flex; justify-content:flex-end; gap:12px; }
    .crm-modal__message, .wait-modal__message { font-size:13px; min-height:18px; }
    .crm-modal__message.error, .wait-modal__message.error { color:#dc2626; }

    .crm-form-grid, .wait-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; }
    .crm-form-grid label, .wait-form-grid label { display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--text-soft); }
    .crm-form-grid input, .crm-form-grid select, .crm-form-grid textarea,
    .wait-form-grid input, .wait-form-grid select, .wait-form-grid textarea { border:1px solid var(--border-soft); border-radius:12px; padding:10px 12px; font-size:14px; background:var(--surface-card); color:var(--text-strong); }
    .crm-form-grid textarea, .wait-form-grid textarea { resize:vertical; min-height:100px; }
    .crm-modal__content > label, .wait-modal__content > label { display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--text-soft); }
    .crm-modal__content > label textarea, .wait-modal__content > label textarea,
    .crm-modal__content > label input, .wait-modal__content > label input { border:1px solid var(--border-soft); border-radius:12px; padding:10px 12px; font-size:14px; background:var(--surface-card); color:var(--text-strong); }

    .student-modal { position:fixed; inset:0; background:rgba(15,23,42,.55); display:flex; align-items:flex-start; justify-content:center; padding:36px 24px; z-index:140; overflow:auto; }
    .student-modal__dialog { width:min(980px, 96vw); background:#fff; border-radius:24px; box-shadow:0 32px 80px rgba(15,23,42,.32); display:flex; flex-direction:column; overflow:hidden; }
    .student-modal__dialog--detail { width:min(960px, 96vw); }
    .student-modal__header { display:flex; justify-content:space-between; align-items:center; padding:24px 30px; border-bottom:1px solid #e2e8f0; background:#f8fafc; }
    .student-modal__title { font-size:20px; font-weight:600; color:#0f172a; }
    .student-modal__subtitle { margin-top:4px; font-size:13px; color:#64748b; }
    .student-modal__close { border:none; background:transparent; font-size:26px; cursor:pointer; color:#64748b; }
    .student-modal__close:hover { color:#0f172a; }
    .student-modal__body { padding:0 28px 26px; display:flex; flex-direction:column; gap:24px; max-height:78vh; overflow:auto; background:#f8fafc; }
    .student-modal__form { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:24px; }
    .student-modal__section { background:#fff; border-radius:18px; padding:20px 22px; border:1px solid #e0e7ff; display:flex; flex-direction:column; gap:16px; box-shadow:0 18px 36px rgba(15,23,42,.08); }
    .student-modal__section h4 { margin:0; font-size:15px; font-weight:600; color:#1f2937; }
    .student-modal__section--full { grid-column:1 / -1; }
    .student-modal__pause-summary { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:18px; padding:8px 0 22px; border-bottom:1px solid #e2e8f0; }
    .student-modal__pause-summary-item { display:flex; flex-direction:column; gap:6px; font-size:13px; color:#475569; }
    .student-modal__pause-summary-label { font-weight:600; text-transform:uppercase; letter-spacing:.04em; font-size:11px; color:#94a3b8; }
    .student-modal__pause-summary-value { font-size:15px; font-weight:600; color:#0f172a; }
    .student-modal__pause-form { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:18px 20px; padding-top:18px; }
    .student-modal__pause-field { display:flex; flex-direction:column; gap:6px; font-size:13px; color:#374151; }
    .student-modal__pause-field label { font-weight:600; color:#1f2937; }
    .student-modal__pause-field input,
    .student-modal__pause-field textarea,
    .student-modal__pause-field select { border:1px solid #cbd5f5; border-radius:8px; padding:10px 12px; font-size:13px; background:#fff; box-shadow:0 1px 0 rgba(15,23,42,.04) inset; }
    .student-modal__pause-field input:focus,
    .student-modal__pause-field textarea:focus,
    .student-modal__pause-field select:focus { outline:none; border-color:#2563eb; box-shadow:0 0 0 2px rgba(37,99,235,.18); }
    .student-modal__pause-field textarea { resize:vertical; min-height:110px; }
    .student-modal__pause-field--full { grid-column:1 / -1; }
    .student-modal__grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px 18px; }
    .student-modal__field { display:flex; flex-direction:column; gap:6px; font-size:13px; color:#1f2937; }
    .student-modal__field--wide { grid-column:1 / -1; }
    .student-modal__field label { font-weight:600; color:#4f5b6c; }
    .student-modal__field input,
    .student-modal__field select,
    .student-modal__field textarea { border:1px solid #d1d5db; border-radius:12px; padding:10px 12px; font-size:13px; background:#fff; transition:border-color .15s ease, box-shadow .15s ease; }
    .student-modal__field input:focus,
    .student-modal__field select:focus,
    .student-modal__field textarea:focus { outline:none; border-color:#2563eb; box-shadow:0 0 0 2px rgba(37,99,235,.18); }
    .student-modal__field textarea { min-height:110px; resize:vertical; }
    .student-modal__radio { display:flex; gap:16px; align-items:center; padding:4px 0; }
    .student-modal__checkbox-group { display:flex; flex-direction:column; gap:8px; padding-top:4px; }
    .student-modal__schedule { display:flex; flex-direction:column; gap:14px; }
    .student-modal__weekday { display:flex; flex-direction:column; gap:6px; }
    .student-modal__weekday legend { font-weight:600; color:#1f2937; font-size:13px; }
    .student-modal__slots { display:flex; gap:8px; flex-wrap:wrap; }
    .student-modal__slot { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border:1px solid #cbd5f5; border-radius:999px; font-size:12px; background:#fff; cursor:pointer; }
    .student-modal__slot input { margin:0; }
    .student-modal__schedule-empty { color:#94a3b8; font-size:13px; }
    .schedule-block { background:#fff; border:1px solid #e0e7ff; border-radius:18px; padding:16px 18px; display:flex; flex-direction:column; gap:16px; box-shadow:0 10px 30px rgba(15,23,42,.06); }
    .schedule-block__header { display:flex; justify-content:space-between; align-items:center; font-weight:600; font-size:14px; color:#1f2937; }
    .schedule-block__grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:12px 16px; }
    .schedule-block__grid label { display:flex; flex-direction:column; gap:6px; font-size:13px; color:#475569; }
    .schedule-block__grid input { border:1px solid #d1d5db; border-radius:12px; padding:8px 12px; font-size:13px; background:#fff; color:#0f172a; }
    .schedule-block__remove { border:none; background:#fef2f2; color:#dc2626; border-radius:999px; padding:6px 12px; font-size:12px; cursor:pointer; }
    .schedule-block__remove:hover { background:#fee2e2; }
    .schedule-block__days { display:flex; flex-direction:column; gap:12px; }
    .schedule-day { border:1px dashed #e2e8f0; border-radius:14px; padding:10px 12px; display:flex; flex-direction:column; gap:10px; background:#f8fafc; transition:border-color .2s ease, background .2s ease; }
    .schedule-day--active { border-color:#2563eb; border-style:solid; background:#eef4ff; }
    .schedule-day__toggle { display:flex; align-items:center; gap:8px; font-weight:600; color:#1f2937; font-size:13px; cursor:pointer; }
    .schedule-day__toggle input { width:16px; height:16px; }
    .schedule-day__shifts { display:none; gap:8px; flex-wrap:wrap; }
    .schedule-day--active .schedule-day__shifts { display:flex; }
    .schedule-shift__pill { position:relative; display:inline-flex; align-items:center; gap:6px; border:1px solid #cbd5f5; border-radius:999px; padding:6px 12px; font-size:12px; color:#475569; background:#fff; cursor:pointer; transition:background .2s ease, color .2s ease, border-color .2s ease; }
    .schedule-shift__pill input { position:absolute; inset:0; opacity:0; pointer-events:none; }
    .schedule-shift__pill span { pointer-events:none; }
    .schedule-shift__pill--active { background:#2563eb; border-color:#2563eb; color:#fff; }
    .schedule-shift__pill--active span { color:#fff; }
    .schedule-day__shifts .schedule-shift__pill:hover { border-color:#2563eb; }
    @media (min-width: 720px) {
      .schedule-day { flex-direction:row; align-items:center; }
      .schedule-day__toggle { min-width:120px; }
      .schedule-day__shifts { flex:1; }
    }
    .student-modal__footer { display:flex; justify-content:space-between; align-items:center; padding:18px 30px; border-top:1px solid #e2e8f0; background:#fff; }
    .student-modal__btn { border-radius:999px; padding:8px 20px; font-weight:600; cursor:pointer; border:none; }
    .student-modal__btn.secondary { background:#fff; border:1px solid #cbd5f5; color:#1f2937; }
    .student-modal__btn.secondary:hover { background:#f1f5f9; }
    .student-modal__btn.neutral { background:#e2e8f0; color:#1f2937; }
    .student-modal__btn.neutral:hover { background:#cbd5f5; }
    .student-detail__body { display:flex; flex-direction:column; gap:18px; }
    .student-detail__section { background:#fff; border-radius:18px; border:1px solid #e0e7ff; padding:20px 22px; box-shadow:0 18px 36px rgba(15,23,42,.06); }
    .student-detail__section.loading-message { padding:32px 22px; }
    .student-detail__profile { display:flex; flex-direction:column; gap:16px; }
    .student-detail__profile-info { display:flex; flex-direction:column; gap:6px; }
    .student-detail__name { font-size:20px; font-weight:700; color:#0f172a; }
    .student-detail__code { font-size:13px; color:#64748b; }
    .student-detail__list { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px 20px; font-size:13px; color:#0f172a; }
    .student-detail__list dt { font-weight:600; color:#64748b; }
    .student-detail__history h4 { margin:0 0 16px; font-size:15px; color:#1f2937; }
    .student-detail__history table { width:100%; border-collapse:collapse; font-size:13px; }
    .student-detail__history th { text-align:left; background:#f1f5f9; color:#64748b; padding:10px 12px; font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
    .student-detail__history td { padding:10px 12px; border-bottom:1px solid #e2e8f0; color:#0f172a; }
    .student-detail__history tr:last-child td { border-bottom:none; }
    .student-detail__empty { text-align:center; padding:24px 0; font-size:13px; color:#94a3b8; }
    .student-history__list { display:flex; flex-direction:column; gap:12px; }
    .student-history__row { display:grid; grid-template-columns:minmax(220px,1.3fr) 120px 120px minmax(200px,1fr); gap:12px; padding:12px 16px; border:1px solid #e2e8f0; border-radius:16px; background:#fff; align-items:center; }
    .student-history__col { font-size:13px; color:#0f172a; }
    .student-history__col--note { font-size:12px; color:#64748b; line-height:1.5; }
    .student-history__class { font-weight:600; color:#1f2937; margin-bottom:4px; }
    .student-history__meta { font-size:12px; color:#94a3b8; }
    .student-history__status { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; background:#e2e8f0; color:#475569; font-size:12px; font-weight:600; }
    .student-history__status--active { background:#dcfce7; color:#15803d; }
    .student-history__status--finished { background:#fee2e2; color:#b91c1c; }
    .student-history__status--paused { background:#fef3c7; color:#d97706; }
    .student-modal__actions { display:flex; gap:12px; }
    .student-modal__message { font-size:12px; color:#2563eb; }
    .student-modal__message.error { color:#ef4444; }
    .student-modal__btn { border:none; border-radius:12px; padding:10px 20px; font-weight:600; cursor:pointer; }
    .student-modal__btn.primary { background:#2563eb; color:#fff; }
    .student-modal__btn.secondary { background:#e2e8f0; color:#1f2937; }
    .student-modal__btn:hover { opacity:.92; }
    body.dark-mode .student-modal { background:var(--overlay-backdrop); }
    body.dark-mode .student-modal__dialog {
      background:var(--surface-card);
      border:1px solid rgba(129,140,248,.24);
      box-shadow:var(--modal-shadow);
      color:var(--text-strong);
    }
    body.dark-mode .student-modal__header {
      background:rgba(17,24,39,.88);
      border-bottom:1px solid rgba(129,140,248,.25);
      color:var(--text-strong);
    }
    body.dark-mode .student-modal__title { color:var(--text-strong); }
    body.dark-mode .student-modal__subtitle { color:var(--text-soft); }
    body.dark-mode .student-modal__close { color:#a5b4fc; }
    body.dark-mode .student-modal__close:hover { color:#f8fafc; }
    body.dark-mode .student-modal__body {
      background:rgba(12,20,39,.92);
      color:var(--text-strong);
    }
    body.dark-mode .student-modal__section {
      background:rgba(15,23,42,.86);
      border:1px solid rgba(99,102,241,.24);
      box-shadow:0 24px 60px rgba(2,6,23,.72);
    }
    body.dark-mode .student-modal__section h4 { color:var(--text-strong); }
    body.dark-mode .student-modal__pause-summary { border-bottom:1px solid rgba(99,102,241,.24); }
    body.dark-mode .student-modal__pause-summary-item { color:var(--text-soft); }
    body.dark-mode .student-modal__pause-summary-label { color:#818cf8; }
    body.dark-mode .student-modal__pause-summary-value { color:var(--text-strong); }
    body.dark-mode .student-modal__pause-field { color:var(--text-soft); }
    body.dark-mode .student-modal__pause-field label { color:var(--text-strong); }
    body.dark-mode .student-modal__field { color:var(--text-soft); }
    body.dark-mode .student-modal__field label { color:var(--text-strong); }
    body.dark-mode .student-modal__radio,
    body.dark-mode .student-modal__checkbox-group { color:var(--text-soft); }
    body.dark-mode .student-modal__schedule-empty { color:var(--text-soft); }
    body.dark-mode .student-modal__slot {
      background:rgba(17,24,39,.78);
      border:1px solid rgba(99,102,241,.32);
      color:var(--text-soft);
    }
    body.dark-mode .student-modal__pause-field input,
    body.dark-mode .student-modal__pause-field textarea,
    body.dark-mode .student-modal__pause-field select,
    body.dark-mode .student-modal__field input,
    body.dark-mode .student-modal__field select,
    body.dark-mode .student-modal__field textarea,
    body.dark-mode .schedule-block__grid input {
      background:rgba(17,24,39,.78);
      border:1px solid rgba(99,102,241,.32);
      color:var(--text-strong);
      box-shadow:0 1px 0 rgba(2,6,23,.55) inset;
    }
    body.dark-mode .student-modal__pause-field input:focus,
    body.dark-mode .student-modal__pause-field textarea:focus,
    body.dark-mode .student-modal__pause-field select:focus,
    body.dark-mode .student-modal__field input:focus,
    body.dark-mode .student-modal__field select:focus,
    body.dark-mode .student-modal__field textarea:focus,
    body.dark-mode .schedule-block__grid input:focus {
      outline:none;
      border-color:#818cf8;
      box-shadow:0 0 0 2px rgba(129,140,248,.28);
    }
    body.dark-mode .schedule-block {
      background:rgba(15,23,42,.84);
      border:1px solid rgba(99,102,241,.28);
      box-shadow:0 22px 50px rgba(2,6,23,.65);
    }
    body.dark-mode .schedule-block__header { color:var(--text-strong); }
    body.dark-mode .schedule-block__grid label { color:var(--text-soft); }
    body.dark-mode .schedule-block__remove {
      background:rgba(248,113,113,.18);
      color:#fca5a5;
    }
    body.dark-mode .schedule-block__remove:hover { background:rgba(248,113,113,.28); }
    body.dark-mode .schedule-day {
      background:rgba(12,20,39,.88);
      border-color:rgba(99,102,241,.28);
    }
    body.dark-mode .schedule-day--active {
      border-color:#60a5fa;
      background:rgba(37,99,235,.2);
    }
    body.dark-mode .schedule-day__toggle { color:var(--text-strong); }
    body.dark-mode .schedule-shift__pill {
      background:rgba(17,24,39,.78);
      border:1px solid rgba(99,102,241,.32);
      color:var(--text-soft);
    }
    body.dark-mode .schedule-shift__pill:hover { border-color:#818cf8; }
    body.dark-mode .schedule-shift__pill--active {
      background:#4f46e5;
      border-color:#4f46e5;
      color:#f8fafc;
    }
    body.dark-mode .schedule-shift__pill--active span { color:#f8fafc; }
    body.dark-mode .student-modal__footer {
      background:rgba(12,20,39,.92);
      border-top:1px solid rgba(99,102,241,.28);
    }
    body.dark-mode .student-modal__btn.secondary {
      background:rgba(30,41,59,.78);
      border:1px solid rgba(99,102,241,.32);
      color:var(--text-strong);
    }
    body.dark-mode .student-modal__btn.secondary:hover { background:rgba(45,55,99,.85); }
    body.dark-mode .student-modal__btn.neutral {
      background:rgba(148,163,233,.18);
      color:var(--text-strong);
    }
    body.dark-mode .student-modal__btn.neutral:hover { background:rgba(148,163,233,.28); }
    body.dark-mode .student-modal__btn.primary { background:#4f46e5; color:#f8fafc; }
    body.dark-mode .student-modal__message { color:#93c5fd; }
    body.dark-mode .student-modal__message.error { color:#fca5a5; }
    body.dark-mode .student-detail__section {
      background:rgba(15,23,42,.86);
      border:1px solid rgba(99,102,241,.26);
      box-shadow:0 24px 60px rgba(2,6,23,.7);
    }
    body.dark-mode .student-detail__name { color:var(--text-strong); }
    body.dark-mode .student-detail__code { color:var(--text-soft); }
    body.dark-mode .student-detail__list { color:var(--text-strong); }
    body.dark-mode .student-detail__list dt { color:var(--text-soft); }
    body.dark-mode .student-detail__history h4 { color:var(--text-strong); }
    body.dark-mode .student-detail__history th {
      background:rgba(28,33,68,.85);
      color:var(--text-soft);
    }
    body.dark-mode .student-detail__history td {
      border-bottom:1px solid rgba(99,102,241,.26);
      background:rgba(12,20,39,.8);
      color:var(--text-strong);
    }
    body.dark-mode .student-detail__empty { color:var(--text-soft); }
    body.dark-mode .student-history__row {
      background:rgba(12,20,39,.88);
      border:1px solid rgba(99,102,241,.26);
    }
    body.dark-mode .student-history__col { color:var(--text-strong); }
    body.dark-mode .student-history__col--note { color:var(--text-soft); }
    body.dark-mode .student-history__class { color:var(--text-strong); }
    body.dark-mode .student-history__meta { color:#93c5fd; }
    body.dark-mode .student-history__status {
      background:rgba(148,163,233,.18);
      color:#e0e7ff;
    }
    body.dark-mode .student-history__status--active { background:rgba(34,197,94,.22); color:#4ade80; }
    body.dark-mode .student-history__status--finished { background:rgba(248,113,113,.22); color:#fca5a5; }
    body.dark-mode .student-history__status--paused { background:rgba(251,191,36,.22); color:#fcd34d; }
    body.dark-mode .student-history-status {
      background:rgba(148,163,233,.18);
      color:#e0e7ff;
    }
    body.dark-mode .student-history-status--active { background:rgba(34,197,94,.22); color:#4ade80; }
    body.dark-mode .student-history-status--paused { background:rgba(251,191,36,.22); color:#fcd34d; }
    body.dark-mode .student-history-status--finished { background:rgba(248,113,113,.22); color:#fca5a5; }
    @media (max-width: 768px) {
      .student-modal { padding:24px 12px; }
      .student-modal__body { padding:0 18px 18px; }
      .student-modal__form { grid-template-columns:1fr; }
      .student-modal__grid { grid-template-columns:1fr; }
    }

    .module--inactive-students .module-header { justify-content:space-between; align-items:flex-start; }
    .inactive-actions,
    .paused-actions { display:flex; gap:12px; align-items:center; }
    .inactive-filters,
    .paused-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; margin:18px 0 12px; background:#fff; padding:14px 16px; border-radius:16px; border:1px solid #e2e8f0; box-shadow:0 10px 26px rgba(15,23,42,.06); }
    .inactive-filter,
    .paused-filter { display:flex; flex-direction:column; gap:6px; font-size:13px; color:#475569; }
    .inactive-filter input,
    .paused-filter input { border:1px solid #d0d7ef; border-radius:12px; padding:10px 12px; font-size:14px; background:#f8fafc; color:#0f172a; }
    .inactive-filter input:focus,
    .paused-filter input:focus { outline:none; border-color:#2563eb; box-shadow:0 0 0 3px rgba(37,99,235,.18); background:#fff; }
    .inactive-filter--actions,
    .paused-filter--actions { display:flex; align-items:flex-end; gap:10px; justify-content:flex-end; }
    .inactive-filter--actions button,
    .paused-filter--actions button { min-width:120px; }
    .inactive-filter--stretch,
    .paused-filter--stretch { min-width:240px; }
    .inactive-summary,
    .paused-summary { font-size:13px; color:#0f172a; margin:12px 0; text-align:left; }
    .paused-export { display:flex; justify-content:flex-end; margin-top:8px; }
    .paused-export .btn-secondary { background:linear-gradient(135deg,#2563eb,#1d4ed8); color:#fff; border:none; padding:10px 20px; border-radius:12px; font-weight:600; cursor:pointer; box-shadow:0 12px 24px rgba(37,99,235,.18); }
    .paused-export .btn-secondary:hover { opacity:.92; }
    .paused-actions-cell { display:flex; gap:8px; justify-content:center; align-items:center; }
    .paused-action-btn { border:none; background:#eef2ff; color:#1d4ed8; width:34px; height:34px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; transition:all .15s ease; font-size:15px; box-shadow:0 8px 18px rgba(37,99,235,.18); }
    .paused-action-btn:hover { background:#dbeafe; transform:translateY(-1px); }
    .paused-modal { position:fixed; inset:0; background:rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; padding:30px 20px; z-index:200; }
    .paused-modal__dialog { width:min(640px, 96vw); max-height:92vh; background:#fff; border-radius:18px; box-shadow:0 28px 60px rgba(15,23,42,.3); display:flex; flex-direction:column; overflow:hidden; }
    .paused-modal__header { display:flex; justify-content:space-between; align-items:center; padding:22px 26px; border-bottom:1px solid #e2e8f0; font-size:18px; font-weight:600; color:#1f2937; }
    .paused-modal__subtitle { font-size:13px; color:#64748b; margin-top:6px; font-weight:400; }
    .paused-modal__close { border:none; background:transparent; font-size:26px; cursor:pointer; color:#64748b; }
    .paused-modal__close:hover { color:#1f2937; }
    .paused-modal__form { display:flex; flex-direction:column; height:100%; }
    .paused-modal__body { padding:22px 26px; flex:1; overflow:auto; display:flex; flex-direction:column; gap:18px; background:#f8fafc; }
    .paused-modal__grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; }
    .paused-modal__field { display:flex; flex-direction:column; gap:6px; font-size:13px; color:#1f2937; }
    .paused-modal__field label { font-weight:600; color:#475569; }
    .paused-modal__field input,
    .paused-modal__field select,
    .paused-modal__field textarea { border:1px solid #cbd5f5; border-radius:12px; padding:10px 12px; font-size:13px; background:#fff; box-shadow:0 1px 0 rgba(15,23,42,.04) inset; }
    .paused-modal__field input:focus,
    .paused-modal__field select:focus,
    .paused-modal__field textarea:focus { outline:none; border-color:#2563eb; box-shadow:0 0 0 2px rgba(37,99,235,.18); }
    .paused-modal__field textarea { min-height:120px; resize:vertical; }
    .paused-modal__metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; }
    .paused-modal__metric { display:flex; flex-direction:column; gap:4px; font-size:13px; color:#475569; }
    .paused-modal__metric-value { font-weight:600; color:#dc2626; }
    .paused-modal__metric-value.positive { color:#16a34a; }
    .paused-modal__message { font-size:12px; color:#ef4444; min-height:16px; }
    .paused-modal__message.success { color:#16a34a; }
    .paused-modal__hint { font-size:12px; color:#64748b; }
    .paused-modal__footer { padding:18px 26px; border-top:1px solid #e2e8f0; display:flex; justify-content:flex-end; gap:12px; background:#fff; }
    .paused-modal__btn { border:none; border-radius:999px; padding:10px 22px; font-weight:600; cursor:pointer; }
    .paused-modal__btn.secondary { background:#e2e8f0; color:#1f2937; }
    .paused-modal__btn.primary { background:#2563eb; color:#fff; }
    .paused-modal__btn.primary:hover { opacity:.9; }
    .paused-modal__btn.secondary:hover { background:#cbd5f5; }
    .inactive-table-wrapper,
    .paused-table-wrapper { width:100%; overflow:auto; border-radius:16px; background:linear-gradient(180deg,#f8fafc 0%,#fff 100%); border:1px solid #e2e8f0; box-shadow:0 14px 32px rgba(15,23,42,.08); }
    .inactive-table,
    .paused-table { width:100%; border-collapse:separate; border-spacing:0; font-size:13px; background:transparent; table-layout:fixed; }
    .inactive-table th,
    .paused-table th { background:#eef2ff; text-align:left; padding:12px 14px; color:#475569; font-size:12px; text-transform:uppercase; letter-spacing:.04em; position:sticky; top:0; z-index:2; }
    .inactive-table td,
    .paused-table td { padding:12px 14px; border-top:1px solid #e2e8f0; vertical-align:middle; color:#0f172a; }
    .inactive-table tbody tr:nth-child(even) td,
    .paused-table tbody tr:nth-child(even) td { background:#f8fafc; }
    .inactive-table tbody tr:hover td,
    .paused-table tbody tr:hover td { background:#eef2ff; }
    .inactive-name,
    .paused-name { font-weight:600; }
    .inactive-phone,
    .paused-phone { font-size:12px; color:#64748b; margin-top:4px; }
    .inactive-empty,
    .paused-empty { padding:48px 0; text-align:center; font-size:14px; color:#94a3b8; background:#fff; border-radius:16px; border:1px dashed #cbd5f5; }
    .btn-secondary { border:none; background:#e2e8f0; color:#1f2937; padding:10px 18px; border-radius:12px; font-weight:600; cursor:pointer; }
    .btn-secondary:hover { opacity:.9; }
    .btn-secondary--small { padding:6px 12px; font-size:12px; border-radius:999px; }
    @media (max-width: 768px) {
      .inactive-table thead,
      .paused-table thead { display:none; }
      .inactive-table tr,
      .paused-table tr { display:block; border-bottom:1px solid #e2e8f0; }
      .inactive-table td,
      .paused-table td { display:flex; justify-content:space-between; gap:12px; }
      .inactive-table td::before,
      .paused-table td::before { content:attr(data-label); font-weight:600; color:#64748b; }
    }

    .student-history-status { display:inline-flex; align-items:center; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:600; background:#e2e8f0; color:#475569; }
    .student-history-status--active { background:#dcfce7; color:#15803d; }
    .student-history-status--paused { background:#fef3c7; color:#d97706; }

    /* Dark mode: Bảo lưu / Học viên nghỉ */
    body.dark-mode .inactive-table-wrapper,
    body.dark-mode .paused-table-wrapper { background:rgba(12,19,38,.9); border-color:rgba(99,102,241,.28); box-shadow:0 18px 40px rgba(0,0,0,.35); }
    body.dark-mode .inactive-table,
    body.dark-mode .paused-table { background:transparent; }
    body.dark-mode .inactive-table th,
    body.dark-mode .paused-table th { background:rgba(28,33,68,.88); color:#cbd5f5; border-bottom:1px solid rgba(99,102,241,.24); }
    body.dark-mode .inactive-table td,
    body.dark-mode .paused-table td { color:#e2e8f0; border-top:1px solid rgba(99,102,241,.16); }
    body.dark-mode .inactive-table tbody tr:nth-child(odd) td,
    body.dark-mode .paused-table tbody tr:nth-child(odd) td { background:rgba(12,19,38,.9); }
    body.dark-mode .inactive-table tbody tr:nth-child(even) td,
    body.dark-mode .paused-table tbody tr:nth-child(even) td { background:rgba(15,23,42,.86); }
    body.dark-mode .inactive-table tbody tr:hover td,
    body.dark-mode .paused-table tbody tr:hover td { background:rgba(59,130,246,.12); }
    body.dark-mode .inactive-empty,
    body.dark-mode .paused-empty { background:rgba(15,23,42,.78); border-color:rgba(99,102,241,.28); color:#cbd5f5; }
    body.dark-mode .paused-modal__dialog { background:rgba(12,19,38,.94); border:1px solid rgba(99,102,241,.28); box-shadow:0 24px 56px rgba(2,6,23,.7); }
    body.dark-mode .paused-modal__header { border-bottom:1px solid rgba(99,102,241,.24); color:#e2e8f0; }
    body.dark-mode .paused-modal__subtitle { color:#a5b4fc; }
    body.dark-mode .paused-modal__body { background:rgba(10,16,32,.92); }
    body.dark-mode .paused-modal__field label { color:#cbd5f5; }
    body.dark-mode .paused-modal__field input,
    body.dark-mode .paused-modal__field select,
    body.dark-mode .paused-modal__field textarea { background:rgba(15,23,42,.85); border-color:rgba(99,102,241,.28); color:#e2e8f0; }
    body.dark-mode .paused-modal__footer { background:rgba(15,23,42,.92); border-top:1px solid rgba(99,102,241,.24); }
    body.dark-mode .paused-modal__btn.secondary { background:rgba(148,163,184,.18); color:#e2e8f0; }
    body.dark-mode .student-history-status { background:rgba(148,163,184,.18); color:#cbd5f5; }
    body.dark-mode .student-history-status--active { background:rgba(34,197,94,.18); color:#4ade80; }
    body.dark-mode .student-history-status--paused { background:rgba(251,191,36,.2); color:#facc15; }
    body.dark-mode .student-history-status--finished { background:rgba(248,113,113,.2); color:#fecdd3; }
    .student-history-status--finished { background:#fee2e2; color:#b91c1c; }

    .wait-add-student { display:flex; flex-direction:column; gap:20px; }
    .wait-add-grid { display:grid; grid-template-columns:repeat(2,minmax(260px,1fr)); gap:24px; }
    .wait-add-col { display:flex; flex-direction:column; gap:18px; }
    .wait-add-field { display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--text-soft); }
    .wait-add-field input,
    .wait-add-field select,
    .wait-add-field textarea { border:1px solid var(--border-soft); border-radius:12px; padding:10px 12px; font-size:14px; background:var(--surface-card); color:var(--text-strong); }
    .wait-add-field input[readonly] { background:var(--surface-soft); color:var(--text-soft); }
    .wait-add-field textarea { resize:vertical; min-height:120px; }
    .wait-add-row { display:flex; flex-wrap:wrap; gap:16px; }
    .wait-add-row .wait-add-field { flex:1 1 160px; }
    .wait-add-radio-group { display:flex; flex-wrap:wrap; gap:14px; font-size:13px; color:#475569; }
    .wait-add-radio-group label { display:inline-flex; align-items:center; gap:6px; cursor:pointer; }
    .wait-add-note { display:flex; flex-direction:column; gap:6px; }
    .wait-add-note textarea { border:1px solid var(--border-soft); border-radius:12px; padding:12px 14px; font-size:14px; min-height:140px; background:var(--surface-card); color:var(--text-strong); }
    .module-header-actions input[type="button"].btn { border:none; border-radius:999px; padding:10px 20px; cursor:pointer; font-weight:600; background:#2563eb; color:#fff; display:inline-flex; align-items:center; justify-content:center; gap:8px; }
    .module-header-actions input[type="button"].btn:hover { opacity:.88; }
    .module-header-actions input[type="button"].btn + .btn-primary { margin-left:12px; }
    @media (max-width: 960px) {
      .wait-add-grid { grid-template-columns:1fr; }
    }

    .crm-log-section .btn-outline, .wait-history-section .btn-outline { border-color:var(--border-soft); color:var(--text-soft); }
    .crm-log-section .btn-outline:hover, .wait-history-section .btn-outline:hover { border-color:#2563eb; color:#2563eb; }

    .crm-lead-popover { position:absolute; z-index:1200; background:var(--surface-card); border-radius:16px; border:1px solid var(--border-soft); box-shadow:0 28px 56px rgba(15,23,42,.16); padding:16px; width:320px; max-width:calc(100vw - 32px); }
    .crm-lead-popover__header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
    .crm-lead-popover__title { font-weight:600; font-size:15px; color:var(--text-strong); }
    .crm-lead-popover__close { border:none; background:transparent; font-size:20px; line-height:1; cursor:pointer; color:var(--text-soft); }
    .crm-lead-popover__close:hover { color:var(--text-strong); }
    .crm-lead-popover__timeline { max-height:360px; overflow:auto; padding-right:4px; }
    .crm-lead-popover__timeline .crm-lead-history-list { gap:12px; }
    .crm-lead-popover__footer { margin-top:12px; font-size:12px; color:var(--text-soft); text-align:right; }
    @media (max-width:1200px) {
      .crm-lead-row { flex-direction:column; }
      .crm-lead-info { flex-direction:column; }
      .crm-lead-history { min-width:0; }
    }
    @media (max-width:768px) {
    }

    .wait-class-picker { display:flex; flex-direction:column; gap:12px; border:1px solid var(--border-soft); border-radius:16px; padding:16px; background:var(--surface-soft); }
    .wait-class-picker__filters { display:flex; gap:12px; flex-wrap:wrap; }
    .wait-class-picker__filters input, .wait-class-picker__filters select { border:1px solid var(--border-soft); border-radius:12px; padding:8px 12px; font-size:13px; background:var(--surface-card); color:var(--text-strong); }
    .wait-class-picker__meta { font-size:12px; color:var(--text-soft); display:flex; gap:16px; flex-wrap:wrap; }
    .wait-class-picker__list { display:flex; flex-direction:column; gap:10px; max-height:260px; overflow:auto; }
    .wait-class-row { display:grid; grid-template-columns:auto minmax(0,1fr); gap:12px; align-items:flex-start; border:1px solid var(--border-soft); border-radius:12px; background:var(--surface-card); padding:12px 14px; cursor:pointer; transition:.2s; }
    .wait-class-row:hover { border-color:#2563eb; box-shadow:0 12px 24px rgba(37,99,235,.14); }
    .wait-class-row__main { display:flex; flex-direction:column; gap:6px; }
    .wait-class-row__title { font-size:14px; font-weight:600; color:var(--text-strong); }
    .wait-class-row__code { font-size:12px; color:var(--text-soft); }
    .wait-class-row__meta { display:flex; gap:10px; font-size:12px; color:var(--text-soft); flex-wrap:wrap; }
    .wait-class-row__badges { display:flex; gap:6px; flex-wrap:wrap; justify-self:end; }
    .wait-chip { display:inline-flex; align-items:center; padding:2px 8px; border-radius:999px; background:var(--surface-highlight); color:#1d4ed8; font-size:11px; font-weight:600; }
    .wait-class-empty { padding:20px 0; text-align:center; color:#94a3b8; font-size:13px; }
.tuition-header__deposit {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px dashed rgba(255, 153, 0, 0.4);
  background: rgba(255, 153, 0, 0.08);
  color: #a05a00;
  font-size: 13px;
  line-height: 1.4;
}

/* Tuition modal polish */
.tuition-modal { position:fixed; inset:0; z-index:1400; display:flex; align-items:center; justify-content:center; padding:28px; background:rgba(15,23,42,.32); backdrop-filter:blur(6px); }
.tuition-modal__dialog { width:min(1280px,96vw); background:var(--surface-card); border-radius:22px; border:1px solid var(--border-soft); box-shadow:0 28px 64px rgba(15,23,42,.32); display:flex; flex-direction:column; overflow:hidden; }
.tuition-modal__header { display:flex; align-items:center; justify-content:space-between; padding:18px 22px; border-bottom:1px solid var(--border-soft); background:linear-gradient(135deg, rgba(37,99,235,.08), rgba(14,165,233,.06)); }
.tuition-modal__title { margin:0; font-size:18px; font-weight:700; color:var(--text-strong); }
.tuition-modal__subtitle { margin-top:4px; color:var(--text-soft); font-size:13px; }
.tuition-modal__close { border:none; background:transparent; font-size:24px; cursor:pointer; color:var(--text-soft); line-height:1; padding:8px; border-radius:10px; transition:background .18s ease, color .18s ease; }
.tuition-modal__close:hover { background:var(--surface-subtle); color:var(--text-strong); }
.tuition-modal__body { padding:18px 20px 10px; overflow:auto; max-height:calc(90vh - 140px); }
.tuition-modal__footer { padding:14px 20px; border-top:1px solid var(--border-soft); display:flex; justify-content:space-between; align-items:center; gap:12px; color:var(--text-soft); background:var(--surface-card); }
.tuition-modal__layout { display:grid; grid-template-columns:320px minmax(0,1fr); gap:16px; align-items:start; }
.tuition-sidebar { background:var(--surface-soft); border:1px solid var(--border-soft); border-radius:14px; box-shadow:inset 0 1px 0 rgba(255,255,255,.4); display:flex; flex-direction:column; max-height:calc(85vh - 160px); overflow:hidden; }
.tuition-sidebar__header { padding:14px 16px; font-weight:700; color:var(--text-strong); border-bottom:1px solid var(--border-soft); }
.tuition-sidebar__list { overflow:auto; padding:12px; display:flex; flex-direction:column; gap:10px; flex:1; min-height:0; -webkit-mask-image:linear-gradient(180deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%); mask-image:linear-gradient(180deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%); }
.tuition-sidebar__item { width:100%; border:1px solid var(--border-soft); border-radius:12px; padding:10px 12px; background:var(--surface-card); text-align:left; display:flex; flex-direction:column; gap:6px; cursor:pointer; transition:transform .15s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease; }
.tuition-sidebar__item.active { border-color:#2563eb; box-shadow:0 14px 28px rgba(37,99,235,.14); background:linear-gradient(135deg, rgba(37,99,235,.08), rgba(14,165,233,.04)); position:relative; }
.tuition-sidebar__item:hover { transform:translateY(-2px); box-shadow:0 12px 22px rgba(15,23,42,.08); }
.tuition-sidebar__name { font-weight:700; color:var(--text-strong); }
.tuition-sidebar__code { display:flex; justify-content:space-between; color:var(--text-soft); font-size:12px; gap:8px; }
.tuition-sidebar__status { align-self:flex-start; padding:4px 10px; border-radius:10px; font-size:11px; font-weight:700; color:#fff; background:linear-gradient(135deg,#22c55e,#16a34a); }
.tuition-sidebar__status.danger { background:linear-gradient(135deg,#f97316,#f59e0b); color:#7c2d12; }
.tuition-sidebar__status.pending { background:linear-gradient(135deg,#fde68a,#fcd34d); color:#854d0e; }
.tuition-sidebar__badge { font-size:11px; color:#b91c1c; background:rgba(248,113,113,.14); border:1px dashed rgba(239,68,68,.35); padding:4px 8px; border-radius:999px; }
.tuition-content { background:var(--surface-card); border-radius:16px; border:1px solid var(--border-soft); box-shadow:0 16px 34px rgba(15,23,42,.12); padding:16px; position:relative; overflow:hidden; }
.tuition-content.is-loading { opacity:.55; pointer-events:none; }
.tuition-content__inner { opacity:0; transform:translateY(6px); transition:opacity .2s ease, transform .2s ease; display:flex; flex-direction:column; gap:16px; }
.tuition-content__inner.is-visible { opacity:1; transform:translateY(0); }
.tuition-card { background:var(--surface-soft); border-radius:16px; padding:16px; border:1px solid var(--border-soft); box-shadow:inset 0 1px 0 rgba(255,255,255,.35); display:flex; flex-direction:column; gap:14px; }
.tuition-card h3 { margin:0; font-size:16px; color:var(--text-strong); }
.tuition-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; }
.tuition-form-grid label { display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--text-soft); }
.tuition-form-grid input,
.tuition-form-grid select,
.tuition-form-grid textarea { border:1px solid var(--border-soft); border-radius:12px; padding:10px 12px; font-size:13px; background:var(--surface-card); color:var(--text-strong); box-shadow:0 4px 10px rgba(15,23,42,.05); transition:border-color .16s ease, box-shadow .16s ease; }
.tuition-form-grid input:focus,
.tuition-form-grid select:focus,
.tuition-form-grid textarea:focus { outline:none; border-color:#2563eb; box-shadow:0 0 0 3px rgba(37,99,235,.18); }
.tuition-form-remaining { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:13px; color:var(--text-soft); padding:10px 12px; background:var(--surface-card); border:1px dashed var(--border-soft); border-radius:12px; }
.tuition-form-outstanding { border:1px dashed rgba(245,158,11,.32); background:rgba(252,211,77,.14); padding:12px; border-radius:12px; display:flex; flex-direction:column; gap:6px; }
.tuition-form-outstanding__top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.tuition-form-outstanding__heading { font-weight:700; color:#92400e; }
.tuition-form-outstanding__amount { font-size:16px; font-weight:700; color:#b45309; }
.tuition-form-outstanding__note { font-size:12px; color:#92400e; }
.tuition-form-outstanding__control { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--text-soft); }
.tuition-radio-group { display:flex; gap:12px; flex-wrap:wrap; padding:10px 12px; border-radius:12px; background:var(--surface-soft); border:1px solid var(--border-soft); font-size:13px; color:var(--text-strong); }
.tuition-radio-group input { margin-right:6px; }
.tuition-actions { display:flex; justify-content:flex-end; gap:10px; }
.tuition-section { background:var(--surface-soft); border:1px solid var(--border-soft); border-radius:14px; padding:14px 16px; box-shadow:inset 0 1px 0 rgba(255,255,255,.35); }
.tuition-section__title { font-weight:700; margin-bottom:8px; color:var(--text-strong); }
.tuition-table { width:100%; border-collapse:separate; border-spacing:0; }
.tuition-table th, .tuition-table td { font-size:13px; padding:10px 12px; border-bottom:1px solid var(--border-soft); text-align:left; }
.tuition-table thead th { background:var(--surface-subtle); font-weight:700; color:var(--text-soft); }
.tuition-empty { text-align:center; padding:14px; color:var(--text-soft); font-size:13px; }

.cashbook { display:flex; flex-direction:column; gap:20px; }
.cashbook-header { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:flex-start; }
.cashbook-header h1 { margin:0; font-size:24px; color:var(--text-strong); }
.cashbook-header p { margin:4px 0 0; color:var(--text-soft); font-size:14px; }
.cashbook-header__actions { display:flex; gap:10px; flex-wrap:wrap; }
.cashbook-split { position:relative; display:inline-flex; }
.cashbook-split .btn { display:inline-flex; align-items:center; gap:6px; }
.cashbook-split__caret { font-size:11px; opacity:.8; }
.cashbook-menu { position:absolute; top:calc(100% + 4px); right:0; background:#fff; border:1px solid var(--border-soft); border-radius:12px; box-shadow:0 14px 30px rgba(15,23,42,.12); padding:6px 0; display:flex; flex-direction:column; min-width:160px; z-index:30; }
.cashbook-menu[hidden] { display:none !important; }
.cashbook-menu__item { width:100%; border:none; background:transparent; padding:8px 16px; text-align:left; font-size:13px; color:var(--text-strong); cursor:pointer; }
.cashbook-menu__item:hover { background:var(--surface-soft); }
.cashbook-toolbar-wrapper { margin-bottom:12px; }
.filter-toolbar { display:flex; flex-wrap:wrap; gap:16px 24px; background:var(--surface); border:1px solid var(--border-soft); border-radius:16px; padding:12px 16px; box-shadow:0 6px 14px rgba(15,23,42,.06); }
.filter-group { display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--text-soft); position:relative; }
.filter-label { font-weight:600; text-transform:uppercase; letter-spacing:.05em; }
.filter-group select { border:1px solid var(--border-soft); border-radius:10px; padding:6px 12px; font-size:13px; color:var(--text-strong); background:var(--surface-soft); min-width:160px; }
.time-trigger { border:1px solid var(--border-soft); border-radius:10px; padding:6px 12px; font-size:13px; color:var(--text-strong); background:var(--surface-soft); min-width:160px; display:inline-flex; align-items:center; gap:6px; cursor:pointer; }
.time-trigger::after { content:'▾'; font-size:12px; opacity:.7; }
.pill-list { display:flex; flex-wrap:wrap; gap:6px; }
.pill-option { border-radius:999px; }
.pill-option input { display:none; }
.pill-option span { display:inline-flex; align-items:center; padding:6px 14px; border-radius:inherit; border:1px solid rgba(148,163,184,.6); font-size:13px; font-weight:600; color:var(--text-strong); cursor:pointer; background:rgba(248,250,252,.9); transition:.2s; }
.pill-option input:checked + span { border-color:#1d4ed8; color:#1d4ed8; background:rgba(59,130,246,.12); }
body.dark-mode .pill-option span { background:rgba(15,23,42,.85); border-color:rgba(99,102,241,.35); color:#e2e8f0; }
body.dark-mode .pill-option input:checked + span { color:#bfdbfe; background:rgba(59,130,246,.22); border-color:rgba(59,130,246,.6); }
.checkbox-inline { display:flex; gap:12px; flex-wrap:wrap; }
.checkbox-row { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--text-strong); }
.checkbox-row input { width:16px; height:16px; }
.cashbook-body { display:block; }
.cashbook-main { display:flex; flex-direction:column; gap:20px; }
.cashbook-content { flex:1; display:flex; flex-direction:column; gap:20px; }
.cashbook-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; }
.cashbook-summary-grid strong { font-size:22px; font-weight:700; }
.cashbook-summary-grid [data-summary="receipt"] { color:#1d4ed8; }
.cashbook-summary-grid [data-summary="payment"] { color:#dc2626; }
.cashbook-summary-grid [data-summary="closing"] { color:#16a34a; }
.cashbook-summary-grid > div {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:4px;
  text-align:right;
}
.cashbook-summary-grid > div p {
  margin:0;
  font-size:12px;
  color:var(--text-soft);
  text-transform:uppercase;
  letter-spacing:.04em;
}
body.dark-mode .cashbook-summary-grid > div p { color:rgba(199,210,254,.8); }
.cashbook-table-head { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; margin-bottom:12px; }
.cashbook-search { flex:1; position:relative; }
.cashbook-search input { width:100%; border-radius:14px; border:1px solid var(--border-soft); padding:10px 14px 10px 38px; font-size:14px; background:var(--surface-soft); }
.cashbook-search__icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); font-size:14px; opacity:.6; }
.cashbook-table-wrapper { width:100%; overflow:auto; border-radius:14px; border:1px solid var(--border-soft); box-shadow:0 14px 32px rgba(15,23,42,.08); }
.cashbook-table { width:100%; border-collapse:separate; border-spacing:0; font-size:13px; min-width:960px; }
.cashbook-table thead th { position:sticky; top:0; z-index:2; background:#edf2ff; color:#1e3a8a; }
.cashbook-table th { text-align:left; padding:10px 12px; font-weight:700; border-bottom:1px solid rgba(79,70,229,.22); white-space:nowrap; }
.cashbook-table td { padding:10px 12px; border-bottom:1px solid var(--border-muted,#e2e8f0); vertical-align:top; color:var(--text-strong); background:var(--surface-card); }
.cashbook-table tbody tr:nth-child(odd) td { background:#f8fafc; }
.cashbook-table tbody tr:nth-child(even) td { background:#fff; }
.cashbook-table tbody tr:hover td { background:#eef2ff; cursor:pointer; }
.cashbook-table tr.is-selected { background:rgba(79,70,229,.08); box-shadow:inset 0 0 0 1px rgba(79,70,229,.2); }
.cashbook-table__amount { font-weight:500; text-align:right; white-space:nowrap; }
.cashbook-table__amount.negative { color:#dc2626; }
.cashbook-table__codes { display:flex; flex-direction:column; gap:2px; }
.cashbook-table__codes strong { font-size:14px; font-weight:500; }
.cashbook-table tr:hover .cashbook-table__codes strong { font-weight:600; }
.cashbook-table tr.is-selected .cashbook-table__codes strong { font-weight:500; }
.cashbook-table__codes small { font-size:11px; color:var(--text-soft); }
.cashbook-table__payer small { font-size:11px; color:var(--text-soft); display:block; }
.cashbook-empty-state { padding:30px 0; text-align:center; color:var(--text-soft); font-size:14px; }
.cashbook-detail-row td { background:var(--surface-soft); padding:0 !important; }
.cashbook-detail-inline { padding:18px; border-top:1px solid var(--border-soft); background:var(--surface); }
.cashbook-detail__header { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.cashbook-detail__header h3 { margin:0; font-weight:600; }
.cashbook-detail__badges { display:flex; gap:8px; flex-wrap:wrap; }
.cashbook-detail__actions { display:flex; gap:10px; flex-wrap:wrap; }
.cashbook-detail__grid { margin-top:18px; display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; }
.cashbook-detail__grid p { margin:0; color:var(--text-soft); font-size:12px; }
.cashbook-detail__grid strong { font-size:14px; color:var(--text-strong); font-weight:500; }
.cashbook-detail__section { margin-top:20px; }
.cashbook-detail__section-title { font-size:14px; font-weight:600; margin-bottom:10px; }
.cashbook-attachment-table { width:100%; border-collapse:collapse; font-size:13px; }
.cashbook-attachment-table th,
.cashbook-attachment-table td { padding:8px; border-bottom:1px solid var(--border-soft); text-align:left; }
.cashbook-badge { display:inline-flex; align-items:center; padding:2px 10px; border-radius:999px; font-size:11px; font-weight:600; }
.cashbook-badge--success { background:rgba(34,197,94,.15); color:#15803d; }
.cashbook-badge--warning { background:rgba(251,191,36,.18); color:#92400e; }
.cashbook-badge--danger { background:rgba(248,113,113,.2); color:#b91c1c; }
.cashbook-badge--muted { background:rgba(148,163,184,.2); color:#475569; }
/* Fund column: show plain text instead of pill */
.cashbook-table td .cashbook-badge--muted {
  background:transparent;
  padding:0;
  border-radius:0;
  font-size:13px;
  font-weight:500;
  color:var(--text-soft);
}
.cashbook-chip { display:inline-flex; align-items:center; padding:4px 10px; border-radius:999px; font-size:11px; font-weight:600; margin-right:6px; }
.cashbook-chip--receipt { background:rgba(59,130,246,.12); color:#1d4ed8; }
.cashbook-chip--payment { background:rgba(248,113,113,.12); color:#b91c1c; }
.btn { border:none; border-radius:12px; padding:10px 16px; font-size:14px; cursor:pointer; background:var(--surface-soft); color:var(--text-strong); }
.btn-primary { background:#2563eb; color:#fff; }
.btn-secondary { background:rgba(37,99,235,.12); color:#1d4ed8; }
.btn-danger { background:rgba(248,113,113,.12); color:#b91c1c; box-shadow:none; }
.btn:hover { opacity:.92; }

.cashbook-modal .wait-modal__dialog { min-width:720px; }

.wait-modal__dialog.payroll-payrun-modal {
  width:min(1100px,92vw);
  max-width:min(1100px,92vw);
  min-width:min(880px,92vw);
  max-height:92vh;
}
.wait-modal__dialog.payroll-payrun-modal .wait-modal__body {
  max-height:calc(90vh - 140px);
  display:flex;
  flex-direction:column;
}
.payroll-payrun-modal .wait-modal__footer {
  position:sticky;
  bottom:0;
  background:var(--surface-card,#fff);
  border-top:1px solid var(--border-soft,#e2e8f0);
  margin-top:auto;
  padding-top:16px;
  box-shadow:0 -8px 16px rgba(15,23,42,.08);
}

.payroll-header-sticky {
  position:sticky;
  top:0;
  background:var(--surface-card,#fff);
  z-index:2;
  padding-top:4px;
  padding-bottom:8px;
}
.payroll-detail-modal .payroll-meta-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
  margin-bottom:12px;
}
.payroll-detail-modal .payroll-meta-card {
  background:var(--surface-soft,#f8fafc);
  border:1px solid var(--border-soft,#e2e8f0);
  border-radius:12px;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.payroll-detail-modal .payroll-meta-label {
  font-size:12px;
  color:var(--text-soft,#94a3b8);
  text-transform:uppercase;
  letter-spacing:.04em;
}
.payroll-detail-modal .payroll-controls {
  display:flex;
  gap:16px;
  align-items:flex-end;
  margin-bottom:8px;
  flex-wrap:wrap;
}
.payroll-table-wrapper table {
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:760px;
}
.payroll-table thead th {
  position:sticky;
  top:0;
  background:var(--surface-card,#fff);
  z-index:1;
}
.payroll-row.is-posted {
  background:rgba(148,163,184,.15);
}
.payroll-row__code {
  font-size:12px;
  color:var(--text-soft,#94a3b8);
  margin-top:2px;
}
.payroll-status {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:600;
}
.payroll-status__dot {
  width:8px;
  height:8px;
  border-radius:50%;
  display:inline-block;
}
.payroll-status--done {
  color:#16a34a;
}
.payroll-status--done .payroll-status__dot {
  background:#16a34a;
}
.payroll-status--pending {
  color:#f97316;
}
.payroll-status--pending .payroll-status__dot {
  background:#f97316;
}
.payroll-status__code {
  font-size:11px;
  font-weight:500;
  color:var(--text-soft,#94a3b8);
}
.cashbook-modal__grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:16px; padding:4px 0 16px; }
.cashbook-modal__field { display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--text-soft); }
.cashbook-modal__field input,
.cashbook-modal__field select,
.cashbook-modal__field textarea { border:1px solid var(--border-soft); border-radius:12px; padding:10px 12px; font-size:14px; color:var(--text-strong); background:var(--surface-soft); }
.cashbook-modal__field textarea { resize:vertical; min-height:68px; }
.cashbook-modal__check { display:flex; align-items:center; gap:10px; font-size:13px; color:var(--text-strong); }
.cashbook-modal__check input { width:16px; height:16px; }

/* Cashbook dark-mode adjustments */
body.dark-mode .cashbook-header h1 { color:#e2e8f0; }
body.dark-mode .cashbook-header p { color:#a5b4fc; }
body.dark-mode .cashbook-summary-grid strong { color:#e2e8f0; }
body.dark-mode .cashbook-summary-grid [data-summary="receipt"] { color:#93c5fd; }
body.dark-mode .cashbook-summary-grid [data-summary="payment"] { color:#fca5a5; }
body.dark-mode .cashbook-summary-grid [data-summary="closing"] { color:#86efac; }
body.dark-mode .cashbook-summary-grid > div { background:rgba(15,23,42,.7); border:1px solid rgba(99,102,241,.3); box-shadow:0 18px 38px rgba(2,6,23,.6); }
body.dark-mode .cashbook-summary-grid > div p { color:rgba(199,210,254,.86); }
body.dark-mode .cashbook-search input { background:rgba(15,23,42,.8); border-color:rgba(99,102,241,.32); color:#e2e8f0; }
body.dark-mode .cashbook-search__icon { color:#cbd5f5; opacity:.75; }
body.dark-mode .cashbook-table-wrapper { border-color:rgba(99,102,241,.28); box-shadow:0 18px 40px rgba(2,6,23,.65); }
body.dark-mode .cashbook-table thead th { background:rgba(28,33,68,.9); color:#cbd5f5; border-bottom:1px solid rgba(99,102,241,.3); }
body.dark-mode .cashbook-table th { color:#e2e8f0; border-bottom-color:rgba(99,102,241,.26); }
body.dark-mode .cashbook-table td { background:rgba(12,19,38,.9); color:#e2e8f0; border-bottom:1px solid rgba(99,102,241,.16); }
body.dark-mode .cashbook-table tbody tr:nth-child(odd) td { background:rgba(10,16,32,.92); }
body.dark-mode .cashbook-table tbody tr:nth-child(even) td { background:rgba(15,23,42,.88); }
body.dark-mode .cashbook-table tbody tr:hover td { background:rgba(99,102,241,.18); }
body.dark-mode .cashbook-table tr.is-selected { background:rgba(99,102,241,.2); box-shadow:inset 0 0 0 1px rgba(129,140,248,.32); }
body.dark-mode .cashbook-table__codes small,
body.dark-mode .cashbook-table__payer small { color:#a5b4fc; }
body.dark-mode .cashbook-badge--muted { background:rgba(148,163,184,.2); color:#cbd5f5; }
body.dark-mode .cashbook-chip--receipt { background:rgba(59,130,246,.18); color:#bfdbfe; }
body.dark-mode .cashbook-chip--payment { background:rgba(248,113,113,.18); color:#fecdd3; }

@media (max-width:992px) {
  .cashbook-body { flex-direction:column; }
  .cashbook-filters { width:100%; position:static; }
}
.time-popover { position:absolute; top:100%; left:0; margin-top:8px; background:var(--surface); border:1px solid var(--border-soft); border-radius:14px; box-shadow:0 18px 40px rgba(15,23,42,.15); padding:12px; display:grid; grid-template-columns:repeat(4,minmax(160px,1fr)); gap:14px; z-index:40; }
.time-popover[hidden] { display:none !important; }
.time-popover__col { display:flex; flex-direction:column; gap:10px; }
.time-popover__col p { margin:0; font-weight:700; font-size:13px; color:var(--text-soft); }
.time-popover__col button { border:1px solid var(--border-soft); background:var(--surface-soft); color:var(--text-strong); border-radius:999px; padding:8px 12px; font-size:13px; cursor:pointer; }
.time-popover__col button:hover { border-color:#2563eb; color:#2563eb; }
