/* ==========================================================================
   ARKAS BOSP - Modern Professional Web UI Stylesheet
   Built with Bootstrap 5 + Custom Design Tokens
   ========================================================================== */

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #334155;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --table-border: #e2e8f0;
  --table-header-bg: #f8fafc;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f1f5f9;
  color: #1e293b;
  min-height: 100vh;
}

/* Sidebar Styling */
.app-sidebar {
  width: 260px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--sidebar-bg);
  color: #94a3b8;
  transition: all 0.25s ease-in-out;
  z-index: 1000;
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-menu {
  padding: 1rem 0;
  overflow-y: auto;
}

.sidebar-menu::-webkit-scrollbar {
  width: 5px;
}

.sidebar-menu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sidebar-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.075rem;
  padding: 0.75rem 1.5rem 0.25rem;
  color: #64748b;
  font-weight: 600;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.5rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  color: #ffffff;
  background-color: var(--sidebar-hover);
  border-left: 3px solid var(--primary-color);
}

.sidebar-link.active {
  color: #ffffff;
  background-color: var(--sidebar-active);
  border-left: 3px solid var(--primary-color);
  font-weight: 600;
}

/* Header Navbar */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1.5rem;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.content-body {
  padding: 1.5rem;
  flex: 1;
}

/* Card Styling */
.card-custom {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-custom:hover {
  box-shadow: var(--card-shadow-hover);
}

.stat-card {
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: var(--card-shadow);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Grid Matrix Dinas Dumai Styling */
.table-matrix-wrapper {
  overflow-x: auto;
  position: relative;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #ffffff;
}

.table-matrix {
  font-size: 0.78rem;
  white-space: nowrap;
  margin-bottom: 0;
}

.table-matrix th {
  text-align: center;
  vertical-align: middle;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 0.4rem 0.6rem;
  font-weight: 600;
}

.table-matrix td {
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.55rem;
  vertical-align: middle;
}

.table-matrix .col-uraian {
  width: 260px !important;
  min-width: 220px !important;
  max-width: 280px !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  line-height: 1.35 !important;
}

/* Sticky first column */
.sticky-col {
  position: sticky;
  left: 0;
  background-color: #ffffff;
  z-index: 10;
}
th.sticky-col {
  z-index: 20;
  background-color: #f1f5f9;
}

/* Dinas dumai highlight colors */
.bg-dinas-green {
  background-color: #dcfce7 !important;
  color: #166534 !important;
  font-weight: 600;
}

.bg-dinas-orange {
  background-color: #ffedd5 !important;
  color: #9a3412 !important;
  font-weight: 700;
}

.bg-dinas-balance-ok {
  background-color: #d1fae5 !important;
  color: #065f46 !important;
}

.bg-dinas-balance-err {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  font-weight: bold;
}

/* Purple custom badge */
.bg-purple-subtle {
  background-color: #f3e8ff !important;
}
.text-purple {
  color: #7e22ce !important;
}
.border-purple-subtle {
  border-color: #e9d5ff !important;
}

/* Buttons */
.btn-primary-custom {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  font-weight: 500;
}

.btn-primary-custom:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}
