@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.08);
  --secondary-color: #0f172a;
  --background-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #cbd5e1;
  --danger-color: #f43f5e;
  --danger-hover: #e11d48;
  --success-color: #10b981;
  --success-hover: #059669;
  --warning-color: #f59e0b;
  --warning-hover: #d97706;
  --sidebar-width: 280px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Sidebar Styling - Premium Dark Sleek */
.sidebar {
  width: var(--sidebar-width);
  background: var(--secondary-color);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 32px 0 24px 0;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.05);
}

.sidebar-header {
  padding: 0 32px 28px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 28px;
}

.sidebar-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-header h2 span {
  color: var(--primary-color);
}

.nav-links {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  margin: 0 16px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link svg {
  width: 18px;
  height: 18px;
  opacity: 0.8;
  transition: transform 0.25s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.nav-link:hover svg {
  transform: translateX(3px);
}

.nav-link.active {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 10px 20px -10px var(--primary-color);
}

.nav-link.active svg {
  opacity: 1;
}

.logout-btn {
  margin: 16px;
  padding: 14px 18px;
  background: rgba(244, 63, 94, 0.1);
  color: #fda4af;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.logout-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.logout-btn:hover {
  background: var(--danger-color);
  color: white;
  box-shadow: 0 8px 20px rgba(244, 63, 94, 0.2);
  transform: translateY(-2px);
}

.logout-btn:hover svg {
  transform: translateX(3px);
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 40px 48px;
  max-width: 1300px;
}

/* Dashboard Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  gap: 20px;
}

.page-title h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--secondary-color);
  letter-spacing: -0.75px;
}

.page-title p {
  color: var(--text-secondary);
  margin-top: 4px;
  font-size: 15px;
  font-weight: 500;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--surface-color);
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
  border-color: var(--border-focus);
}

.stat-info h3 {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-info h2 {
  font-size: 32px;
  font-weight: 800;
  margin-top: 8px;
  color: var(--secondary-color);
  letter-spacing: -0.5px;
}

.stat-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: var(--secondary-color);
  transition: all 0.3s ease;
}

.stat-card:hover .stat-icon-wrapper {
  background: var(--primary-light);
  color: var(--primary-color);
}

.stat-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

/* Content Cards (Forms & Tables) */
.card {
  background: var(--surface-color);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
  border: 1px solid var(--border-color);
  margin-bottom: 32px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
input[type="file"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background-color: #f8fafc;
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
  background-color: #fff;
}

input[type="file"] {
  background: white;
  cursor: pointer;
  padding: 9px 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
  background: var(--danger-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.3);
}

/* Tables Styling */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--border-color);
}

td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(99, 102, 241, 0.015);
}

/* Badges */
.badge-count {
  background: var(--primary-light);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 12px;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}

.status-valid, .status-tersimpan {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.status-expired, .status-belum {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
}

.status-invalid {
  background: rgba(244, 63, 94, 0.1);
  color: #be123c;
}

/* Action Buttons inside Tables */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 4px;
}

.btn-action:hover {
  transform: translateY(-1px);
}

.btn-edit {
  background: rgba(245, 158, 11, 0.1) !important;
  color: #d97706 !important;
}

.btn-edit:hover {
  background: var(--warning-color) !important;
  color: white !important;
}

.btn-hapus, .btn-delete {
  background: rgba(244, 63, 94, 0.1) !important;
  color: var(--danger-color) !important;
}

.btn-hapus:hover, .btn-delete:hover {
  background: var(--danger-color) !important;
  color: white !important;
}

.btn-import {
  background: rgba(16, 185, 129, 0.1) !important;
  color: var(--success-color) !important;
}

.btn-import:hover {
  background: var(--success-color) !important;
  color: white !important;
}

.btn-cetak {
  background: rgba(99, 102, 241, 0.1) !important;
  color: var(--primary-color) !important;
}

.btn-cetak:hover {
  background: var(--primary-color) !important;
  color: white !important;
}

/* Alerts styling */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 28px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.alert-success {
  background: rgba(16, 185, 129, 0.08);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
  background: rgba(244, 63, 94, 0.08);
  color: #991b1b;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

/* Pagination */
.custom-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.custom-pagination nav {
  display: flex;
  gap: 4px;
}

.custom-pagination a, .custom-pagination span {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
}

.custom-pagination a:hover {
  background: #f1f5f9;
}

.custom-pagination .active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 36px;
  border-radius: var(--border-radius-xl);
  width: 90%;
  max-width: 440px;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  animation: modalZoom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

@keyframes modalZoom {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.close-modal {
  position: absolute;
  right: 24px;
  top: 20px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--secondary-color);
}

.modal h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--secondary-color);
  margin-bottom: 8px;
}

.modal img {
  width: 200px;
  height: 200px;
  margin: 20px auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.btn-download-qr {
  display: inline-flex;
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  margin-top: 15px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-download-qr:hover {
  background: var(--primary-hover);
}

/* =====================================================
   REAL-TIME VISUAL EDITOR & WYSIWYG PREVIEW
   ===================================================== */
.editor-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1100px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
}

.sticky-preview {
  position: sticky;
  top: 32px;
}

.preview-card {
  background: var(--surface-color);
  border-radius: var(--border-radius-xl);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
  border: 1px solid var(--border-color);
}

.preview-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--border-color);
}

.preview-title-bar h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--secondary-color);
}

.preview-status {
  font-size: 11px;
  font-weight: 700;
  color: var(--success-color);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 99px;
  text-transform: uppercase;
}

/* Responsive aspect-ratio A4 Canvas */
.cert-preview-container {
  width: 100%;
  aspect-ratio: 842 / 595;
  background-color: #e2e8f0;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(15, 23, 42, 0.06), 0 10px 25px rgba(15, 23, 42, 0.05);
  border: 1.5px solid var(--border-color);
}

.cert-preview-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: absolute;
  top: 0;
  left: 0;
  transition: background-image 0.2s ease;
}

.cert-preview-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  padding: 24px;
  background: #f8fafc;
}

.cert-preview-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Certificate Overlay elements on 842x595 virtual canvas */
.cert-preview-canvas {
  width: 842px;
  height: 595px;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  pointer-events: none;
}

.cert-preview-nomor {
  position: absolute;
  left: 0;
  width: 100%;
  text-align: center;
  font-weight: bold;
  letter-spacing: 1px;
  white-space: nowrap;
}

.cert-preview-nama {
  position: absolute;
  left: 0;
  width: 100%;
  text-align: center;
  font-weight: bold;
  white-space: nowrap;
}

.cert-preview-qr-img {
  position: absolute;
  background: white;
  padding: 4px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  display: block;
}

/* Custom styled Range Inputs */
.range-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.range-group input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  padding: 0;
  border: none;
}

.range-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 99px;
  background: var(--primary-color);
  cursor: pointer;
  transition: transform 0.1s;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

.range-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: var(--primary-hover);
}

.range-val {
  min-width: 50px;
  font-size: 12px;
  font-weight: 700;
  color: var(--secondary-color);
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid var(--border-color);
}

/* Collapsible Settings Sections */
.form-section-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.form-section-title {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--secondary-color);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 540px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   LOGIN PAGE - Clean & Professional Design
   ===================================================== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.25);
  margin-bottom: 16px;
  background: white;
  padding: 14px;
}

.login-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--secondary-color);
  margin: 0;
  letter-spacing: -0.75px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 6px 0 0;
  font-weight: 500;
}

.login-card {
  background: var(--surface-color);
  border-radius: var(--border-radius-xl);
  padding: 36px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--border-color);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--secondary-color);
  margin: 0 0 6px;
}

.login-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.75px;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.login-input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background-color: #f8fafc;
  transition: all 0.2s ease;
}

.login-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
  background-color: #fff;
}

.login-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--primary-color);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  margin-right: 8px;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-wrapper:hover .checkbox-custom {
  border-color: var(--primary-color);
}

.checkbox-input:checked ~ .checkbox-custom {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-input:checked ~ .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.back-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--primary-color);
}

.btn-login {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.2);
}

.btn-login:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.8;
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 24px;
  }
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-danger { color: var(--danger-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-primary { color: var(--primary-color) !important; }
.text-muted { color: var(--text-muted) !important; }

.mt-4 { margin-top: 24px; }
.mt-3 { margin-top: 16px; }
.mt-2 { margin-top: 10px; }
.mb-4 { margin-bottom: 24px; }
.mb-3 { margin-bottom: 16px; }
.mb-0 { margin-bottom: 0 !important; }

.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 12px; }
.w-full { width: 100%; }

/* Input number - same style as text/date/select */
input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background-color: #f8fafc;
  transition: all 0.2s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

input[type="number"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
  background-color: #fff;
}

/* Make the range-group number input compact */
.range-group input[type="number"] {
  width: 70px;
  min-width: 70px;
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
}

/* Color picker alignment */
input[type="color"] {
  width: 50px;
  height: 40px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
  cursor: pointer;
  background: white;
}

/* Fix img-preview from old code */
.img-preview {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-top: 12px;
}

/* Responsive main-content */
@media (max-width: 1024px) {
  .main-content {
    padding: 24px 20px;
  }
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    padding: 16px;
  }

  .sidebar {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Fix: number input spinner appearance */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  opacity: 1;
}

/* =====================================================
   ADDITIONAL COMPONENT: Info blocks used in pages
   ===================================================== */
.info-block {
  background: rgba(99, 102, 241, 0.03);
  border: 1.5px dashed var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.info-block svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--primary-color);
}

.info-block p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Action grid on generate-pdf page */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 640px) {
  .action-grid {
    grid-template-columns: 1fr;
  }
}

.action-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.action-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.action-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

