/* ============================================================
   SISTEM PERAMALAN LPG — Professional UI Design System
   SPPBE PT Polly Jasa Persada Indramayu
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Design Tokens ---- */
:root {
  --primary: #064893;         /* PollyCast Corporate Blue */
  --primary-light: #0b66c3;   /* Brighter Blue for hover states */
  --primary-dark: #022247;    /* Darker Blue for active states/headers */
  --accent: #dc2626;          /* PollyCast Vibrant Red */
  --success: #10b981;         /* Premium green */
  --danger: #e31b23;          /* Vibrant Red for warnings/criticals */
  --warning: #f59e0b;         /* Modern Amber */
  --info: #3b82f6;            /* Premium Blue */

  --sidebar-bg: #ffffff;      /* Clean White Sidebar for Light Theme */
  --sidebar-w: 260px;
  --sidebar-text: #475569;    /* Slate 600 */
  --sidebar-hover: #f1f5f9;   /* Slate 100 */
  --sidebar-active-bg: rgba(27, 42, 140, 0.07); /* Light blue tint matching corporate blue */
  --sidebar-active-text: #1b2a8c;
  --sidebar-border: #e2e8f0;  /* Slate 200 */

  --bg-page: #f8fafc;         /* Slate 50 clean background */
  --bg-card: #ffffff;
  --border-card: #e2e8f0;     /* Slate 200 border */
  --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 8px 30px rgba(15, 23, 42, 0.08);
  --radius-card: 14px;
  --radius-btn: 50px;

  --text-primary: #0f172a;    /* Slate 900 */
  --text-secondary: #475569;  /* Slate 600 */
  --text-muted: #94a3b8;      /* Slate 400 */

  --navbar-h: 60px;
  --transition: all 0.22s ease-in-out;
}

/* ---- Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Prevent scrollbar on login page */
body.login-bg {
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.app-navbar {
  background: #ffffff !important;
  height: 70px;
  padding: 0 2rem;
  box-shadow: none !important;
  border-bottom: 1px solid var(--border-card);
  position: sticky;
  top: 0;
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.navbar-breadcrumbs .breadcrumb-separator {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.navbar-breadcrumbs .breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 600;
}

.navbar-toggle {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: var(--text-primary) !important;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-only {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.15rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon-only:hover {
  background-color: #f1f5f9;
  color: var(--primary);
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.avatar-circle-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--primary-light);
  cursor: pointer;
}

.dropdown-menu {
  border-radius: 10px;
  border: 1px solid var(--border-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 0.4rem;
  font-size: 0.85rem;
}

.dropdown-item {
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: #eef4fb;
  color: var(--primary);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
/* ============================================================
   LAYOUT SHELL (Orbit style)
   ============================================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  transition: margin-left 0.3s ease;
  background-color: var(--bg-page);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  background: var(--sidebar-bg);
  width: var(--sidebar-w);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 1020;
  display: flex;
  flex-direction: column;
  padding: 0 0.75rem 1rem;
  border-right: 1px solid var(--sidebar-border);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.08) transparent;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand .brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.sidebar-brand .brand-logo:hover {
  transform: scale(1.03);
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.85rem 0.5rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--sidebar-border);
  line-height: 1.4;
  font-weight: 500;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem 0.25rem;
  margin-top: 0.5rem;
}

.sidebar .nav-link {
  color: var(--sidebar-text);
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 3px;
  transition: var(--transition);
  position: relative;
}

.sidebar .nav-link i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar .nav-link:hover {
  background-color: var(--sidebar-hover);
  color: var(--primary);
}

.sidebar .nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
}

.sidebar .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 50%;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

/* User profile widget at bottom of sidebar */
.sidebar-user-profile {
  margin-top: auto;
  padding: 0.75rem;
  border-radius: 12px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.sidebar-user-profile .avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.sidebar-user-profile .user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex-grow: 1;
}

.sidebar-user-profile .user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-profile .user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-profile .logout-btn {
  color: var(--text-secondary);
  font-size: 1.05rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.sidebar-user-profile .logout-btn:hover {
  color: var(--danger);
  transform: translateX(2px);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  padding: 2rem;
  min-height: calc(100vh - 70px);
  flex-grow: 1;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e8edf2;
}

.page-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-header h1 .page-icon {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.breadcrumb-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  margin-bottom: 1.25rem;
  transition: var(--transition);
}

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

.card-header {
  background: transparent;
  border-bottom: 1px solid #f0f3f7;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-card) var(--radius-card) 0 0 !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header i {
  color: var(--primary);
}

.card-body {
  padding: 1.25rem;
}

/* Stat Cards */
.stat-card {
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: none;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: default;
}

.stat-card::after {
  content: '';
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-card .stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.85;
  margin-bottom: 0.2rem;
}

.stat-card .stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-card-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
}

.stat-card-success {
  background: linear-gradient(135deg, #16a085 0%, #1abc9c 100%);
  color: #fff;
}

.stat-card-danger {
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
  color: #fff;
}

.stat-card-warning {
  background: linear-gradient(135deg, #d35400 0%, #f39c12 100%);
  color: #fff;
}

.stat-card-info {
  background: linear-gradient(135deg, #2471a3 0%, #3498db 100%);
  color: #fff;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-weight: 500;
  font-size: 0.84rem;
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(26, 82, 118, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  box-shadow: 0 6px 18px rgba(26, 82, 118, 0.45);
  transform: translateY(-1px);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(231, 76, 60, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #16a085 0%, #27ae60 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(39, 174, 96, 0.4);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
}

.btn-lg {
  padding: 0.65rem 1.75rem;
  font-size: 0.95rem;
  border-radius: 10px;
}

/* ============================================================
   TABLES
   ============================================================ */
.table {
  font-size: 0.84rem;
}

.table thead th {
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: #f8fafc;
  border-bottom: 2px solid #e8edf2;
  white-space: nowrap;
  padding: 0.85rem 1rem;
}

.table tbody tr {
  transition: background-color 0.15s;
}

.table tbody tr:hover {
  background-color: #f4f8fb;
}

.table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-color: #f0f3f7;
  color: var(--text-primary);
}

.table-dark thead th {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  border: none;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.35em 0.7em;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

/* ============================================================
   NAV TABS (inside cards)
   ============================================================ */
.nav-tabs {
  border-bottom: 2px solid #e8edf2;
  gap: 0.25rem;
}

.nav-tabs .nav-link {
  border: none;
  border-radius: 8px 8px 0 0;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.84rem;
  padding: 0.6rem 1.1rem;
  transition: var(--transition);
  margin-bottom: -2px;
}

.nav-tabs .nav-link:hover {
  color: var(--primary);
  background-color: #f4f8fb;
}

.nav-tabs .nav-link.active {
  color: var(--primary);
  font-weight: 600;
  background: transparent;
  border-bottom: 3px solid var(--primary);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  border: none;
  border-radius: 12px;
  font-size: 0.87rem;
  padding: 1rem 1.25rem;
}

.alert-success {
  background: linear-gradient(135deg, #e8f8f5 0%, #d1f2eb 100%);
  color: #1a6648;
  border-left: 4px solid var(--success);
}

.alert-info {
  background: linear-gradient(135deg, #eaf4fb 0%, #d6eaf8 100%);
  color: #1a4f72;
  border-left: 4px solid var(--info);
}

.alert-warning {
  background: linear-gradient(135deg, #fef9e7 0%, #fef3cd 100%);
  color: #7d6608;
  border-left: 4px solid var(--warning);
}

.alert-danger {
  background: linear-gradient(135deg, #fdedec 0%, #fadbd8 100%);
  color: #922b21;
  border-left: 4px solid var(--danger);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control,
.form-select {
  border: 1.5px solid #d8e2eb;
  border-radius: 9px;
  font-size: 0.87rem;
  padding: 0.6rem 0.9rem;
  transition: var(--transition);
  background: #fafcfe;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.12);
  background: #fff;
}

.form-floating>label {
  font-size: 0.87rem;
  color: var(--text-muted);
}

/* ============================================================
   SPINNER / LOADING
   ============================================================ */
.spinner-border {
  border-width: 3px;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress {
  border-radius: 50px;
  background: #e8edf2;
  height: 8px;
}

.progress-bar {
  border-radius: 50px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* ============================================================
   LOGIN PAGE (PollyCast 2-Column Split Design)
   ============================================================ */
.login-bg {
  background: linear-gradient(135deg, #f3f6fa 0%, #e2eaf4 100%);
  height: 100vh;
  height: 100dvh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.login-wrapper {
  width: 100%;
  max-width: 640px;
  padding: 1.25rem;
  z-index: 2;
}

.login-bg::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 72, 147, 0.12) 0%, rgba(6, 72, 147, 0) 70%);
  filter: blur(80px);
  pointer-events: none;
}

.login-bg::after {
  content: '';
  position: absolute;
  bottom: -15%;
  right: -5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.08) 0%, rgba(220, 38, 38, 0) 70%);
  filter: blur(80px);
  pointer-events: none;
}

.login-split-card {
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  width: 100%;
}

.login-form-side {
  flex: 1.2;
  padding: 2.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-brand-side {
  flex: 0.8;
  background: linear-gradient(135deg, #064893 0%, #032b5c 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.75rem 1.75rem;
  color: #ffffff;
  text-align: center;
}

/* Accent glowing effects inside the branding panel */
.brand-glow-1 {
  position: absolute;
  top: -15%;
  right: -15%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 192, 45, 0.15) 0%, rgba(251, 192, 45, 0) 75%);
  filter: blur(35px);
  pointer-events: none;
}

.brand-glow-2 {
  position: absolute;
  bottom: -15%;
  left: -15%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.15) 0%, rgba(220, 38, 38, 0) 75%);
  filter: blur(35px);
  pointer-events: none;
}

.login-brand-logo-container {
  background: #ffffff;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.10);
  margin-bottom: 1rem;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-brand-logo-container:hover {
  transform: translateY(-3px) scale(1.02);
}

.login-brand-logo-container img {
  max-width: 130px;
  height: auto;
  object-fit: contain;
}

.login-brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  z-index: 2;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.login-brand-subtitle {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.85;
  z-index: 2;
  max-width: 240px;
  margin: 0 auto;
  line-height: 1.55;
  color: #e2e8f0;
}

/* Responsiveness for mobile stack */
@media (max-width: 767.98px) {
  .login-split-card {
    flex-direction: column;
    min-height: auto;
  }
  .login-brand-side {
    order: 1; /* Brand on top */
    padding: 2.5rem 1.5rem;
  }
  .login-form-side {
    order: 2; /* Form on bottom */
    padding: 2.5rem 1.5rem;
  }
  .login-brand-logo-container {
    margin-bottom: 1.25rem;
    padding: 1rem;
  }
  .login-brand-logo-container img {
    max-width: 140px;
  }
}

/* ---- Login form inputs ---- */
.login-form-side .form-control {
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  border: 1.5px solid #d8e2eb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form-side .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(6, 72, 147, 0.12);
}

.login-form-side .input-group .btn-outline-secondary {
  border-radius: 0 10px 10px 0 !important;
}

/* ============================================================
   FORECAST ACTION CARD
   ============================================================ */
.run-panel-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eaf4fb, #d6eaf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--primary);
  margin: 0 auto 1rem;
  animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(41, 128, 185, 0.3);
  }

  50% {
    box-shadow: 0 0 0 15px rgba(41, 128, 185, 0);
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
    transition: transform 0.3s ease;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-primary {
  color: var(--primary) !important;
}

.fw-700 {
  font-weight: 700;
}

.fs-11 {
  font-size: 0.72rem;
}

.fs-12 {
  font-size: 0.78rem;
}

.fs-13 {
  font-size: 0.82rem;
}

.rounded-14 {
  border-radius: 14px;
}

/* Metric Badge */
.metric-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #f4f8fb;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  min-width: 90px;
}

.metric-badge .metric-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.metric-badge .metric-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

/* Model badge highlights */
.model-best-badge {
  background: linear-gradient(135deg, var(--success), #27ae60);
  color: #fff;
  border-radius: 50px;
  padding: 0.25rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ============================================================
   CHART CONTAINERS
   ============================================================ */
.chart-wrapper {
  position: relative;
  padding: 0.5rem 0;
}

/* ============================================================
   STAT CARD REDESIGN (Orbit style)
   ============================================================ */
.stat-card-modern {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.02), 0 2px 4px -1px rgba(15, 23, 42, 0.02);
}

.stat-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
}

.stat-card-modern .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  z-index: 2;
}

.stat-card-modern .icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-card-modern .icon-box-primary {
  background-color: rgba(27, 42, 140, 0.08);
  color: var(--primary);
}

.stat-card-modern .icon-box-success {
  background-color: rgba(16, 185, 129, 0.08);
  color: var(--success);
}

.stat-card-modern .icon-box-danger {
  background-color: rgba(227, 27, 35, 0.08);
  color: var(--accent);
}

.stat-card-modern .icon-box-info {
  background-color: rgba(59, 130, 246, 0.08);
  color: var(--info);
}

.stat-card-modern .icon-box-warning {
  background-color: rgba(245, 158, 11, 0.08);
  color: #d97706;
}

.stat-card-modern .badge-trend {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.stat-card-modern .badge-trend-up {
  background-color: #ecfdf5;
  color: #047857;
}

.stat-card-modern .badge-trend-neutral {
  background-color: #f8fafc;
  color: #475569;
}

.stat-card-modern .card-label {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
  z-index: 2;
}

.stat-card-modern .card-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  z-index: 2;
}

.stat-card-modern .card-subtext {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  margin-bottom: 1rem;
  z-index: 2;
}

.stat-card-modern .decor-chart {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  pointer-events: none;
  width: 100%;
  z-index: 1;
}

/* ============================================================
   SIDEBAR OVERLAY (Mobile)
   ============================================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1015;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
}

/* ============================================================
   PAGE HEADER (modern greeter)
   ============================================================ */
.page-greeter {
  margin-bottom: 1.75rem;
}

.page-greeter .page-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.1rem;
}

.page-greeter .page-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ============================================================
   RESPONSIVE — MOBILE / TABLET
   ============================================================ */

/* Tablet (≤ 991px) */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1020;
    box-shadow: none;
  }

  .sidebar.show {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
  }

  .content-wrapper {
    margin-left: 0 !important;
  }

  .app-navbar {
    padding: 0 1.25rem;
  }

  .main-content {
    padding: 1.25rem;
  }
}

/* Mobile (≤ 575px) */
@media (max-width: 575.98px) {
  .sidebar {
    width: 100%;
    max-width: 280px;
  }

  .main-content {
    padding: 1rem;
  }

  .stat-card-modern .card-value {
    font-size: 1.25rem;
  }

  .navbar-breadcrumbs {
    display: none;
  }
}

/* Desktop (≥ 992px) — ensure toggle button is hidden */
@media (min-width: 992px) {
  .sidebar {
    transform: translateX(0) !important;
  }

  .navbar-toggle {
    display: none !important;
  }
}

/* Modern Table Pagination Styles (Orbit style) */
.pagination-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.pagination-link:hover:not(.disabled) {
  background-color: #f1f5f9;
  color: var(--primary);
  border-color: #e2e8f0;
}

.pagination-link.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.5;
}

/* ============================================================
   RUN PANEL ICON — Peramalan page pulsing CPU icon
   ============================================================ */
.run-panel-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(27,42,140,0.08) 0%, rgba(27,42,140,0.16) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  animation: runIconPulse 2.4s ease-in-out infinite;
}

.run-panel-icon i {
  font-size: 2.5rem;
  color: var(--primary);
}

@keyframes runIconPulse {
  0%   { box-shadow: 0 0 0 0 rgba(27,42,140, 0.18); }
  50%  { box-shadow: 0 0 0 14px rgba(27,42,140, 0); }
  100% { box-shadow: 0 0 0 0 rgba(27,42,140, 0); }
}

/* ============================================================
   CHART CONTAINER — uniform wrapper polish
   ============================================================ */
canvas {
  display: block;
}

/* Nav-tab active indicator bar override */
.nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
  background: none;
  padding: 0.5rem 0.85rem 0.6rem;
  margin-bottom: -1px;
}

.nav-tabs .nav-link:hover {
  color: var(--primary);
  border-bottom-color: rgba(27,42,140,0.3);
  background: none;
}

.nav-tabs .nav-link.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  background: none;
  font-weight: 600;
}

.nav-tabs {
  border-bottom: 1px solid #e2e8f0;
}