/* =========================================================
   SISTEM INFORMASI REKAM MEDIS SANTRI — Design System CSS
   ========================================================= */

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

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Primary Palette — Teal/Emerald */
  --primary-50: #f0fdfa;
  --primary-100: #ccfbf1;
  --primary-200: #99f6e4;
  --primary-300: #5eead4;
  --primary-400: #2dd4bf;
  --primary-500: #14b8a6;
  --primary-600: #0d9488;
  --primary-700: #0f766e;
  --primary-800: #115e59;
  --primary-900: #134e4a;

  /* Neutral Palette */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Accent Colors */
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-orange: #f97316;
  --accent-yellow: #eab308;
  --accent-red: #ef4444;
  --accent-green: #22c55e;

  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0d9488 0%, #14b8a6 50%, #2dd4bf 100%);
  --gradient-sidebar: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  --gradient-card-1: linear-gradient(135deg, #0d9488 0%, #06b6d4 100%);
  --gradient-card-2: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  --gradient-card-3: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  --gradient-card-4: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
  --gradient-hero: linear-gradient(135deg, #0f766e 0%, #0d9488 30%, #14b8a6 60%, #2dd4bf 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-primary: 0 10px 30px -5px rgba(13, 148, 136, 0.3);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 6px 16px rgba(0,0,0,0.04);

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
  --navbar-height: 64px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--gray-700);
  background-color: var(--gray-100);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

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

.login-page {
  min-height: 100vh;
  background: var(--gradient-hero);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: floatBlob 20s ease-in-out infinite;
}

.login-blob-1 {
  width: 500px;
  height: 500px;
  background: rgba(45, 212, 191, 0.3);
  top: -15%;
  right: -10%;
  animation-duration: 20s;
}

.login-blob-2 {
  width: 400px;
  height: 400px;
  background: rgba(13, 148, 136, 0.25);
  bottom: -10%;
  left: -10%;
  animation-duration: 25s;
  animation-direction: reverse;
}

.login-blob-3 {
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  top: 40%;
  left: 50%;
  animation-duration: 18s;
}

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.login-container {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 3rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-2xl);
  animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-logo {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.8rem;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 2rem;
}

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

.login-input-group > i:first-child {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--gray-400);
  pointer-events: none;
  z-index: 2;
}

.login-input-group .form-control-custom {
  padding-left: 2.5rem;
  width: 100%;
}

.login-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.login-toggle-password:hover {
  color: var(--gray-600);
}

.login-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  border-radius: var(--border-radius-sm);
  margin-top: 0.5rem;
}

.login-demo-info {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-200);
  font-size: 0.8rem;
  color: var(--gray-500);
}

.login-demo-info p {
  margin-bottom: 0.25rem;
}

.login-demo-info code {
  background: var(--primary-50);
  color: var(--primary-700);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

/* --- Form Controls (Global) --- */
.form-label-custom {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.form-control-custom {
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: all var(--transition-fast);
}

.form-control-custom:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
  background: #fff;
}

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

.form-select-custom {
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: var(--gray-800);
  background-color: var(--gray-50);
  transition: all var(--transition-fast);
}

.form-select-custom:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
  background-color: #fff;
}

/* --- Buttons --- */
.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-primary);
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px -5px rgba(13, 148, 136, 0.4);
  color: #fff;
}

.btn-primary-custom:active {
  transform: translateY(0);
}

.btn-secondary-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--border-radius-sm);
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-secondary-custom:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--gray-700);
}

.btn-danger-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--danger);
  border: none;
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-danger-custom:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.35);
  color: #fff;
}

.btn-success-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--success);
  border: none;
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-success-custom:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.35);
  color: #fff;
}

.btn-warning-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--warning);
  border: none;
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-warning-custom:hover {
  background: #d97706;
  transform: translateY(-1px);
  color: #fff;
}

.btn-sm-custom {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  border-radius: 6px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
}

/* =========================================================
   LAYOUT — Sidebar + Main Content
   ========================================================= */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--gradient-sidebar);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.sidebar-brand-sub {
  font-size: 0.7rem;
  color: var(--gray-400);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
}

.sidebar-nav-section {
  margin-bottom: 1.5rem;
}

.sidebar-nav-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gray-500);
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--border-radius-sm);
  color: var(--gray-400);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
  cursor: pointer;
  text-decoration: none;
}

.sidebar-nav-item i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

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

.sidebar-nav-item.active {
  background: rgba(13, 148, 136, 0.2);
  color: var(--primary-400);
  font-weight: 600;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gradient-card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

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

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

.sidebar-user-role {
  font-size: 0.7rem;
  color: var(--gray-400);
}

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

/* --- Top Navbar --- */
.top-navbar {
  height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: none;
  background: var(--gray-100);
  border-radius: var(--border-radius-sm);
  color: var(--gray-600);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  background: var(--gray-200);
}

.page-title-section h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.page-title-section p {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin: 0;
}

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

.navbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--gray-200);
  background: #fff;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.navbar-icon-btn:hover {
  background: var(--gray-50);
  color: var(--primary-600);
}

/* --- Content Area --- */
.content-area {
  padding: 2rem;
}

/* --- Cards --- */
.stat-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.stat-card-gradient.teal {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.stat-card-gradient.teal .stat-card-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

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

.stat-card-label {
  font-size: 0.78rem;
  color: var(--gray-500);
  font-weight: 500;
  margin-top: 0.25rem;
}

.stat-card-gradient.teal .stat-card-label {
  color: rgba(255, 255, 255, 0.85);
}

.data-card, .chart-card, .form-card, .report-filter-card {
  background: #fff;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.data-card-header, .chart-card-header, .form-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.data-card-title, .chart-card-title, .form-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0;
  display: flex;
  align-items: center;
}

.data-card-body, .chart-card-body, .form-card-body {
  padding: 1.5rem;
}

.chart-container {
  position: relative;
  height: 6cm;
  max-height: 6cm;
  width: 100%;
}

.report-filter-card {
  padding: 1.25rem 1.5rem;
}

.report-filter-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gray-800);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- Tables --- */
.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-custom th {
  background: var(--gray-50);
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
}

.table-custom td {
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.table-custom tbody tr {
  transition: background var(--transition-fast);
}

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

/* --- Badges --- */
.badge-custom {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.badge-primary { background: var(--primary-50); color: var(--primary-700); border: 1px solid var(--primary-200); }
.badge-success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.badge-warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.badge-info { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.badge-secondary { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-300); }

/* --- Action Buttons --- */
.action-btns {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-btn-view { color: var(--accent-blue); }
.action-btn-view:hover { background: #dbeafe; border-color: #93c5fd; }

.action-btn-edit { color: var(--warning); }
.action-btn-edit:hover { background: #fef3c7; border-color: #fde68a; }

.action-btn-delete { color: var(--danger); }
.action-btn-delete:hover { background: #fee2e2; border-color: #fca5a5; }

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-500);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--primary-200);
}

.timeline-dot.warning { background: var(--warning); box-shadow: 0 0 0 2px #fde68a; }
.timeline-dot.danger { background: var(--danger); box-shadow: 0 0 0 2px #fca5a5; }
.timeline-dot.success { background: var(--success); box-shadow: 0 0 0 2px #86efac; }

.timeline-card {
  background: #fff;
  border-radius: var(--border-radius-sm);
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
}

.timeline-title {
  font-weight: 700;
  color: var(--gray-800);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--gray-600);
  margin-top: 0.5rem;
}

.timeline-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* --- Profile Header --- */
.profile-header {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gray-900);
}

.profile-detail {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.profile-badge {
  background: var(--gray-100);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-700);
}

/* =========================================================
   RESPONSIVE OVERRIDES (MOBILE & TABLET)
   ========================================================= */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
  }
  .sidebar-overlay.show {
    display: block;
  }
  .main-content {
    margin-left: 0 !important;
  }
  .sidebar-toggle {
    display: flex;
  }
  .content-area {
    padding: 1rem;
  }
  .top-navbar {
    padding: 0 1rem;
  }
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .top-navbar {
    height: auto;
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .page-title-section h1 {
    font-size: 1.1rem;
  }

  .page-title-section p {
    font-size: 0.72rem;
  }

  .data-card-header, .chart-card-header, .form-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .report-filter-card .row > [class*="col-"] {
    margin-bottom: 0.5rem;
  }

  .timeline {
    padding-left: 1.25rem;
  }

  .timeline::before {
    left: 4px;
  }

  .timeline-dot {
    left: -1.25rem;
    width: 14px;
    height: 14px;
    top: 6px;
  }

  .timeline-card {
    padding: 1rem;
  }

  .timeline-meta {
    gap: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .stat-card-value {
    font-size: 1.4rem;
  }
  .stat-card-label {
    font-size: 0.72rem;
  }
  .login-card {
    margin: 1rem;
    padding: 1.5rem;
  }
  .profile-name {
    font-size: 1.1rem;
  }
  .profile-avatar {
    width: 64px;
    height: 64px;
  }
}

/* =========================================================
   UTILITIES
   ========================================================= */
.text-primary-custom { color: var(--primary-600); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-muted-custom { color: var(--gray-500); }

.bg-primary-light { background: var(--primary-50); }
.bg-success-light { background: rgba(16, 185, 129, 0.1); }
.bg-warning-light { background: rgba(245, 158, 11, 0.1); }
.bg-danger-light { background: rgba(239, 68, 68, 0.1); }
.bg-info-light { background: rgba(59, 130, 246, 0.1); }

.rounded-custom { border-radius: var(--border-radius); }
.shadow-custom { box-shadow: var(--shadow-card); }

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

.password-toggle { position: relative; }
.password-toggle .toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 1rem;
}

.form-check-input-custom:checked {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
}

.search-box { position: relative; }
.search-box input { padding-left: 2.5rem; }
.search-box i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.9rem;
}
