/**
 * Style CSS - Dashboard Vaksinasi Harian
 * Health & Medical Modern Clean Theme
 */

:root {
  --primary-color: #0d9488;
  --primary-hover: #0f766e;
  --primary-light: #ccfbf1;
  --primary-dark: #115e59;
  --secondary-color: #0284c7;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;
  
  --sidebar-bg: #0f172a;
  --sidebar-active: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-hover-text: #f8fafc;
  
  --body-bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  --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);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --sidebar-width: 260px;
}

html {
  overflow-x: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--body-bg);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

/* Layout Architecture */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
}

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

.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
}

.sidebar-brand-text h5 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.2px;
}

.sidebar-brand-text small {
  color: #64748b;
  font-size: 0.75rem;
}

.sidebar-menu {
  padding: 1rem 0.75rem;
  flex-grow: 1;
  overflow-y: auto;
}

.menu-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.05em;
  padding: 0.75rem 0.75rem 0.25rem;
}

.nav-link-custom {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
}

.nav-link-custom i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: #64748b;
  transition: color 0.2s ease;
}

.nav-link-custom:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sidebar-hover-text);
}

.nav-link-custom:hover i {
  color: #2dd4bf;
}

.nav-link-custom.active {
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.2) 0%, rgba(13, 148, 136, 0.05) 100%);
  color: #2dd4bf;
  font-weight: 600;
  border-left: 3px solid #2dd4bf;
}

.nav-link-custom.active i {
  color: #2dd4bf;
}

.main-content {
  flex-grow: 1;
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--body-bg);
  transition: margin-left 0.3s ease, width 0.3s ease, max-width 0.3s ease;
  overflow-x: hidden;
}

/* Top Navbar */
.top-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.75rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-user-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--border-color);
  background: #ffffff;
  padding: 0.4rem 0.85rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.navbar-user-btn:hover {
  background: #f1f5f9;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Cards & UI Elements */
.content-body {
  padding: 1.75rem;
  flex-grow: 1;
}

.custom-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1.5rem;
}

.custom-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Stat Cards */
.stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 1.25rem 1.25rem;
  box-shadow: var(--card-shadow);
  transition: all 0.25s ease;
}

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

.stat-card-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.stat-subtext {
  font-size: 0.75rem;
  color: #64748b;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-icon-primary {
  background: #ccfbf1;
  color: #0d9488;
}

.stat-icon-blue {
  background: #e0f2fe;
  color: #0284c7;
}

.stat-icon-green {
  background: #dcfce7;
  color: #10b981;
}

.stat-icon-amber {
  background: #fef3c7;
  color: #d97706;
}

.stat-icon-indigo {
  background: #e0e7ff;
  color: #4f46e5;
}

.stat-icon-pink {
  background: #fce7f3;
  color: #db2777;
}

/* Custom Buttons */
.btn-primary-custom {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.btn-primary-custom:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
}

/* Tables */
.custom-table {
  width: 100%;
  margin-bottom: 0;
  border-color: var(--border-color);
}

.custom-table thead th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

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

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

/* Badges */
.badge-soft-success {
  background-color: #dcfce7;
  color: #15803d;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

.badge-soft-danger {
  background-color: #fee2e2;
  color: #b91c1c;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

.badge-soft-primary {
  background-color: #ccfbf1;
  color: #0f766e;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

.badge-soft-blue {
  background-color: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

/* Chart Canvas container */
.chart-container {
  position: relative;
  width: 100%;
  height: 320px;
}

.chart-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--radius-md);
  transition: opacity 0.2s ease;
}

/* Footer */
.app-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.75rem;
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* Login Page Styling */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 50%, #f8fafc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 2.25rem 2rem;
}

.auth-logo-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.75rem;
  margin: 0 auto 1.25rem;
  box-shadow: 0 10px 15px -3px rgba(13, 148, 136, 0.3);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }
  
  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1030;
  }
}

/* Print Styling */
@media print {
  .sidebar, .top-navbar, .app-footer, .no-print, .btn, .filter-card {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  .content-body {
    padding: 0 !important;
  }
  body {
    background: #ffffff !important;
    font-size: 12pt !important;
  }
  .custom-card {
    border: none !important;
    box-shadow: none !important;
  }
}

/* Upload Dropzone & File Preview */
.upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  background: #f8fafc;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary-color);
  background: var(--primary-light);
  transform: scale(1.005);
}

.upload-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  transition: all 0.25s ease;
}

.upload-dropzone:hover .upload-icon-circle {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-3px);
}

.file-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.825rem;
  font-weight: 600;
  color: #334155;
}

.badge-icv {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-family: monospace;
  letter-spacing: 0.5px;
}

.badge-batch {
  background-color: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  font-family: monospace;
}

.badge-ntpn {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-family: monospace;
  font-size: 0.8rem;
}

.badge-passport {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-family: monospace;
}

/* ========================================================
 * SIDEBAR COLLAPSIBLE / MINI MODE (DESKTOP)
 * ======================================================== */
:root {
  --sidebar-mini-width: 72px;
}

body.sidebar-collapsed .sidebar {
  width: var(--sidebar-mini-width);
}

body.sidebar-collapsed .sidebar .sidebar-header {
  padding: 1.15rem 0.5rem;
  justify-content: center;
}

body.sidebar-collapsed .sidebar .sidebar-brand-text {
  display: none !important;
}

body.sidebar-collapsed .sidebar .sidebar-brand-icon {
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
}

body.sidebar-collapsed .sidebar .sidebar-menu {
  padding: 0.75rem 0.4rem;
}

body.sidebar-collapsed .sidebar .menu-category {
  text-align: center;
  font-size: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.85rem 0.5rem;
  padding: 0;
}

body.sidebar-collapsed .sidebar .nav-link-custom {
  justify-content: center;
  padding: 0.75rem 0;
  width: 44px;
  margin: 0 auto 0.4rem;
  border-radius: 10px;
  border-left: none !important;
  position: relative;
}

body.sidebar-collapsed .sidebar .nav-link-custom.active {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.3) 0%, rgba(2, 132, 199, 0.3) 100%);
  color: #2dd4bf;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

body.sidebar-collapsed .sidebar .nav-link-custom span {
  display: none !important;
}

body.sidebar-collapsed .sidebar .nav-link-custom i {
  margin: 0;
  font-size: 1.25rem;
  width: auto;
}

body.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-mini-width);
  width: calc(100% - var(--sidebar-mini-width));
  max-width: calc(100% - var(--sidebar-mini-width));
}

@media (max-width: 991.98px) {
  body.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }
}


/* UI/UX Upgrades for Patient Module */
.patient-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.patient-avatar-l {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0284c7;
  border: 1px solid #7dd3fc;
}

.patient-avatar-p {
  background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%);
  color: #e11d48;
  border: 1px solid #fda4af;
}

.patient-row {
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.patient-row:hover {
  background-color: #f1f5f9 !important;
  transform: scale-[1.002];
}

.patient-row:hover .patient-avatar {
  transform: scale(1.08);
}

.badge-copyable {
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  user-select: all;
}

.badge-copyable:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.filter-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.filter-chip:hover, .filter-chip.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-color);
}

.floating-batch-bar {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 40px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  z-index: 1050;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-batch-bar.show {
  transform: translateX(-50%) translateY(0);
}

.action-btn-pill {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: #64748b;
  transition: all 0.2s ease;
}

.action-btn-pill:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

.action-btn-pill.view:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.action-btn-pill.edit:hover {
  color: #0284c7;
  border-color: #0284c7;
  background: #e0f2fe;
}

.action-btn-pill.delete:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: #fee2e2;
}

.table-patient-header th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background-color: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  padding: 0.85rem 0.75rem;
  white-space: nowrap;
}

.cert-card-modal {
  background: linear-gradient(135deg, #0d9488 0%, #0369a1 100%);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 1.5rem;
  color: #ffffff;
}

.cert-pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}


