/* ====================================================
   SISTEM PERMOHONAN INSPEKSI MARITIM
   Global Design System
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* Primary Colors */
  --primary-50: #f0f5fb;
  --primary-100: #e3edf8;
  --primary-200: #c6dbef;
  --primary-300: #9bbede;
  --primary-400: #6b9bc7;
  --primary-500: #3b6fa8;
  --primary-600: #1f2a7c;
  --primary-700: #192268;
  --primary-800: #151e55;
  --primary-900: #111941;

  /* Navy/Dark */
  --navy-900: #131e48;
  --navy-800: #1f2a7c;
  --navy-700: #2e4774;
  --navy-600: #3b6fa8;

  /* Neutral */
  --gray-50: #f4f6fa;
  --gray-100: #edf1f6;
  --gray-200: #dde3eb;
  --gray-300: #c5cfdd;
  --gray-400: #7d8a9d;
  --gray-500: #596675;
  --gray-600: #49576a;
  --gray-700: #344256;
  --gray-800: #283346;
  --gray-900: #1e2430;
  --surface: #ffffff;
  --accent: #38bdf8;
  --accent-light: #e7f6fd;
  --sidebar-text: #d0daed;
  --sidebar-muted: #a6b6d1;
  --font-display: 'Barlow Condensed', 'Trebuchet MS', sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --focus-ring: #3b6fa8;
  --backdrop: rgb(15 26 57 / 0.48);

  /* Status Colors */
  --status-draft: #f59e0b;
  --status-received: #3b82f6;
  --status-correction: #ef4444;
  --status-verification: #8b5cf6;
  --status-verified: #06b6d4;
  --status-scheduled: #0ea5e9;
  --status-executing: #f97316;
  --status-review: #84cc16;
  --status-followup: #eab308;
  --status-completed: #22c55e;
  --status-cancelled: #6b7280;

  /* Semantic */
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Layout */
  --sidebar-width: 272px;
  --sidebar-collapsed: 72px;
  --topbar-height: 64px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Border Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.2s ease;
  --transition-slow: all 0.3s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

img {
  max-width: 100%;
}

.svg-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.status-indicator.green {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.status-indicator.red {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.status-indicator.yellow {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

/* ====================================================
   LAYOUT
   ==================================================== */

.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--navy-900);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: var(--transition-slow);
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: var(--topbar-height);
  flex-shrink: 0;
}

.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  overflow: hidden;
}

.sidebar-logo .logo-text {
  display: flex;
  flex-direction: column;
}

.sidebar-logo .logo-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.sidebar-logo .logo-sub {
  font-size: 10px;
  color: var(--gray-400);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.nav-group {
  padding: 0 0 8px 0;
}

.nav-group-label {
  padding: 8px 20px 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  cursor: pointer;
  border-radius: 0;
  color: var(--gray-400);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary-400);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--primary-500);
  border-radius: 0 2px 2px 0;
}

.nav-item .nav-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: var(--transition);
}

.nav-item:hover .nav-icon {
  color: #fff;
}

.nav-item.active .nav-icon {
  color: var(--primary-400);
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.nav-submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.nav-submenu.open {
  max-height: 500px;
}

.nav-submenu .nav-item {
  padding-left: 20px;
  font-size: 12.5px;
}

.nav-submenu .nav-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
}

.nav-submenu .nav-item span:not(.nav-icon) {
  padding-left: 2px;
}

.nav-chevron {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.nav-item:hover .nav-chevron {
  color: #ffffff;
}

.nav-item.submenu-open .nav-chevron {
  transform: rotate(180deg);
  color: #ffffff;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.user-profile:hover {
  background: rgba(255,255,255,0.06);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--gray-400);
}

/* ---- Main Content ---- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition-slow);
}

/* ---- Topbar ---- */
.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
  flex: 1;
}

.topbar-breadcrumb .crumb-sep {
  color: var(--gray-300);
}

.topbar-breadcrumb .crumb-current {
  color: var(--gray-800);
  font-weight: 600;
}

.topbar-breadcrumb a {
  color: var(--gray-500);
  transition: var(--transition);
}

.topbar-breadcrumb a:hover {
  color: var(--primary-600);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--gray-600);
  transition: var(--transition);
  position: relative;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1;
}

/* Tombol keluar di topbar */
.topbar-btn[data-auth="logout"] {
  background: #fef2f2;
  color: #991b1b;
}

.topbar-btn[data-auth="logout"]:hover {
  background: var(--danger);
  color: #fff;
}

.topbar-btn:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

.topbar-btn .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: var(--radius-full);
  border: 2px solid #fff;
}

/* ---- Page Content ---- */
.page-content {
  padding: 24px;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ====================================================
   COMPONENTS
   ==================================================== */

/* ---- Cards ---- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
}

.card-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 12px 20px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Stat Cards ---- */
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: center;
  overflow: hidden;
  flex-shrink: 0;
  word-break: break-word;
  padding: 2px;
}

.stat-icon.blue { background: var(--primary-50); color: var(--primary-600); }
.stat-icon.green { background: #f0fdf4; color: #16a34a; }
.stat-icon.orange { background: #fff7ed; color: #ea580c; }
.stat-icon.red { background: #fef2f2; color: #dc2626; }
.stat-icon.purple { background: #faf5ff; color: #9333ea; }
.stat-icon.cyan { background: #ecfeff; color: #0891b2; }
.stat-icon.yellow { background: #fefce8; color: #ca8a04; }

.stat-content,
.stat-card > div:last-child {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.1;
  margin-top: 4px;
}

.stat-change {
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }
.stat-change.neutral { color: var(--gray-500); }

.stat-sub {
  font-size: 11.5px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary-600);
  color: #fff;
  border-color: var(--primary-600);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-700);
  border-color: var(--primary-700);
}

.btn-secondary {
  background: #fff;
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn-success:hover:not(:disabled) {
  background: #16a34a;
  border-color: #16a34a;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
  border-color: #dc2626;
}

.btn-warning {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--gray-100);
  color: var(--gray-800);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 11px 24px;
  font-size: 14px;
  border-radius: var(--radius-md);
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
}

.btn-icon.btn-sm {
  padding: 5px;
  width: 28px;
  height: 28px;
}

/* ---- Badges / Status Pills ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
  flex-shrink: 0;
}

.badge-draft { background: #fef3c7; color: #92400e; }
.badge-received { background: var(--primary-50); color: var(--primary-800); }
.badge-correction { background: #fef2f2; color: #991b1b; }
.badge-verification { background: #f5f3ff; color: #5b21b6; }
.badge-verified { background: #ecfeff; color: #164e63; }
.badge-waiting { background: #f0f9ff; color: #0c4a6e; }
.badge-scheduled { background: #f0fdf4; color: #14532d; }
.badge-executing { background: #fff7ed; color: #9a3412; }
.badge-review { background: #f7fee7; color: #365314; }
.badge-followup { background: #fefce8; color: #713f12; }
.badge-completed { background: #f0fdf4; color: #14532d; }
.badge-cancelled { background: var(--gray-100); color: var(--gray-600); }

/* Small tag badges */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-50);
  color: var(--primary-700);
}

/* ---- Filter Panel ---- */
.filter-panel {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.filter-panel-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 160px;
}

.filter-group.wide {
  flex: 2;
  min-width: 240px;
}

.filter-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-600);
}

.filter-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ---- Form Controls ---- */
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--gray-800);
  background: #fff;
  transition: var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
  color: var(--gray-400);
}

.form-control.error {
  border-color: var(--danger);
}

.form-control.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .form-control {
  padding-left: 36px;
}

.input-group .input-icon {
  position: absolute;
  left: 12px;
  color: var(--gray-400);
  font-size: 15px;
  pointer-events: none;
}

.input-group .input-icon-right {
  position: absolute;
  right: 12px;
  color: var(--gray-400);
  font-size: 15px;
  cursor: pointer;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-700);
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-error {
  font-size: 11.5px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-hint {
  font-size: 11.5px;
  color: var(--gray-500);
}

/* ---- Tables ---- */
.table-wrapper {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-toolbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-info {
  font-size: 12.5px;
  color: var(--gray-500);
}

.table-info strong {
  color: var(--gray-800);
  font-weight: 600;
}

.table-container,
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  padding: 11px 16px;
  background: var(--gray-50);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--gray-200);
}

thead th.sortable {
  cursor: pointer;
  user-select: none;
}

thead th.sortable:hover {
  color: var(--gray-700);
}

thead th .sort-icon {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  color: var(--gray-400);
  vertical-align: middle;
}

thead th.sorted-asc .sort-icon::after { content: ' \25B2'; color: var(--primary-600); }
thead th.sorted-desc .sort-icon::after { content: ' \25BC'; color: var(--primary-600); }
thead th:not(.sorted-asc):not(.sorted-desc) .sort-icon::after { content: ' \21C5'; opacity: 0.4; }

tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--gray-50);
}

tbody td {
  padding: 12px 16px;
  color: var(--gray-700);
  vertical-align: middle;
}

tbody td.primary-cell {
  font-weight: 600;
  color: var(--primary-700);
  cursor: pointer;
}

tbody td.primary-cell:hover {
  color: var(--primary-800);
  text-decoration: underline;
}

.no-data {
  padding: 60px 20px;
  text-align: center;
}

.no-data-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.no-data-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.no-data-subtitle {
  font-size: 13px;
  color: var(--gray-400);
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.pagination-info {
  font-size: 12.5px;
  color: var(--gray-500);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-700);
}

.page-btn.active {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Action Menu ---- */
.action-menu {
  position: relative;
}

.action-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  min-width: 160px;
  z-index: 200;
  padding: 4px;
  display: none;
}

.action-dropdown.open {
  display: block;
  animation: fadeInDown 0.15s ease;
}

.action-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.action-dropdown-item:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

.action-dropdown-item.danger {
  color: var(--danger);
}

.action-dropdown-item.danger:hover {
  background: #fef2f2;
}

.action-dropdown-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 4px 0;
}

/* ---- Modals ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open,
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal,
.modal-container {
  background: #ffffff !important;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.2s ease;
  position: relative;
  z-index: 301;
}

.modal > form,
.modal-container > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.modal-overlay.open .modal,
.modal-overlay.open .modal-container,
.modal-overlay.active .modal,
.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.cash-entry-modal { max-width: 600px; }
.cash-entry-types { display: flex; flex-wrap: wrap; gap: 12px 20px; padding: 8px 0; }
.cash-entry-types label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 700; }
.cash-entry-types .cash-entry-in { color: var(--success-700, #047857); }
.cash-entry-types .cash-entry-out { color: var(--danger-700, #b91c1c); }
.cash-entry-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.cash-entry-grid-amount { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.cash-entry-help { margin-top: 4px; font-size: 11px; color: var(--gray-500); }
.cash-entry-modal-stacked {
  --cash-in-ink: #047857;
  --cash-in-soft: #ecfdf5;
  --cash-out-ink: #b91c1c;
  --cash-out-soft: #fef2f2;
}
.cash-entry-modal-stacked .cash-entry-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
.cash-entry-modal-stacked .cash-entry-types { gap: 10px; }
.cash-entry-modal-stacked .cash-entry-types label {
  flex: 1 1 210px;
  padding: 10px 12px;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  font-size: 12px;
  min-height: 44px;
}
.cash-entry-modal-stacked .cash-entry-in { color: var(--cash-in-ink); }
.cash-entry-modal-stacked .cash-entry-out { color: var(--cash-out-ink); }
.cash-entry-modal-stacked .cash-entry-in input { accent-color: var(--cash-in-ink); }
.cash-entry-modal-stacked .cash-entry-out input { accent-color: var(--cash-out-ink); }
.cash-entry-modal-stacked .cash-entry-in:has(input:checked) { background: var(--cash-in-soft); box-shadow: inset 0 0 0 1px var(--cash-in-ink); }
.cash-entry-modal-stacked .cash-entry-out:has(input:checked) { background: var(--cash-out-soft); box-shadow: inset 0 0 0 1px var(--cash-out-ink); }
.cash-entry-modal-stacked .cash-entry-types label:has(input:focus-visible) { outline: 2px solid currentColor; outline-offset: 3px; }
@media (max-width: 560px) {
  .cash-entry-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cash-entry-modal .modal-footer { flex-wrap: wrap; }
  .cash-entry-modal .modal-footer .btn { flex: 1; }
}

.modal.modal-lg,
.modal-container.modal-lg {
  max-width: 900px;
}

.modal.modal-xl,
.modal-container.modal-xl {
  max-width: 1040px;
}

.modal.modal-sm,
.modal-container.modal-sm {
  max-width: 400px;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 10;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  transition: all 0.15s ease;
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.modal-close:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.modal-body {
  padding: 24px;
  background: #ffffff !important;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: auto;
  min-height: 0;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
  background: var(--gray-50);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  z-index: 10;
}

/* Official Slips & Financial Documents */
.slip-paper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.slip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid #0f172a;
}

.slip-logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slip-logo-badge {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slip-company-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.slip-company-sub {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.slip-title-banner {
  text-align: center;
  margin: 14px 0 18px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.slip-title-text {
  font-size: 14px;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.05em;
}

.slip-num-text {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}

.slip-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.slip-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
}

.slip-meta-label {
  color: #64748b;
  font-weight: 500;
}

.slip-meta-val {
  font-weight: 700;
  color: #0f172a;
}

.badge-dicairkan {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
}

.badge-diverifikasi {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  gap: 0;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--gray-700);
}

.tab-btn.active {
  color: var(--primary-600);
  border-bottom-color: var(--primary-600);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ---- Timeline/Activity Log ---- */
.timeline {
  position: relative;
  padding: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding-bottom: 24px;
  position: relative;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: #fff;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-dot.status-change { border-color: var(--primary-400); color: var(--primary-600); background: var(--primary-50); }
.timeline-dot.assignment { border-color: var(--success); color: var(--success); background: #f0fdf4; }
.timeline-dot.document { border-color: var(--warning); color: var(--warning); background: #fefce8; }
.timeline-dot.create { border-color: var(--info); color: var(--info); background: var(--primary-50); }
.timeline-dot.verification { border-color: #8b5cf6; color: #8b5cf6; background: #f5f3ff; }

.timeline-content {
  flex: 1;
  padding-top: 4px;
}

.timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
}

.timeline-meta {
  font-size: 11.5px;
  color: var(--gray-500);
  margin-top: 2px;
}

.timeline-note {
  font-size: 12.5px;
  color: var(--gray-600);
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-top: 8px;
  border-left: 3px solid var(--gray-300);
}

/* ---- Alerts ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-info { background: var(--primary-50); color: var(--primary-800); border: 1px solid var(--primary-200); }
.alert-success { background: #f0fdf4; color: #14532d; border: 1px solid #bbf7d0; }
.alert-warning { background: #fefce8; color: #713f12; border: 1px solid #fde68a; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---- Progress Bar ---- */
.progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--primary-500);
  transition: width 0.5s ease;
}

/* ---- Chips/Tags ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
}

.chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
  display: flex;
  align-items: center;
  opacity: 0.7;
}

.chip-remove:hover { opacity: 1; }

/* ---- Loading ---- */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: inherit;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary-500);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 16px 0;
}

/* ---- Grid Layouts ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

/* ---- Text utilities ---- */
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--gray-500); }
.text-primary { color: var(--primary-600); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ---- Spacing utilities ---- */
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }

/* ---- Flex utilities ---- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

/* ====================================================
   ANIMATIONS
   ==================================================== */

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-pulse { animation: pulse 1.5s ease infinite; }
.animate-fade-in { animation: fadeIn 0.3s ease; }

/* ====================================================
   PAGE: LOGIN
   ==================================================== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 50%, #1e3a8a 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-bg-circles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-bg-circles span {
  position: absolute;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.08);
}

.login-bg-circles span:nth-child(1) {
  width: 400px; height: 400px;
  top: -100px; right: -100px;
}

.login-bg-circles span:nth-child(2) {
  width: 300px; height: 300px;
  bottom: -80px; left: -80px;
}

.login-bg-circles span:nth-child(3) {
  width: 200px; height: 200px;
  top: 50%; left: 10%;
  opacity: 0.5;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  padding: 40px;
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-circle {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--radius-xl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
  overflow: hidden;
}

.login-logo h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.login-logo p {
  font-size: 13px;
  color: var(--gray-500);
}

.login-form .form-group {
  margin-bottom: 16px;
}

.login-btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  margin-top: 8px;
  border-radius: var(--radius-md);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--gray-400);
}

/* ====================================================
   PAGE: DETAIL PERMOHONAN - Info Section
   ==================================================== */

.info-section {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.info-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.info-item {
  display: flex;
  flex-direction: column;
}
.info-label {
  font-size: 11.5px;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 2px;
}
.info-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-800);
}

/* ====================================================
   PAGE: DASHBOARD
   ==================================================== */

.dashboard-stats,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.chart-placeholder {
  height: 200px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 13px;
  font-style: italic;
}

/* ====================================================
   DOCUMENT UPLOAD
   ==================================================== */

.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--gray-50);
}

.upload-area:hover {
  border-color: var(--primary-400);
  background: var(--primary-50);
}

.upload-area.drag-over {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.upload-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 12px;
  color: var(--gray-400);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.file-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-50);
  color: var(--primary-600);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 11.5px;
  color: var(--gray-400);
}

/* ====================================================
   SURVEY STATUS TRACKER
   ==================================================== */

.status-tracker {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
}

.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 80px;
  position: relative;
}

.status-step::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--gray-200);
}

.status-step:last-child::before {
  display: none;
}

.status-step.done::before {
  background: var(--success);
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-300);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-400);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.status-step.done .step-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.status-step.current .step-dot {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.step-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  text-align: center;
  margin-top: 6px;
  line-height: 1.3;
}

.status-step.done .step-label,
.status-step.current .step-label {
  color: var(--gray-700);
}

/* ====================================================
   SIDEBAR ACTIVE STATES
   ==================================================== */

/* Notification badge */
.notif-count {
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  margin-left: auto;
}

/* ====================================================
   RESPONSIVE
   ==================================================== */

@media (max-width: 1200px) {
  .dashboard-stats,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop Collapsed Sidebar */
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar.collapsed .sidebar-logo {
  justify-content: center;
  padding: 16px 8px;
}

.sidebar.collapsed .sidebar-logo .logo-text,
.sidebar.collapsed .nav-item span:not(.nav-icon),
.sidebar.collapsed .nav-chevron,
.sidebar.collapsed .user-info,
.sidebar.collapsed .nav-group-label,
.sidebar.collapsed .nav-badge {
  display: none !important;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
  margin: 4px 8px;
  border-radius: var(--radius-md);
}

.sidebar.collapsed .nav-item .nav-icon {
  margin: 0;
}

.sidebar.collapsed .nav-submenu {
  max-height: none !important;
}

.sidebar.collapsed .nav-submenu .nav-item {
  padding-left: 0;
  justify-content: center;
}

.sidebar.collapsed .nav-item.active::before {
  display: none;
}

.main-content.sidebar-collapsed {
  margin-left: var(--sidebar-collapsed);
}

@media (max-width: 900px) {
  .sidebar {
    width: var(--sidebar-collapsed);
  }

  .sidebar-logo {
    justify-content: center;
    padding: 16px 8px;
  }

  .sidebar-logo .logo-text,
  .nav-item span:not(.nav-icon),
  .nav-chevron,
  .user-info,
  .nav-group-label,
  .nav-badge {
    display: none !important;
  }

  .main-content {
    margin-left: var(--sidebar-collapsed);
  }

  .nav-item {
    justify-content: center;
    padding: 12px 0;
    margin: 4px 8px;
    border-radius: var(--radius-md);
  }

  .nav-item .nav-icon {
    margin: 0;
  }

  .nav-submenu {
    max-height: none !important;
  }

  .nav-submenu .nav-item {
    padding-left: 0;
    justify-content: center;
  }

  .nav-item.active::before {
    display: none;
  }

  .filter-row {
    flex-direction: column;
  }

  .filter-group {
    min-width: 100%;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .page-content {
    padding: 16px;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

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

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

  .page-header {
    flex-direction: column;
  }

  .table-container {
    font-size: 12px;
  }
}

/* ====================================================
   AGENDA SPREADSHEET TABLE & EDITABLE NOMINAL STYLES
   ==================================================== */

.agenda-spreadsheet-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  background: #fff;
  min-width: 1300px;
}

.agenda-spreadsheet-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 8px;
  border-bottom: 2px solid #cbd5e1;
  border-right: 1px solid #e2e8f0;
  white-space: nowrap;
}

.agenda-spreadsheet-table th:last-child {
  border-right: none;
}

.agenda-spreadsheet-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
  font-size: 12.5px;
  color: #1e293b;
}

.agenda-spreadsheet-table td:last-child {
  border-right: none;
}

.agenda-spreadsheet-table tr:hover td {
  background: #f8fafc;
}

/* Editable Nominal (RP) Cell */
.rp-cell-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: relative;
}

.rp-cell-input {
  width: 100%;
  min-width: 130px;
  max-width: 150px;
  padding: 5px 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12.5px;
  font-weight: 700;
  text-align: right;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.rp-cell-input:hover {
  background: #ffffff;
  border-color: #3b82f6;
  cursor: text;
}

.rp-cell-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.rp-cell-input.rp-saving {
  background: #fefce8;
  border-color: #f59e0b;
}

.rp-cell-input.rp-saved {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

/* Keterangan (KET) Badges */
.ket-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
}

.ket-badge.ket-aprov {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.ket-badge.ket-proses {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.ket-badge.ket-cancel {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.ket-badge.ket-revisi {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  text-transform: lowercase;
}

.ket-badge.ket-draft {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.ket-badge.ket-visit {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.ket-badge.ket-selesai {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.ket-badge.ket-invoice {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.ket-badge.ket-empty {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
}

select.ket-select {
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  text-align-last: center;
  transition: all 0.15s ease;
}

select.ket-select:hover {
  filter: brightness(0.96);
}

select.ket-select:focus {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Dokumen Action Buttons */
.doc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.btn-doc-cetak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-doc-cetak:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.btn-doc-upload {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-doc-upload:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #065f46;
}

.doc-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.doc-menu-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-doc-lihat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-doc-lihat:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.btn-doc-pdf {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-doc-pdf:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

.btn-doc-excel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-doc-excel:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #047857;
}

.doc-sheet {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 24px 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
  max-width: 680px;
  margin: 0 auto;
}

.doc-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.doc-sheet-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 12px;
}

.doc-sheet-table th, .doc-sheet-table td {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
}

.doc-sheet-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  width: 32%;
}

.ket-badge.ket-belum {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.btn-doc-upload {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-doc-upload:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #047857;
}

.doc-menu-btn {
  padding: 3px 6px;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  cursor: pointer;
}

.doc-menu-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

/* ====================================================
   FINANCIAL & SLIP STYLING
   ==================================================== */

.badge-lunas { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-sebagian { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-terkirim { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-tempo { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.badge-dicairkan { background: #ecfdf5; color: #059669; border: 1px solid #6ee7b7; }
.badge-diverifikasi { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }

.slip-paper {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 28px 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-family: inherit;
  color: #0f172a;
}

.slip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.slip-logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slip-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #1e3a8a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.05em;
}

.slip-company-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.slip-company-sub {
  font-size: 11px;
  color: #475569;
  margin-top: 2px;
}

.slip-title-banner {
  text-align: center;
  margin: 14px 0 16px;
}

.slip-title-text {
  font-size: 16px;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.slip-num-text {
  font-size: 11px;
  color: #64748b;
  font-family: monospace;
  margin-top: 2px;
}

.slip-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 12px;
}

.slip-meta-row {
  display: flex;
  gap: 8px;
  line-height: 1.6;
}

.slip-meta-label {
  width: 130px;
  font-weight: 600;
  color: #475569;
  flex-shrink: 0;
}

.slip-meta-val {
  font-weight: 700;
  color: #0f172a;
}

.slip-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 18px;
}

.slip-col-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.slip-col-head {
  padding: 8px 14px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid #e2e8f0;
}

.slip-head-income {
  background: #ecfdf5;
  color: #065f46;
}

.slip-head-deduct {
  background: #fef2f2;
  color: #991b1b;
}

.slip-table-rows {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.slip-table-rows td {
  padding: 7px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.slip-table-rows tr:last-child td {
  border-bottom: none;
}

.slip-total-banner {
  background: #eff6ff;
  border: 2px solid #3b82f6;
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.slip-total-label {
  font-size: 13px;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.slip-total-terbilang {
  font-size: 11px;
  font-style: italic;
  color: #3b82f6;
  margin-top: 3px;
}

.slip-total-val {
  font-size: 20px;
  font-weight: 900;
  color: #1e3a8a;
  letter-spacing: 0.02em;
}

.slip-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px dashed #cbd5e1;
}

.slip-sig-box {
  width: 200px;
  text-align: center;
  font-size: 11.5px;
}

.slip-sig-space {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slip-stamp-digital {
  display: inline-block;
  padding: 3px 8px;
  border: 1px dashed #059669;
  background: #ecfdf5;
  color: #059669;
  font-size: 10px;
  font-weight: 800;
  border-radius: 4px;
  letter-spacing: 0.05em;
  transform: rotate(-3deg);
}

.slip-sig-name {
  font-weight: 800;
  color: #0f172a;
  border-top: 1px solid #64748b;
  padding-top: 4px;
}

/* ====================================================
   FRAMEWORK & AUDIT UPLOAD AND VIEWER
   ==================================================== */

.file-upload-zone {
  border: 2px dashed #93c5fd;
  border-radius: 8px;
  background: #f8fafc;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-upload-zone:hover {
  background: #eff6ff;
  border-color: #3b82f6;
}

.file-upload-zone.dragover {
  background: #e0f2fe;
  border-color: #0284c7;
}

.file-preview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 8px;
}

.doc-viewer-frame {
  width: 100%;
  height: 540px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
}

/* ====================================================
   PRINT
   ==================================================== */

/* NSB Maritime Workspace: shared operational interface. */
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
input, select, textarea { accent-color: var(--primary-600); }
.sidebar { background: var(--navy-900); border-right: 1px solid var(--navy-700); transition: transform .25s ease, width .25s ease; }
.sidebar-logo { padding: 24px 20px; gap: 12px; }
.sidebar-logo .logo-icon, .user-avatar { background: var(--primary-600); box-shadow: none; }
.sidebar-logo .logo-title { font-size: 16px; letter-spacing: -.02em; }
.sidebar-logo .logo-sub { color: var(--sidebar-muted); font-size: 9px; letter-spacing: .14em; margin-top: 5px; }
.sidebar-nav { padding: 8px 12px 24px; scrollbar-width: none; -ms-overflow-style: none; }
.nav-group { padding-bottom: 12px; }
.nav-group-label { color: var(--sidebar-muted); padding: 16px 12px 8px; font-size: 10px; }
.nav-item { width: 100%; padding: 11px 12px; gap: 10px; border-radius: 5px; color: var(--sidebar-text); white-space: normal; line-height: 1.35; min-height: 42px; }
.nav-item > span:not(.nav-icon):not(.nav-badge) { flex: 1; min-width: 0; }
.nav-item[hidden], .nav-group[hidden] { display: none !important; }
.nav-item .nav-icon, .nav-chevron { color: var(--sidebar-muted); }
.nav-item.active { background: var(--primary-600); color: var(--surface); }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-item.active::before { left: -12px; width: 3px; background: var(--accent); }
.nav-submenu { padding-left: 12px; }
.nav-submenu .nav-item { padding-left: 12px; }
.nav-submenu:not(.open) { visibility: hidden; }
.nav-submenu.open { max-height: 1200px; visibility: visible; }
.sidebar-footer { padding: 12px; }
.sidebar .user-role { color: var(--sidebar-muted); }
.nav-search { margin: 0 16px 8px; }
.nav-search input { width: 100%; min-height: 38px; border: 1px solid var(--navy-700); background: var(--navy-900); color: var(--surface); border-radius: 5px; padding: 8px 12px; font-size: 12px; }
.nav-search input::placeholder { color: var(--sidebar-muted); }
.nav-search-empty { color: var(--sidebar-text); padding: 12px; font-size: 12px; }
.sidebar.collapsed .nav-search { display: none; }
.sidebar.collapsed .nav-item { width: calc(100% - 16px); }
.sidebar.collapsed .nav-submenu { padding-left: 0; visibility: visible; }
.sidebar.collapsed .sidebar-nav { padding-left: 0; padding-right: 0; }
.topbar { box-shadow: none; background: var(--surface); height: 68px; padding: 0 32px; gap: 12px; }
.topbar-btn { min-width: 40px; min-height: 40px; }
.sidebar-menu-toggle { flex-shrink: 0; }
.sidebar-backdrop { display: none; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 1000; padding: 12px 20px; background: var(--primary-600); color: var(--surface); border-radius: 4px; }
.skip-link:focus { top: 12px; }
.page-content { padding: 32px; }
.page-header { margin-bottom: 28px; align-items: center; }
.page-title { font-family: var(--font-display); font-weight: 600; font-size: 36px; letter-spacing: -.015em; }
.page-subtitle { font-size: 14px; line-height: 1.6; margin-top: 6px; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--primary-500); margin-bottom: 8px; }
.card { background: var(--surface); border-radius: 8px; box-shadow: none; }
.card-header { padding: 20px 22px; border-bottom-color: var(--gray-200); }
.card-title { font-size: 16px; font-weight: 600; }
.card-subtitle { font-size: 12px; line-height: 1.5; }
.btn { min-height: 38px; border-radius: 5px; padding: 10px 16px; transition: background-color .16s, border-color .16s, color .16s; }
.btn-sm { min-height: 32px; }
.btn-primary { box-shadow: none; }
.form-control { min-height: 42px; border-radius: 5px; border-color: var(--gray-300); }
.form-control:focus { border-color: var(--primary-500); box-shadow: 0 0 0 3px var(--primary-100); }
.form-label { font-weight: 600; }
.table-container, .table-responsive { overscroll-behavior-x: contain; scrollbar-width: thin; }
.table-container:focus-visible, .table-responsive:focus-visible { outline-offset: -3px; }
table th { background: var(--gray-50); color: var(--gray-500); }
table td { padding-top: 14px; padding-bottom: 14px; }
table tbody tr:hover { background: var(--primary-50); }
.tabs { overflow-x: auto; flex-wrap: nowrap; }
.tab-btn { flex-shrink: 0; min-height: 44px; }
.filter-row { gap: 12px; }
.modal-header { background: var(--gray-50); }
.modal-title { font-family: var(--font-display); font-size: 25px; }
.modal-close { min-width: 40px; min-height: 40px; }
.workbench { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); border: 1px solid var(--gray-200); border-radius: 8px; background: var(--surface); margin-bottom: 32px; overflow: hidden; }
.workbench-intro { background: var(--primary-600); color: var(--surface); padding: 26px; }
.workbench-intro .eyebrow { color: var(--primary-200); }
.workbench-intro h2 { font-family: var(--font-display); font-size: 29px; font-weight: 500; line-height: 1.1; margin: 10px 0; }
.workbench-intro p { font-size: 12px; color: var(--primary-200); max-width: 210px; }
.workbench-link { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 26px 22px; border-left: 1px solid var(--gray-200); transition: background-color .16s; }
.workbench-link:hover { background: var(--primary-50); }
.workbench-number { color: var(--primary-500); font-size: 10px; letter-spacing: .1em; font-weight: 700; }
.workbench-link strong { display: flex; justify-content: space-between; gap: 8px; font-size: 16px; font-weight: 600; color: var(--primary-600); }
.workbench-link > span:last-child { color: var(--gray-500); font-size: 13px; line-height: 1.6; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2 { font-size: 17px; font-weight: 600; }
.section-heading > span { color: var(--gray-500); font-size: 12px; }
.dashboard-stats { gap: 12px; }
.dashboard-stats .stat-card { padding: 18px; box-shadow: none; border-radius: 6px; gap: 12px; }
.dashboard-stats .stat-card:hover { transform: none; border-color: var(--primary-400); background: var(--primary-50); box-shadow: none; }
.dashboard-stats .stat-icon { width: 32px; height: 32px; border-radius: 5px; }
.dashboard-stats .stat-icon.blue, .dashboard-stats .stat-icon.purple, .dashboard-stats .stat-icon.cyan { background: var(--primary-50); color: var(--primary-500); }
.dashboard-stats .stat-label { text-transform: none; letter-spacing: 0; font-size: 12px; }
.dashboard-stats .stat-value { font-family: var(--font-display); font-size: 36px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dashboard-stats .stat-change { font-size: 11px; font-weight: 400; }
.dashboard-primary-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.dashboard-page .grid-2 > .card { min-width: 0; }
.dashboard-status-row { display: block; padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.dashboard-status-row:last-child { border-bottom: 0; }
.dashboard-status-row:hover { background: var(--primary-50); }
.dashboard-production { margin-bottom: 20px; }
.production-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.production-metrics > div { padding: 22px; border-right: 1px solid var(--gray-200); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.production-metrics > div:last-child { border-right: 0; }
.production-metrics span { font-size: 13px; color: var(--gray-600); }
.production-metrics strong { font-family: var(--font-display); font-size: 34px; line-height: 1.2; font-weight: 600; color: var(--primary-600); font-variant-numeric: tabular-nums; }
.production-metrics small { font-size: 11px; color: var(--gray-500); }
.dashboard-task { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--gray-200); }
.dashboard-task:first-child { padding-top: 0; }
.dashboard-task:last-child { border-bottom: 0; padding-bottom: 0; }
.dashboard-task:hover { color: var(--primary-600); }
.dashboard-task-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dashboard-task-copy strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.dashboard-task-copy > span { color: var(--gray-500); font-size: 12px; overflow-wrap: anywhere; }
.dashboard-task > .badge { flex-shrink: 0; }
.dashboard-date { display: flex; flex-direction: column; gap: 4px; width: 100px; flex-shrink: 0; }
.dashboard-date strong { color: var(--primary-600); font-size: 12px; }
.dashboard-date span { font-size: 11px; color: var(--gray-500); }
.dashboard-empty { padding: 24px 8px; font-size: 13px; line-height: 1.7; color: var(--gray-500); }
.dashboard-resources { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.dashboard-resources a { display: flex; align-items: center; gap: 10px; padding: 16px; border: 1px solid var(--gray-200); background: var(--surface); border-radius: 6px; font-size: 13px; }
.dashboard-resources a:hover { border-color: var(--primary-400); }
.dashboard-resources a > span:last-child { margin-left: auto; color: var(--primary-500); }
.dashboard-resources strong { font-variant-numeric: tabular-nums; color: var(--primary-600); }
@media (max-width: 1100px) {
  .production-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .production-metrics > div { border-bottom: 1px solid var(--gray-200); }
  .dashboard-resources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .production-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-metrics > div { padding: 16px; }
  .production-metrics > div:nth-child(even) { border-right: 0; }
  .dashboard-action-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-task { flex-wrap: wrap; gap: 10px; }
  .dashboard-task > .badge { font-size: 10px; }
  .dashboard-date { width: 80px; }
  .dashboard-resources { grid-template-columns: minmax(0, 1fr); }
}
#loginBody .login-page { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); padding: 0; background: var(--surface); align-items: stretch; }
.login-story { background: var(--primary-600); color: var(--surface); padding: 48px 56px 28px; display: flex; flex-direction: column; justify-content: space-between; position: relative; min-height: 0; overflow: hidden; }
.story-brand { display: flex; align-items: center; font-weight: 700; font-size: 40px; letter-spacing: -.06em; }
.story-brand > span { color: var(--accent); }
.story-brand small { font-size: 9px; line-height: 1.6; font-weight: 500; letter-spacing: .13em; margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--primary-400); }
.story-copy { margin-top: 56px; position: relative; z-index: 1; }
.story-copy .eyebrow { color: var(--primary-200); }
.story-copy h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(46px, 5vw, 76px); line-height: 1.02; letter-spacing: -.015em; margin: 20px 0; }
.story-copy > p:last-child { font-size: 16px; line-height: 1.8; color: var(--primary-200); max-width: 350px; }
.vessel-drawing { width: 110%; max-width: none; margin: 30px -5% 24px; color: var(--primary-300); }
.story-footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--primary-500); padding-top: 20px; color: var(--primary-200); font-size: 10px; }
#loginBody .login-card { width: calc(100% - 96px); max-width: 420px; margin: 48px auto; align-self: center; padding: 0; border: 0 !important; box-shadow: none !important; border-radius: 0; backdrop-filter: none; }
#loginBody .login-card.card-glass, #loginBody .login-card.card-solid { background: var(--surface) !important; }
#loginBody .login-card.card-dark { padding: 28px; border-radius: 8px; }
.login-logo { text-align: left; display: grid; grid-template-columns: 42px 1fr; column-gap: 12px; margin-bottom: 32px; }
.login-logo .logo-circle { grid-row: span 2; width: 42px; height: 42px; border-radius: 6px; margin: 0; background: var(--primary-600); box-shadow: none; }
.login-logo h1 { font-size: 17px; align-self: end; margin: 0; }
.login-logo p { font-size: 11px; }
.login-heading { margin-bottom: 28px; }
.login-heading h2 { font-family: var(--font-display); font-size: 34px; line-height: 1.15; font-weight: 600; margin-bottom: 10px; }
.login-heading > p:last-child { font-size: 14px; color: var(--gray-500); line-height: 1.6; }
.login-form .form-group { margin-bottom: 20px; }
.login-form .form-control { min-height: 48px; }
.login-btn { min-height: 48px; margin-top: 4px; }
.password-toggle { border: 0; background: transparent; cursor: pointer; width: 44px; height: 44px; display: inline-flex; justify-content: center; align-items: center; }
.login-form #password { padding-right: 48px; }
.login-footer { text-align: left; color: var(--gray-500); border-top: 1px solid var(--gray-200); padding-top: 20px; }
.card-dark .login-heading > p:last-child { color: var(--sidebar-text); }
/* Keep the desktop composition within one viewport, while short screens can scroll. */
#loginBody .login-page { min-height: 100dvh; }
#loginBody .login-story { min-width: 0; }
#loginBody .vessel-drawing { flex: 1 1 0; min-height: 0; width: 100%; max-height: 36vh; margin: 20px 0; }
#loginBody .story-brand, #loginBody .story-footer { flex-shrink: 0; position: relative; z-index: 1; }
.login-story.has-photo {
  background-image: linear-gradient(180deg, rgba(9, 19, 54, .72), rgba(9, 19, 54, .48)), var(--login-photo);
  background-size: cover;
  background-position: center;
}
#loginBody .login-story.has-photo .vessel-drawing { visibility: hidden; }
#loginBody .login-story.has-photo .story-copy p, #loginBody .login-story.has-photo .story-footer { color: var(--surface); }
@media (min-width: 641px) {
  #loginBody .login-card { margin-top: clamp(20px, 4vh, 40px); margin-bottom: clamp(20px, 4vh, 40px); }
  #loginBody .login-story { padding: clamp(24px, 4vh, 48px) clamp(28px, 4vw, 56px) 24px; }
  #loginBody .story-copy { margin-top: clamp(24px, 5vh, 56px); }
}
@media (min-width: 641px) and (max-height: 1000px) {
  #loginBody .login-heading h2 { font-size: 30px; margin-bottom: 6px; }
  #loginBody .login-heading > p:last-child { font-size: 12px; }
  #loginBody .login-footer { font-size: 10px; }
  #loginBody .login-logo { margin-bottom: 18px; }
  #loginBody .login-heading { margin-bottom: 16px; }
  #loginBody .login-form .form-group { margin-bottom: 14px; }
  #loginBody .login-form .form-control, #loginBody .login-btn { min-height: 44px; }
  #loginBody .login-footer { margin-top: 16px; padding-top: 12px; }
  #loginBody .story-copy h2 { font-size: clamp(42px, 7vh, 66px); }
}
@media (min-width: 641px) and (max-height: 800px) {
  #loginBody .login-card { margin-top: 8px; margin-bottom: 8px; }
  #loginBody .login-logo { margin-bottom: 10px; }
  #loginBody .login-heading { margin-bottom: 10px; }
  #loginBody .login-heading h2 { font-size: 26px; }
  #loginBody .login-form .form-group { margin-bottom: 10px; }
  #loginBody .login-footer { margin-top: 10px; padding-top: 8px; }
  #loginBody .login-form .form-control, #loginBody .login-btn { min-height: 40px; }
}
.login-settings-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 24px; align-items: start; }
.login-photo-preview { display: block; width: 100%; max-height: 190px; object-fit: cover; border-radius: var(--radius); margin: 12px 0; }
.login-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.login-photo-help { font-size: 12px; line-height: 1.6; color: var(--gray-500); margin-top: 8px; }
.login-photo-preview[hidden] { display: none; }
.preview-box.preview-login-split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); padding: 0; align-items: stretch; background: var(--surface); }
.preview-login-visual { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: 24px 16px; color: var(--surface); background-size: cover; background-position: center; }
.preview-login-visual > strong { font-size: 26px; }
.preview-login-visual span { font-size: 8px; letter-spacing: .08em; }
.preview-login-visual h3 { font-family: var(--font-display); font-size: 24px; line-height: 1.2; margin: 12px 0; color: inherit; }
.preview-login-split .preview-card { min-width: 0; padding: 24px 12px; border-radius: 0; box-shadow: none; }
@media (max-width: 900px) { .login-settings-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1200px) {
  .page-content { padding: 24px; }
  .workbench { grid-template-columns: repeat(3, 1fr); }
  .workbench-intro { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; padding: 20px 24px; }
  .workbench-intro h2 { margin: 0; font-size: 25px; }
  .workbench-intro h2 br { display: none; }
  .workbench-intro p { max-width: none; margin-left: auto; }
  .workbench-intro .eyebrow { margin-bottom: 0; }
  .login-story { padding: 36px; }
}
@media (max-width: 900px) {
  .sidebar, .sidebar.collapsed { width: var(--sidebar-width); transform: translateX(-100%); visibility: hidden; }
  .sidebar.mobile-open { transform: translateX(0); visibility: visible; z-index: 160; }
  .sidebar.mobile-open .sidebar-logo { justify-content: flex-start; padding: 24px 20px; }
  .sidebar.mobile-open .logo-text, .sidebar.mobile-open .user-info { display: flex !important; }
  .sidebar.mobile-open .user-info { flex-direction: column; }
  .sidebar.mobile-open .nav-item span:not(.nav-icon), .sidebar.mobile-open .nav-chevron, .sidebar.mobile-open .nav-group-label { display: block !important; }
  .sidebar.mobile-open .nav-badge { display: inline-block !important; }
  .sidebar.mobile-open .nav-item { justify-content: flex-start; margin: 0; padding: 11px 12px; width: 100%; }
  .sidebar.mobile-open .nav-submenu { max-height: 0 !important; visibility: hidden; }
  .sidebar.mobile-open .nav-submenu.open { max-height: 1200px !important; visibility: visible; }
  .sidebar.mobile-open .nav-search { display: block; }
  .main-content, .main-content.sidebar-collapsed { margin-left: 0; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; z-index: 150; background: var(--backdrop); border: 0; }
  body.nav-open { overflow: hidden; }
  .topbar { padding: 0 20px; }
  .dashboard-primary-grid { grid-template-columns: minmax(0, 1fr); }
  #loginBody .login-page { grid-template-columns: .85fr 1fr; }
  .login-story { padding: 28px; }
  .story-copy h2 { font-size: 48px; }
  #loginBody .login-card { width: calc(100% - 48px); }
  .story-footer { flex-direction: column; gap: 6px; }
}
@media (max-width: 640px) {
  .page-content { padding: 20px 16px; }
  .topbar { height: 60px; gap: 8px; padding: 0 12px; }
  .topbar-breadcrumb { font-size: 12px; min-width: 0; overflow: hidden; white-space: nowrap; }
  .topbar-actions { gap: 4px; }
  #serverStatusBadge { display: none !important; }
  .topbar-actions > div:has(#currentDate) { display: none; }
  .page-header { align-items: stretch; gap: 16px; }
  .page-title { font-size: 32px; }
  .page-header-actions { flex-wrap: wrap; }
  .page-header-actions .btn { flex: 1; }
  .workbench { grid-template-columns: 1fr; margin-bottom: 24px; }
  .workbench-intro { display: block; }
  .workbench-intro h2 { margin: 10px 0; }
  .workbench-link { padding: 18px 22px; border-left: 0; border-top: 1px solid var(--gray-200); gap: 8px; }
  .workbench-link > span:last-child { display: none; }
  .section-heading { align-items: flex-start; }
  .section-heading > span { text-align: right; }
  .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dashboard-stats .stat-card { padding: 14px; gap: 8px; }
  .dashboard-stats .stat-icon { display: none; }
  .dashboard-stats .stat-label { min-height: 32px; }
  .dashboard-stats .stat-value { font-size: 32px; }
  .card-header { padding: 16px; flex-wrap: wrap; }
  .card-body { padding: 16px; }
  .modal-footer { flex-wrap: wrap; }
  .modal-footer .btn { flex: 1; }
  #loginBody .login-page { display: block; }
  .login-story { min-height: 0; padding: 24px; }
  .story-brand { font-size: 30px; }
  .story-copy { margin-top: 28px; }
  .story-copy h2 { font-size: 40px; margin: 12px 0; }
  .story-copy h2 br { display: none; }
  .story-copy > p:last-child { font-size: 13px; max-width: 100%; }
  .vessel-drawing, .story-footer { display: none; }
  #loginBody .login-card { width: calc(100% - 48px); margin: 32px auto; }
  .login-logo { margin-bottom: 24px; }
  .login-heading h2 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .workbench, .section-heading, .skip-link, .sidebar-backdrop, .nav-search { display: none !important; }
  @page {
    size: A4 portrait;
    margin: 8mm 12mm 8mm 12mm;
  }

  /* Sembunyikan navigasi, sidebar, toolbar, header modal, tombol, dan overlay */
  .sidebar,
  .topbar,
  .page-header,
  .stats-grid,
  .filter-panel,
  .table-wrapper,
  .pagination,
  .modal-header,
  .modal-close,
  .modal-footer,
  .btn,
  button,
  .toast,
  .notif-dot,
  .no-print,
  .no-print *,
  .modal-overlay:not(.open):not(.active) {
    display: none !important;
  }

  html, body {
    background: #ffffff !important;
    color: #0f172a !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    font-size: 11pt !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .app-container,
  .main-content,
  .page-content {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  .app-wrapper {
    min-height: 0 !important;
    height: auto !important;
  }

  /* Sembunyikan app-wrapper jika modal aktif sedang dicetak agar tidak membuat halaman kosong di awal */
  body:has(.modal-overlay.open) .app-wrapper,
  body:has(.modal-overlay.active) .app-wrapper {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Tampilkan modal yang sedang aktif/terbuka secara penuh dan normal */
  .modal-overlay.open,
  .modal-overlay.active {
    position: static !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    overflow: visible !important;
    backdrop-filter: none !important;
    inset: auto !important;
  }

  .modal-overlay.open .modal,
  .modal-overlay.open .modal-container,
  .modal-overlay.active .modal,
  .modal-overlay.active .modal-container {
    position: static !important;
    display: block !important;
    background: #ffffff !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .modal-body {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    display: block !important;
  }

  .slip-paper {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
  }

  .table-responsive {
    overflow: visible !important;
  }

  table {
    width: 100% !important;
    page-break-inside: auto !important;
  }

  tr {
    page-break-inside: avoid !important;
  }
}
