/* ==============================================================================================
   DESIGN SYSTEM & STYLESHEET - PENGUMUMAN KELULUSAN & SERTIFIKAT PESERTA
   Proyek: Portal Pengumuman (WJYIP x LAZ Percikan Iman x Creadin.co)
   Standar UI/UX Profesional: Emerald & Warm Gold Theme, Glassmorphism, Responsive Mobile-First
   ============================================================================================== */

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

:root {
  /* Primary Islamic Emerald Palette */
  --primary-950: #022c22;
  --primary-900: #064e3b;
  --primary-800: #065f46;
  --primary-700: #047857;
  --primary-600: #059669;
  --primary-500: #10b981;
  --primary-400: #34d399;
  --primary-200: #a7f3d0;
  --primary-100: #d1fae5;
  --primary-50:  #ecfdf5;

  /* Accent Amber / Gold */
  --accent-700:  #b45309;
  --accent-600:  #d97706;
  --accent-500:  #f59e0b;
  --accent-100:  #fef3c7;
  --accent-50:   #fffbeb;

  /* Slate & Neutrals */
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white:     #ffffff;

  /* Status Colors */
  --danger-600:  #dc2626;
  --danger-500:  #ef4444;
  --danger-100:  #fee2e2;
  --danger-50:   #fef2f2;

  --warning-600: #d97706;
  --warning-500: #f59e0b;
  --warning-100: #fef3c7;

  --info-600:    #0284c7;
  --info-500:    #06b6d4;
  --info-100:    #e0f2fe;

  --success-600: #16a34a;
  --success-500: #22c55e;
  --success-100: #dcfce7;
  --success-50:  #f0fdf4;

  /* Border Radii & Shadows */
  --radius-xs:   6px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 12px -2px rgba(15, 23, 42, 0.08), 0 3px 6px -3px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.1), 0 6px 12px -6px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 20px 32px -6px rgba(15, 23, 42, 0.12), 0 10px 16px -8px rgba(15, 23, 42, 0.08);

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

/* Reset & Global Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f1f5f9;
  background-image: 
    radial-gradient(at 0% 0%, rgba(5, 150, 105, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(217, 119, 6, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(2, 132, 199, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--slate-800);
  line-height: 1.6;
  min-height: 100vh;
  padding: 24px 16px 40px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-container {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.icon-xs { width: 14px; height: 14px; display: inline-block; vertical-align: middle; }
.icon-sm { width: 18px; height: 18px; display: inline-block; vertical-align: middle; }
.icon-md { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }
.icon-lg { width: 32px; height: 32px; display: inline-block; vertical-align: middle; }

/* Banner Top Section */
.banner-top-container {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
  width: 100%;
}

.banner-top-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px -5px rgba(6, 78, 59, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  transition: var(--transition-normal);
  display: block;
}

.banner-top-img:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -5px rgba(6, 78, 59, 0.18), 0 6px 14px -2px rgba(0, 0, 0, 0.08);
}

/* Brand Header */
.brand-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-partner {
  background: var(--primary-100);
  color: var(--primary-800);
  border: 1px solid var(--primary-200);
}

.brand-header h1 {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  line-height: 1.25;
}

.brand-header p {
  color: var(--slate-600);
  font-size: 0.98rem;
  max-width: 680px;
  margin: 0 auto 14px;
}

.brand-management-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--slate-500);
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--slate-200);
}

/* Security & Privacy Trust Bar */
.security-trust-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(5, 150, 105, 0.2);
  border-radius: var(--radius-full);
  padding: 10px 22px;
  margin-bottom: 26px;
  box-shadow: 0 4px 16px rgba(6, 78, 59, 0.06);
  font-size: 0.86rem;
  color: var(--slate-700);
}

.trust-shield {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.25);
}

.trust-text strong {
  color: var(--primary-950);
  font-weight: 700;
}

.trust-text span {
  color: var(--primary-700);
  font-weight: 700;
}

/* Main Card Container */
.main-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 32px;
  margin-bottom: 32px;
  transition: var(--transition-normal);
}

.card-header-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--slate-200);
}

.header-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-100);
  color: var(--accent-700);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--primary-100);
  color: var(--primary-800);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.card-header-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-900);
}

.subtitle-text {
  font-size: 0.88rem;
  color: var(--slate-500);
}

/* Form Styles */
.search-form {
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-700);
  display: flex;
  align-items: center;
  gap: 6px;
}

.required-star {
  color: var(--danger-600);
  font-weight: bold;
}

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

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-md);
  background-color: var(--slate-50);
  color: var(--slate-900);
  transition: var(--transition-fast);
  outline: none;
}

.input-wrapper input:focus {
  border-color: var(--primary-600);
  background-color: var(--white);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.input-wrapper .input-icon {
  position: absolute;
  left: 14px;
  color: var(--slate-400);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.input-help {
  font-size: 0.78rem;
  color: var(--slate-500);
}

/* Buttons */
.form-actions {
  display: flex;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  width: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background-color: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
}

.btn-secondary:hover {
  background-color: var(--slate-200);
  color: var(--slate-900);
}

.btn-cert {
  background: linear-gradient(135deg, var(--accent-600), var(--accent-700));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

.btn-cert:hover {
  background: linear-gradient(135deg, var(--accent-700), #92400e);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--slate-700);
  border: 1.5px solid var(--slate-300);
}

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

.btn-text-only {
  background: none;
  border: none;
  color: var(--slate-600);
  padding: 8px 16px;
}

.btn-text-only:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* Alerts */
.alert-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-top: 20px;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.alert-error {
  background-color: var(--danger-50);
  border: 1px solid var(--danger-100);
  border-left: 4px solid var(--danger-500);
  color: #991b1b;
}

.alert-icon {
  color: var(--danger-600);
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.alert-content p {
  font-size: 0.86rem;
  line-height: 1.45;
}

.alert-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
}

.alert-close:hover {
  color: var(--slate-700);
  background-color: rgba(0, 0, 0, 0.05);
}

.cooldown-alert {
  background-color: var(--warning-100);
  color: var(--warning-600);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

/* RESULT CONTAINER (BENTO GRID ARCHITECTURE) */
.result-container {
  margin-top: 32px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: clamp(20px, 4vw, 32px);
  box-shadow: 
    0 20px 40px -15px rgba(6, 78, 59, 0.1),
    0 0 0 1px rgba(5, 150, 105, 0.08),
    var(--shadow-lg);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Bento Grid System */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.bento-tile {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition-normal);
}

.bento-tile:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--slate-300);
}

.bento-hero {
  grid-column: span 12;
  background: linear-gradient(135deg, var(--primary-950), var(--primary-900));
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 28px -6px rgba(2, 44, 34, 0.4);
}

.bento-hero-flex {
  display: flex;
  align-items: center;
  gap: 20px;
}

.participant-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
  border: 2.5px solid rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.participant-info-meta {
  flex: 1;
  min-width: 0;
}

.bento-label-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--primary-300);
  margin-bottom: 4px;
}

.bento-hero .result-participant-name {
  color: var(--white);
  font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  font-weight: 800;
  line-height: 1.25;
}

.participant-id-sub {
  font-size: 0.88rem;
  color: var(--slate-300);
  margin-top: 2px;
}

.participant-id-sub strong {
  color: var(--accent-100);
  font-weight: 700;
  letter-spacing: 0.4px;
}

.bento-tile-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate-500);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--slate-100);
}

.bento-status-tile {
  grid-column: span 12;
}

.bento-details-tile {
  grid-column: span 12;
}

.bento-eval-tile {
  grid-column: span 12;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.bento-cert-tile {
  grid-column: span 12;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

@media (min-width: 768px) {
  .bento-status-tile {
    grid-column: span 5;
  }
  .bento-details-tile {
    grid-column: span 7;
  }
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.result-badge-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--slate-500);
  display: block;
  margin-bottom: 4px;
}

.result-participant-name {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 800;
  color: var(--slate-900);
}

.result-badges-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.4px;
  box-shadow: var(--shadow-xs);
}

.badge-lulus {
  background-color: var(--success-100);
  color: var(--success-600);
  border: 1.5px solid var(--success-500);
}

.badge-tidak-lulus {
  background-color: var(--danger-100);
  color: var(--danger-600);
  border: 1.5px solid var(--danger-500);
}

.badge-proses {
  background-color: var(--info-100);
  color: var(--info-600);
  border: 1.5px solid var(--info-500);
}

/* Badge Penilaian Tugas */
.badge-tugas-bagus {
  background-color: var(--accent-100);
  color: var(--accent-700);
  border: 1.5px solid var(--accent-500);
}

.badge-tugas-cukup {
  background-color: var(--info-100);
  color: var(--info-600);
  border: 1.5px solid var(--info-500);
}

.badge-tugas-kurang {
  background-color: var(--slate-200);
  color: var(--slate-700);
  border: 1.5px solid var(--slate-400);
}

.badge-tugas-buruk {
  background-color: var(--danger-100);
  color: var(--danger-700);
  border: 1.5px solid var(--danger-500);
}

/* Evaluation Message Box */
.eval-message-box {
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  border-left: 5px solid var(--primary-600);
  background-color: var(--slate-50);
  box-shadow: var(--shadow-xs);
}

.eval-message-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.eval-message-header h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--slate-900);
}

.eval-message-box p {
  font-size: 0.92rem;
  color: var(--slate-700);
  line-height: 1.55;
  margin-left: 34px;
}

.eval-success {
  background-color: var(--success-50);
  border: 1px solid var(--success-100);
  border-left: 4px solid var(--success-600);
}

.eval-success .eval-message-header i,
.eval-success .eval-message-header h4 {
  color: var(--success-600);
}

.eval-danger {
  background-color: var(--danger-50);
  border: 1px solid var(--danger-100);
  border-left: 4px solid var(--danger-500);
}

.eval-danger .eval-message-header i,
.eval-danger .eval-message-header h4 {
  color: var(--danger-600);
}

.eval-info {
  background-color: var(--info-100);
  border: 1px solid var(--slate-200);
  border-left: 4px solid var(--info-600);
}

.eval-info .eval-message-header i,
.eval-info .eval-message-header h4 {
  color: var(--info-600);
}

.divider {
  height: 1px;
  background-color: var(--slate-200);
  margin: 20px 0;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
}

.result-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.result-item-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.result-item-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-800);
}

/* Certificate Section Card */
.cert-section {
  margin-bottom: 24px;
}

.cert-card {
  background: linear-gradient(135deg, var(--white), var(--accent-50));
  border: 1.5px solid var(--accent-500);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.cert-info {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.cert-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-600);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-700);
  margin-bottom: 2px;
}

.cert-info p {
  font-size: 0.85rem;
  color: var(--slate-600);
}

.cert-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cert-notice-none {
  background: var(--slate-200);
  color: var(--slate-700);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.result-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px dashed var(--slate-300);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.modal-content {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  background-color: var(--slate-900);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-xs);
}

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

.modal-body {
  flex: 1;
  min-height: 480px;
  background-color: var(--slate-100);
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: none;
}

.modal-footer {
  padding: 14px 20px;
  background-color: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 20px 0 30px;
  font-size: 0.86rem;
  color: var(--slate-500);
}

.footer-subtext {
  font-size: 0.78rem;
  margin-top: 4px;
  color: var(--slate-400);
}

/* ==============================================================================================
   RESPONSIVE MOBILE OPTIMIZATION
   ============================================================================================== */

@media (max-width: 640px) {
  body {
    padding: 16px 12px 30px;
  }

  .banner-top-container {
    margin-bottom: 18px;
  }

  .banner-top-badge {
    font-size: 0.78rem;
    padding: 6px 14px;
    text-align: center;
  }

  .brand-badges {
    flex-wrap: wrap;
  }

  .brand-badge {
    font-size: 0.75rem;
  }

  .brand-header h1 {
    font-size: 1.6rem;
  }

  .security-trust-bar {
    padding: 10px 14px;
    gap: 10px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    font-size: 0.81rem;
  }

  .trust-shield {
    width: 28px;
    height: 28px;
  }

  .main-card {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
  }

  .card-header-title {
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
  }

  .header-icon {
    width: 42px;
    height: 42px;
  }

  .card-header-title h2 {
    font-size: 1.12rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .input-wrapper input {
    height: 48px;
    font-size: 16px; /* Touch friendly & Prevents iOS auto-zoom */
  }

  .btn {
    width: 100%;
    min-height: 50px;
  }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .result-badges-wrap {
    width: 100%;
  }

  .eval-message-box p {
    margin-left: 0;
    margin-top: 6px;
  }

  .cert-card {
    padding: 16px;
  }

  .cert-actions {
    flex-direction: column;
    width: 100%;
  }

  .cert-actions .btn {
    width: 100%;
  }

  .result-actions {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .result-actions .btn {
    width: 100%;
  }

  .modal-overlay {
    padding: 10px;
  }

  .modal-content {
    max-height: 94vh;
  }

  .modal-body,
  .modal-body iframe {
    min-height: 360px;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

/* Print Styles */
@media print {
  body {
    background: none;
    padding: 0;
  }

  .banner-top-container,
  .security-notice-card,
  .search-form,
  .alert-box,
  .result-actions,
  .app-footer,
  .modal-overlay {
    display: none !important;
  }

  .main-card {
    box-shadow: none;
    border: none;
    padding: 0;
  }

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
