    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    :root {
      --primary: #9b0000;
      --primary-light: #c41e1e;
      --primary-dark: #6d0000;
      --bg-light: #f8f9fa;
      --bg-white: #ffffff;
      --text-dark: #1a1a1a;
      --text-muted: #6c757d;
      --border: #e0e0e0;
      --success: #28a745;
      --warning: #ffc107;
      --danger: #dc3545;
      --info: #17a2b8;
      --shadow: rgba(0, 0, 0, 0.1);
      --transition: all 0.3s ease;
    }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--bg-light);
      color: var(--text-dark);
      line-height: 1.6;
    }

    body.dark {
      --bg-light: #1a1a1a;
      --bg-white: #2d2d2d;
      --text-dark: #f0f0f0;
      --text-muted: #adb5bd;
      --border: #444;
      --shadow: rgba(0, 0, 0, 0.3);
    }

    body.auth-locked {
      min-height: 100vh;
      background:
        radial-gradient(circle at top center, rgba(185, 25, 25, 0.08), transparent 38%),
        radial-gradient(circle at bottom right, rgba(55, 177, 193, 0.12), transparent 28%),
        linear-gradient(135deg, #f6f1ed 0%, #f2ece8 48%, #f7f7f5 100%);
    }

    body.auth-locked .app,
    body.auth-locked .modal,
    body.auth-locked .mobile-nav {
      display: none;
    }

    body:not(.auth-locked) .login-shell {
      display: none;
    }

    .login-shell {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 36px;
      position: relative;
    }

    .login-shell::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 32%);
      pointer-events: none;
    }

    .login-panel {
      position: relative;
      z-index: 1;
    }

    .login-panel {
      width: 100%;
      max-width: 460px;
    }

    .login-card {
      width: 100%;
      padding: 38px 38px 36px;
      border-radius: 30px;
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid rgba(255, 255, 255, 0.75);
      backdrop-filter: blur(16px);
      box-shadow: 0 24px 60px rgba(73, 35, 35, 0.12);
    }

    .login-brand {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 34px;
    }

    .login-brand .logo {
      width: 44px;
      height: 44px;
      border-radius: 0;
      flex: 0 0 auto;
    }

    .login-brand .brand-text h1 {
      font-size: 18px;
      line-height: 1;
    }

    .login-brand .brand-text p {
      font-size: 13px;
      margin-top: 6px;
    }

    .login-copy h3 {
      font-size: 30px;
      color: #2e1414;
      margin-bottom: 10px;
    }

    .login-copy p {
      color: #7b6a6a;
      font-size: 15px;
      margin-bottom: 28px;
    }

    .login-form {
      display: flex;
      flex-direction: column;
    }

    .auth-hidden {
      display: none;
    }

    .login-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 16px;
    }

    .login-check {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: var(--text-muted);
      font-size: 13px;
    }

    .login-check input {
      accent-color: #157f8e;
    }

    .login-link {
      border: none;
      background: transparent;
      color: var(--primary);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
    }

    .login-error {
      min-height: 20px;
      color: var(--danger);
      font-size: 13px;
      margin-bottom: 12px;
    }

    .auth-note {
      margin-top: 18px;
      color: #7b6a6a;
      font-size: 13px;
      text-align: center;
    }

    .login-submit {
      width: 100%;
      justify-content: center;
      padding: 16px 20px;
      border-radius: 12px;
      margin-top: 10px;
      box-shadow: 0 10px 24px rgba(155, 0, 0, 0.24);
    }

    .app {
      display: grid;
      grid-template-columns: 280px 1fr;
      min-height: 100vh;
    }

    .mobile-nav {
      display: none;
    }

    .sidebar {
      background: var(--bg-white);
      border-right: 1px solid var(--border);
      padding: 24px;
      display: flex;
      flex-direction: column;
      box-shadow: 2px 0 8px var(--shadow);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 32px;
      padding-bottom: 24px;
      border-bottom: 1px solid var(--border);
    }

    .logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: url("logo_dismar_PNG.png") center/contain no-repeat;
    }     

    .brand-text h1 {
      font-size: 20px;
      font-weight: 700;
      color: var(--primary);
    }

    .brand-text p {
      font-size: 11px;
      color: var(--text-muted);
      margin-top: 2px;
    }

    nav {
      flex: 1;
    }

    .nav-section {
      margin-bottom: 24px;
    }

    .nav-title {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 8px;
      padding: 0 12px;
      letter-spacing: 0.5px;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px;
      margin: 4px 0;
      border-radius: 10px;
      cursor: pointer;
      transition: var(--transition);
      color: var(--text-muted);
      text-decoration: none;
      font-size: 14px;
      font-weight: 500;
    }

    .nav-item:hover {
      background: rgba(155, 0, 0, 0.05);
      color: var(--primary);
    }

    .nav-item.active {
      background: linear-gradient(135deg, var(--primary), var(--primary-light));
      color: white;
      box-shadow: 0 4px 12px rgba(155, 0, 0, 0.2);
    }

    .nav-icon {
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .theme-toggle {
      margin-top: auto;
      padding: 12px;
      background: var(--bg-light);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      transition: var(--transition);
    }

    .theme-toggle:hover {
      background: rgba(155, 0, 0, 0.05);
    }

    .user-panel {
      margin-top: 14px;
      padding: 14px;
      border-radius: 14px;
      background: var(--bg-light);
      border: 1px solid var(--border);
    }

    .user-meta {
      display: flex;
      flex-direction: column;
      gap: 2px;
      margin-bottom: 12px;
    }

    .user-meta strong {
      font-size: 14px;
      color: var(--text-dark);
      overflow-wrap: anywhere;
      word-break: break-word;
      line-height: 1.35;
    }

    .user-meta span {
      font-size: 12px;
      color: var(--text-muted);
    }

    .logout-btn {
      width: 100%;
      justify-content: center;
    }

    .main {
      padding: 32px;
      overflow-y: auto;
      padding-bottom: 96px;
    }

    .top-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 32px;
    }

    .page-title h2 {
      font-size: 28px;
      font-weight: 700;
      color: var(--text-dark);
    }

    .page-title p {
      font-size: 14px;
      color: var(--text-muted);
      margin-top: 4px;
    }

    .top-actions {
      display: flex;
      gap: 12px;
      align-items: center;
      flex-wrap: wrap;
    }

    .search-box {
      position: relative;
    }

    .search-box input {
      padding: 10px 16px 10px 40px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--bg-white);
      color: var(--text-dark);
      font-size: 14px;
      width: 300px;
      transition: var(--transition);
    }

    .dashboard-panels {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
    }

    .search-box input:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(155, 0, 0, 0.1);
    }

    .search-icon {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-muted);
    }

    .btn {
      padding: 10px 20px;
      border: none;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: var(--transition);
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--primary), var(--primary-light));
      color: white;
      box-shadow: 0 4px 12px rgba(155, 0, 0, 0.2);
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(155, 0, 0, 0.3);
    }

    .btn-secondary {
      background: var(--bg-white);
      color: var(--text-dark);
      border: 1px solid var(--border);
    }

    .btn-secondary:hover {
      background: var(--bg-light);
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 20px;
      margin-bottom: 32px;
    }

    .stat-card {
      background: var(--bg-white);
      padding: 24px;
      border-radius: 16px;
      box-shadow: 0 2px 8px var(--shadow);
      transition: var(--transition);
      position: relative;
      overflow: hidden;
    }

    .stat-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(90deg, var(--primary), var(--primary-light));
    }

    .stat-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 6px 20px var(--shadow);
    }

    .stat-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
    }

    .stat-title {
      font-size: 13px;
      color: var(--text-muted);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .stat-icon {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
    }

    .stat-value {
      font-size: 32px;
      font-weight: 700;
      color: var(--text-dark);
      margin-bottom: 8px;
    }

    .stat-change {
      font-size: 13px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 8px;
      border-radius: 6px;
    }

    .stat-change.positive {
      color: var(--success);
      background: rgba(40, 167, 69, 0.1);
    }

    .stat-change.negative {
      color: var(--danger);
      background: rgba(220, 53, 69, 0.1);
    }

    .card {
      background: var(--bg-white);
      border-radius: 16px;
      padding: 24px;
      box-shadow: 0 2px 8px var(--shadow);
      margin-bottom: 24px;
    }

    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }

    .card-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--text-dark);
    }

    .filters {
      display: flex;
      gap: 12px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    .filter-btn {
      padding: 8px 16px;
      border: 1px solid var(--border);
      background: var(--bg-white);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: var(--transition);
      color: var(--text-muted);
    }

    .filter-btn:hover, .filter-btn.active {
      background: var(--primary);
      color: white;
      border-color: var(--primary);
    }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 720px;
    }

    .table-wrap {
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
    }

    .mobile-stack {
      display: grid;
      gap: 14px;
    }

    .mobile-card {
      padding: 16px;
      border-radius: 16px;
      background: var(--bg-light);
      border: 1px solid var(--border);
    }

    .mobile-card-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .mobile-card-header strong {
      font-size: 15px;
      color: var(--text-dark);
    }

    .mobile-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 0;
      border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-meta:first-of-type {
      border-top: none;
      padding-top: 0;
    }

    .mobile-meta span {
      color: var(--text-muted);
      font-size: 12px;
    }

    .mobile-meta strong {
      color: var(--text-dark);
      font-size: 13px;
      text-align: right;
    }

    .mobile-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .mobile-grid .mobile-meta {
      margin: 0;
      padding: 0;
      border-top: none;
      align-items: flex-start;
      flex-direction: column;
    }

    .mobile-grid .mobile-meta strong {
      text-align: left;
    }

    .mobile-actions {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
      margin-top: 14px;
    }

    .mobile-actions .btn-icon {
      width: 100%;
      height: 38px;
    }

    .mobile-progress {
      width: 100%;
      height: 8px;
      border-radius: 999px;
      overflow: hidden;
      background: rgba(0, 0, 0, 0.08);
      margin-top: 12px;
    }

    .mobile-progress-bar {
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--primary), var(--primary-light));
    }

    .mobile-full-btn {
      width: 100%;
      justify-content: center;
      margin-top: 14px;
    }

    thead {
      background: var(--bg-light);
    }

    th {
      padding: 12px;
      text-align: left;
      font-size: 12px;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    td {
      padding: 16px 12px;
      border-bottom: 1px solid var(--border);
      font-size: 14px;
    }

    tbody tr {
      transition: var(--transition);
    }

    tbody tr:hover {
      background: var(--bg-light);
    }

    .badge {
      display: inline-block;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
    }

    .badge-success {
      background: rgba(40, 167, 69, 0.1);
      color: var(--success);
    }

    .badge-warning {
      background: rgba(255, 193, 7, 0.1);
      color: var(--warning);
    }

    .badge-danger {
      background: rgba(220, 53, 69, 0.1);
      color: var(--danger);
    }

    .badge-info {
      background: rgba(23, 162, 184, 0.1);
      color: var(--info);
    }

    .action-btns {
      display: flex;
      gap: 8px;
    }

    .btn-icon {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: var(--transition);
      background: var(--bg-light);
      color: var(--text-muted);
    }

    .btn-icon:hover {
      background: var(--primary);
      color: white;
      transform: scale(1.1);
    }

    .modal {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      backdrop-filter: blur(4px);
    }

    .modal.open {
      display: flex;
    }

    .modal-content {
      background: var(--bg-white);
      border-radius: 20px;
      padding: 32px;
      width: 90%;
      max-width: 600px;
      max-height: 90vh;
      overflow-y: auto;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      animation: modalSlideIn 0.3s ease;
    }

    @keyframes modalSlideIn {
      from {
        opacity: 0;
        transform: translateY(-30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;
    }

    .modal-title {
      font-size: 24px;
      font-weight: 700;
      color: var(--text-dark);
    }

    .close-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: none;
      background: var(--bg-light);
      color: var(--text-muted);
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
    }

    .close-btn:hover {
      background: var(--danger);
      color: white;
    }

    .form-group {
      margin-bottom: 20px;
    }

    .form-label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      color: var(--text-dark);
      margin-bottom: 8px;
    }

    .form-input, .form-select {
      width: 100%;
      padding: 14px 16px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: var(--bg-white);
      color: var(--text-dark);
      font-size: 14px;
      transition: var(--transition);
    }

    .form-input:focus, .form-select:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(155, 0, 0, 0.1);
    }

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    .modal-footer {
      display: flex;
      justify-content: flex-end;
      gap: 12px;
      margin-top: 24px;
      padding-top: 24px;
      border-top: 1px solid var(--border);
    }

    .empty-state {
      text-align: center;
      padding: 60px 20px;
      color: var(--text-muted);
    }

    .empty-icon {
      font-size: 64px;
      margin-bottom: 16px;
      opacity: 0.3;
    }

    .empty-title {
      font-size: 18px;
      font-weight: 600;
      margin-bottom: 8px;
    }

    @media (max-width: 1024px) {
      .app {
        grid-template-columns: 1fr;
      }

      .sidebar {
        display: none;
      }

      .mobile-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        backdrop-filter: blur(18px);
        box-shadow: 0 -14px 32px rgba(0, 0, 0, 0.12);
      }

      .mobile-nav .nav-item {
        margin: 0;
        padding: 10px 8px;
        min-height: 72px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-size: 11px;
        font-weight: 600;
        text-align: center;
        border-radius: 16px;
        background: #f4f4f4;
        color: #6f6f6f;
        box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
      }

      .mobile-nav .nav-item.active {
        background: linear-gradient(180deg, #b90f0f 0%, #d11212 100%);
        color: #ffffff;
        box-shadow: 0 10px 22px rgba(185, 15, 15, 0.28);
      }

      .mobile-nav-badge {
        width: 28px;
        height: 28px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.06);
        color: inherit;
        font-size: 12px;
        font-weight: 800;
        line-height: 1;
      }

      .mobile-nav .nav-item.active .mobile-nav-badge {
        background: rgba(255, 255, 255, 0.18);
      }

      .mobile-nav-label {
        display: block;
        line-height: 1.1;
      }

      .mobile-nav .nav-icon {
        display: none;
      }

      .stats-grid {
        grid-template-columns: 1fr;
      }

      .form-row {
        grid-template-columns: 1fr;
      }

      .dashboard-panels {
        grid-template-columns: 1fr;
      }

      .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
      }

      .top-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
      }

      .search-box,
      .search-box input,
      .top-actions .btn {
        width: 100%;
      }

      .page-title h2 {
        font-size: 24px;
      }

      .main {
        padding: 24px 20px 108px;
      }

      .modal-content {
        width: calc(100% - 24px);
        padding: 24px 18px;
        border-radius: 18px;
      }

      .modal-footer {
        flex-direction: column-reverse;
      }

      .modal-footer .btn {
        width: 100%;
        justify-content: center;
      }
    }

    @media (max-width: 640px) {
      .login-shell {
        padding: 18px;
      }

      .login-card {
        padding: 28px 22px;
      }

      .login-row {
        flex-direction: column;
        align-items: flex-start;
      }

      .main {
        padding: 20px 16px 112px;
      }

      .mobile-nav {
        gap: 8px;
        padding-left: 10px;
        padding-right: 10px;
      }

      .table-wrap {
        margin: 0 -6px;
        padding-bottom: 6px;
      }

      th,
      td {
        padding-left: 10px;
        padding-right: 10px;
      }

      .action-btns {
        flex-wrap: wrap;
      }

      .mobile-grid {
        grid-template-columns: 1fr;
      }

      .mobile-meta {
        align-items: flex-start;
        flex-direction: column;
      }

      .mobile-meta strong {
        text-align: left;
      }

      .filter-btn {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
      }

      .empty-state {
        padding: 42px 12px;
      }
    }
