:root {
    --primary: #001f3f;
    --primary-light: #003366;
    --accent: #d4af37;
    --accent-glow: rgba(212, 175, 55, 0.4);
    --bg-main: #f0f2f5;
    --bg-sidebar: #1a0505;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --gradient-hero: linear-gradient(135deg, #001f3f 0%, #003366 100%);
    --gradient-accent: linear-gradient(135deg, #d4af37 0%, #f1d378 100%);
  }

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* Utility */
  .hidden {
    display: none !important;
  }

  .badge {
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .bg-aktif {
    background: #dcfce7;
    color: #166534;
  }

  .bg-inaktif {
    background: #fef9c3;
    color: #854d0e;
  }

  .bg-statis {
    background: #dbeafe;
    color: #1e40af;
  }

  .bg-vital {
    background: #fee2e2;
    color: #991b1b;
  }

  .bg-berhasil {
    background: #dcfce7;
    color: #166534;
  }

  .bg-pending {
    background: #fef9c3;
    color: #854d0e;
  }

  .bg-revisi {
    background: #ffedd5;
    color: #9a3412;
  }

  .field-help {
    display: block;
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.78rem;
  }

  .auto-meta-note {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    font-size: 0.9rem;
    font-weight: 600;
  }

  .upload-doc-card .card-header small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-weight: 600;
  }

  .upload-progress-card {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid #fcd34d;
    background: linear-gradient(135deg, #fffdf2 0%, #fff7d6 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  }

  .upload-progress-card.is-uploading,
  .upload-progress-card.is-finalizing {
    border-color: #93c5fd;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  }

  .upload-progress-card.is-success {
    border-color: #86efac;
    background: linear-gradient(135deg, #ecfdf5 0%, #dcfce7 100%);
  }

  .upload-progress-card.is-error {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  }

  .upload-progress-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }

  .upload-progress-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
  }

  .upload-progress-status-text {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .upload-progress-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
  }

  .upload-progress-percent {
    min-width: 58px;
    text-align: right;
    color: var(--primary);
    font-size: 1.1rem;
  }

  .upload-progress-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    animation: uploadSpin 0.75s linear infinite;
  }

  .upload-progress-bar-shell {
    margin-top: 0.95rem;
  }

  .upload-progress-bar-track {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.08);
  }

  .upload-progress-bar-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    transition: width 0.25s ease, background 0.25s ease;
    box-shadow: 0 0 22px rgba(59, 130, 246, 0.28);
  }

  .upload-progress-card.is-uploading .upload-progress-bar-fill,
  .upload-progress-card.is-finalizing .upload-progress-bar-fill {
    background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
  }

  .upload-progress-card.is-success .upload-progress-bar-fill {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
  }

  .upload-progress-card.is-error .upload-progress-bar-fill {
    background: linear-gradient(90deg, #dc2626 0%, #f87171 100%);
  }

  .upload-progress-meta {
    margin-top: 0.8rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 600;
  }

  .upload-progress-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .badge-waiting {
    background: #fef3c7;
    color: #a16207;
  }

  .badge-uploading {
    background: #dbeafe;
    color: #1d4ed8;
  }

  .badge-success {
    background: #dcfce7;
    color: #166534;
  }

  .badge-error {
    background: #fee2e2;
    color: #b91c1c;
  }

  @keyframes uploadSpin {
    from {
      transform: rotate(0deg);
    }

    to {
      transform: rotate(360deg);
    }
  }

  .mobile-only {
    display: none !important;
  }

  .btn-icon {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
  }

  .btn-icon:hover {
    background: rgba(0, 0, 0, 0.05);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    transition: opacity 0.3s;
  }

  /* Sidebar */
  .sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--bg-sidebar) 0%, #0a0202 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(140, 0, 0, 0.25);
  }

  /* Modern Crimson Red Sidebar Style */
  .sidebar-premium {
    background: linear-gradient(160deg, #3b0a0a 0%, #1a0505 50%, #0a0202 100%) !important;
    border-right: 1px solid rgba(220, 38, 38, 0.12);
  }

  .brand {
    padding: 2.5rem 1.5rem;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .brand span {
    color: var(--accent);
  }

  .nav-links {
    list-style: none;
    padding: 1.5rem 1rem;
    flex: 1;
    overflow-y: auto;
  }

  /* Custom Scrollbar for Sidebar */
  .nav-links::-webkit-scrollbar {
    width: 4px;
  }

  .nav-links::-webkit-scrollbar-track {
    background: transparent;
  }

  .nav-links::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
  }

  .nav-item {
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    border-radius: 12px;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    gap: 12px;
  }

  .nav-item:hover {
    background: rgba(220, 38, 38, 0.12);
    color: var(--white);
    transform: translateX(4px);
  }

  .nav-item.active {
    background: linear-gradient(90deg, #dc2626 0%, #991b1b 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.35), inset 0 0 0 1px rgba(255, 60, 60, 0.2);
    font-weight: 700;
  }

  .nav-icon {
    font-size: 1.25rem;
  }

  /* Main Content */
  .main {
    margin-left: 280px;
    flex: 1;
    padding: 2rem;
    transition: all 0.4s;
    max-width: calc(100vw - 280px);
  }

  .header {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.25rem 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 1rem;
    z-index: 900;
  }

  .header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
  }

  .header-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .user-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .user-info .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
  }

  .user-info .name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    margin: 2px 0;
  }

  .unit-info {
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  .unit-info span {
    font-weight: 700;
    color: var(--primary);
  }

  .logout-link-text {
    color: #ef4444;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
    transition: all 0.2s;
  }

  .logout-link-text:hover {
    opacity: 0.7;
    text-decoration: underline;
  }

  .page-title-wrap {
    display: flex;
    align-items: center;
    gap: 1.35rem;
  }

  .page-title-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    background: #fff1f2;
    border: 1px solid #ffe4e6;
    box-shadow: inset 0 0 0 8px rgba(220, 38, 38, 0.08);
    font-size: 1.3rem;
    font-weight: 900;
    flex: 0 0 auto;
  }

  .header {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 1.55rem 1.7rem;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  }

  .header h2 {
    font-size: clamp(1.65rem, 2.3vw, 2.3rem);
    line-height: 1.05;
    letter-spacing: 0;
    color: #0f172a;
  }

  .page-breadcrumb-header {
    margin-top: 0.45rem;
    color: #64748b;
    font-size: 0.98rem;
    font-weight: 500;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .header-notification-btn {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  }

  .notification-dot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #ef4444;
    border: 2px solid #ffffff;
  }

  .header-profile {
    gap: 0.9rem;
    padding-left: 1rem;
    border-left: 1px solid #e5e7eb;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #fb7185 0%, #dc2626 100%);
    border: 7px solid #ffe4e6;
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.18);
    font-size: 0.9rem;
    flex: 0 0 auto;
  }

  .user-info .name {
    color: #0f172a;
    font-size: 1.05rem;
  }

  .logout-link-text {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.45rem 1rem;
    border: 1px solid #fee2e2;
    border-radius: 9px;
    background: #ffffff;
    color: #dc2626;
    font-weight: 800;
    text-decoration: none;
  }

  .logout-link-text:hover {
    background: #fef2f2;
    opacity: 1;
    text-decoration: none;
  }

  @media (max-width: 768px) {
    .header {
      padding: 1rem 1.5rem;
      align-items: flex-start;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .page-title-wrap {
      gap: 0.85rem;
    }

    .page-title-icon {
      width: 46px;
      height: 46px;
      border-radius: 12px;
    }

    .header-right {
      width: 100%;
      justify-content: space-between;
    }

    .header-profile {
      padding-left: 0.75rem;
    }

    .profile-avatar {
      width: 48px;
      height: 48px;
      border-width: 5px;
    }

    .user-info .label,
    .unit-info {
      display: none;
    }
  }

  /* Cards & Grid */
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .tile {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .tile::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
  }

  .tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  }

  .tile-lab {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
  }

  .tile-val {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
  }

  .card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
    margin-bottom: 2rem;
    animation: slideUp 0.5s ease-out;
  }

  .card-header {
    background: rgba(0, 51, 102, 0.02);
    padding: 1.25rem 1.5rem;
    font-weight: 800;
    color: var(--primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
  }

  /* Tables */
  table {
    width: 100%;
    border-collapse: collapse;
  }

  th {
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 2px solid #f1f5f9;
  }

  td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
  }

  tr:hover td {
    background: #f8fafc;
  }

  /* Forms */
  .field {
    margin-bottom: 1.25rem;
  }

  label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
  }

  input,
  select,
  textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: #f8fafc;
  }

  input:focus,
  select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.1);
  }

  .readonly-field {
    background: #f1f5f9;
    cursor: not-allowed;
    color: #475569;
    font-weight: 500;
  }

  .required {
    color: #ef4444;
    margin-left: 2px;
  }

  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .form-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    background: var(--primary);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
  }

  .brand img,
  .lp-logo img,
  .footer-brand img {
    max-height: 100%;
    object-fit: contain;
    margin-right: 12px;
    border-radius: 4px;
  }

  .lp-logo,
  .brand,
  .footer-brand {
    display: inline-flex;
    align-items: center;
  }

  .btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 51, 102, 0.3);
  }

  .btn-sm {
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
  }

  .btn-danger {
    background: #ef4444;
  }

  .btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.3);
  }

  /* Login Styles */
  #login-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top left, var(--primary-light) 0%, #000 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .login-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: left;
    position: relative;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .login-card img {
    display: block;
    margin: 0 auto 1.5rem auto;
  }

  .login-header {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.04em;
    text-align: center;
  }

  .login-header span {
    color: var(--accent);
  }

  .login-card p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    text-align: center;
  }

  .overlay-close-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    z-index: 100000;
    transition: all 0.3s;
    line-height: 1;
    padding: 10px;
  }

  .overlay-close-btn:hover {
    color: var(--white);
    transform: scale(1.1);
  }

  #toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #334155;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    display: none;
    z-index: 1000;
    box-shadow: var(--shadow);
  }

  #toast.toast-success {
    background: #166534;
  }

  #toast.toast-error {
    background: #b91c1c;
  }

  #toast.toast-info {
    background: #1e3a8a;
  }

  .hidden {
    display: none !important;
  }

  .admin-only {
    border-left: 1px solid rgba(255, 255, 255, 0.05);
  }

  /* Responsive */
  @media (max-width: 1024px) {
    .sidebar {
      left: -280px;
      transition: left 0.4s;
    }

    .sidebar.open {
      left: 0;
    }

    .mobile-only {
      display: flex !important;
    }

    .main {
      margin-left: 0;
      max-width: 100vw;
      padding: 1rem;
    }

    .header {
      padding: 1rem;
      margin-bottom: 1.5rem;
    }

    .grid {
      grid-template-columns: 1fr;
    }

    .form-grid {
      grid-template-columns: 1fr;
    }

    .nav-item span:not(.nav-icon) {
      display: inline-block !important;
    }

    .sidebar .brand {
      display: flex !important;
      align-items: center;
    }

    /* Table Responsiveness */
    .card {
      overflow-x: auto;
    }

    table {
      min-width: 600px;
    }
  }

  @media (max-width: 768px) {
    .header {
      gap: 0.5rem;
      padding: 1rem;
    }

    .header h2 {
      font-size: 1.2rem;
    }

    /* Removing the rule that hides the entire profile/logout section on mobile */
    /*.header div:last-child {
      display: none;
    }*/

    .login-card {
      padding: 2rem;
      margin: 1rem;
    }

    .upload-progress-header {
      flex-direction: column;
      align-items: stretch;
    }

    .upload-progress-right {
      justify-content: space-between;
    }
  }

  /* Landing Page specific styles (DARK MODE) */
  .lp-container {
    background: radial-gradient(ellipse at top right, #003366 0%, #001f3f 60%, #000b1a 100%);
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    color: white;
  }

  .lp-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
    background: rgba(0, 11, 30, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .lp-logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .lp-logo span {
    color: #d4af37;
  }

  .lp-hero {
    padding: 12rem 10% 8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
  }

  /* Ambient glow effect */
  .lp-hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: #d4af37;
    filter: blur(150px);
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
  }

  .lp-hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
  }

  .lp-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: #d4af37;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(4px);
  }

  .lp-hero h1 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
  }

  .lp-hero h1 span {
    background: linear-gradient(135deg, #fceeb5 0%, #d4af37 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .lp-hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 2.5rem;
  }

  .lp-features {
    padding: 6rem 10%;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
  }

  .lp-section-title {
    text-align: center;
    margin-bottom: 4rem;
  }

  .lp-section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
  }

  .lp-section-title p {
    color: rgba(255, 255, 255, 0.6);
  }

  .lp-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .lp-feature-card {
    padding: 3rem 2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    text-align: center;
    backdrop-filter: blur(10px);
  }

  .lp-feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: #d4af37;
  }

  .lp-feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.2));
  }

  .lp-feature-card h3 {
    margin-bottom: 1rem;
    color: white;
    font-size: 1.25rem;
  }

  .lp-feature-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .lp-cta-row {
    display: flex;
    gap: 1rem;
  }

  .lp-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
  }

  .lp-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    transform: translateY(-2px);
  }

  /* Unified Modern Footer Styles (Default: Light/Dashboard) */
  .cool-footer {
    padding: 3rem 1.5rem;
    margin-top: 3rem;
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
  }

  .cool-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #d4af37;
    border-radius: 0 0 4px 4px;
    opacity: 0.7;
  }

  .cool-footer .footer-brand {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.1rem;
    letter-spacing: -0.02em;
  }

  .cool-footer .footer-brand span {
    color: #d4af37;
  }

  .cool-footer .footer-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
    opacity: 0.8;
  }

  .cool-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
  }

  .cool-footer a:hover {
    color: #d4af37;
  }

  /* --- LANDING PAGE OVERRIDES (Dark Mode) --- */
  .lp-container .cool-footer {
    padding: 4rem 10%;
    margin-top: 0;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
  }

  .lp-container .cool-footer .footer-brand {
    color: white;
  }

  .lp-container .cool-footer a {
    color: rgba(255, 255, 255, 0.8);
  }

  .lp-container .cool-footer a:hover {
    color: #d4af37;
  }

  /* --- RESPONSIVE LANDING PAGE --- */
  @media (max-width: 1024px) {
    .lp-hero {
      flex-direction: column;
      padding-top: 9rem;
      gap: 3rem;
      text-align: center;
    }

    .lp-hero-content {
      max-width: 100%;
    }

    .lp-hero h1 {
      font-size: 3.5rem;
    }

    .lp-feature-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 1.5rem;
    }

    .lp-cta-row {
      justify-content: center;
    }

    /* Adjust glow position for mobile */
    .lp-hero::before {
      top: 10%;
      left: 50%;
      transform: translateX(-50%);
    }
  }

  @media (max-width: 768px) {
    .lp-nav {
      padding: 1rem 1.5rem;
      background: rgba(0, 11, 30, 0.95);
      /* More opaque on mobile */
    }

    .lp-logo {
      font-size: 1.2rem;
    }

    /* Stack nav button */
    .lp-nav .btn {
      padding: 0.5rem 1rem;
      font-size: 0.9rem;
    }

    .lp-hero {
      padding: 8rem 1.5rem 4rem;
    }

    .lp-hero h1 {
      font-size: 2.5rem;
    }

    .lp-hero p {
      font-size: 1rem;
    }

    .lp-feature-grid {
      grid-template-columns: 1fr;
    }

    .lp-feature-card {
      padding: 2rem 1.5rem;
    }

    .lp-features {
      padding: 4rem 1.5rem;
    }

    .lp-container .cool-footer {
      padding: 4rem 1.5rem;
    }

    .lp-cta-row {
      flex-direction: column;
      width: 100%;
    }

    .lp-cta-row .btn {
      width: 100%;
      justify-content: center;
    }
  }



  /* --- REPORT SIMULATION & PRINT --- */
  .report-simulation-container {
    width: 100%;
    overflow-x: auto;
    background: #f1f5f9;
    padding: 3rem 1rem;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    border: 1px solid #e2e8f0;
  }

  .report-paper {
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    box-sizing: border-box;
    padding: 2.5cm 2cm;
    color: black;
    font-family: "Times New Roman", Times, serif;
    line-height: 1.5;
    transform-origin: top center;
    transition: transform 0.3s ease;
  }

  /* Paper Sizes Simulation */
  .paper-a4-portrait {
    width: 210mm;
    min-height: 297mm;
  }

  .paper-a4-landscape {
    width: 297mm;
    min-height: 210mm;
  }

  .paper-f4-portrait {
    width: 215mm;
    min-height: 330mm;
  }

  .paper-f4-landscape {
    width: 330mm;
    min-height: 215mm;
  }

  /* Responsive scale for preview */
  @media (max-width: 1200px) {
    .report-paper {
      transform: scale(0.9);
      margin-bottom: -100px;
    }
  }

  @media (max-width: 1000px) {
    .report-paper {
      transform: scale(0.8);
      margin-bottom: -200px;
    }
  }

  @media (max-width: 800px) {
    .report-paper {
      transform: scale(0.65);
      margin-bottom: -350px;
    }
  }

  @media (max-width: 600px) {
    .report-paper {
      transform: scale(0.45);
      margin-bottom: -550px;
    }
  }

  /* Kop Surat */
  .report-header-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-align: center;
    border-bottom: 4px double black;
    padding-bottom: 12px;
    margin-bottom: 2rem;
  }

  .report-header-logo {
    width: 88px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto 0.25rem;
  }

  .report-header-text {
    text-align: center;
    overflow: hidden;
  }

  .report-header-text h1,
  .report-header-text h2,
  .report-header-text p {
    white-space: nowrap;
    /* Prevent wrapping as requested */
    margin: 0;
  }

  .report-header-text h1 {
    font-size: 16pt;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.15;
  }

  .report-header-text h2 {
    font-size: 15pt;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.15;
  }

  .report-header-text p {
    font-size: 10pt;
    line-height: 1.4;
    font-style: normal;
    /* Address usually normal, maybe italic for email */
  }

  /* Report Stat boxes */
  .report-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
  }

  .report-stats-grid-single {
    grid-template-columns: minmax(180px, 260px);
    justify-content: center;
    justify-items: center;
    text-align: center;
  }

  .report-stat-box {
    border: 1px solid #000;
    padding: 12px;
    text-align: center;
    width: 100%;
  }

  .report-stat-box .title {
    font-size: 8.5pt;
    font-weight: bold;
    text-transform: uppercase;
    color: #555;
  }

  .report-stat-box .value {
    font-size: 18pt;
    font-weight: bold;
    margin-top: 5px;
  }

  .report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 10.5pt;
  }

  .report-table th,
  .report-table td {
    border: 1px solid black;
    padding: 8px 10px;
  }

  .report-table th {
    background: #f5f5f5 !important;
    text-align: center;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Print Specifics */
  @media print {
    html,
    body {
      margin: 0 !important;
      padding: 0 !important;
      background: white !important;
    }

    body * {
      visibility: hidden;
    }

    #view-reports,
    #view-reports * {
      visibility: visible;
    }

    #view-reports {
      position: absolute !important;
      left: 0 !important;
      top: 0 !important;
      width: 100% !important;
      background: white !important;
    }

    .no-print {
      display: none !important;
    }

    .report-simulation-container {
      padding: 0 !important;
      background: transparent !important;
      border: none !important;
      display: block !important;
      overflow: visible !important;
    }

    .report-paper {
      visibility: visible;
      margin: 0 !important;
      padding: 1.5cm 1.6cm !important;
      box-shadow: none !important;
      transform: none !important;
      width: 100% !important;
      min-height: auto !important;
      box-sizing: border-box !important;
    }

    .report-header-grid {
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      justify-content: center !important;
      text-align: center !important;
    }

    .report-header-logo {
      display: block !important;
      width: 88px !important;
      height: auto !important;
      margin: 0 auto 0.25rem !important;
    }

    .report-header-text {
      text-align: center !important;
      width: 100% !important;
    }

    .print-a4-portrait {
      size: A4 portrait;
    }

    .print-a4-landscape {
      size: A4 landscape;
    }

    .print-f4-portrait {
      size: 215mm 330mm portrait;
    }

    .print-f4-landscape {
      size: 330mm 215mm landscape;
    }

    @page {
      margin: 0;
    }
  }

  /* ===== MODERN DASHBOARD STYLES ===== */

  /* Enhanced Stats Cards */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .stat-card {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 2rem;
    border-radius: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
  }

  .stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
  }

  .stat-card:hover::before {
    opacity: 1;
  }

  .stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  }

  .stat-card-primary {
    --gradient-start: #001f3f;
    --gradient-end: #003d7a;
  }

  .stat-card-success {
    --gradient-start: #059669;
    --gradient-end: #10b981;
  }

  .stat-card-warning {
    --gradient-start: #d97706;
    --gradient-end: #f59e0b;
  }

  .stat-card-purple {
    --gradient-start: #7c3aed;
    --gradient-end: #a78bfa;
  }

  .stat-icon {
    font-size: 4rem;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
  }

  @keyframes float {

    0%,
    100% {
      transform: translateY(0);
    }

    50% {
      transform: translateY(-10px);
    }
  }

  .stat-content {
    flex: 1;
  }

  .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-weight: 600;
  }

  .stat-value {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.25rem;
  }

  .stat-subtext {
    font-size: 0.85rem;
    opacity: 0.85;
  }

  /* Secondary Stats */
  .secondary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .mini-stat {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  .mini-stat:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
  }

  .mini-stat-icon {
    font-size: 2rem;
  }

  .mini-stat-content {
    flex: 1;
  }

  .mini-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
  }

  .mini-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    margin: 0.25rem 0;
  }

  .mini-stat-trend {
    font-size: 0.85rem;
    font-weight: 600;
  }

  .trend-up {
    color: #10b981;
  }

  .trend-down {
    color: #ef4444;
  }

  .security-breakdown {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
  }

  .sec-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
  }

  .sec-terbuka {
    background: #dcfce7;
    color: #166534;
  }

  .sec-terbatas {
    background: #fef9c3;
    color: #854d0e;
  }

  .sec-rahasia {
    background: #fee2e2;
    color: #991b1b;
  }

  /* Quick Actions */
  .quick-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
  }

  .quick-action-btn {
    flex: 1;
    min-width: 150px;
    padding: 1.25rem 1.5rem;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 700;
    color: var(--primary);
    font-family: inherit;
  }

  .quick-action-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 31, 63, 0.2);
  }

  .qa-icon {
    font-size: 1.5rem;
  }

  .qa-label {
    font-size: 0.95rem;
  }

  /* Charts Row */
  .charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .chart-card {
    min-height: 350px;
  }

  .chart-container {
    padding: 1.5rem;
    height: 280px;
    position: relative;
  }

  /* Activity Timeline */
  .activity-timeline {
    padding: 1.5rem;
    max-height: 450px;
    overflow-y: auto;
  }

  .activity-timeline::-webkit-scrollbar {
    width: 6px;
  }

  .activity-timeline::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
  }

  .activity-timeline::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
  }

  .activity-timeline::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
  }

  .activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-left: 3px solid var(--primary);
    margin-bottom: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s;
  }

  .activity-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
    border-left-color: var(--accent);
  }

  .activity-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
  }

  .activity-content {
    flex: 1;
  }

  .activity-user {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
  }

  .activity-action {
    color: var(--text-main);
    margin: 0.25rem 0;
    font-size: 0.9rem;
  }

  .activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  /* Responsive Dashboard */
  @media (max-width: 1024px) {
    .charts-row {
      grid-template-columns: 1fr;
    }

    .stats-grid {
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
  }

  @media (max-width: 768px) {
    .stat-icon {
      font-size: 3rem;
    }

    .stat-value {
      font-size: 2rem;
    }

    .quick-actions {
      flex-direction: column;
    }

    .quick-action-btn {
      min-width: 100%;
    }

    .secondary-stats {
      grid-template-columns: 1fr;
    }
  }

  /* Animation for dashboard load */
  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .stats-grid>* {
    animation: slideUp 0.5s ease-out backwards;
  }

  .stats-grid>*:nth-child(1) {
    animation-delay: 0.1s;
  }

  .stats-grid>*:nth-child(2) {
    animation-delay: 0.2s;
  }

  .stats-grid>*:nth-child(3) {
    animation-delay: 0.3s;
  }

  .stats-grid>*:nth-child(4) {
    animation-delay: 0.4s;
  }

  .brand,
  .lp-logo,
  .footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .sidebar .brand {
    justify-content: flex-start;
  }

  .cool-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .footer-brand {
    margin-bottom: 0.5rem;
  }

  .brand img,
  .lp-logo img,
  .footer-brand img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
  }

  .login-card {
    position: relative;
  }

  /* ===== MODAL STYLES ===== */
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
  }

  .modal.hidden {
    display: none;
    opacity: 0;
  }

  .modal-content {
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalPop 0.3s ease-out;
  }

  @keyframes modalPop {
    from {
      opacity: 0;
      transform: scale(0.95) translateY(20px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
  }

  .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-main);
  }

  .modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    line-height: 1;
    padding: 0 0.5rem;
  }

  .modal-close:hover {
    color: #ef4444;
  }

    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
  }

  .activity-action {
    color: var(--text-main);
    margin: 0.25rem 0;
    font-size: 0.9rem;
  }

  .activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  /* Responsive Dashboard */
  @media (max-width: 1024px) {
    .charts-row {
      grid-template-columns: 1fr;
    }

    .stats-grid {
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
  }

  @media (max-width: 768px) {
    .stat-icon {
      font-size: 3rem;
    }

    .stat-value {
      font-size: 2rem;
    }

    .quick-actions {
      flex-direction: column;
    }

    .quick-action-btn {
      min-width: 100%;
    }

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

  /* Animation for dashboard load */
  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }

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

  .stats-grid>* {
    animation: slideUp 0.5s ease-out backwards;
  }

  .stats-grid>*:nth-child(1) {
    animation-delay: 0.1s;
  }

  .stats-grid>*:nth-child(2) {
    animation-delay: 0.2s;
  }

  .stats-grid>*:nth-child(3) {
    animation-delay: 0.3s;
  }

  .stats-grid>*:nth-child(4) {
    animation-delay: 0.4s;
  }

  .brand,
  .lp-logo,
  .footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .sidebar .brand {
    justify-content: flex-start;
  }

  .cool-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .footer-brand {
    margin-bottom: 0.5rem;
  }

  .brand img,
  .lp-logo img,
  .footer-brand img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
  }

  .login-card {
    position: relative;
  }

  /* ===== MODAL STYLES ===== */
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
  }

  .modal.hidden {
    display: none;
    opacity: 0;
  }

  .modal-content {
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalPop 0.3s ease-out;
  }

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

  .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
  }

  .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-main);
  }

  .modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    line-height: 1;
    padding: 0 0.5rem;
  }

  .modal-close:hover {
    color: #ef4444;
  }

  .modal-content form {
    padding: 1.5rem;
    overflow-y: auto;
  }

  .modal-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #f8fafc;
  }

  /* --- ARSIP REDESIGN --- */
  .arc-monitoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
  }
  .arc-monitoring-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #cbd5e1;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .arc-monitoring-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  }
  .arc-mon-blue { border-left-color: #3b82f6; }
  .arc-mon-green { border-left-color: #10b981; }
  .arc-mon-teal { border-left-color: #14b8a6; }
  .arc-mon-indigo { border-left-color: #6366f1; }
  .arc-mon-emerald { border-left-color: #059669; }
  .arc-mon-red { border-left-color: #ef4444; }
  
  .arc-mon-icon {
    font-size: 2rem;
    background: #f1f5f9;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
  .arc-mon-body { flex: 1; }
  .arc-mon-label { font-size: 0.8rem; color: #64748b; font-weight: 600; text-transform: uppercase; margin-bottom: 0.25rem; }
  .arc-mon-value { font-size: 1.75rem; font-weight: 800; color: #0f172a; line-height: 1; margin-bottom: 0.25rem; }
  .arc-mon-sub { font-size: 0.75rem; color: #94a3b8; }

  .arc-filter-panel {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
    border: 1px solid #eef2f7;
  }
  .arc-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }
  .arc-filter-title {
    font-weight: 900;
    color: #b91c1c;
    font-size: 1rem;
  }
  .arc-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(150px, 1fr));
    gap: 1rem;
  }
  .arc-filter-field { display: flex; flex-direction: column; gap: 0.45rem; }
  .arc-filter-field label { font-size: 0.78rem; font-weight: 800; color: #334155; }
  .arc-filter-field select, .arc-filter-field input {
    height: 44px; padding: 0 0.85rem; border-radius: 8px; border: 1px solid #dbe3ef; font-size: 0.9rem; background:#fff; color:#0f172a;
  }

  .arc-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
  }

  .arc-filter-spacer {
    flex: 1;
  }

  .arc-count-badge {
    background: #e0e7ff; color: #4f46e5; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.8rem; font-weight: 600;
  }
  .arc-action-btn {
    border: none; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    transition: opacity 0.2s; padding: 0.35rem 0.6rem; font-size: 0.75rem; font-weight: 600; gap: 4px;
  }
  .arc-action-btn:hover { opacity: 0.85; }

  /* --- AUDIT TRAIL REDESIGN --- */
  .audit-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .audit-stat-card {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  }

  .audit-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    font-size: 0.82rem;
    letter-spacing: 0;
  }

  .audit-stat-red .audit-stat-icon { background: linear-gradient(135deg, #fb7185, #e11d48); }
  .audit-stat-blue .audit-stat-icon { background: linear-gradient(135deg, #60a5fa, #2563eb); }
  .audit-stat-green .audit-stat-icon { background: linear-gradient(135deg, #4ade80, #16a34a); }
  .audit-stat-orange .audit-stat-icon { background: linear-gradient(135deg, #fb923c, #ea580c); }

  .audit-stat-label {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
  }

  .audit-stat-value {
    color: #0f172a;
    font-size: 1.65rem;
    line-height: 1;
    font-weight: 900;
    margin-bottom: 0.35rem;
  }

  .audit-stat-sub {
    color: #64748b;
    font-size: 0.8rem;
  }

  .audit-filter-panel {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
  }

  .audit-filter-title {
    color: #b91c1c;
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 1rem;
  }

  .audit-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(150px, 1fr));
    gap: 1rem;
  }

  .audit-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
  }

  .audit-filter-field label {
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
  }

  .audit-filter-field input,
  .audit-filter-field select {
    height: 44px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    padding: 0 0.85rem;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.9rem;
  }

  .audit-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
  }

  .audit-filter-spacer {
    flex: 1;
  }

  .audit-export-btn {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    color: #0f172a;
  }

  .audit-export-excel {
    border-color: #16a34a;
    color: #15803d;
  }

  .audit-export-pdf {
    border-color: #ef4444;
    color: #dc2626;
  }

  .audit-table-card {
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  }

  .audit-card-header {
    color: #b91c1c;
  }

  .audit-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .audit-refresh-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
  }

  .audit-refresh-btn.active {
    background: #dcfce7;
    border-color: #86efac;
    color: #15803d;
  }

  .audit-user-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
  }

  .audit-user-cell small {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    margin-top: 0.15rem;
  }

  .audit-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 900;
    flex: 0 0 auto;
  }

  .audit-action-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .audit-action-login { background: #dbeafe; color: #2563eb; }
  .audit-action-upload { background: #dcfce7; color: #15803d; }
  .audit-action-update { background: #ffedd5; color: #ea580c; }
  .audit-action-delete { background: #fee2e2; color: #b91c1c; }
  .audit-action-restore { background: #ede9fe; color: #6d28d9; }
  .audit-action-default { background: #f1f5f9; color: #334155; }

  .audit-detail-cell {
    max-width: 360px;
    color: #334155;
    line-height: 1.45;
  }

  .audit-detail-btn {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
  }

  .audit-detail-btn:hover {
    border-color: #fecaca;
    color: #dc2626;
    background: #fff7f7;
  }

  .audit-muted {
    color: #94a3b8;
    font-weight: 700;
  }

  .audit-detail-body {
    padding: 1.5rem;
    overflow-y: auto;
  }

  .audit-detail-text {
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #1e293b;
    line-height: 1.7;
    min-height: 72px;
  }

  @media (max-width: 1200px) {
    .arc-filter-grid,
    .audit-stat-grid,
    .audit-filter-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .audit-search-field {
      grid-column: 1 / -1;
    }
  }

  @media (max-width: 720px) {
    .arc-filter-grid,
    .audit-stat-grid,
    .audit-filter-grid {
      grid-template-columns: 1fr;
    }

    .arc-filter-spacer,
    .audit-filter-spacer {
      display: none;
    }

    .audit-header-actions {
      width: 100%;
      justify-content: flex-start;
      flex-wrap: wrap;
    }
  }

  .archive-pagination-footer {
    margin-top: 1.35rem;
    padding: 1.25rem 1.45rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(300px, auto) auto;
    align-items: center;
    gap: 1rem 1.25rem;
  }

  .pagination-summary {
    color: #0f172a;
    font-size: 0.93rem;
  }

  .pagination-summary strong {
    font-weight: 800;
  }

  .page-size-control {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #475569;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .page-size-control select {
    min-width: 74px;
    height: 44px;
    border-radius: 9px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    padding: 0 0.75rem;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
  }

  .pagination {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    flex-wrap: wrap;
  }

  .pagination button {
    min-width: 44px;
    height: 44px;
    padding: 0 0.95rem;
    border-radius: 9px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
  }

  .pagination button:hover:not(:disabled) {
    border-color: #fecaca;
    color: #dc2626;
    background: #fff7f7;
  }

  .pagination button.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.24);
  }

  .pagination button:disabled {
    color: #94a3b8;
    background: #f8fafc;
    cursor: not-allowed;
    box-shadow: none;
  }

  .pagination-nav {
    min-width: 112px !important;
  }

  .pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 44px;
    color: #64748b;
    font-weight: 800;
  }

  .pagination-status {
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
  }

  @media (max-width: 1200px) {
    .archive-pagination-footer {
      grid-template-columns: 1fr;
      align-items: stretch;
    }

    .pagination,
    .page-size-control,
    .pagination-status {
      justify-content: flex-start;
    }
  }

  .sec-publik { background: #dcfce7; color: #166534; padding: 0.25rem 0.6rem; border-radius: 12px; font-size: 0.75rem; font-weight: 700; display: inline-block; border: 1px solid #bbf7d0; }
  .sec-tertutup { background: #fee2e2; color: #991b1b; padding: 0.25rem 0.6rem; border-radius: 12px; font-size: 0.75rem; font-weight: 700; display: inline-block; border: 1px solid #fecaca; }

  .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  @media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }
  .detail-section-title {
    font-size: 1rem; font-weight: 700; color: #0f172a; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #e2e8f0;
  }
  .detail-row { display: flex; flex-direction: column; margin-bottom: 0.8rem; }
  .detail-label { font-size: 0.75rem; color: #64748b; font-weight: 600; text-transform: uppercase; margin-bottom: 2px; }
  .detail-value { font-size: 0.95rem; color: #1e293b; }
