/* ── EduGrade CSS ─────────────────────────────────────────────────────── */
:root {
  --navy:        #0d1b2a;
  --navy-mid:    #162032;
  --navy-light:  #1e2f47;
  --navy-border: #253d56;
  --gold:        #c9a84c;
  --gold-light:  #e2c97e;
  --gold-dim:    rgba(201,168,76,.15);
  --cream:       #f4efdf;
  --cream-dim:   rgba(244,239,223,.07);
  --slate:       #8fa3b8;
  --white:       #fff;
  --green:       #4caf87;
  --red:         #e05c5c;
  --orange:      #e09a5c;
  --border:      rgba(201,168,76,.2);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.3);
  --shadow:      0 4px 24px rgba(0,0,0,.4);
  --radius:      10px;
  --radius-sm:   6px;
}

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

html { font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--navy);
  color: var(--cream);
  min-height: 100vh;
  display: flex; flex-direction: column;
  background-image:
    radial-gradient(ellipse at 10% 0%,   rgba(201,168,76,.05) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(201,168,76,.03) 0%, transparent 55%);
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1,h2,h3 { font-family: 'Playfair Display', serif; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 500; }
h3 { font-size: 1.1rem; font-weight: 500; }
p  { line-height: 1.7; color: var(--slate); }
a  { color: var(--gold-light); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: 'DM Mono', monospace; font-size: .85em; color: var(--gold-light); }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container   { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.main-content { flex: 1; padding: 32px 0 48px; }

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  background: rgba(13,27,42,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 0 24px; height: 58px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: 16px; }
.brand-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 700;
  color: var(--navy); flex-shrink: 0;
}
.brand-text { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--cream); }
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-link { padding: 6px 14px; border-radius: var(--radius-sm); color: var(--slate); font-size: 14px; font-weight: 500; transition: all .15s; }
.nav-link:hover { color: var(--cream); text-decoration: none; background: var(--cream-dim); }
.nav-link.active { color: var(--gold-light); background: var(--gold-dim); }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-user { font-size: 13px; color: var(--slate); }
.nav-icon { font-size: 18px; color: var(--slate); padding: 6px; border-radius: var(--radius-sm); transition: color .15s; }
.nav-icon:hover { color: var(--cream); text-decoration: none; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.card + .card { margin-top: 20px; }
.card-sm { padding: 18px 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-header h2, .card-header h3 { color: var(--cream); }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 16px;
  border-left: 3px solid transparent;
}
.alert-success { background: rgba(76,175,135,.12); border-color: var(--green); color: #7dd5b0; }
.alert-danger   { background: rgba(224,92,92,.12);  border-color: var(--red);   color: #e8908f; }
.alert-warning  { background: rgba(224,154,92,.12); border-color: var(--orange); color: #e8c08f; }
.alert-info     { background: rgba(143,163,184,.12); border-color: var(--slate); color: var(--slate); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  transition: all .15s; text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy); border-color: transparent;
  box-shadow: 0 2px 12px rgba(201,168,76,.25);
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(201,168,76,.4); }
.btn-secondary {
  background: var(--cream-dim); border-color: var(--border);
  color: var(--slate);
}
.btn-secondary:hover { color: var(--cream); border-color: rgba(201,168,76,.4); }
.btn-danger {
  background: rgba(224,92,92,.12); border-color: rgba(224,92,92,.3);
  color: #e8908f;
}
.btn-danger:hover { background: rgba(224,92,92,.2); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 7px 10px; font-size: 16px; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 12px;
  background: rgba(244,239,223,.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--cream); font-family: 'DM Sans', sans-serif; font-size: 14px;
  outline: none; transition: border-color .2s;
}
.form-control:focus { border-color: var(--gold); }
.form-control::placeholder { color: var(--slate); font-style: italic; }
.form-control.textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
select.form-control option { background: var(--navy-mid); color: var(--cream); }
.form-hint { font-size: 12px; color: var(--slate); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 4px; }

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

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--gold); border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px 14px; font-size: 14px; color: var(--cream); border-bottom: 1px solid rgba(201,168,76,.07); }
.data-table tr:hover td { background: var(--cream-dim); }
.data-table tr:last-child td { border-bottom: none; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-green  { background: rgba(76,175,135,.15);  color: var(--green); }
.badge-gold   { background: rgba(201,168,76,.15);  color: var(--gold-light); }
.badge-red    { background: rgba(224,92,92,.15);   color: var(--red); }
.badge-slate  { background: rgba(143,163,184,.12); color: var(--slate); }
.badge-orange { background: rgba(224,154,92,.15);  color: var(--orange); }

/* ── Score Circle ───────────────────────────────────────────────────────── */
.score-circle {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.score-num   { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; line-height: 1; }
.score-label { font-size: 10px; letter-spacing: .05em; margin-top: 1px; }
.score-high  { background: rgba(76,175,135,.15);  border: 2px solid var(--green);  color: var(--green); }
.score-mid   { background: rgba(201,168,76,.15);  border: 2px solid var(--gold);   color: var(--gold); }
.score-low   { background: rgba(224,92,92,.15);   border: 2px solid var(--red);    color: var(--red); }
.score-neutral { background: var(--cream-dim);    border: 2px solid var(--border); color: var(--slate); }

/* ── Progress bar ───────────────────────────────────────────────────────── */
.progress { height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); transition: width .8s ease; }

/* ── Section label ──────────────────────────────────────────────────────── */
.section-label { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 600; margin-bottom: 10px; }

/* ── Upload zone ────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; cursor: pointer;
  transition: all .25s; background: rgba(244,239,223,.02); position: relative;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--gold); background: var(--gold-dim); }
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-icon { font-size: 36px; margin-bottom: 12px; display: block; }
.upload-zone h3 { font-size: 15px; color: var(--cream); font-weight: 500; margin-bottom: 6px; }
.upload-zone p  { font-size: 13px; color: var(--slate); }
.file-loaded {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: rgba(76,175,135,.08);
  border: 1px solid rgba(76,175,135,.3); border-radius: var(--radius-sm); margin-top: 12px;
}
.file-loaded-name { font-size: 13px; color: var(--green); font-weight: 500; }
.file-loaded-meta { font-size: 11px; color: var(--slate); }

/* ── Spinner ────────────────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border); border-top-color: var(--gold);
  border-radius: 50%; animation: spin .8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stat cards ─────────────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--navy-mid); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat-num  { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; color: var(--gold-light); line-height: 1; }
.stat-label { font-size: 12px; color: var(--slate); margin-top: 4px; }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--slate); }
.empty-icon  { font-size: 40px; margin-bottom: 12px; display: block; }

/* ── Page header ────────────────────────────────────────────────────────── */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.page-header-text h1 { color: var(--cream); margin-bottom: 4px; }
.page-header-text p  { font-size: 14px; }
.breadcrumb { font-size: 12px; color: var(--slate); margin-bottom: 6px; }
.breadcrumb a { color: var(--slate); }
.breadcrumb a:hover { color: var(--gold-light); }

/* ── Criteria breakdown ─────────────────────────────────────────────────── */
.criteria-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--cream-dim); border-radius: var(--radius-sm);
  margin-bottom: 6px;
}
.criteria-name    { flex: 1; font-size: 14px; color: var(--cream); }
.criteria-comment { font-size: 12px; color: var(--slate); margin-top: 2px; }
.criteria-score   { font-family: 'DM Mono', monospace; font-size: 13px; color: var(--gold-light); min-width: 58px; text-align: right; }

/* ── Lists ──────────────────────────────────────────────────────────────── */
.feedback-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.feedback-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.feedback-list.strengths    li { color: var(--green); }
.feedback-list.improvements li { color: var(--orange); }
.feedback-list.strengths    li::before { content: '✓'; flex-shrink: 0; }
.feedback-list.improvements li::before { content: '→'; flex-shrink: 0; }

/* ── Loading overlay ────────────────────────────────────────────────────── */
.loading-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--gold-dim);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--gold-light); margin-top: 12px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 20px 0; }
.footer-inner { display: flex; justify-content: space-between; font-size: 12px; color: var(--slate); flex-wrap: wrap; gap: 8px; }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; margin-top: 20px; }
.page-link { padding: 6px 12px; background: var(--cream-dim); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; color: var(--slate); }
.page-link.active, .page-link:hover { color: var(--gold-light); border-color: rgba(201,168,76,.4); background: var(--gold-dim); }

/* ── Landing page ───────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 80px 20px 60px; }
.hero h1 { font-size: 3rem; margin-bottom: 16px; background: linear-gradient(135deg, var(--gold), var(--gold-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p   { font-size: 18px; max-width: 540px; margin: 0 auto 32px; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .form-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  h1 { font-size: 1.5rem; }
  .hero h1 { font-size: 2rem; }
}
