@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #b91c1c;
  --primary-hover: #991b1b;
  --primary-light: #fef2f2;
  --primary-border: #fecaca;
  --dark: #0f172a;
  --dark-surface: #1e293b;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --card-bg: #ffffff;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --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 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #f8fafc;
  color: var(--slate-800);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(1140px, calc(100% - 36px));
  margin: 0 auto;
}

/* --- Hero Banner --- */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #881337 100%);
  color: #ffffff;
  padding: 56px 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.2) 0%, rgba(220, 38, 38, 0) 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fca5a5;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 800;
  margin: 6px 0 12px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero p {
  max-width: 680px;
  color: var(--slate-300);
  font-size: 16px;
  margin: 0;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.hero-badge .icon-lock {
  font-size: 24px;
  margin-bottom: 6px;
  display: block;
}

.hero-badge strong {
  color: #ffffff;
  display: block;
  font-size: 15px;
}

.hero-badge span {
  color: #fca5a5;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Card Base --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* --- Form Layout --- */
.form-card {
  margin: -24px auto 64px;
  padding: 38px 42px;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-lg);
  border-color: var(--slate-200);
}

.form-card section {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--slate-200);
  margin-bottom: 30px;
}

.form-card section:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 10px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
}

.form-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--slate-900);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--slate-700);
  margin-bottom: 6px;
}

label span.req {
  color: var(--primary);
  font-weight: 700;
  margin-left: 2px;
}

label small {
  display: inline-block;
  color: var(--slate-400);
  font-weight: 500;
  font-size: 12px;
  margin-left: 4px;
}

/* Field Badges (e.g. NIK counter) */
.field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.field-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--slate-100);
  color: var(--slate-500);
  letter-spacing: 0.03em;
}

.field-badge.valid {
  background: #dcfce7;
  color: #15803d;
}

.field-badge.warning {
  background: #fef3c7;
  color: #b45309;
}

/* Inputs, Selects, Textareas */
input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: #ffffff;
  font: inherit;
  color: var(--slate-800);
  font-size: 14.5px;
  outline: none;
  transition: all 0.15s ease-in-out;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
  background-color: #ffffff;
}

input:disabled, select:disabled {
  background-color: var(--slate-100);
  cursor: not-allowed;
  color: var(--slate-400);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

textarea {
  resize: vertical;
  min-height: 85px;
}

/* Password Input with Toggle Button */
.password-group {
  position: relative;
  display: flex;
  align-items: center;
}

.password-group input {
  padding-right: 46px;
}

.btn-toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.btn-toggle-pw:hover {
  color: var(--slate-700);
}

.btn-toggle-pw svg {
  width: 19px;
  height: 19px;
}

/* Photo Upload & Instant Preview */
.photo-uploader {
  margin-top: 4px;
}

.photo-preview-box {
  display: none;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--slate-50);
  border: 1px dashed var(--slate-300);
  border-radius: var(--radius-md);
}

.photo-preview-box img {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.photo-preview-info {
  flex: 1;
}

.photo-preview-info strong {
  display: block;
  font-size: 13px;
  color: var(--slate-800);
}

.photo-preview-info span {
  font-size: 12px;
  color: var(--slate-500);
}

.btn-remove-photo {
  background: #fee2e2;
  color: #991b1b;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-remove-photo:hover {
  background: #fecaca;
}

/* Conditional Highlight for Japan Status */
.japan-box {
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  padding: 2px;
}

.japan-box.active-highlight {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  padding: 16px;
  margin-top: 12px;
}

/* Checkbox Styling */
.check-container {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 500;
  font-size: 14px;
  color: var(--slate-700);
  line-height: 1.5;
  cursor: pointer;
}

.check-container input[type="checkbox"] {
  width: 19px;
  height: 19px;
  margin-top: 3px;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 13px 22px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.2);
}

.btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.3);
  transform: translateY(-1px);
}

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

.btn:disabled {
  background: var(--slate-400);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn.btn-dark {
  background: var(--slate-900);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.btn.btn-dark:hover {
  background: var(--slate-800);
}

.btn.btn-outline {
  background: #ffffff;
  color: var(--slate-700);
  border: 1.5px solid var(--slate-300);
  box-shadow: var(--shadow-sm);
}

.btn.btn-outline:hover {
  background: var(--slate-50);
  border-color: var(--slate-400);
}

.btn.small {
  padding: 9px 15px;
  font-size: 13.5px;
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 14.5px;
}

.alert strong {
  display: block;
  margin-bottom: 4px;
}

.alert ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.alert.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

/* Honeypot */
.hp {
  position: absolute !important;
  left: -10000px !important;
  opacity: 0 !important;
}

/* --- Login & Success Pages --- */
.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 16px;
  background: radial-gradient(circle at 50% 20%, #f1f5f9 0%, #e2e8f0 100%);
}

.login-card {
  width: min(440px, 100%);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.login-header {
  text-align: center;
  margin-bottom: 26px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.login-card h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--slate-900);
}

.login-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 14px;
}

.login-card .btn {
  width: 100%;
  margin-top: 18px;
}

.success-card {
  width: min(520px, 100%);
  padding: 48px 36px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.success-icon-wrap {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 38px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.18);
}

.success-card h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--slate-900);
  margin: 0 0 10px;
}

.success-card p {
  color: var(--slate-600);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 28px;
}

/* --- Admin Panel --- */
.admin-header {
  background: var(--dark);
  color: #ffffff;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-nav {
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.admin-brand strong {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.admin-brand-tag {
  background: var(--primary);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-user-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-user-menu .user-name {
  color: var(--slate-300);
  font-size: 13.5px;
  font-weight: 500;
}

.admin-user-menu .nav-link {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease;
}

.admin-user-menu .nav-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

.admin-main {
  padding: 32px 0 64px;
}

/* Admin Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--slate-300);
}

.stat-card.red::before {
  background: var(--primary);
}

.stat-card.green::before {
  background: #16a34a;
}

.stat-card.blue::before {
  background: #2563eb;
}

.stat-label {
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1;
}

/* Search & Action Bar */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filter-form {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 650px;
}

.filter-form input, .filter-form select {
  margin: 0;
}

.filter-form input {
  flex: 1;
}

.export-dropdown {
  display: flex;
  gap: 8px;
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.status-pill.jepang {
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.status-pill.indonesia {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.status-pill.negara-lain {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.status-pill.belum-bekerja {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.status-pill.lainnya {
  background: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
}

/* Table Styling */
.table-container {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-responsive {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 900px;
}

th {
  background: #f8fafc;
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 16px;
  border-bottom: 1.5px solid var(--slate-200);
  text-align: left;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--slate-200);
  font-size: 14px;
  vertical-align: middle;
  color: var(--slate-800);
}

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

.alumni-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.alumni-avatar, .alumni-person img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.alumni-avatar {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.alumni-person strong {
  display: block;
  font-size: 14.5px;
  color: var(--slate-900);
}

.alumni-code-tag {
  display: inline-block;
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  background: var(--slate-100);
  color: var(--slate-600);
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

td small {
  display: block;
  color: var(--slate-500);
  font-size: 12px;
  margin-top: 2px;
}

.btn-detail {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
  display: inline-block;
  transition: all 0.15s ease;
}

.btn-detail:hover {
  background: #fecaca;
  color: var(--primary-hover);
}

/* Detail View */
.detail-card {
  padding: 36px;
}

.detail-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 24px;
  gap: 20px;
}

.detail-profile {
  display: flex;
  align-items: center;
  gap: 24px;
}

.detail-photo, .detail-avatar {
  width: 104px;
  height: 104px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.detail-avatar {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 38px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-title h1 {
  font-size: 26px;
  font-weight: 800;
  margin: 6px 0;
  color: var(--slate-900);
}

.detail-subtitle {
  color: var(--slate-500);
  font-size: 15px;
  margin: 0;
}

.detail-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.detail-section-block {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 20px;
}

.detail-section-block h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 10px;
}

.detail-item-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13.5px;
}

.detail-item-row:last-child {
  margin-bottom: 0;
}

.detail-item-row .label-key {
  color: var(--slate-500);
  font-weight: 600;
}

.detail-item-row .label-val {
  color: var(--slate-900);
  font-weight: 600;
  word-break: break-word;
}

/* Footer */
footer {
  border-top: 1px solid var(--slate-200);
  padding: 28px 0;
  background: #ffffff;
  color: var(--slate-500);
  font-size: 13.5px;
  text-align: center;
}

/* --- Print Stylesheet --- */
@media print {
  body {
    background: #ffffff;
    color: #000000;
  }
  .no-print, .admin-header, .btn, .nav-link, p a, a.no-print, header, footer {
    display: none !important;
  }
  .admin-main {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .wrap {
    width: 100% !important;
    margin: 0 !important;
  }
  .card, .detail-section-block {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  .detail-top {
    border-bottom: 2px solid #000 !important;
  }
}

/* --- Responsive Breakpoints --- */
@media (max-width: 768px) {
  .hero {
    padding: 38px 0;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-badge {
    display: none;
  }
  .form-card {
    padding: 24px 20px;
    margin-top: -16px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-form {
    max-width: 100%;
    flex-direction: column;
  }
  .detail-sections-grid {
    grid-template-columns: 1fr;
  }
  .detail-top {
    flex-direction: column;
    align-items: stretch;
  }
  .detail-profile {
    flex-direction: column;
    text-align: center;
  }
  .detail-item-row {
    grid-template-columns: 120px 1fr;
  }
}

/* --- Dual Photo Input (Kamera & Upload) --- */
.photo-choice-card {
  border: 1.5px dashed var(--slate-300);
  background: var(--slate-50);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all 0.2s ease;
}

.photo-choice-card:hover {
  border-color: var(--primary);
  background: #fff;
}

.photo-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-photo-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1.5px solid transparent;
}

.btn-photo-action.btn-cam {
  background: var(--slate-900);
  color: #fff;
}

.btn-photo-action.btn-cam:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.btn-photo-action.btn-upload {
  background: #fff;
  color: var(--slate-700);
  border-color: var(--slate-300);
}

.btn-photo-action.btn-upload:hover {
  background: var(--slate-100);
  border-color: var(--slate-400);
  transform: translateY(-1px);
}

.photo-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
}

.photo-preview-card img {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--slate-200);
}

.photo-preview-details {
  flex: 1;
  min-width: 0;
}

.photo-preview-details strong {
  display: block;
  font-size: 13px;
  color: var(--slate-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-preview-details .badge-source {
  font-size: 11px;
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 3px;
}

.btn-photo-remove {
  background: #fee2e2;
  color: #991b1b;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-photo-remove:hover {
  background: #fecaca;
}

/* --- Camera Modal Popup --- */
.camera-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.camera-modal-dialog {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 20px;
  width: min(520px, 100%);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}

.camera-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #1e293b;
  color: #fff;
}

.camera-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.camera-modal-header p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.btn-camera-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.btn-camera-close:hover {
  color: #fff;
}

.camera-viewfinder-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.camera-viewfinder-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-target-overlay {
  position: absolute;
  inset: 20px;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.25);
}

.camera-loading {
  position: absolute;
  color: #fff;
  font-size: 13.5px;
  display: none;
  align-items: center;
  gap: 8px;
}

.camera-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #0f172a;
  border-top: 1px solid #1e293b;
}

.btn-camera-shutter {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid #ef4444;
  padding: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
  transition: transform 0.1s ease;
}

.btn-camera-shutter:hover {
  transform: scale(1.06);
}

.btn-camera-shutter:active {
  transform: scale(0.95);
}

.shutter-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ef4444;
  display: block;
}

.btn-camera-opt {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-camera-opt:hover {
  background: #334155;
  color: #fff;
}

/* Print / PDF Export Styles */
@media print {
  .no-print,
  a.no-print,
  button.no-print,
  .admin-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .admin-main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  .wrap {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .card,
  .detail-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  footer {
    display: block !important;
    visibility: visible !important;
    text-align: center !important;
    margin-top: 30px !important;
    padding: 16px 0 !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    font-size: 12px !important;
  }

  @page {
    margin: 12mm;
    size: auto;
  }
}

