/* ============================================================
   ZING COMPLIANCE AUDIT — PREMIUM DESIGN SYSTEM
   Brand: Bold, energetic, modern. Navy + Electric Blue + Amber
   ============================================================ */

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

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --font-body:   'Plus Jakarta Sans', sans-serif;
  --font-head:   'Space Grotesk', sans-serif;

  /* Zing Brand Palette */
  --navy:        #050d1a;
  --navy-2:      #0a1628;
  --navy-3:      #0e1e36;
  --navy-card:   #111f38;
  --navy-border: rgba(255,255,255,0.08);

  --blue:        #2e7dff;
  --blue-mid:    #1a6aee;
  --blue-glow:   rgba(46,125,255,0.18);
  --blue-soft:   rgba(46,125,255,0.10);

  --amber:       #ffad1a;
  --amber-glow:  rgba(255,173,26,0.15);
  --amber-soft:  rgba(255,173,26,0.08);

  --green:       #00d68f;
  --red:         #ff4d6d;
  --red-soft:    rgba(255,77,109,0.1);

  --text-1:  #f0f4ff;
  --text-2:  #9db5d8;
  --text-3:  #5a7598;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;

  --shadow-glow: 0 0 40px rgba(46,125,255,0.12);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.5);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t:   all 0.22s var(--ease);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--navy);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(46,125,255,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 90% 80%,  rgba(255,173,26,0.07) 0%, transparent 60%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

/* ─── App Header ─────────────────────────────────────────────── */
.app-header {
  background: rgba(5, 13, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--navy-border);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-container {
  width: 92%;
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* ─── Logo ───────────────────────────────────────────────────── */
.logo-area {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-mark {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--blue) 0%, #6a3fff 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(46,125,255,0.4);
  flex-shrink: 0;
}

.logo-mark svg {
  width: 22px;
  height: 22px;
  color: white;
}

.logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.5px;
  color: var(--text-1);
}

.logo-text .zing-z { color: var(--blue); }
.logo-badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--amber);
  text-transform: uppercase;
  background: var(--amber-soft);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: super;
  border: 1px solid rgba(255,173,26,0.3);
}

/* ─── User Status Pill ───────────────────────────────────────── */
.user-status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  padding: 0.35rem 0.9rem 0.35rem 0.6rem;
  border-radius: 50px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green);
  animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 6px var(--green); }
  50%       { box-shadow: 0 0 14px var(--green); }
}

.user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-1);
}

.admin-toggle-area { margin-left: auto; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--t);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--t);
}
.btn:hover::after { background: rgba(255,255,255,0.05); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, #1a5fe8 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px var(--blue-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #3d8cff 0%, var(--blue) 100%);
  box-shadow: 0 6px 24px rgba(46,125,255,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--navy-card);
  color: var(--text-1);
  border-color: var(--navy-border);
}
.btn-secondary:hover {
  background: var(--navy-3);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red) 0%, #e0004a 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(255,77,109,0.2);
}
.btn-danger:hover {
  box-shadow: 0 6px 24px rgba(255,77,109,0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--blue);
  color: var(--blue);
}
.btn-outline:hover {
  background: var(--blue-soft);
  box-shadow: 0 0 16px var(--blue-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-1);
}

.btn-amber {
  background: linear-gradient(135deg, var(--amber) 0%, #e59600 100%);
  color: var(--navy);
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 16px var(--amber-glow);
}
.btn-amber:hover {
  box-shadow: 0 6px 24px rgba(255,173,26,0.35);
  transform: translateY(-1px);
}

.btn-sm    { padding: 0.4rem 0.85rem; font-size: 0.82rem; border-radius: var(--radius-xs); }
.btn-block { display: flex; width: 100%; }
.btn-link  { background: transparent; border: none; color: var(--blue); padding: 0; font-size: 0.85rem; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }

.btn-circle {
  border-radius: 50%;
  width: 42px;
  height: 42px;
  padding: 0;
}

/* ─── Inputs & Forms ──────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }

.form-group label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input[type="text"],
input[type="tel"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.78rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-1);
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--navy-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--t);
  -webkit-appearance: none;
}

select option { background: var(--navy-2); color: var(--text-1); }

input:focus, textarea:focus, select:focus {
  border-color: var(--blue);
  background: rgba(46,125,255,0.06);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

input::placeholder, textarea::placeholder { color: var(--text-3); }

.input-with-prefix { display: flex; align-items: stretch; position: relative; }
.input-prefix {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-weight: 600;
  font-size: 0.9rem;
  pointer-events: none;
}
.input-with-prefix input { padding-left: 2.8rem; }

.form-help {
  display: block;
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 0.3rem;
}

/* ─── Cards / Glass Panels ───────────────────────────────────── */
.glass-panel {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 2rem;
  transition: var(--t);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.glass-panel:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: var(--shadow-hover);
}

.panel-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--navy-border);
}

.panel-header h3 { font-size: 1.25rem; color: var(--text-1); }
.panel-header p  { color: var(--text-3); font-size: 0.88rem; margin-top: 0.2rem; }

/* ─── SPA Page Transitions ───────────────────────────────────── */
.app-page {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.app-page.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ─── Main Layout ────────────────────────────────────────────── */
.app-main { flex: 1; padding: 2.5rem 0 4rem; }

.container {
  width: 92%;
  max-width: 1360px;
  margin: 0 auto;
}

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.7em;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50px;
  letter-spacing: 0.03em;
}
.badge-success { background: rgba(0,214,143,0.15); color: var(--green); border: 1px solid rgba(0,214,143,0.3); }
.badge-accent  { background: var(--blue-soft); color: var(--blue); border: 1px solid rgba(46,125,255,0.3); }
.badge-amber   { background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(255,173,26,0.3); }
.badge-danger  { background: var(--red-soft); color: var(--red); border: 1px solid rgba(255,77,109,0.3); }

/* ─── Feedback Messages ──────────────────────────────────────── */
.feedback-msg {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  display: none;
}
.feedback-msg.error   { display: block; background: var(--red-soft); color: var(--red); border: 1px solid rgba(255,77,109,0.3); }
.feedback-msg.success { display: block; background: rgba(0,214,143,0.1); color: var(--green); border: 1px solid rgba(0,214,143,0.25); }

/* ─── Login Page ─────────────────────────────────────────────── */
.login-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 70px);
  padding: 2rem 0;
}

.login-brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-brand-icon {
  display: inline-flex;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--blue) 0%, #6a3fff 100%);
  border-radius: 20px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  box-shadow: 0 0 40px rgba(46,125,255,0.35);
}

.login-brand-icon svg { width: 38px; height: 38px; color: white; }

.login-brand h1 {
  font-size: 2.4rem;
  letter-spacing: -1px;
  margin-bottom: 0.4rem;
}

.login-brand h1 .zing-z { color: var(--blue); }

.login-brand p {
  color: var(--text-3);
  font-size: 0.95rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-2);
  text-align: center;
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.auth-card-title::before,
.auth-card-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--navy-border);
}

.auth-step { display: none; }
.auth-step.active { display: block; animation: fadeSlideUp 0.35s var(--ease); }

.otp-input {
  text-align: center;
  font-size: 2rem;
  letter-spacing: 0.7rem;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--blue);
}

.otp-timer-container {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.82rem;
}
.otp-cooldown { color: var(--text-3); }

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-3);
}
.trust-badge svg { width: 14px; height: 14px; color: var(--green); }

/* ─── Project Page ───────────────────────────────────────────── */
.grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 768px) { .grid-layout { grid-template-columns: 1fr; } }

/* GPS location box */
.location-box {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--amber-soft);
  border: 1.5px solid rgba(255,173,26,0.2);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.4rem;
}
.location-icon { width: 20px; height: 20px; color: var(--amber); flex-shrink: 0; }
.location-text { display: flex; flex-direction: column; gap: 0.1rem; }
.location-title { font-weight: 600; font-size: 0.88rem; color: var(--text-1); }
.location-details { font-size: 0.78rem; color: var(--text-3); }

/* Active project card */
.active-project-card {
  background: linear-gradient(135deg, #0d1e3a 0%, var(--navy-2) 100%);
  border: 1px solid rgba(46,125,255,0.25);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  box-shadow: 0 0 30px rgba(46,125,255,0.1);
  animation: glow-pulse 3s infinite alternate;
}
.active-project-card h4 { font-size: 1.2rem; color: var(--text-1); }
.active-project-card p.meta { color: var(--text-3); font-size: 0.83rem; margin: 0.35rem 0 1rem; }
.card-tag {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--blue); color: white;
  font-size: 0.68rem; font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: 50px;
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* Past projects list */
.past-projects-list h4 { font-size: 1rem; color: var(--text-2); margin-bottom: 0.85rem; }
.list-container {
  display: flex; flex-direction: column; gap: 0.6rem;
  max-height: 320px; overflow-y: auto; padding-right: 0.25rem;
}

.project-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--navy-border);
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  display: flex; justify-content: space-between; align-items: center;
  transition: var(--t);
}
.project-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  transform: translateX(3px);
}
.project-item-info h5 { font-size: 0.9rem; margin: 0; color: var(--text-1); }
.project-item-info p  { font-size: 0.78rem; color: var(--text-3); }

.placeholder-text {
  color: var(--text-3); font-style: italic;
  font-size: 0.88rem; text-align: center; padding: 2.5rem 0;
}

/* ─── Audit Page ─────────────────────────────────────────────── */
.audit-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 992px) { .audit-grid { grid-template-columns: 1fr; } }

.sticky-panel { position: sticky; top: 80px; }

.project-meta-pill {
  display: flex; gap: 0.4rem; margin-bottom: 0.5rem;
}
.project-pill-name {
  background: var(--navy-3); color: var(--text-2);
  padding: 0.18rem 0.55rem; font-size: 0.72rem; font-weight: 700;
  border-radius: 4px; border: 1px solid var(--navy-border);
}
.project-pill-state {
  background: var(--blue-soft); color: var(--blue);
  padding: 0.18rem 0.55rem; font-size: 0.72rem; font-weight: 700;
  border-radius: 4px; border: 1px solid rgba(46,125,255,0.2);
}

/* Image capture zone */
.image-capture-zone {
  width: 100%; height: 240px;
  background: rgba(255,255,255,0.02);
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  position: relative;
  display: flex; justify-content: center; align-items: center;
  overflow: hidden;
  transition: var(--t);
}
.image-capture-zone:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--blue);
  box-shadow: 0 0 20px var(--blue-glow);
}

.camera-preview {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; z-index: 5;
}
.camera-preview video { width: 100%; height: 100%; object-fit: cover; }

.btn-capture {
  position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  width: 58px; height: 58px;
  background: rgba(255,255,255,0.2); border: 3px solid white; z-index: 10;
}
.btn-capture .inner-circle {
  display: block; width: 40px; height: 40px;
  background: white; border-radius: 50%; transition: var(--t);
}
.btn-capture:hover .inner-circle { transform: scale(0.88); background: var(--blue); }
.btn-close-cam {
  position: absolute; top: 0.85rem; right: 0.85rem;
  background: rgba(0,0,0,0.6); color: white; z-index: 10;
}

.upload-placeholder {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.7rem; padding: 2rem; text-align: center; z-index: 2;
}
.upload-icon { width: 44px; height: 44px; color: var(--text-3); }
.upload-actions { display: flex; gap: 0.5rem; }
.file-input-label { margin: 0; }
.upload-hint { font-size: 0.73rem; color: var(--text-3); }

.selected-preview {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; z-index: 4;
}
.selected-preview img { width: 100%; height: 100%; object-fit: cover; }
.btn-remove {
  position: absolute; top: 0.85rem; right: 0.85rem;
  background: rgba(0,0,0,0.65); color: white; border: none;
  font-size: 1.2rem; font-weight: bold; z-index: 10;
}

/* AI Loading overlay */
.analysis-loading {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(5,13,26,0.9); z-index: 20;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  animation: fadeIn 0.3s var(--ease);
  border-radius: var(--radius-md);
}
.loader-ring {
  width: 52px; height: 52px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--blue);
  border-right-color: #6a3fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-bottom: 1.2rem;
}
.loader-text    { font-weight: 700; color: var(--text-1); font-size: 1rem; margin-bottom: 0.2rem; }
.loader-subtext { font-size: 0.82rem; color: var(--text-3); }

.panel-footer-actions {
  margin-top: 1.3rem; border-top: 1px solid var(--navy-border); padding-top: 1rem;
}

/* Findings list */
.flex-header { display: flex; justify-content: space-between; align-items: center; }

.findings-list-wrapper {
  display: flex; flex-direction: column; gap: 1.1rem;
  max-height: 780px; overflow-y: auto; padding-right: 0.25rem;
}

/* Scrollbar styling */
.findings-list-wrapper::-webkit-scrollbar,
.list-container::-webkit-scrollbar { width: 4px; }
.findings-list-wrapper::-webkit-scrollbar-track,
.list-container::-webkit-scrollbar-track { background: transparent; }
.findings-list-wrapper::-webkit-scrollbar-thumb,
.list-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Finding cards */
.finding-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.1rem;
  transition: var(--t);
  animation: fadeSlideUp 0.3s var(--ease);
}
.finding-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.finding-thumb-container {
  width: 120px; height: 120px;
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--navy-border);
}
.finding-thumb-container img { width: 100%; height: 100%; object-fit: cover; }

.finding-details {
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.4rem;
}
.finding-law-pill {
  display: inline-flex;
  background: var(--amber-soft); color: var(--amber);
  font-weight: 700; font-size: 0.72rem;
  padding: 0.2rem 0.55rem; border-radius: 4px;
  width: fit-content; margin-bottom: 0.3rem;
  border: 1px solid rgba(255,173,26,0.2);
}
.finding-issue-title { font-size: 1rem; font-weight: 700; color: var(--text-1); margin-bottom: 0.2rem; }
.finding-section-cite { font-size: 0.82rem; color: var(--text-3); font-weight: 500; }
.finding-solution {
  font-size: 0.87rem; color: var(--text-2);
  background: rgba(255,255,255,0.03);
  padding: 0.55rem 0.75rem;
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  margin: 0.5rem 0;
}
.finding-card-actions {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--navy-border); padding-top: 0.5rem;
}
.confidence-score { font-size: 0.78rem; font-weight: 500; color: var(--text-3); }
.confidence-score.low  { color: var(--red); font-weight: 600; }
.confidence-score.high { color: var(--green); }

.empty-state {
  text-align: center; padding: 4rem 2rem; color: var(--text-3);
}
.empty-icon { width: 56px; height: 56px; color: rgba(255,255,255,0.06); margin-bottom: 0.8rem; }

/* Alert banners */
.alert {
  padding: 0.85rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500;
}
.alert-warning { background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(255,173,26,0.25); }

/* ─── Modal ──────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  z-index: 1000; justify-content: center; align-items: center;
}
.modal.active { display: flex; }

.modal-content {
  width: 92%; max-width: 620px; max-height: 90vh; overflow-y: auto;
  animation: zoomIn 0.28s var(--ease);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--navy-border);
  padding-bottom: 0.85rem;
}
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: bold; cursor: pointer;
  color: var(--text-3); transition: var(--t);
  background: rgba(255,255,255,0.05);
}
.modal-close:hover { color: var(--red); background: var(--red-soft); }

.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.modal-audit-trail-tag {
  font-size: 0.75rem; color: var(--text-3);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--navy-border);
  padding: 0.55rem 0.75rem; border-radius: var(--radius-xs); margin-top: 1rem;
}
.modal-footer {
  margin-top: 1.5rem; border-top: 1px solid var(--navy-border);
  padding-top: 1rem; display: flex; justify-content: flex-end; gap: 0.6rem;
}

/* ─── Report View ────────────────────────────────────────────── */
.report-view-container {
  max-width: 980px; margin: 0 auto;
  padding: 0; border-radius: var(--radius-md);
  background: var(--navy-card);
}
.report-view-actions {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem;
  background: var(--navy-2);
  border-bottom: 1px solid var(--navy-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.security-disclaimer {
  display: flex; align-items: center; gap: 0.45rem;
  color: var(--amber); font-size: 0.82rem; font-weight: 600;
}
.icon-sec { width: 15px; height: 15px; }

.report-watermarked-area {
  position: relative; overflow: hidden;
  user-select: none; -webkit-user-select: none;
}
.watermark-overlay {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 10; overflow: hidden;
  opacity: 0.04; font-size: 2.2rem;
  font-family: var(--font-head); font-weight: 800; color: #fff;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 80px 40px; padding: 80px;
  transform: rotate(-15deg) scale(1.2); transform-origin: center;
}

.report-sheet {
  background: var(--navy-card);
  padding: 2.5rem;
  min-height: 700px;
}
.report-brand {
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--navy-border);
  padding-bottom: 1rem;
}
.report-brand h1 { font-size: 1.8rem; color: var(--text-1); }
.brand-subtext {
  text-transform: uppercase;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 2px; color: var(--blue);
}
.report-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--navy-border);
  padding: 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem;
}
.report-meta-grid strong { color: var(--text-2); }
.report-meta-grid span  { color: var(--text-1); }

.category-breakdown-section { margin-top: 1.25rem; }
.category-pills-container { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.category-pill-stat {
  background: var(--navy-3); color: var(--text-2);
  padding: 0.35rem 0.8rem; font-size: 0.78rem; border-radius: 50px;
  font-weight: 600; display: flex; gap: 0.4rem;
  border: 1px solid var(--navy-border);
}
.category-pill-stat span {
  background: var(--amber); color: var(--navy);
  border-radius: 50%; width: 18px; height: 18px;
  display: inline-flex; justify-content: center; align-items: center;
  font-size: 0.68rem;
}

.report-divider { border: 0; height: 1px; background: var(--navy-border); margin: 2rem 0; }
.report-findings-section h3 {
  margin-bottom: 1.25rem; border-bottom: 1px solid var(--navy-border); padding-bottom: 0.5rem;
}
.report-finding-item {
  display: grid; grid-template-columns: 180px 1fr;
  gap: 1.5rem; margin-bottom: 2rem; page-break-inside: avoid;
}
.report-finding-photo {
  width: 180px; height: 180px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--navy-border); overflow: hidden;
}
.report-finding-photo img { width: 100%; height: 100%; object-fit: cover; }
.report-finding-desc h4 { font-size: 1.1rem; color: var(--text-1); margin-bottom: 0.4rem; }
.report-finding-cite {
  display: inline-block; background: rgba(255,173,26,0.08);
  border-left: 3px solid var(--amber);
  padding: 0.4rem 0.85rem; margin-bottom: 0.85rem;
  font-size: 0.82rem; font-weight: 600; color: var(--text-2);
}
.report-finding-sol { font-size: 0.9rem; color: var(--text-2); }
.report-finding-sol strong { color: var(--text-1); }

/* ─── Admin Dashboard ────────────────────────────────────────── */
.admin-tabs {
  display: flex; gap: 0.4rem;
  background: var(--navy-2);
  border: 1px solid var(--navy-border);
  padding: 0.35rem; border-radius: var(--radius-sm); margin-bottom: 2rem;
  width: fit-content;
}
.admin-tab-btn {
  border: none; background: transparent;
  padding: 0.55rem 1.1rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.88rem;
  cursor: pointer; border-radius: var(--radius-xs);
  transition: var(--t); color: var(--text-3);
}
.admin-tab-btn.active {
  background: var(--navy-card); color: var(--text-1);
  box-shadow: var(--shadow-card);
}

.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; animation: fadeIn 0.3s var(--ease); }

.table-responsive { width: 100%; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.88rem; }
.admin-table th, .admin-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--navy-border);
}
.admin-table th {
  background: rgba(255,255,255,0.04); color: var(--text-2);
  font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.admin-table td { color: var(--text-1); }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-table tr:last-child td { border-bottom: none; }

.rules-management-layout { display: flex; flex-direction: column; gap: 2rem; }

/* ─── Footer ─────────────────────────────────────────────────── */
.app-footer {
  border-top: 1px solid var(--navy-border);
  padding: 1.2rem 0;
  background: var(--navy-2);
}
.app-footer p {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-3);
}
.app-footer .footer-brand { color: var(--blue); font-weight: 600; }

/* ─── Section Divider / Section Heading ──────────────────────── */
.section-intro {
  margin-bottom: 2rem;
}
.section-intro h2 {
  font-size: 1.6rem; letter-spacing: -0.5px;
}
.section-intro p { color: var(--text-3); font-size: 0.9rem; }

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes zoomIn {
  from { transform: scale(0.93); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes pulseGlow {
  0%   { box-shadow: 0 0 10px rgba(16, 185, 129, 0.1); }
  100% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.3); }
}

/* ─── Severity Summary Row ──────────────────────────────────── */
.severity-summary-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.5rem;
}
.severity-summary-row .badge {
  font-size: 0.85rem;
  padding: 0.3em 0.85em;
}

/* ─── Responsive Mobile ──────────────────────────────────────── */
@media (max-width: 576px) {
  .glass-panel { padding: 1.25rem; }
  .audit-grid  { grid-template-columns: 1fr; }
  .finding-card { grid-template-columns: 90px 1fr; }
  .finding-thumb-container { width: 90px; height: 90px; }
  .grid-form { grid-template-columns: 1fr; }
  .report-finding-item { grid-template-columns: 1fr; }
  .report-finding-photo { width: 100%; height: 200px; }
  .admin-tabs { width: 100%; flex-wrap: wrap; }
}
