
  :root {
    --primary: #D40511;
    --primary-light: #FF2D37;
    --primary-dark: #A00410;
    --bg: #FFFDF7;
    --surface: #FFFFFF;
    --text: #1a1a1a;
    --text-muted: #555555;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --radius: 12px;
    --border: 2px solid #1a1a1a;
    --shadow: 4px 4px 0px #1a1a1a;
    --shadow-sm: 2px 2px 0px #1a1a1a;
    --shadow-hover: 6px 6px 0px #1a1a1a;
    --sidebar-width: 260px;
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
  }

  /* === NEO BRUTALISM BASE === */
  .glass {
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  /* === LOGIN === */
  #login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #FEE2E2;
    background-image: 
      radial-gradient(circle at 20% 50%, rgba(212, 5, 17, 0.08) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(212, 5, 17, 0.05) 0%, transparent 50%);
  }

  .login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px 32px;
    text-align: center;
    background: var(--surface);
    border: 3px solid #1a1a1a;
    box-shadow: 8px 8px 0px #1a1a1a;
  }

  .login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }

  .login-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 4px;
  }

  .login-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    font-weight: 600;
  }

  /* === FORM === */
  .form-group {
    margin-bottom: 16px;
    text-align: left;
  }

  .form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .glass-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--surface);
    color: var(--text);
    transition: all 0.15s;
    outline: none;
    font-weight: 500;
  }

  .glass-input:focus {
    border-color: var(--primary);
    box-shadow: 3px 3px 0px var(--primary);
    transform: translate(-1px, -1px);
  }

  textarea.glass-input {
    resize: vertical;
    min-height: 80px;
  }

  select.glass-input {
    cursor: pointer;
  }

  .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
  }

  /* === BUTTONS === */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    background: var(--surface);
    color: var(--text);
    transition: all 0.1s;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
  }

  .btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hover);
  }

  .btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px #1a1a1a;
  }

  .btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: #1a1a1a;
  }

  .btn-primary:hover {
    background: var(--primary-light);
  }

  .btn-outline {
    background: transparent;
  }

  .btn-full {
    width: 100%;
  }

  .btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    box-shadow: 1px 1px 0px #1a1a1a;
  }

  /* === SIDEBAR === */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    border-radius: 0;
    border: none;
    border-right: 3px solid #1a1a1a;
    box-shadow: none;
    overflow-y: auto;
    background: var(--surface);
  }

  .sidebar-header {
    padding: 0 8px 20px;
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: 16px;
  }

  .sidebar-brand {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary);
  }

  .sidebar-nav {
    flex: 1;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.1s;
    margin-bottom: 4px;
    position: relative;
    border: 2px solid transparent;
  }

  .nav-item:hover {
    background: #FEE2E2;
    color: var(--primary);
    border-color: var(--primary);
  }

  .nav-item.active {
    background: var(--primary);
    color: #fff;
    border-color: #1a1a1a;
    box-shadow: var(--shadow-sm);
  }

  .nav-item i, .nav-item svg {
    width: 18px;
    height: 18px;
  }

  .nav-divider {
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 16px 12px 8px;
  }

  .sidebar-footer {
    padding-top: 16px;
    border-top: 2px solid #1a1a1a;
  }

  .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #FEE2E2;
    border: 2px solid #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
  }

  .user-detail {
    font-size: 0.8rem;
    overflow: hidden;
  }

  /* === MAIN CONTENT === */
  .main-content {
    margin-left: var(--sidebar-width);
    padding: 32px;
    min-height: 100vh;
  }

  .page-header {
    margin-bottom: 24px;
  }

  .page-header h1 {
    font-size: 1.5rem;
    font-weight: 900;
  }

  .page-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
  }

  /* === VIEWS === */
  .view {
    display: none;
  }

  .view.active {
    display: block;
  }

  /* === STATS === */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
  }

  .stat-card {
    padding: 20px;
    border-radius: var(--radius);
    background: var(--surface);
    border: var(--border);
    box-shadow: var(--shadow);
    transition: all 0.1s;
  }

  .stat-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hover);
  }

  .stat-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
  }

  .stat-value {
    font-size: 2rem;
    font-weight: 900;
  }

  .stat-success { border-left: 5px solid var(--success); }
  .stat-success .stat-value { color: var(--success); }
  .stat-warning { border-left: 5px solid var(--warning); }
  .stat-warning .stat-value { color: var(--warning); }
  .stat-danger { border-left: 5px solid var(--danger); }
  .stat-danger .stat-value { color: var(--danger); }
  .stat-info { border-left: 5px solid var(--info); }
  .stat-info .stat-value { color: var(--info); }

  /* === CARDS === */
  .card {
    padding: 24px;
    margin-bottom: 20px;
  }

  /* === TABLES === */
  .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
  }

  .data-table th {
    text-align: left;
    padding: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text);
    border-bottom: 3px solid #1a1a1a;
    background: #FEF3C7;
  }

  .data-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
  }

  .data-table tr:hover {
    background: #FFFBEB;
  }

  /* === BADGES === */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    border: 1.5px solid #1a1a1a;
  }

  .badge-success { background: #DCFCE7; color: #166534; }
  .badge-warning { background: #FEF3C7; color: #92400E; }
  .badge-danger { background: #FEE2E2; color: #991B1B; }
  .badge-info { background: #DBEAFE; color: #1E40AF; }
  .badge-neutral { background: #F3F4F6; color: #374151; }

  .badge-tipe {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    background: #FEE2E2;
    color: var(--primary);
    border: 1.5px solid var(--primary);
  }

  /* === APPROVALS GRID === */
  .approvals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
  }

  /* === MODAL === */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
  }

  .modal-content {
    width: 100%;
    max-width: 480px;
    padding: 32px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-content h2 {
    margin-bottom: 20px;
    font-size: 1.2rem;
  }

  /* === SWEETALERT OVERRIDE === */
  .swal2-popup {
    overflow-x: hidden !important;
    border: 2px solid #1a1a1a !important;
    border-radius: 12px !important;
    box-shadow: 6px 6px 0px #1a1a1a !important;
  }
  .swal2-html-container {
    overflow-x: hidden !important;
  }
  .swal2-select {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .swal2-confirm {
    border: 2px solid #1a1a1a !important;
    box-shadow: 2px 2px 0px #1a1a1a !important;
    font-weight: 800 !important;
  }
  .swal2-cancel {
    border: 2px solid #1a1a1a !important;
    box-shadow: 2px 2px 0px #1a1a1a !important;
    font-weight: 800 !important;
  }

  /* === SHIFT TABS === */
  .tab-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 2px solid #1a1a1a;
    background: var(--surface);
    cursor: pointer;
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: all 0.1s;
    box-shadow: var(--shadow-sm);
  }

  .tab-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: #1a1a1a;
  }

  .tab-btn:hover {
    transform: translate(-1px, -1px);
  }

  /* === PLOTTING TABLE === */
  .plotting-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
  }

  .plotting-table th,
  .plotting-table td {
    border: 1.5px solid #1a1a1a;
    padding: 6px;
    text-align: center;
    min-width: 40px;
  }

  .plotting-table th {
    background: #FEF3C7;
    font-weight: 800;
  }

  .plotting-table .sticky-col {
    position: sticky;
    left: 0;
    background: var(--surface);
    z-index: 10;
    min-width: 140px;
    text-align: left;
    padding: 8px;
  }

  .shift-select {
    border: none;
    background: transparent;
    width: 100%;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    outline: none;
  }

  /* === MOBILE === */
  .mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--surface);
    border-bottom: 3px solid #1a1a1a;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 90;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
  }

  @media (max-width: 768px) {
    .mobile-header {
      display: flex;
    }

    .sidebar {
      transform: translateX(-100%);
      transition: transform 0.3s ease;
    }

    .sidebar.open {
      transform: translateX(0);
    }

    .sidebar-overlay.open {
      display: block;
    }

    .main-content {
      margin-left: 0;
      padding: 72px 16px 24px;
    }

    .stats-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
      grid-template-columns: 1fr;
    }

    .approvals-grid {
      grid-template-columns: 1fr;
    }

    /* Mobile card table */
    .data-table.mobile-card-table thead {
      display: none;
    }

    .data-table.mobile-card-table tr {
      display: block;
      padding: 16px;
      margin-bottom: 12px;
      border: 2px solid #1a1a1a;
      border-radius: 10px;
      background: var(--surface);
      box-shadow: 3px 3px 0px #1a1a1a;
    }

    .data-table.mobile-card-table td {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 6px 0;
      border: none;
    }

    .data-table.mobile-card-table td::before {
      content: attr(data-label);
      font-weight: 800;
      font-size: 0.75rem;
      color: var(--text-muted);
      text-transform: uppercase;
    }
  }

  /* === LIBUR TOGGLE === */
  .libur-cell {
    width: 48px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    transition: all 0.1s;
    margin: 0 auto;
    user-select: none;
    border: 2px solid #1a1a1a;
  }

  .libur-cell.kerja {
    background: #DCFCE7;
    color: #166534;
  }

  .libur-cell.libur {
    background: #FEE2E2;
    color: #991B1B;
  }

  .libur-cell:hover {
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0px #1a1a1a;
  }

  /* === NOTIFICATION BADGE === */
  .notif-badge {
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0 4px;
    border: 1.5px solid #1a1a1a;
    animation: badge-pulse 2s ease-in-out infinite;
  }

  @keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
  }

  /* === MAP PULSE ANIMATION === */
  @keyframes pulse-ring {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
  }

  .pulse-marker {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(212, 5, 17, 0.4);
    position: relative;
  }

  .pulse-marker::before,
  .pulse-marker::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: pulse-ring 2s ease-out infinite;
  }

  .pulse-marker::after {
    animation-delay: 1s;
  }

  .office-marker {
    width: 16px;
    height: 16px;
    background: var(--success);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
  }

  /* === LEAFLET MAP Z-INDEX FIX (mobile) === */
  .leaflet-pane,
  .leaflet-top,
  .leaflet-bottom,
  .leaflet-control {
    z-index: 1 !important;
  }
  #user-map, #admin-map {
    position: relative;
    z-index: 1;
  }

  /* === ANIMATIONS === */
  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .view.active {
    animation: fadeIn 0.2s ease;
  }

  /* === FOTO LINK === */
  .foto-link {
    padding: 3px 8px;
    background: #DBEAFE;
    border: 1.5px solid #1a1a1a;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #1E40AF !important;
    text-decoration: none !important;
  }

  .foto-link:hover {
    background: #BFDBFE;
  }
