:root {
  --brand: #0f4c5c;
  --brand-dark: #0a3743;
  --brand-2: #0b7285;
  --brand-soft: #e6f1f3;
  --gold: #c9a227;
  --gold-soft: #fbf5df;
  --ink: #16232e;
  --muted: #64748b;
  --bg: #f4f8f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --success: #0f766e;
  --danger: #b91c1c;
  --warning: #b45309;
  --info: #0369a1;
  --purple: #6d28d9;
  --teal: #0f766e;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 76, 92, .06), 0 6px 18px rgba(15, 76, 92, .04);
  --shadow-md: 0 10px 30px rgba(15, 76, 92, .1);
}

* { box-sizing: border-box; }

@font-face {
  font-family: 'Cairo';
  src: url("../fonts/Cairo-VariableFont_slnt_wght.0e355a997fd3.ttf") format('truetype');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: .95rem;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--brand); }

h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--ink); }

.text-muted { color: var(--muted) !important; }
.bg-brand { background: var(--brand) !important; }
.text-brand { color: var(--brand) !important; }
.text-gold { color: var(--gold) !important; }

/* ------------------------------------------------------------------ */
/* Navbar                                                              */
/* ------------------------------------------------------------------ */
.app-navbar {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  min-height: 74px;
  z-index: 1030;
}
.app-brand { display: flex; align-items: center; gap: .65rem; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 1.15rem;
  box-shadow: 0 6px 14px rgba(15, 76, 92, .25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-weight: 800; color: var(--ink); font-size: 1.02rem; }
.brand-sub { font-size: .65rem; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.navbar .nav-link { color: #334155; font-weight: 500; padding: .5rem .85rem; border-radius: 10px; }
.navbar .nav-link:hover { color: var(--brand); background: var(--brand-soft); }
.user-chip {
  display: flex; align-items: center; gap: .5rem;
  border: 1px solid var(--border); border-radius: 999px;
  padding: .3rem .7rem .3rem .45rem; background: #fff; color: var(--ink);
  font-weight: 600;
}
.user-chip:hover { border-color: var(--brand-2); color: var(--brand); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.btn-icon { border: 0; background: transparent; color: var(--ink); }

/* ------------------------------------------------------------------ */
/* Layout / sidebar                                                    */
/* ------------------------------------------------------------------ */
.app-layout { display: flex; flex: 1 0 auto; align-items: stretch; min-height: calc(100vh - 74px); }
.app-sidebar {
  width: 268px; flex: 0 0 268px;
  background: #fff;
  border-left: 1px solid var(--border);
  padding: 1.1rem .85rem;
  position: sticky; top: 74px;
  height: calc(100vh - 74px);
  overflow-y: auto;
}
.sidebar-inner { display: flex; flex-direction: column; height: 100%; }
.sidebar-section { margin-bottom: 1.1rem; }
.sidebar-heading {
  display: block; font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; color: #94a3b8;
  padding: .35rem .8rem .5rem; text-transform: uppercase;
}
.sidebar-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .62rem .8rem; margin-bottom: .18rem;
  border-radius: 11px; color: #334155; font-weight: 500;
  transition: .15s ease;
  border: 1px solid transparent;
}
.sidebar-link i { font-size: 1.05rem; color: #7c8b9a; width: 20px; text-align: center; }
.sidebar-link:hover { background: #f6fafb; color: var(--brand); }
.sidebar-link:hover i { color: var(--brand-2); }
.sidebar-link.active {
  background: var(--brand-soft); color: var(--brand); font-weight: 700;
  border-color: #cfe5ea;
}
.sidebar-link.active i { color: var(--brand); }
.sidebar-note {
  margin-top: auto; padding: .9rem; border-radius: 14px;
  background: var(--gold-soft); border: 1px solid #f1e3ad;
  color: #6b5411; font-size: .78rem;
}
.sidebar-note i { font-size: 1.1rem; color: var(--gold); margin-bottom: .3rem; display: block; }
.sidebar-note p { margin: 0; line-height: 1.7; }
.app-main { flex: 1 1 auto; min-width: 0; }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.site-footer {
  background: #0b2e37;
  color: #b9cdd3;
  padding: 1.2rem 0;
  font-size: .8rem;
  margin-top: auto;
  border-top: 3px solid var(--gold);
}
.site-footer a { color: #e7f0f2; }
.site-footer a:hover { color: var(--gold); }
.footer-brand { display: flex; gap: .5rem; align-items: center; font-weight: 600; color: #fff; }
.footer-brand i { color: var(--gold); }
.footer-dev { color: #d6e4e8; }
.footer-dev strong { color: #fff; }
.footer-copy { color: #8fabb3; }
.dot { color: #5f7b83; margin: 0 .25rem; }

/* ------------------------------------------------------------------ */
/* Typography / common                                                 */
/* ------------------------------------------------------------------ */
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem;
}
.page-head h1 { font-size: 1.55rem; margin: 0 0 .25rem; font-weight: 800; }
.page-head p { margin: 0; color: var(--muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  color: var(--brand-2); text-transform: uppercase;
}
.section-title { font-size: 1.2rem; font-weight: 800; margin-bottom: .3rem; }
.section-sub { color: var(--muted); margin-bottom: 1.2rem; }

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card-header {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem; border-radius: var(--radius) var(--radius) 0 0 !important;
  font-weight: 700;
}
.card-body { padding: 1.25rem; }
.soft-card { background: #fbfdfe; border-style: dashed; }
.divider { height: 1px; background: var(--border); margin: 1rem 0; }

/* Buttons */
.btn { border-radius: 11px; font-weight: 600; padding: .52rem 1rem; }
.btn-brand {
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  color: #fff; border: 0;
  box-shadow: 0 6px 14px rgba(15, 76, 92, .22);
}
.btn-brand:hover, .btn-brand:focus { color: #fff; filter: brightness(1.05); }
.btn-outline-brand { border: 1px solid #b9d5db; color: var(--brand); background: #fff; }
.btn-outline-brand:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-2); }
.btn-gold { background: var(--gold); border: 0; color: #2b2205; font-weight: 700; }
.btn-gold:hover { background: #d8b23a; color: #2b2205; }
.btn-soft-danger { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.btn-soft-danger:hover { background: #fee2e2; color: var(--danger); }
.btn-soft-success { background: #ecfdf5; color: var(--success); border: 1px solid #a7f3d0; }
.btn-soft-success:hover { background: #d1fae5; color: var(--success); }
.btn-soft-secondary { background: #f1f5f9; color: #475569; border: 1px solid var(--border); }
.btn-sm { padding: .32rem .65rem; font-size: .79rem; border-radius: 9px; }

/* Badges */
.badge { font-weight: 600; padding: .38em .65em; border-radius: 8px; font-size: .72rem; }
.text-bg-purple { background: #ede9fe !important; color: #5b21b6 !important; }
.text-bg-teal { background: #ccfbf1 !important; color: #115e59 !important; }
.text-bg-soft { background: #f1f5f9 !important; color: #475569 !important; }
.badge-confidence { background: #f8fafc; border: 1px solid var(--border); color: #475569; }

/* Alerts */
.messages-wrap { margin-bottom: 1rem; }
.app-alert { border: 0; border-radius: 13px; box-shadow: var(--shadow-sm); font-weight: 500; }

/* Forms */
.form-label { font-weight: 600; font-size: .85rem; margin-bottom: .4rem; color: #334155; }
.form-control, .form-select {
  border-radius: 11px; border-color: #d7e1e5; padding: .62rem .85rem;
  font-size: .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-2); box-shadow: 0 0 0 .2rem rgba(11, 114, 133, .12);
}
input[type="url"], input[type="email"] { direction: ltr; text-align: left; }
.form-text { font-size: .76rem; color: var(--muted); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.invalid-feedback { display: block; }
.errorlist { list-style: none; padding: 0; margin: .3rem 0 0; color: var(--danger); font-size: .8rem; }
.required-star { color: var(--danger); }

/* Tables */
.table { --bs-table-bg: transparent; margin-bottom: 0; font-size: .86rem; }
.table thead th {
  background: #f8fafb; color: #475569; font-weight: 700;
  border-bottom: 1px solid var(--border); white-space: nowrap;
  font-size: .76rem; padding: .7rem .75rem;
}
.table td { vertical-align: middle; padding: .7rem .75rem; border-color: #edf1f4; }
.table-hover tbody tr:hover { background: #f9fcfc; }
.table-responsive { border-radius: 0 0 var(--radius) var(--radius); }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state .icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin-bottom: 1rem;
}
.empty-state h3 { font-size: 1.05rem; color: var(--ink); }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat-card { padding: 1.1rem 1.15rem; display: flex; align-items: center; gap: .9rem; }
.stat-icon {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; background: var(--brand-soft); color: var(--brand);
}
.stat-icon.gold { background: var(--gold-soft); color: #a17c0a; }
.stat-icon.green { background: #ecfdf5; color: var(--success); }
.stat-icon.red { background: #fef2f2; color: var(--danger); }
.stat-icon.purple { background: #f5f3ff; color: var(--purple); }
.stat-value { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .76rem; }

/* Progress */
.progress { border-radius: 999px; background: #edf2f4; height: 8px; }
.progress-bar { border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), #14b8a6); }
.progress-thin { height: 5px; }

/* ------------------------------------------------------------------ */
/* Landing                                                             */
/* ------------------------------------------------------------------ */
.landing-container { padding: 0 !important; max-width: none; }
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(201, 162, 39, .22), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(20, 184, 166, .22), transparent 30%),
    linear-gradient(135deg, #082f38 0%, #0f4c5c 52%, #0d3b47 100%);
  padding: 4.6rem 0 4rem;
}
.hero::after {
  content: ""; position: absolute; inset: auto -10% -55% -10%; height: 70%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.08), transparent 60%);
  pointer-events: none;
}
.hero .container-xxl { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  color: #f7e9b6; padding: .45rem .9rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; backdrop-filter: blur(5px);
}
.hero h1 {
  color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 800; line-height: 1.22; margin: 1.1rem 0 .8rem;
  letter-spacing: -.01em;
}
.hero h1 .accent { color: #f0cf6a; }
.hero-sub { color: #cfe0e4; font-size: 1.02rem; line-height: 1.9; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.hero-actions .btn { padding: .72rem 1.3rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.8rem; color: #a9c4ca; font-size: .78rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: .35rem; }
.hero-trust i { color: var(--gold); }

.mock-window {
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
  transform: rotate(-1deg); color: var(--ink);
  border: 1px solid rgba(255,255,255,.4);
}
.mock-bar { display: flex; align-items: center; gap: .35rem; padding: .7rem .9rem; background: #f7fafb; border-bottom: 1px solid var(--border); }
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: #d6e0e3; }
.mock-dot.red { background: #fca5a5; } .mock-dot.yellow { background: #fcd34d; } .mock-dot.green { background: #6ee7b7; }
.mock-title { margin-inline-start: auto; font-size: .68rem; color: var(--muted); }
.mock-body { padding: 1rem; }
.mock-page { background: #fbfdfe; border: 1px solid var(--border); border-radius: 12px; padding: .9rem; font-size: .78rem; line-height: 2; }
.mock-page .line { display: block; height: 6px; border-radius: 4px; background: #e8eef1; margin: .45rem 0; }
.mock-page .line.w-75 { width: 75%; } .mock-page .line.w-50 { width: 50%; } .mock-page .line.w-90 { width: 90%; }
.mock-error {
  display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem;
  border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px;
  margin-top: .5rem; font-size: .7rem;
}
.mock-error.correct { background: #ecfdf5; border-color: #a7f3d0; }
.mock-error .tag { font-size: .58rem; background: #fff; border: 1px solid var(--border); padding: .1rem .35rem; border-radius: 5px; color: var(--muted); }
.mock-error del { color: #b91c1c; }
.mock-error ins { color: #047857; text-decoration: none; font-weight: 700; }
.mock-footer { display: flex; justify-content: space-between; align-items: center; margin-top: .7rem; color: var(--muted); font-size: .65rem; }

.landing-section { padding: 4.4rem 0; }
.landing-section.alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.landing-head { text-align: center; max-width: 680px; margin: 0 auto 2.4rem; }
.landing-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.landing-head p { color: var(--muted); margin-top: .6rem; line-height: 1.9; }

.feature-card { height: 100%; padding: 1.5rem; transition: .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfe5ea; }
.feature-icon {
  width: 52px; height: 52px; border-radius: 15px;
  background: var(--brand-soft); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: .45rem; }
.feature-card p { color: var(--muted); line-height: 1.85; font-size: .85rem; margin: 0; }
.feature-card .more { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; margin-top: .9rem; font-weight: 600; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: step; }
.step { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 800; margin-bottom: .8rem;
}
.step h3 { font-size: .95rem; font-weight: 800; }
.step p { font-size: .8rem; color: var(--muted); margin: 0; line-height: 1.8; }

.category-card { padding: 1.1rem 1.2rem; display: flex; gap: .8rem; align-items: flex-start; height: 100%; }
.category-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: .4rem; flex: 0 0 12px; }
.category-card h3 { font-size: .88rem; font-weight: 800; margin: 0 0 .2rem; }
.category-card p { color: var(--muted); font-size: .76rem; margin: 0; line-height: 1.7; }

.sample-table-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.sample-table thead th { background: var(--brand); color: #fff; border: 0; }
.sample-table td { font-size: .82rem; }
.original-wrong { color: #b91c1c; background: #fef2f2; padding: .1rem .4rem; border-radius: 5px; }
.original-right { color: #047857; background: #ecfdf5; padding: .1rem .4rem; border-radius: 5px; }

.quality-list { list-style: none; padding: 0; margin: 0; }
.quality-list li { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem 0; border-bottom: 1px dashed #e5edf0; color: #475569; font-size: .86rem; }
.quality-list li:last-child { border-bottom: 0; }
.quality-list i { color: var(--success); margin-top: .15rem; }

.cta-band {
  position: relative; overflow: hidden; border-radius: 24px; padding: 2.8rem;
  background: linear-gradient(135deg, #0b3b45, #0f4c5c 60%, #134e4a);
  color: #fff; text-align: center;
}
.cta-band h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; }
.cta-band p { color: #cfe0e4; max-width: 620px; margin: .6rem auto 1.4rem; line-height: 1.9; }

/* ------------------------------------------------------------------ */
/* Auth                                                                */
/* ------------------------------------------------------------------ */
.auth-main { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 200px); padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 440px; padding: 2rem; border-radius: 22px; }
.auth-logo { width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(145deg, var(--brand), var(--brand-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto 1rem; box-shadow: 0 10px 25px rgba(15, 76, 92, .25); }
.auth-card h1 { font-size: 1.4rem; text-align: center; }
.auth-card .sub { color: var(--muted); text-align: center; font-size: .85rem; margin-bottom: 1.5rem; }
.auth-footer { text-align: center; font-size: .8rem; margin-top: 1rem; }
.auth-note { background: #f8fafb; border: 1px dashed var(--border); border-radius: 12px; padding: .8rem; font-size: .75rem; color: var(--muted); line-height: 1.8; }

/* ------------------------------------------------------------------ */
/* Project cards / dashboard                                           */
/* ------------------------------------------------------------------ */
.project-card { height: 100%; display: flex; flex-direction: column; overflow: hidden; transition: .18s ease; }
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.project-cover {
  height: 92px; background: linear-gradient(135deg, #0f4c5c, #0b7285);
  color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem; position: relative; overflow: hidden;
}
.project-cover::after {
  content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); left: -30px; bottom: -60px;
}
.project-cover .book-icon { font-size: 2rem; opacity: .9; }
.project-cover .badge { background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(3px); }
.project-card .card-body { flex: 1; display: flex; flex-direction: column; }
.project-title { font-size: 1rem; font-weight: 800; margin-bottom: .2rem; }
.project-meta { font-size: .75rem; color: var(--muted); }
.project-stats { display: flex; gap: 1rem; margin: .9rem 0; font-size: .76rem; color: #475569; }
.project-stats b { color: var(--ink); }
.project-card .actions { margin-top: auto; display: flex; gap: .4rem; flex-wrap: wrap; }

.processing-pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #f59e0b; margin-inline-end: .35rem;
  animation: pulse 1.4s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .5); } 70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
.ring-flash { box-shadow: 0 0 0 4px rgba(11, 114, 133, .25) !important; transition: box-shadow .2s ease; }

.breakdown-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .65rem; font-size: .8rem; }
.breakdown-row .label { width: 88px; flex: 0 0 88px; color: #475569; }
.breakdown-row .bar { flex: 1; height: 8px; background: #eef3f5; border-radius: 999px; overflow: hidden; }
.breakdown-row .bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), #2dd4bf); }
.breakdown-row .count { width: 38px; text-align: left; font-weight: 700; color: var(--ink); }

.timeline { position: relative; padding-inline-start: 1.2rem; }
.timeline::before { content: ""; position: absolute; inset-inline-start: .25rem; top: .3rem; bottom: .3rem; width: 2px; background: #e5edf0; }
.timeline-item { position: relative; padding-bottom: .85rem; font-size: .8rem; color: #475569; }
.timeline-item::before { content: ""; position: absolute; inset-inline-start: -1.05rem; top: .35rem; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); border: 2px solid #fff; box-shadow: 0 0 0 1px #cfe5ea; }
.timeline-item:last-child { padding-bottom: 0; }

.file-pill { display: inline-flex; align-items: center; gap: .45rem; background: #f8fafb; border: 1px solid var(--border); padding: .45rem .7rem; border-radius: 10px; font-size: .78rem; max-width: 100%; }
.file-pill i { color: var(--brand-2); }
.file-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.detail-list { list-style: none; margin: 0; padding: 0; }
.detail-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed #e8eef1; font-size: .82rem; }
.detail-list li:last-child { border-bottom: 0; }
.detail-list .k { color: var(--muted); }
.detail-list .v { font-weight: 600; text-align: left; }

/* ------------------------------------------------------------------ */
/* Review screen                                                       */
/* ------------------------------------------------------------------ */
.review-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.review-header h1 { font-size: 1.25rem; margin: 0; font-weight: 800; }
.review-toolbar { padding: .9rem 1rem; margin-bottom: 1rem; }
.review-toolbar form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.review-toolbar .form-select, .review-toolbar .form-control { min-width: 120px; font-size: .82rem; padding: .45rem .7rem; }
.review-toolbar .search { min-width: 200px; flex: 1; }

.review-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 1rem; align-items: start; }
@media (max-width: 1199.98px) { .review-grid { grid-template-columns: 1fr; } }

.viewer-card { position: sticky; top: 86px; }
.viewer-body { padding: 0; }
.viewer-tabs { display: flex; gap: .3rem; padding: .6rem .75rem 0; border-bottom: 1px solid var(--border); }
.viewer-tab { border: 0; background: transparent; padding: .45rem .8rem; font-size: .8rem; font-weight: 600; color: var(--muted); border-radius: 8px 8px 0 0; }
.viewer-tab.active { color: var(--brand); background: var(--brand-soft); }
.viewer-pane { display: none; }
.viewer-pane.active { display: block; }
.pdf-frame { width: 100%; height: 72vh; min-height: 480px; border: 0; background: #334155; }
.page-text {
  white-space: pre-wrap; line-height: 2.1; font-size: .93rem;
  padding: 1.2rem; max-height: 72vh; overflow-y: auto;
  background: #fdfdfb;
}
.page-text mark.hl {
  background: #fef3c7; border-bottom: 2px solid #d97706;
  padding: 1px 3px; border-radius: 4px; color: inherit; cursor: pointer;
}
.page-text mark.hl.hl-accepted { background: #d1fae5; border-color: #059669; }
.page-text mark.hl.hl-rejected { background: #f1f5f9; border-color: #94a3b8; color: #64748b; text-decoration: line-through; }
.page-text mark.hl.hl-edited { background: #dbeafe; border-color: #2563eb; }
.page-text mark.hl.hl-ocr { background: #f3e8ff; border-color: #7c3aed; }
.page-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; border-top: 1px solid var(--border); background: #fff; }
.page-nav .form-select { width: auto; min-width: 110px; font-size: .8rem; }

.error-list { display: flex; flex-direction: column; gap: .8rem; }
.error-card {
  border: 1px solid var(--border); border-right: 4px solid #f59e0b;
  border-radius: 14px; background: #fff; padding: .95rem 1rem;
  box-shadow: var(--shadow-sm);
}
.error-card.status-accepted { border-right-color: #10b981; background: #fbfefc; }
.error-card.status-rejected { border-right-color: #94a3b8; background: #fbfcfc; opacity: .9; }
.error-card.status-edited { border-right-color: #3b82f6; background: #fbfdff; }
.error-card.severity-confirmed { border-right-color: #dc2626; }
.error-card.severity-ocr_issue { border-right-color: #7c3aed; background: #fdfcff; }
.error-top { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .6rem; }
.error-index { font-size: .75rem; color: var(--muted); font-weight: 700; }
.error-texts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .55rem; }
@media (max-width: 575.98px) { .error-texts { grid-template-columns: 1fr; } }
.error-box { border-radius: 10px; padding: .55rem .7rem; font-size: .84rem; line-height: 1.8; word-break: break-word; }
.error-box .box-label { display: block; font-size: .64rem; font-weight: 700; letter-spacing: .04em; margin-bottom: .2rem; opacity: .8; }
.error-box.original { background: #fef2f2; color: #991b1b; }
.error-box.suggestion { background: #ecfdf5; color: #065f46; }
.error-context { font-size: .78rem; color: #64748b; background: #f8fafb; border: 1px dashed #e2e8f0; border-radius: 9px; padding: .5rem .65rem; margin-bottom: .55rem; line-height: 1.8; }
.error-explanation { font-size: .78rem; color: #475569; line-height: 1.8; margin-bottom: .55rem; }
.error-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.error-actions form { display: inline-flex; }
.error-edit-panel { display: none; margin-top: .65rem; padding-top: .65rem; border-top: 1px dashed #e2e8f0; }
.error-edit-panel.open { display: block; }
.error-user-note { font-size: .76rem; color: #0369a1; background: #f0f9ff; border-radius: 8px; padding: .45rem .6rem; margin-top: .5rem; }

.review-progress { display: flex; align-items: center; gap: .8rem; }
.review-progress .progress { flex: 1; min-width: 100px; }
.review-progress small { color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------------ */
/* Manage / settings                                                   */
/* ------------------------------------------------------------------ */
.settings-section { margin-bottom: 1.3rem; }
.settings-section .card-header { display: flex; align-items: center; gap: .5rem; }
.settings-section .card-header i { color: var(--brand-2); }
.setting-row { padding: .75rem 0; border-bottom: 1px dashed #e8eef1; }
.setting-row:last-child { border-bottom: 0; }
.setting-row .form-check { margin: 0; }
.setting-row .form-check-label { font-weight: 600; font-size: .86rem; }
.setting-row .form-text { margin-top: .2rem; }
.form-switch .form-check-input { width: 2.4rem; height: 1.25rem; cursor: pointer; }

.user-cell { display: flex; align-items: center; gap: .6rem; }
.user-cell .avatar { width: 36px; height: 36px; font-size: .82rem; }
.role-badge { font-size: .68rem; padding: .25em .55em; }

.log-details summary { cursor: pointer; color: var(--brand-2); font-size: .8rem; font-weight: 600; }
.log-pre { background: #0f172a; color: #cbd5e1; padding: 1rem; border-radius: 12px; font-size: .72rem; max-height: 260px; overflow: auto; direction: ltr; text-align: left; white-space: pre-wrap; margin-top: .5rem; }

#viewer { scroll-margin-top: 92px; }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 991.98px) {
  .hero { padding: 3.4rem 0; }
  .hero h1 { font-size: 2.2rem; }
  .mock-window { transform: none; margin-top: 2rem; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .app-main .container-xxl { padding-inline: 1rem; }
  .viewer-card { position: static; }
}
@media (max-width: 575.98px) {
  .stat-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .site-footer .container-xxl { justify-content: center; text-align: center; }
  .review-toolbar .search { min-width: 100%; }
  .page-head h1 { font-size: 1.3rem; }
}
