﻿:root {
      --bg-main: #f4faf9;
      --bg-gradient-a: #d2efe6;
      --bg-gradient-b: #f8fdf8;
      --sidebar-bg: #0f3d3e;
      --sidebar-soft: #1f5f5b;
      --accent: #0b9b87;
      --accent-strong: #087463;
      --warning: #f28d35;
      --danger: #d95f59;
      --ink-900: #123035;
      --ink-700: #35565b;
      --ink-500: #6c8a8f;
      --surface: #ffffff;
      --border: #d8e6e4;
      --shadow: 0 16px 40px rgba(8, 41, 42, 0.12);
      --radius-lg: 18px;
      --radius-md: 12px;
      --radius-sm: 8px;
    }

    html,
    body {
      width: 100%;
      height: 100%;
      overflow: hidden;
      overscroll-behavior: none;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: "Manrope", sans-serif;
      color: var(--ink-900);
      background:
        radial-gradient(1200px 600px at 10% -10%, var(--bg-gradient-a), transparent 60%),
        radial-gradient(900px 500px at 100% 10%, #dbeff9, transparent 50%),
        var(--bg-main);
      min-height: 100vh;
      overflow: hidden;
    }

    .screen {
      display: none;
      min-height: 100vh;
      position: relative;
      z-index: 2;
    }

    .screen.active {
      display: block;
      animation: fadeIn 0.3s ease;
    }

    .bg-shape {
      position: fixed;
      border-radius: 999px;
      filter: blur(4px);
      opacity: 0.45;
      z-index: 1;
      pointer-events: none;
      animation: drift 8s ease-in-out infinite;
    }

    .shape-a {
      width: 360px;
      height: 360px;
      background: #9adfce;
      top: -120px;
      right: -120px;
    }

    .shape-b {
      width: 280px;
      height: 280px;
      background: #b2dbff;
      bottom: -90px;
      left: -90px;
      animation-delay: 1.6s;
    }

    @keyframes drift {
      0% { transform: translateY(0); }
      50% { transform: translateY(14px); }
      100% { transform: translateY(0); }
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .login-wrap {
      width: min(980px, 92vw);
      margin: 6vh auto;
      display: grid;
      grid-template-columns: 1.2fr 1fr;
      gap: 26px;
      align-items: stretch;
    }

    .glass-panel {
      background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82));
      border: 1px solid rgba(255, 255, 255, 0.6);
      border-radius: 26px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(8px);
    }

    .intro-panel {
      padding: 36px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .intro-title {
      margin: 0;
      font-family: "Sora", sans-serif;
      font-size: 36px;
      line-height: 1.2;
      color: #103a3c;
    }

    .intro-subtitle {
      margin-top: 14px;
      color: var(--ink-700);
      line-height: 1.7;
    }

    .intro-points {
      margin: 24px 0 0;
      padding: 0;
      list-style: none;
      display: grid;
      gap: 12px;
    }

    .intro-points li {
      background: #effaf7;
      border: 1px solid #d6ebe5;
      border-radius: var(--radius-md);
      padding: 12px 14px;
      color: #26545d;
      font-weight: 600;
    }

    .login-panel {
      padding: 32px 28px;
    }

    .login-heading {
      margin: 0 0 8px;
      font-family: "Sora", sans-serif;
      font-size: 26px;
    }

    .login-caption {
      margin: 0 0 20px;
      color: var(--ink-700);
    }

    .field {
      margin-bottom: 15px;
    }

    .field label {
      display: block;
      margin-bottom: 8px;
      font-weight: 700;
      color: #2f575c;
    }

    .field input,
    .field select {
      width: 100%;
      height: 45px;
      border: 1px solid #cde0de;
      border-radius: 10px;
      padding: 0 12px;
      font-size: 15px;
      color: #1f4449;
      background: #ffffff;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .field input:focus,
    .field select:focus {
      outline: none;
      border-color: #3ea99b;
      box-shadow: 0 0 0 4px rgba(62, 169, 155, 0.16);
    }

    .btn {
      height: 44px;
      border: none;
      border-radius: 10px;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.16s ease, filter 0.2s ease;
      font-family: "Manrope", sans-serif;
    }

    .btn:hover {
      transform: translateY(-1px);
      filter: brightness(1.02);
    }

    .btn-primary {
      width: 100%;
      background: linear-gradient(130deg, var(--accent), #0f8b77);
      color: #ffffff;
      margin-top: 6px;
    }

    .btn-muted {
      background: #edf5f4;
      color: #255057;
      border: 1px solid #d3e2e1;
      min-width: 130px;
    }

    .btn-danger {
      background: #feecec;
      color: #b94444;
      border: 1px solid #f5caca;
    }

    .btn-warning {
      background: #fff4e8;
      color: #b5651d;
      border: 1px solid #ffd8b3;
    }

    .btn-export {
      background: #ecf8ff;
      color: #2c5f93;
      border: 1px solid #c7dff3;
      min-width: 160px;
    }

    .help-list {
      margin: 16px 0 0;
      padding-left: 18px;
      color: #43696e;
      line-height: 1.7;
      font-size: 14px;
    }

    .app-shell {
      display: grid;
      grid-template-columns: 280px 1fr;
      min-height: 100vh;
      position: relative;
      z-index: 2;
    }

    .sidebar {
      background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-soft));
      color: #e6fbf7;
      padding: 24px 18px;
      display: flex;
      flex-direction: column;
      gap: 20px;
      position: sticky;
      top: 0;
      height: 100vh;
    }

    .brand-box {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 16px;
      padding: 14px;
    }

    .brand-title {
      margin: 0;
      font-size: 20px;
      font-family: "Sora", sans-serif;
      line-height: 1.3;
    }

    .brand-subtitle {
      margin: 8px 0 0;
      color: #c7e8e3;
      font-size: 13px;
      line-height: 1.5;
    }

    .menu {
      display: grid;
      gap: 10px;
    }

    .menu-btn {
      border: 1px solid transparent;
      background: rgba(255, 255, 255, 0.08);
      color: #d9f2ee;
      border-radius: 12px;
      padding: 12px 14px;
      text-align: left;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s ease;
      font-family: "Manrope", sans-serif;
      display: block;
      width: 100%;
    }

    .menu-btn:hover {
      background: rgba(255, 255, 255, 0.16);
      transform: translateX(2px);
    }

    .menu-btn.active {
      background: #f0fffb;
      color: #0f4c4d;
      border-color: #a9ddd4;
    }

    .main {
      padding: 20px;
      width: 100%;
      min-width: 0;
    }

    .topbar {
      background: rgba(255, 255, 255, 0.84);
      border: 1px solid #dbebea;
      border-radius: var(--radius-lg);
      padding: 16px 18px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      box-shadow: 0 6px 20px rgba(4, 40, 41, 0.06);
      margin-bottom: 18px;
    }

    .topbar h2 {
      margin: 0;
      font-family: "Sora", sans-serif;
      font-size: 22px;
    }

    .topbar p {
      margin: 4px 0 0;
      color: var(--ink-700);
      font-weight: 600;
    }

    .page-section {
      display: none;
      animation: fadeIn 0.26s ease;
    }

    .page-section.active {
      display: block;
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 18px;
    }

    .stat-card {
      background: linear-gradient(150deg, #ffffff, #f4fbf9);
      border: 1px solid #deece9;
      border-radius: var(--radius-md);
      padding: 16px;
      box-shadow: 0 10px 24px rgba(4, 49, 50, 0.07);
      min-height: 104px;
    }

    .stat-label {
      font-size: 13px;
      color: #4f757b;
      font-weight: 700;
      margin-bottom: 7px;
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }

    .stat-value {
      font-size: 30px;
      font-family: "Sora", sans-serif;
      color: #113f43;
      margin: 0;
      line-height: 1.1;
    }

    .panel-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    .panel {
      background: var(--surface);
      border: 1px solid #deece8;
      border-radius: var(--radius-md);
      box-shadow: 0 8px 20px rgba(8, 51, 51, 0.06);
      overflow: hidden;
    }

    .panel-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      padding: 14px 16px;
      border-bottom: 1px solid #e8f0ef;
      background: #f7fbfb;
    }

    .panel-title {
      margin: 0;
      font-size: 18px;
      font-family: "Sora", sans-serif;
      color: #1a464b;
    }

    .panel-body {
      padding: 14px 16px 16px;
    }

    .tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 14px;
    }

    .tab-btn {
      border: 1px solid #cfe3e1;
      background: #f8fcfb;
      color: #2f5c61;
      border-radius: 999px;
      padding: 9px 14px;
      cursor: pointer;
      font-weight: 700;
      font-family: "Manrope", sans-serif;
      transition: all 0.2s ease;
    }

    .tab-btn.active {
      background: #0c8b78;
      color: #ffffff;
      border-color: #0c8b78;
      box-shadow: 0 6px 16px rgba(12, 139, 120, 0.3);
    }

    .tab-pane {
      display: none;
      animation: fadeIn 0.26s ease;
    }

    .tab-pane.active {
      display: block;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .form-grid.form-grid-5 {
      grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .form-actions {
      margin-top: 12px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .table-wrap {
      border: 1px solid #dcebea;
      border-radius: 10px;
      overflow: auto;
      margin-top: 12px;
      background: #ffffff;
    }

    table {
      border-collapse: collapse;
      width: 100%;
      min-width: 700px;
      font-size: 14px;
    }

    thead th {
      text-align: left;
      background: #eff8f6;
      color: #1e4d53;
      font-weight: 800;
      border-bottom: 1px solid #d9e8e6;
      padding: 11px 10px;
      white-space: nowrap;
    }

    tbody td {
      padding: 10px;
      border-bottom: 1px solid #edf3f2;
      color: #2f555a;
      vertical-align: middle;
    }

    tbody tr:hover {
      background: #f9fcfc;
    }

    .row-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .mini-btn {
      border: none;
      border-radius: 8px;
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
      font-family: "Manrope", sans-serif;
    }

    .mini-edit {
      background: #fff4e8;
      color: #ac6316;
      border: 1px solid #ffd7b0;
    }

    .mini-delete {
      background: #ffecee;
      color: #b94646;
      border: 1px solid #f6cccc;
    }

    .empty-row {
      text-align: center;
      color: #6b8b90;
      font-style: italic;
    }

    .charts-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .chart-card {
      background: #ffffff;
      border: 1px solid #ddecea;
      border-radius: 14px;
      padding: 14px;
      box-shadow: 0 8px 22px rgba(5, 46, 47, 0.07);
    }

    .chart-title {
      margin: 0 0 10px;
      font-size: 14px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: #3f6b70;
      font-weight: 800;
    }

    .chart-holder {
      height: 300px;
      width: 100%;
    }

    .hidden {
      display: none !important;
    }

    .notice {
      margin-top: 8px;
      padding: 11px 12px;
      border-radius: 10px;
      border: 1px solid #ffe3bf;
      background: #fff8ef;
      color: #94602a;
      font-weight: 700;
      font-size: 14px;
    }

    .toast-host {
      position: fixed;
      right: 14px;
      top: 14px;
      z-index: 99;
      display: grid;
      gap: 8px;
      width: min(340px, 90vw);
    }

    .toast {
      border-radius: 12px;
      border: 1px solid #dce9e8;
      background: #ffffff;
      box-shadow: 0 10px 20px rgba(4, 35, 37, 0.16);
      padding: 10px 12px;
      color: #294d53;
      font-weight: 700;
      animation: fadeIn 0.2s ease;
    }

    .toast.success {
      border-color: #b8e6d9;
      background: #f2fdf9;
      color: #14695f;
    }

    .toast.warning {
      border-color: #ffe0bc;
      background: #fff8ef;
      color: #9c6126;
    }

    .toast.error {
      border-color: #f6c8ca;
      background: #fff1f2;
      color: #a73f42;
    }

    .table-edit-modal {
      position: fixed;
      inset: 0;
      z-index: 120;
      background: rgba(11, 31, 35, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .table-edit-modal.active {
      animation: fadeIn 0.2s ease;
    }

    .table-edit-card {
      width: min(760px, 95vw);
      max-height: 88vh;
      overflow: auto;
      border-radius: 16px;
      border: 1px solid #d4e1df;
      background: #ffffff;
      box-shadow: 0 16px 40px rgba(4, 34, 36, 0.2);
    }

    .table-edit-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 16px;
      border-bottom: 1px solid #e4eceb;
    }

    .table-edit-title {
      margin: 0;
      font-size: 20px;
      font-weight: 800;
      color: #15373d;
    }

    .table-edit-close {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      border: 1px solid #d7e4e2;
      background: #f5faf9;
      color: #385e63;
      font-size: 18px;
      font-weight: 800;
      line-height: 1;
      cursor: pointer;
    }

    .table-edit-close:hover {
      background: #ecf5f4;
    }

    .table-edit-form {
      padding: 16px;
      display: grid;
      gap: 14px;
    }

    .table-edit-fields {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px 12px;
    }

    .table-edit-fields .field {
      margin-bottom: 0;
    }

    .table-edit-field-full {
      grid-column: 1 / -1;
    }

    .table-edit-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }

    .delete-confirm-card {
      width: min(460px, 94vw);
      max-height: 88vh;
    }

    .delete-confirm-content {
      padding: 16px;
      display: grid;
      gap: 14px;
    }

    .delete-confirm-text {
      margin: 0;
      color: #33595e;
      line-height: 1.6;
      font-weight: 600;
    }

    @media (max-width: 1200px) {
      .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .panel-grid,
      .charts-grid {
        grid-template-columns: 1fr;
      }

      .form-grid.form-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 980px) {
      .login-wrap {
        grid-template-columns: 1fr;
        margin: 3vh auto;
      }

      .app-shell {
        grid-template-columns: 1fr;
      }

      .sidebar {
        height: auto;
        position: static;
      }

      .menu {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .main {
        padding-top: 0;
      }
    }

    @media (max-width: 760px) {
      .menu {
        grid-template-columns: 1fr;
      }

      .stats-grid {
        grid-template-columns: 1fr;
      }

      .form-grid,
      .form-grid.form-grid-5 {
        grid-template-columns: 1fr;
      }

      .topbar {
        flex-direction: column;
        align-items: flex-start;
      }
    }

    .bg-shape {
      display: none;
    }

    body {
      background: #f3f5f7;
      color: #111827;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
      overflow: hidden;
    }

    #loginView,
    #appView {
      height: 100vh;
      overflow: hidden;
    }

    #loginView {
      padding: 24px 16px;
      overflow-y: auto;
      overscroll-behavior-y: contain;
    }

    #loginView.active {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    #loginView .login-wrap {
      width: min(440px, 100%);
      margin: 0;
      display: block;
    }

    #loginView .login-card {
      background: #ffffff;
      border: 1px solid #dde4ea;
      border-radius: 16px;
      box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
      padding: 22px 20px;
    }

    #loginView .login-brand {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 16px;
    }

    #loginView .login-logo {
      width: 42px;
      height: 42px;
      border-radius: 11px;
      background: #ffffff;
      border: 1px solid #d9e2ea;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      flex-shrink: 0;
    }

    #loginView .login-logo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    #loginView .login-title {
      margin: 0;
      font-size: 24px;
      font-weight: 800;
      letter-spacing: -0.1px;
      line-height: 1.18;
      color: #0f172a;
    }

    #loginView .login-subtitle {
      margin: 4px 0 0;
      font-size: 14px;
      color: #64748b;
      line-height: 1.45;
    }

    #loginView .login-form .field {
      margin-bottom: 12px;
    }

    #loginView .login-form .field label {
      margin-bottom: 6px;
      font-size: 13px;
      color: #334155;
      font-weight: 700;
    }

    #loginView .login-form .field input {
      height: 44px;
      border: 1px solid #d9e1e8;
      border-radius: 10px;
      background: #f8fafc;
      color: #1f2937;
      font-size: 14px;
      padding: 0 12px;
      box-shadow: none;
    }

    #loginView .login-form .field input:focus {
      border-color: #8dc1a4;
      box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
      outline: none;
    }

    #loginView .btn-primary {
      width: 100%;
      margin-top: 6px;
      min-height: 44px;
      border-radius: 10px;
      font-size: 14px;
      background: #16a34a;
    }

    #loginView .login-accounts {
      margin-top: 14px;
      border-top: 1px solid #e9edf2;
      padding-top: 12px;
    }

    #loginView .login-accounts-title {
      margin: 0 0 8px;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.3px;
      text-transform: uppercase;
      color: #64748b;
    }

    #loginView .login-help-list {
      margin: 0;
      padding-left: 18px;
      color: #475569;
      line-height: 1.6;
      font-size: 12px;
    }

    #appView {
      font-size: 14px;
      line-height: 1.5;
    }

    #appView .app-shell {
      grid-template-columns: 280px minmax(0, 1fr);
      background: #f3f5f7;
      height: 100vh;
      overflow: hidden;
    }

    #appView .sidebar {
      background: #f5f6f8;
      border-right: 1px solid #e3e7eb;
      color: #111827;
      gap: 0;
      padding: 16px 14px;
      display: flex;
      flex-direction: column;
    }

    #appView .brand-box {
      background: transparent;
      border: none;
      border-radius: 0;
      border-bottom: 1px solid #e3e7eb;
      padding: 10px 8px 20px;
      margin-bottom: 16px;
    }

    .brand-row {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .brand-icon {
      width: 44px;
      height: 44px;
      border-radius: 11px;
      background: #ffffff;
      border: 1px solid #d9e2ea;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      flex-shrink: 0;
    }

    .brand-icon img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    #appView .brand-title {
      margin: 0;
      font-size: 18px;
      line-height: 1.2;
      font-weight: 800;
      font-family: "Manrope", sans-serif;
      letter-spacing: -0.1px;
      color: #111827;
    }

    #appView .brand-subtitle {
      margin: 2px 0 0;
      font-size: 13px;
      color: #6b7280;
      font-weight: 600;
    }

    #appView .menu {
      display: grid;
      gap: 6px;
      margin-bottom: 8px;
    }

    #appView .menu-btn {
      background: transparent;
      color: #111827;
      border: none;
      box-shadow: none;
      border-radius: 10px;
      padding: 11px 12px;
      font-size: 15px;
      line-height: 1.35;
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 700;
      transition: background-color 0.2s ease, color 0.2s ease;
    }

    #appView .menu-btn:hover {
      transform: none;
      background: #eef1f4;
    }

    #appView .menu-btn.active {
      background: #deefe5;
      color: #15803d;
      border: none;
    }

    #appView .menu-btn .menu-icon {
      font-size: 18px;
      color: #111827;
      line-height: 1;
    }

    #appView .menu-btn.active .menu-icon {
      color: #15803d;
    }

    .sidebar-footer {
      margin-top: auto;
      border-top: 1px solid #e3e7eb;
      padding-top: 16px;
      display: grid;
      gap: 12px;
    }

    .user-box {
      border: 1px solid #e4e8ec;
      border-radius: 12px;
      padding: 12px;
      background: #ffffff;
    }

    .user-label {
      margin: 0;
      color: #6b7280;
      font-size: 13px;
      font-weight: 600;
    }

    .user-name {
      margin: 6px 0 0;
      color: #111827;
      font-size: 18px;
      font-weight: 700;
      line-height: 1.3;
      word-break: break-word;
    }

    .logout-link {
      border: 1px solid #f2caca;
      background: #fff4f4;
      border-radius: 12px;
      min-height: 42px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      justify-content: flex-start;
      color: #dc2626;
      font-family: "Manrope", sans-serif;
      font-weight: 700;
      cursor: pointer;
      padding: 0 12px;
      width: 100%;
    }

    .logout-link .material-symbols-outlined {
      font-size: 18px;
    }

    #appView .main {
      padding: 18px 22px;
      max-width: 1440px;
      margin: 0 auto;
      width: 100%;
      height: 100vh;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior-y: contain;
      scrollbar-gutter: stable;
    }

    #appView .page-section.active {
      display: grid;
      gap: 14px;
      align-content: start;
      min-height: min-content;
    }

    #appView .topbar {
      display: none;
    }

    #appView .tabs {
      margin-bottom: 12px;
      gap: 8px;
      align-items: center;
    }

    #appView .tab-btn {
      border-radius: 8px;
      border: 1px solid #d7dde3;
      background: #ffffff;
      color: #374151;
      font-size: 14px;
      font-weight: 700;
      padding: 8px 12px;
      box-shadow: none;
    }

    #appView .tab-btn.active {
      background: #e7f4ed;
      color: #15803d;
      border-color: #b8dfc8;
      box-shadow: none;
    }

    #formsSection .forms-shell {
      display: grid;
      gap: 12px;
      align-content: start;
    }

    #formsSection .forms-hero {
      padding: 0 2px 2px;
    }

    #formsSection .forms-main-title {
      margin: 0;
      font-size: clamp(30px, 3.2vw, 38px);
      line-height: 1.12;
      font-weight: 800;
      letter-spacing: -0.2px;
      color: #0f172a;
    }

    #formsSection .forms-main-subtitle {
      margin: 8px 0 0;
      font-size: 14px;
      color: #64748b;
      font-weight: 500;
    }

    #formsSection #formTabs {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 4px;
      background: #e5e7eb;
      border: 1px solid #d9dee4;
      border-radius: 14px;
      padding: 4px;
      max-width: 860px;
      width: 100%;
      margin-bottom: 0;
    }

    #formsSection #formTabs .tab-btn {
      border: none;
      background: transparent;
      color: #111827;
      text-align: center;
      justify-content: center;
      border-radius: 10px;
      min-height: 42px;
      font-size: 14px;
      font-weight: 700;
      padding: 0 8px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    #formsSection #formTabs .tab-btn.active {
      background: #ffffff;
      color: #111827;
      border-color: transparent;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    }

    #formsSection .tab-pane {
      display: none;
    }

    #formsSection .tab-pane.active {
      display: block;
      animation: fadeIn 0.2s ease;
    }

    #formsSection .form-panel {
      border: 1px solid #dde2e8;
      border-radius: 16px;
      overflow: hidden;
    }

    #formsSection .form-panel .panel-head {
      padding: 12px 16px 6px;
    }

    #formsSection .form-panel .panel-title {
      font-size: 20px;
      line-height: 1.2;
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    #formsSection .form-card-subtitle {
      display: none;
    }

    #formsSection .form-panel .panel-body {
      padding: 8px 18px 18px;
      display: grid;
      gap: 8px;
    }

    #formsSection.table-only-mode .input-only-block,
    #formsSection.table-only-mode .form-panel .panel-head {
      display: none !important;
    }

    #formsSection.table-only-mode .form-panel .panel-body {
      padding-top: 14px;
    }

    #formsSection .form-section-title {
      margin: 0 0 8px;
      font-size: 15px;
      font-weight: 800;
      color: #0f172a;
      letter-spacing: -0.1px;
    }

    #formsSection .section-divider {
      height: 1px;
      background: #e6eaef;
      margin: 2px 0 2px;
    }

    #formsSection .form-grid {
      gap: 10px 12px;
    }

    #formsSection .form-grid.form-grid-3 {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #formsSection .form-grid.form-grid-single {
      grid-template-columns: minmax(0, 1fr);
      max-width: 320px;
    }

    #formsSection .field label {
      font-size: 13px;
      margin-bottom: 5px;
    }

    #formsSection .field input,
    #formsSection .field select {
      height: 42px;
      border-radius: 9px;
      font-size: 13px;
      padding: 0 12px;
    }

    #formsSection .field input[readonly] {
      background: #ebeef2;
      color: #6b7280;
      border-color: #e3e7ec;
      font-weight: 700;
    }

    #formsSection .form-actions {
      margin-top: 0;
      gap: 8px;
    }

    #formsSection .btn {
      height: 40px;
      font-size: 13px;
      border-radius: 9px;
    }

    #formsSection .btn-primary {
      min-width: 132px;
      padding: 0 14px;
    }

    #formsSection .btn-export {
      min-width: 184px;
    }

    #formsSection .btn-muted {
      min-width: 112px;
    }

    #formsSection .data-panel {
      margin-top: 4px;
      border-radius: 14px;
    }

    #formsSection .data-panel-head {
      padding: 10px 14px;
    }

    #formsSection .data-panel-title {
      font-size: 14px;
    }

    #formsSection .inline-total {
      font-size: 12px;
    }

    #formsSection .inline-total span {
      font-size: 18px;
    }

    #formsSection #formTabKunjungan .table-wrap {
      border-radius: 0;
    }

    #formsSection #formTabKunjungan table {
      min-width: 1180px;
      border-collapse: collapse;
    }

    #formsSection #formTabKunjungan thead th,
    #formsSection #formTabKunjungan tbody td {
      border: 1px solid #8f97a4;
      text-align: center;
    }

    #formsSection #formTabKunjungan thead th {
      background: #eef1f4;
      color: #111827;
      font-weight: 800;
    }

    #formsSection #formTabKunjungan tbody td:nth-child(2) {
      text-align: left;
      font-weight: 700;
    }

    #appView .panel {
      border: 1px solid #dce2e8;
      border-radius: 18px;
      box-shadow: none;
      overflow: hidden;
      background: #ffffff;
    }

    #appView .panel + .panel {
      margin-top: 14px;
    }

    #appView .panel-head {
      padding: 16px 20px 8px;
      border-bottom: none;
      background: transparent;
    }

    #appView .panel-title {
      font-family: "Manrope", sans-serif;
      font-size: 22px;
      font-weight: 800;
      color: #111827;
      letter-spacing: -0.1px;
      line-height: 1.3;
    }

    #appView .panel-body {
      padding: 8px 20px 20px;
    }

    #appView .field {
      margin-bottom: 12px;
    }

    #appView .field label {
      margin-bottom: 8px;
      font-size: 13px;
      color: #111827;
      font-weight: 700;
    }

    #appView .field input,
    #appView .field select {
      height: 48px;
      border: 1px solid #eff2f5;
      background: #f0f2f5;
      color: #374151;
      border-radius: 10px;
      font-size: 14px;
      box-shadow: none;
      padding: 0 14px;
    }

    #appView .field input:focus,
    #appView .field select:focus {
      border-color: #9ccbb0;
      box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
    }

    #appView .btn-primary {
      width: auto;
      min-width: 148px;
      margin-top: 0;
      background: #16a34a;
      color: #ffffff;
      padding: 0 20px;
      font-size: 14px;
      border-radius: 10px;
    }

    #loginView .btn-primary {
      width: 100%;
    }

    #appView .btn-primary:hover {
      filter: brightness(1.04);
    }

    #appView .btn-muted {
      background: #f2f4f7;
      border: 1px solid #d7dde3;
      color: #374151;
      min-width: 128px;
    }

    #appView .btn-export {
      background: #ffffff;
      border: 1px solid #d7dde3;
      color: #4b5563;
      min-width: 200px;
    }

    #appView .form-actions {
      margin-top: 10px;
      gap: 10px;
      align-items: center;
    }

    .data-panel {
      margin-top: 12px;
      border: 1px solid #e3e8ee;
      border-radius: 16px;
      overflow: hidden;
      background: #ffffff;
    }

    .data-panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 16px;
      border-bottom: 1px solid #edf1f5;
    }

    .data-panel-title {
      margin: 0;
      font-size: 15px;
      color: #111827;
      font-weight: 700;
    }

    .inline-total {
      margin: 0;
      color: #6b7280;
      font-size: 13px;
      font-weight: 600;
      display: inline-flex;
      align-items: baseline;
      gap: 8px;
    }

    .inline-total span {
      color: #16a34a;
      font-size: 20px;
      font-weight: 800;
      line-height: 1;
    }

    #appView .table-wrap {
      border: none;
      border-radius: 0;
      margin-top: 0;
      background: transparent;
      overflow-x: auto;
    }

    #appView table {
      min-width: 680px;
    }

    #appView thead th {
      background: #f8fafb;
      color: #334155;
      border-bottom: 1px solid #e6ebf1;
      font-size: 12px;
      font-weight: 700;
      padding: 10px 12px;
    }

    #appView tbody td {
      color: #374151;
      border-bottom: 1px solid #edf1f5;
      font-size: 13px;
      padding: 10px 12px;
    }

    #appView tbody tr:last-child td {
      border-bottom: none;
    }

    #appView .row-actions {
      gap: 6px;
    }

    #appView .mini-btn {
      height: 30px;
      border-radius: 7px;
      font-size: 12px;
      font-weight: 700;
      padding: 0 10px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    #appView .empty-row {
      color: #94a3b8;
      font-size: 14px;
      padding: 24px;
    }

    #appView .mini-edit {
      background: #fff8e8;
      border: 1px solid #f8dfaa;
      color: #a35b0b;
    }

    #appView .mini-delete {
      background: #fff1f2;
      border: 1px solid #f7c8cf;
      color: #b4232d;
    }

    #appView .stats-grid {
      gap: 12px;
      margin-bottom: 0;
    }

    #appView .stat-card {
      min-height: 98px;
      padding: 14px;
      border-radius: 14px;
      border: 1px solid #dde4ea;
      box-shadow: none;
    }

    #appView .stat-label {
      font-size: 12px;
      margin-bottom: 6px;
      letter-spacing: 0.3px;
    }

    #appView .stat-value {
      font-size: 22px;
      line-height: 1.15;
    }

    #appView .panel-grid,
    #appView .charts-grid {
      gap: 12px;
    }

    #appView .chart-card {
      border-radius: 16px;
      border: 1px solid #dde4ea;
      padding: 12px;
      box-shadow: none;
    }

    #appView .chart-title {
      font-size: 12px;
      letter-spacing: 0.35px;
      margin-bottom: 8px;
    }

    #appView .chart-holder {
      height: 286px;
    }

    #appView #formsSection .field label {
      font-size: 13px;
    }

    #appView #formsSection .field input,
    #appView #formsSection .field select {
      font-size: 13px;
      height: 42px;
    }

    #appView #formsSection #formTabs .tab-btn {
      font-size: 14px;
    }

    #appView #formsSection .form-panel .panel-title {
      font-size: 20px;
    }

    @media (max-width: 980px) {
      #appView .sidebar {
        height: auto;
        position: static;
      }

      #appView .menu {
        grid-template-columns: 1fr;
      }

      #appView .brand-title {
        font-size: 20px;
      }

      .user-name,
      #appView .panel-title,
      .inline-total span {
        font-size: 19px;
      }

      #appView .main {
        padding: 14px;
      }

      #formsSection #formTabs {
        grid-template-columns: 1fr;
      }

      #formsSection .forms-main-title {
        font-size: clamp(26px, 7vw, 32px);
      }

      #formsSection .form-panel .panel-title {
        font-size: 18px;
        white-space: normal;
      }

      #formsSection .form-grid.form-grid-3,
      #formsSection .form-grid.form-grid-5 {
        grid-template-columns: 1fr;
      }

      #formsSection .field label {
        font-size: 13px;
      }

      #formsSection .field input,
      #formsSection .field select {
        font-size: 13px;
        height: 42px;
      }

      #appView #formsSection .form-panel .panel-title {
        font-size: 18px;
      }

      #formsSection .inline-total span {
        font-size: 17px;
      }

      #appView .chart-holder {
        height: 250px;
      }

      .table-edit-fields {
        grid-template-columns: 1fr;
      }

      .table-edit-title {
        font-size: 18px;
      }
    }



  /* TAMBAHAN CSS */



    /* Container Utama */
.login-container {
    display: flex;
    width: 1000px;
    min-height: 600px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    position: relative;
}

/* Sisi Kiri (Gelap) */
.login-left {
    flex: 1.2;
    background: #2d3344;
    color: white;
    padding: 60px;
    display: flex;
    align-items: center;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%); /* Efek miring */
}

.left-content { z-index: 2; }

.logo-white { height: 80px; margin-bottom: 20px; }

.brand-box h1 { font-size: 32px; letter-spacing: 2px; margin-bottom: 20px; }

.description { line-height: 1.6; font-size: 14px; opacity: 0.9; margin-bottom: 30px; }

.btn-outline {
    background: #b6737a;
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
}

/* Sisi Kanan (Putih) */
.login-right {
    flex: 1.5;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.welcome-text { font-size: 28px; color: #333; margin-bottom: 5px; text-align: center;}
.sub-welcome { color: #888; text-align: center; margin-bottom: 20px;}

/* Input Style */
.input-box {
    margin-bottom: 20px;
    position: relative;
}

.input-box label {
    position: absolute;
    top: -10px;
    left: 20px;
    background: white;
    padding: 0 10px;
    font-size: 12px;
    color: #666;
    z-index: 1;
}

.input-box input {
    width: 100%;
    padding: 15px 25px;
    border: 2px solid #ccc;
    border-radius: 30px;
    font-size: 16px;
    outline: none;
}

/* Button & Links */
.btn-submit {
    width: 100%;
    padding: 15px;
    background: #bc747b;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}

.hint-text { font-size: 12px; text-align: center; margin: 15px 0; color: #444; }

.form-options {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
}

/* Dekorasi Panah di Tengah */
.middle-arrow {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: #bc747b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 5px solid white;
    z-index: 10;
}