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

    :root {
      --navy: #0d1b3e;
      --blue: #1a3a7c;
      --gold: #c8962a;
      --gold-lt: #f0c060;
      --red: #b52020;
      --green: #1a7c4f;
      --teal: #0e7490;
      --purple: #6d28d9;
      --bg: #f0f4fa;
      --card: #fff;
      --border: #d1dae8;
      --text: #1e293b;
      --muted: #64748b;
      --radius: 10px;
      --shadow: 0 4px 24px rgba(13, 27, 62, .12)
    }

    html {
      font-family: 'Inter', sans-serif;
      font-size: 15px;
      color: var(--text);
      background: var(--bg)
    }

    body {
      min-height: 100vh
    }

    /* LOADER */
    #appLoader {
      position: fixed;
      inset: 0;
      background: linear-gradient(135deg, #0d1b3e, #1a3a7c);
      z-index: 9999;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 20px;
      color: #fff
    }

    #appLoader .spinner {
      width: 52px;
      height: 52px;
      border: 5px solid rgba(255, 255, 255, .2);
      border-top-color: #f0c060;
      border-radius: 50%;
      animation: spin 1s linear infinite
    }

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

    #appLoader .lm {
      font-size: 1rem;
      color: #a9c4ff;
      font-weight: 600;
      text-align: center;
      padding: 0 20px
    }

    #appLoader .lt {
      font-size: 1.4rem;
      font-weight: 800;
      color: #f0c060
    }

    /* LOGIN */
    #loginScreen {
      position: fixed;
      inset: 0;
      background: linear-gradient(135deg, var(--navy), var(--blue));
      z-index: 9000;
      display: flex;
      align-items: center;
      justify-content: center
    }

    .login-box {
      background: #fff;
      padding: 35px 30px;
      border-radius: 12px;
      width: 100%;
      max-width: 400px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
      text-align: center
    }

    .login-box img {
      width: 80px;
      margin-bottom: 15px;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .2))
    }

    .login-box h2 {
      font-size: 1.5rem;
      color: var(--navy);
      margin-bottom: 6px;
      font-family: 'Poppins', sans-serif
    }

    .login-box p {
      font-size: .85rem;
      color: var(--muted);
      margin-bottom: 24px
    }

    .login-box input {
      width: 100%;
      margin-bottom: 15px;
      padding: 12px 14px;
      border: 1.5px solid var(--border);
      border-radius: 8px;
      font-size: 1rem;
      background: #f8faff;
      transition: border-color .2s
    }

    .login-box input:focus {
      outline: none;
      border-color: var(--blue);
      background: #fff
    }

    .login-box button {
      width: 100%;
      padding: 13px;
      background: linear-gradient(135deg, var(--blue), #2563eb);
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 1.05rem;
      font-weight: 700;
      cursor: pointer;
      transition: transform .2s, box-shadow .2s
    }

    .login-box button:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(37, 99, 235, .3)
    }

    #loginErr {
      color: var(--red);
      font-size: .85rem;
      margin-top: 14px;
      background: #fef2f2;
      border: 1px solid #fecaca;
      padding: 8px;
      border-radius: 6px;
      display: none
    }

    /* HEADER */
    .site-header {
      background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
      color: #fff;
      padding: 0 24px;
      display: flex;
      align-items: center;
      gap: 18px;
      min-height: 90px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
      position: sticky;
      top: 0;
      z-index: 100
    }

    .site-header .logo-wrap img {
      width: 70px;
      height: 70px;
      object-fit: contain;
      filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4))
    }

    .site-header .hd-text {
      flex: 1
    }

    .site-header .hd-text h1 {
      font-family: 'Poppins', sans-serif;
      font-size: 1.45rem;
      font-weight: 700;
      letter-spacing: .5px;
      line-height: 1.2
    }

    .site-header .hd-text p {
      font-size: .82rem;
      color: #a9c4ff;
      margin-top: 3px
    }

    .site-header .badge {
      background: var(--gold);
      color: var(--navy);
      font-size: .7rem;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: 20px;
      white-space: nowrap
    }

    .fb-indicator {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: .72rem;
      color: #a9c4ff;
      padding: 4px 10px;
      background: rgba(255, 255, 255, .08);
      border-radius: 20px;
      border: 1px solid rgba(255, 255, 255, .15)
    }

    .fb-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #ef4444;
      transition: background .3s
    }

    .fb-dot.connected {
      background: #22c55e
    }

    /* NAV */
    .nav-tabs {
      display: flex;
      background: var(--navy);
      padding: 0 20px;
      gap: 2px;
      border-bottom: 3px solid var(--gold);
      overflow-x: auto
    }

    .nav-tabs button {
      background: none;
      border: none;
      color: #a9c4ff;
      cursor: pointer;
      padding: 12px 16px;
      font-size: .83rem;
      font-weight: 600;
      border-bottom: 3px solid transparent;
      margin-bottom: -3px;
      transition: all .2s;
      white-space: nowrap;
      font-family: inherit
    }

    .nav-tabs button:hover {
      color: #fff
    }

    .nav-tabs button.active {
      color: var(--gold-lt);
      border-bottom-color: var(--gold-lt)
    }

    /* MAIN */
    .main {
      max-width: 100%;
      width: 100%;
      margin: 0 auto;
      padding: 24px 10px 60px
    }

    .panel {
      display: none;
      animation: fadeIn .3s ease
    }

    .panel.active {
      display: block
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(8px)
      }

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

    /* CARD */
    .card {
      background: var(--card);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 22px;
      margin-bottom: 22px
    }

    .card-title {
      font-size: .98rem;
      font-weight: 700;
      color: var(--blue);
      border-bottom: 2px solid var(--border);
      padding-bottom: 9px;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 8px
    }

    .section-sub {
      font-size: .8rem;
      font-weight: 700;
      color: var(--navy);
      margin: 14px 0 9px;
      padding: 5px 10px;
      background: linear-gradient(135deg, #e8f0fe, #dbeafe);
      border-radius: 6px;
      border-left: 3px solid var(--blue)
    }

    /* FORM */
    .form-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
      gap: 14px
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 4px
    }

    label {
      font-size: .76rem;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .4px
    }

    label .req {
      color: var(--red);
      margin-left: 2px
    }

    input,
    select,
    textarea {
      border: 1.5px solid var(--border);
      border-radius: 7px;
      padding: 9px 11px;
      font-size: .9rem;
      font-family: inherit;
      color: var(--text);
      background: #f8faff;
      transition: border-color .2s, box-shadow .2s
    }

    input:focus,
    select:focus,
    textarea:focus {
      outline: none;
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(26, 58, 124, .1)
    }

    input.error,
    select.error {
      border-color: var(--red)
    }

    .error-msg {
      color: var(--red);
      font-size: .73rem;
      display: none
    }

    .error-msg.show {
      display: block
    }

    /* TOGGLE */
    .toggle-wrap {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 4px
    }

    .toggle {
      position: relative;
      width: 48px;
      height: 25px;
      cursor: pointer
    }

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

    .slider {
      position: absolute;
      inset: 0;
      background: #d1dae8;
      border-radius: 34px;
      transition: .3s
    }

    .slider::before {
      content: '';
      position: absolute;
      width: 19px;
      height: 19px;
      left: 3px;
      top: 3px;
      background: #fff;
      border-radius: 50%;
      transition: .3s;
      box-shadow: 0 2px 4px rgba(0, 0, 0, .2)
    }

    .toggle input:checked+.slider {
      background: var(--teal)
    }

    .toggle input:checked+.slider::before {
      transform: translateX(23px)
    }

    .toggle-label {
      font-size: .86rem;
      font-weight: 600;
      color: var(--text)
    }

    /* BUTTONS */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 9px 18px;
      border: none;
      border-radius: 8px;
      font-size: .86rem;
      font-weight: 600;
      cursor: pointer;
      transition: all .2s;
      font-family: inherit
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--blue), #2563eb);
      color: #fff;
      box-shadow: 0 2px 8px rgba(26, 58, 124, .25)
    }

    .btn-primary:hover {
      transform: translateY(-1px)
    }

    .btn-success {
      background: linear-gradient(135deg, var(--green), #16a34a);
      color: #fff
    }

    .btn-success:hover {
      transform: translateY(-1px)
    }

    .btn-gold {
      background: linear-gradient(135deg, var(--gold), #d97706);
      color: #fff
    }

    .btn-gold:hover {
      transform: translateY(-1px)
    }

    .btn-danger {
      background: linear-gradient(135deg, var(--red), #dc2626);
      color: #fff
    }

    .btn-danger:hover {
      transform: translateY(-1px)
    }

    .btn-outline {
      background: none;
      border: 1.5px solid var(--blue);
      color: var(--blue)
    }

    .btn-outline:hover {
      background: var(--blue);
      color: #fff
    }

    .btn-sm {
      padding: 5px 11px;
      font-size: .76rem
    }

    .btn-row {
      display: flex;
      gap: 9px;
      flex-wrap: wrap;
      margin-top: 16px
    }

    /* STATS */
    .stats-strip {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
      gap: 13px;
      margin-bottom: 20px
    }

    .stat-card {
      background: var(--card);
      border-radius: var(--radius);
      padding: 14px;
      box-shadow: var(--shadow);
      border-left: 4px solid var(--blue)
    }

    .stat-card .sv {
      font-size: 1.5rem;
      font-weight: 800;
      color: var(--blue)
    }

    .stat-card .sk {
      font-size: .72rem;
      color: var(--muted);
      font-weight: 600;
      text-transform: uppercase;
      margin-top: 2px
    }

    .stat-card.gold {
      border-left-color: var(--gold)
    }

    .stat-card.gold .sv {
      color: var(--gold)
    }

    .stat-card.green {
      border-left-color: var(--green)
    }

    .stat-card.green .sv {
      color: var(--green)
    }

    .stat-card.teal {
      border-left-color: var(--teal)
    }

    .stat-card.teal .sv {
      color: var(--teal)
    }

    .stat-card.purple {
      border-left-color: var(--purple)
    }

    .stat-card.purple .sv {
      color: var(--purple)
    }

    /* TABLE */
    .tbl-wrap {
      overflow-x: auto;
      border-radius: var(--radius);
      box-shadow: var(--shadow)
    }

    table {
      width: 100%;
      border-collapse: collapse;
      background: var(--card);
      font-size: .82rem
    }

    thead th {
      background: linear-gradient(135deg, var(--navy), var(--blue));
      color: #fff;
      padding: 9px 11px;
      text-align: left;
      font-weight: 600;
      white-space: nowrap
    }

    tbody tr:nth-child(even) {
      background: #f5f8ff
    }

    tbody tr:hover {
      background: #e8f0ff
    }

    tbody td {
      padding: 8px 11px;
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
      white-space: nowrap
    }

    /* BADGES */
    .badge-cls {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 20px;
      font-size: .71rem;
      font-weight: 700;
      background: #dbeafe;
      color: var(--blue)
    }

    .badge-bus.yes {
      background: #d1fae5;
      color: var(--green);
      display: inline-block;
      padding: 2px 8px;
      border-radius: 20px;
      font-size: .71rem;
      font-weight: 700
    }

    .badge-bus.no {
      background: #fee2e2;
      color: var(--red);
      display: inline-block;
      padding: 2px 8px;
      border-radius: 20px;
      font-size: .71rem;
      font-weight: 700
    }

    /* FEE CHART */
    .fee-chart-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
      gap: 11px;
      margin-bottom: 18px
    }

    .fee-item {
      background: var(--card);
      border: 1.5px solid var(--border);
      border-radius: 8px;
      padding: 13px 15px;
      display: flex;
      justify-content: space-between;
      align-items: center
    }

    .fee-item .fi-cls {
      font-weight: 700;
      color: var(--navy)
    }

    .fee-item .fi-amt {
      font-size: 1.05rem;
      font-weight: 800;
      color: var(--blue)
    }

    /* SEARCH */
    .search-bar {
      display: flex;
      gap: 9px;
      flex-wrap: wrap;
      margin-bottom: 14px;
      align-items: center
    }

    .search-bar input {
      flex: 1;
      min-width: 190px
    }

    .search-bar select {
      min-width: 125px
    }

    /* MODAL */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .5);
      z-index: 999;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 14px
    }

    .modal-overlay.open {
      display: flex
    }

    .modal {
      background: var(--card);
      border-radius: 14px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
      max-width: 820px;
      width: 100%;
      max-height: 92vh;
      overflow-y: auto
    }

    .modal-header {
      background: linear-gradient(135deg, var(--navy), var(--blue));
      color: #fff;
      padding: 16px 20px;
      border-radius: 14px 14px 0 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: sticky;
      top: 0;
      z-index: 10
    }

    .modal-header h3 {
      font-size: .96rem;
      font-weight: 700
    }

    .modal-close {
      background: none;
      border: none;
      color: #fff;
      font-size: 1.4rem;
      cursor: pointer;
      line-height: 1;
      padding: 0
    }

    .modal-body {
      padding: 20px
    }

    /* MONTH GRID */
    .month-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
      gap: 14px;
      margin-top: 12px
    }

    .month-card {
      border: 1.5px solid var(--border);
      border-radius: 10px;
      overflow: hidden;
      transition: border-color .2s, box-shadow .2s;
      background: #fff
    }

    .month-card.paid {
      border-color: #86efac;
      background: linear-gradient(135deg, #f0fdf4, #f8fff8)
    }

    .month-card:hover {
      box-shadow: 0 4px 16px rgba(26, 58, 124, .12)
    }

    .month-card-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      cursor: pointer;
      user-select: none;
      border-bottom: 1px solid var(--border)
    }

    .month-card-header:hover {
      background: rgba(26, 58, 124, .04)
    }

    .month-cb {
      width: 20px;
      height: 20px;
      cursor: pointer;
      accent-color: var(--green);
      flex-shrink: 0
    }

    .month-name {
      font-weight: 700;
      color: var(--navy);
      font-size: .93rem;
      flex: 1
    }

    .month-status {
      font-size: .72rem;
      font-weight: 700;
      white-space: nowrap
    }

    .month-status.paid {
      color: var(--green)
    }

    .month-status.unpaid {
      color: var(--muted)
    }

    .bus-fee-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 14px;
      background: linear-gradient(135deg, #eff6ff, #f0f9ff);
      border-bottom: 1px solid #bfdbfe;
      cursor: pointer;
      user-select: none
    }

    .bus-fee-row:hover {
      background: #dbeafe
    }

    .bus-cb {
      width: 18px;
      height: 18px;
      cursor: pointer;
      accent-color: var(--teal);
      flex-shrink: 0
    }

    .bus-row-label {
      font-size: .82rem;
      font-weight: 700;
      color: var(--teal);
      flex: 1
    }

    .bus-status {
      font-size: .7rem;
      font-weight: 700;
      white-space: nowrap
    }

    .bus-status.paid {
      color: var(--teal)
    }

    .bus-status.unpaid {
      color: var(--muted)
    }

    .month-details {
      padding: 12px 14px;
      background: #fafbff
    }

    .fee-section {
      margin-bottom: 10px;
      padding: 10px;
      border-radius: 7px;
      border: 1px solid var(--border)
    }

    .fee-section.tuition-sec {
      background: #f0fdf4;
      border-color: #86efac
    }

    .fee-section.bus-sec {
      background: #eff6ff;
      border-color: #bfdbfe
    }

    .fee-section.other-sec {
      background: #fff7ed;
      border-color: #fed7aa;
      border-left-width: 4px;
      border-left-color: #c2410c;
    }

    .fee-section.tuition-form {
      background: #fff;
      border-color: #d1dae8
    }

    .fee-section.bus-form {
      background: #f0f9ff;
      border-color: #93c5fd
    }

    .fee-section.other-form {
      background: #fffaf5;
      border-color: #ffedd5;
      border-left-width: 4px;
      border-left-color: #c2410c;
    }

    .other-fee-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 14px;
      background: linear-gradient(135deg, #fff7ed, #fffaf5);
      border-top: 1px solid var(--border);
      cursor: pointer;
      font-size: .83rem;
      color: #c2410c;
    }

    .other-fee-row:hover {
      background: #ffedd5;
    }

    .other-cb {
      width: 18px;
      height: 18px;
      cursor: pointer;
      accent-color: #c2410c;
      flex-shrink: 0;
    }

    .sec-title {
      font-size: .75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 7px
    }

    .sec-title.t {
      color: var(--green)
    }

    .sec-title.b {
      color: var(--teal)
    }

    .sec-title.o {
      color: #c2410c;
    }

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

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

    .md-label {
      font-size: .68rem;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .4px
    }

    .md-value {
      font-size: .83rem;
      font-weight: 600;
      color: var(--text)
    }

    .md-ts {
      font-size: .7rem;
      color: var(--muted);
      margin-top: 5px;
      grid-column: 1/-1
    }

    .month-details input {
      padding: 7px 10px;
      font-size: .85rem
    }

    .action-row {
      display: flex;
      gap: 6px;
      margin-top: 8px;
      flex-wrap: wrap
    }

    /* STUDENT SELECT */
    .year-tabs {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-bottom: 14px
    }

    .year-tab {
      padding: 5px 14px;
      border-radius: 20px;
      font-size: .8rem;
      font-weight: 600;
      cursor: pointer;
      border: 1.5px solid var(--border);
      background: #fff;
      transition: all .2s
    }

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

    .stu-search-result {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-top: 8px;
      max-height: 260px;
      overflow-y: auto
    }

    .stu-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 14px;
      border: 1.5px solid var(--border);
      border-radius: 8px;
      cursor: pointer;
      transition: all .2s;
      background: #fff
    }

    .stu-row:hover {
      border-color: var(--blue);
      background: #f0f4ff
    }

    .stu-row.selected {
      border-color: var(--blue);
      background: #dbeafe
    }

    .stu-row .sr-name {
      font-weight: 700;
      font-size: .9rem
    }

    .stu-row .sr-meta {
      font-size: .75rem;
      color: var(--muted);
      margin-top: 2px
    }

    .stu-row .sr-fee {
      font-weight: 800;
      color: var(--green);
      font-size: .95rem
    }

    /* PRINT */
    .print-toolbar {
      display: flex;
      gap: 9px;
      margin-bottom: 14px;
      flex-wrap: wrap;
      align-items: center
    }

    .print-card {
      background: #fff;
      border: 1px solid #ccc;
      border-radius: 6px;
      padding: 16px;
      margin-bottom: 20px
    }

    .pr-table {
      width: 100%;
      border-collapse: collapse;
      font-size: .74rem
    }

    .pr-table th {
      background: #0d1b3e;
      color: #fff;
      padding: 6px 7px;
      font-weight: 700;
      text-align: center;
      border: 1px solid #444;
      white-space: nowrap
    }

    .pr-table td {
      padding: 5px 6px;
      border: 1px solid #bbb;
      vertical-align: middle
    }

    .pr-table tbody tr:nth-child(even) {
      background: #f0f4ff
    }

    .pr-school-head {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 14px;
      margin-bottom: 8px
    }

    .pr-logo {
      width: 60px;
      height: 60px;
      object-fit: contain
    }

    .pr-hdr {
      text-align: center;
      margin-bottom: 12px
    }

    .pr-hdr h2 {
      font-size: 1.1rem;
      font-weight: 800;
      color: #0d1b3e
    }

    .pr-hdr p {
      font-size: .78rem;
      color: #666
    }

    .reg-wrap {
      overflow-x: visible;
      width: 100%
    }

    .reg-table {
      border-collapse: collapse;
      font-size: .63rem;
      width: 100%;
      table-layout: auto
    }

    .reg-table th {
      background: #0d1b3e;
      color: #fff;
      padding: 3px 4px;
      text-align: center;
      border: 1px solid #333;
      white-space: normal;
      word-wrap: break-word;
      line-height: 1.2
    }

    .reg-table td {
      padding: 3px 4px;
      border: 1px solid #bbb;
      vertical-align: middle;
      text-align: center;
      white-space: normal;
      word-wrap: break-word
    }

    .reg-table .paid-cell {
      background: transparent;
      color: #065f46;
      font-weight: 700;
      text-align: center
    }

    .reg-table .bus-paid-cell {
      background: transparent;
      color: #1e40af;
      font-weight: 700;
      text-align: center
    }

    .reg-table .unpaid-cell {
      background: transparent;
      color: #bbb;
      text-align: center
    }

    .reg-table .stu-info {
      background: transparent;
      font-weight: 600;
      vertical-align: top;
      padding-top: 5px
    }

    /* Remove global even-row stripe and hover color inside reg-table */
    .reg-table tbody tr:nth-child(even) {
      background: transparent
    }

    .reg-table tbody tr:hover {
      background: transparent
    }

    .detail-table {
      width: 100%;
      font-size: .84rem;
      border-collapse: collapse
    }

    .detail-table td {
      padding: 7px 10px;
      border-bottom: 1px solid var(--border)
    }

    .detail-table tr:nth-child(even) td {
      background: #f8faff
    }

    .detail-table .dt-key {
      color: var(--muted);
      font-weight: 600;
      width: 40%;
      font-size: .78rem
    }

    /* TOAST */
    #toast {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: var(--green);
      color: #fff;
      padding: 11px 18px;
      border-radius: 10px;
      font-weight: 600;
      font-size: .86rem;
      box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
      z-index: 9999;
      transform: translateY(80px);
      opacity: 0;
      transition: all .35s cubic-bezier(.4, 0, .2, 1)
    }

    #toast.show {
      transform: translateY(0);
      opacity: 1
    }

    #toast.error {
      background: var(--red)
    }

    #toast.warn {
      background: var(--gold)
    }

    /* SAVING INDICATOR */
    #saveIndicator {
      position: fixed;
      top: 100px;
      right: 20px;
      background: #1e293b;
      color: #fff;
      padding: 8px 14px;
      border-radius: 8px;
      font-size: .78rem;
      font-weight: 600;
      display: none;
      z-index: 500;
      align-items: center;
      gap: 8px
    }

    #saveIndicator.show {
      display: flex
    }

    #saveIndicator .si-spin {
      width: 14px;
      height: 14px;
      border: 2px solid rgba(255, 255, 255, .3);
      border-top-color: #f0c060;
      border-radius: 50%;
      animation: spin .7s linear infinite
    }

    /* PRINT FIELDS CUSTOMIZER */
    .print-fields-box {
      background: #ffffff;
      border: 1px solid #cbd5e1;
      border-radius: 10px;
      padding: 14px 18px;
      margin: 12px 0 16px 0;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    }
    .pr-field-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
      flex-wrap: wrap;
      gap: 10px;
      padding-bottom: 8px;
      border-bottom: 1px solid #f1f5f9;
    }
    .pr-field-title {
      font-weight: 700;
      font-size: 0.9rem;
      color: #0f172a;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .pr-field-actions {
      display: flex;
      gap: 6px;
    }
    .pr-field-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      gap: 8px 12px;
    }
    .pr-field-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.82rem;
      color: #334155;
      cursor: pointer;
      user-select: none;
      background: #f8fafc;
      padding: 6px 10px;
      border-radius: 6px;
      border: 1px solid #e2e8f0;
      transition: all 0.15s ease;
      font-weight: 500;
    }
    .pr-field-item:hover {
      background: #eff6ff;
      border-color: #bfdbfe;
      color: #1e40af;
    }
    .pr-field-item input[type="checkbox"] {
      width: 15px;
      height: 15px;
      cursor: pointer;
      accent-color: #2563eb;
    }

    @media print {

      .site-header,
      .nav-tabs,
      .print-toolbar,
      .no-print,
      .modal-overlay,
      #appLoader,
      #saveIndicator,
      #loginScreen {
        display: none !important
      }

      body {
        background: #fff
      }

      .main {
        max-width: 100%;
        width: 100%;
        padding: 0
      }

      #panel-print {
        display: block !important
      }

      .print-card {
        box-shadow: none;
        border: none
      }

      .reg-wrap {
        overflow: visible !important;
        width: 100% !important
      }

      .reg-table {
        width: 100% !important;
        table-layout: auto !important;
        font-size: 6.5pt !important
      }

      .pr-table,
      .reg-table {
        font-size: 7pt
      }

      .pr-table th,
      .pr-table td,
      .reg-table th,
      .reg-table td {
        padding: 2px 3px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-word !important
      }
    }

    @media(max-width:600px) {
      .site-header {
        min-height: 68px;
        padding: 0 12px
      }

      .site-header .hd-text h1 {
        font-size: 1rem
      }

      .nav-tabs button {
        padding: 10px 10px;
        font-size: .74rem
      }

      .main {
        padding: 12px 8px 40px
      }

      .month-grid {
        grid-template-columns: 1fr
      }
    }

/* Premium Login Screen Styles */
#loginScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  z-index: 10000;
  font-family: 'Inter', sans-serif;
}

.login-box {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px;
  width: 90%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  color: white;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-box img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.login-box h2 {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.5px;
}

.login-box p {
  margin: 0 0 30px;
  font-size: 15px;
  color: #94a3b8;
}

#loginForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#loginForm input {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 15px;
  outline: none;
  transition: all 0.3s;
}

#loginForm input::placeholder {
  color: #64748b;
}

#loginForm input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

#loginForm button {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  font-weight: 600;
  padding: 14px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

#loginForm button:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

#loginErr {
  margin-top: 16px;
  color: #f87171;
  font-size: 14px;
  min-height: 20px;
}

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