/* ==========================================================================
   EDUIZIN - SISTEM PERIZINAN & ABSENSI SISWA ONLINE
   Modern UI CSS System with Glassmorphism, Responsive Layout & Custom Animations
   ========================================================================== */

/* Google Fonts & Design System Variables */
:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Color Palette - Edu Indigo Theme */
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-focus: #6366f1;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  /* Status Colors */
  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.15);
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.15);
  --rose: #f43f5e;
  --rose-bg: rgba(244, 63, 94, 0.15);
  --sky: #0ea5e9;
  --sky-bg: rgba(14, 165, 233, 0.15);

  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 40px;
}

/* Background Animated Blobs */
.bg-glow {
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}
.blob-1 {
  top: -100px;
  left: -100px;
  background: var(--primary);
}
.blob-2 {
  bottom: -150px;
  right: -100px;
  background: var(--sky);
}

/* Layout Container */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  position: relative;
  z-index: 1;
}

/* Main Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--sky));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.brand-text h1 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.badge-v {
  font-size: 0.65rem;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
}

/* Role Switcher Tabs */
.nav-roles {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-card);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.nav-tab.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.nav-tab:hover:not(.active) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.badge-count {
  background: var(--rose);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* User Profile Badge */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
}

.btn-logout {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: var(--rose);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background: var(--rose);
  color: #fff;
}

/* Connection Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-checking {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.3);
}
.status-checking .dot {
  background: #94a3b8;
}

.status-online {
  background: var(--emerald-bg);
  color: var(--emerald);
  border-color: rgba(16, 185, 129, 0.3);
}
.status-online .dot {
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse-dot 2s infinite;
}

.status-offline {
  background: var(--rose-bg);
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.3);
}
.status-offline .dot {
  background: var(--rose);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.live-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.5);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
}

/* Role Sections */
.role-section {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.role-section.active-section {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Database Error Banner */
.db-error-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
  color: var(--rose);
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.db-error-banner i:first-child {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.db-error-banner > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.db-error-banner strong {
  font-size: 0.95rem;
}

.db-error-banner span {
  color: var(--text-muted);
  font-size: 0.83rem;
}

.db-error-banner code {
  background: rgba(244, 63, 94, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: #fda4af;
}

/* Banner Section */
.section-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(14, 165, 233, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.banner-text h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.banner-text p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 800px;
}

.banner-actions {
  display: flex;
  gap: 10px;
}

.banner-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

/* Class Management Modal Elements */
.add-class-form-row {
  display: flex;
  gap: 10px;
}

.class-list-container {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.class-list-container h4 {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.class-items-ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.class-item-li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-card);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Admin Login Guard Card */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.login-card {
  width: 100%;
  max-width: 480px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-glow);
}

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

.login-badge-icon {
  width: 60px;
  height: 60px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 16px auto;
}

.login-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.login-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.login-hint {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 16px;
}

.login-hint p {
  color: var(--text-main);
  margin-bottom: 6px;
}

.login-hint ul {
  padding-left: 20px;
  margin-top: 4px;
}

.login-hint code {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.btn-block {
  width: 100%;
}

/* Layout Grid Student Portal */
.student-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

@media (max-width: 992px) {
  .student-grid {
    grid-template-columns: 1fr;
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-card);
}

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.text-indigo { color: var(--primary); }

/* Form Elements */
.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  width: 100%;
}

.col-6 { flex: 1; }

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.req { color: var(--rose); }

.form-control, .form-control-sm {
  width: 100%;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-control-sm {
  padding: 8px 12px;
  font-size: 0.85rem;
}

.form-control:focus, .form-control-sm:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: rgba(15, 23, 42, 0.9);
}

select.form-control option, select.form-control-sm option {
  background-color: var(--bg-dark);
  color: var(--text-main);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.info-alert {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: var(--sky);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* File Upload Drag and Drop Zone */
.upload-dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.hidden-file-input {
  display: none;
}

.drop-icon {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.drop-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.drop-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Uploaded File Preview Box */
.file-preview-container {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid var(--emerald);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-align: left;
}

.preview-thumb-wrapper {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdf-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--rose);
  font-size: 1.5rem;
}

.pdf-placeholder span {
  font-size: 0.6rem;
  color: var(--text-muted);
  max-width: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-details {
  flex: 1;
}

.preview-details h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
  word-break: break-all;
}

.preview-details p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.btn-remove-file {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-remove-file:hover {
  background: var(--rose);
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-card);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-card);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
}

.btn-outline-danger {
  background: transparent;
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}
.btn-outline-danger:hover {
  background: var(--rose-bg);
}

.btn-emerald {
  background: var(--emerald);
  color: #fff;
}
.btn-emerald:hover {
  background: #059669;
}

.btn-rose {
  background: var(--rose);
  color: #fff;
}
.btn-rose:hover {
  background: #e11d48;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}
.btn-xs {
  padding: 4px 8px;
  font-size: 0.75rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* History Card & Student Items */
.search-box-student {
  margin-bottom: 16px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.input-with-icon input {
  padding-left: 40px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom Scrollbar */
.history-list::-webkit-scrollbar, .table-responsive::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.history-list::-webkit-scrollbar-thumb, .table-responsive::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}

.student-item-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: var(--transition);
}

.student-item-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(30, 41, 59, 0.8);
}

.item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.item-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.item-reason {
  font-size: 0.85rem;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-warning {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-success {
  background: var(--emerald-bg);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
  background: var(--rose-bg);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-info {
  background: var(--sky-bg);
  color: var(--sky);
  border: 1px solid rgba(14, 165, 233, 0.3);
}

/* ================= ADMIN DASHBOARD ================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.icon-blue { background: var(--sky-bg); color: var(--sky); }
.icon-amber { background: var(--amber-bg); color: var(--amber); }
.icon-emerald { background: var(--emerald-bg); color: var(--emerald); }
.icon-rose { background: var(--rose-bg); color: var(--rose); }

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

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

/* Admin Toolbar */
.toolbar-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.toolbar-search {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.toolbar-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.toolbar-search input {
  padding-left: 40px;
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Admin Custom Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.custom-table th {
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-muted);
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-card);
  white-space: nowrap;
}

.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

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

.custom-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.student-info-cell {
  display: flex;
  flex-direction: column;
}

.student-info-name {
  font-weight: 700;
  color: var(--text-main);
}

.student-info-nis {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.proof-btn-thumbnail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition);
}

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

.action-buttons {
  display: flex;
  gap: 6px;
  justify-content: center;
}

/* ================= MODAL DIALOG ================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.modal-overlay.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.glass-modal {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-group i {
  font-size: 1.5rem;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }
}

.modal-preview-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.viewer-container {
  background: #000000;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.modal-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.modal-pdf-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--rose);
}

.modal-pdf-box i {
  font-size: 3.5rem;
}

.modal-detail-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.detail-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.detail-value {
  font-size: 0.9rem;
  color: var(--text-main);
}

.detail-reason-text {
  font-size: 0.88rem;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.admin-action-box {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
}

.admin-action-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 300px;
}

.toast-success { border-left: 4px solid var(--emerald); }
.toast-error { border-left: 4px solid var(--rose); }
.toast-info { border-left: 4px solid var(--sky); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Utilities */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8rem; }
.font-semibold { font-weight: 600; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.border-b { border-bottom: 1px solid var(--border-card); }
.text-center { text-align: center; }

/* Main Footer */
.main-footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

/* PRINT MEDIA SPECIFIC STYLES */
.print-only {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  #print-area, #print-area * {
    visibility: visible;
  }
  #print-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    color: #000;
    background: #fff;
    padding: 20px;
    font-family: Arial, sans-serif;
  }
  .print-header {
    text-align: center;
    margin-bottom: 20px;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
  }
  .print-table th, .print-table td {
    border: 1px solid #333;
    padding: 8px;
    font-size: 11px;
    text-align: left;
  }
  .print-table th {
    background: #f0f0f0;
  }
  .print-footer {
    margin-top: 40px;
    float: right;
    text-align: center;
  }
}
