/* =====================================================================
   School ERP — Design System
   Brand: Askurex Technologies — violet → magenta → orange → gold gradient,
   taken directly from the vendor logo. Bold gradient spent on brand
   moments (hero, auth, buttons, marks); working surfaces (tables, forms,
   dashboards) stay calm and legible for daily use.
   Signature motif carried over: the ruled exercise-book (খাতা) card.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Baloo+Da+2:wght@500;600;700;800&family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Color tokens — Askurex Technologies palette */
  --color-primary: #7C3AED;        /* vibrant violet */
  --color-primary-dark: #4C1D95;   /* deep violet — dark surfaces, headings */
  --color-primary-light: #C4B5FD;
  --color-primary-tint: #F5F3FF;
  --color-magenta: #DB2777;        /* brand secondary — gradient midpoint, highlights */
  --color-magenta-dark: #9D174D;
  --color-magenta-tint: #FCE7F3;
  --color-accent: #F97316;         /* brand orange — CTAs & signature rule */
  --color-accent-dark: #C2410C;
  --color-accent-tint: #FFEDD5;
  --color-gold: #F59E0B;           /* brand warm highlight */
  --color-gold-tint: #FEF3C7;
  --color-ink: #1E1B2E;
  --color-ink-soft: #6B6478;
  --color-paper: #FAFAFC;
  --color-white: #FFFFFF;
  --color-border: #E7E3F1;
  --color-success: #16A34A;
  --color-success-tint: #DCFCE7;
  --color-danger: #DC2626;
  --color-danger-tint: #FEE2E2;
  --color-warning: #D97706;
  --color-warning-tint: #FEF3C7;

  /* Brand gradient — the signature */
  --gradient-brand: linear-gradient(135deg, #7C3AED 0%, #DB2777 55%, #F97316 100%);
  --gradient-brand-wide: linear-gradient(135deg, #4C1D95 0%, #7C3AED 30%, #DB2777 65%, #F97316 90%, #F59E0B 100%);
  --gradient-brand-soft: linear-gradient(135deg, #F5F3FF 0%, #FCE7F3 55%, #FFEDD5 100%);

  /* Type */
  --font-display: 'Baloo Da 2', 'Hind Siliguri', sans-serif;
  --font-body: 'Hind Siliguri', 'Inter', sans-serif;
  --font-data: 'Inter', 'Hind Siliguri', sans-serif;

  /* Layout */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(76, 29, 149, 0.07);
  --shadow-md: 0 8px 24px rgba(124, 58, 237, 0.13);
  --shadow-lg: 0 20px 48px rgba(76, 29, 149, 0.20);
  --shadow-glow: 0 10px 22px rgba(219, 39, 119, 0.22);
  --sidebar-w: 264px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-paper);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .5em;
  color: var(--color-primary-dark);
}

h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.15rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--color-ink); }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-magenta); }
img { max-width: 100%; display: block; }

.numerals, table, .data { font-family: var(--font-data); font-variant-numeric: tabular-nums; }

/* Reusable gradient text — used sparingly, on short brand moments only */
.text-gradient {
  background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; display: inline-block;
}

:focus-visible {
  outline: 3px solid var(--color-magenta);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------------
   Layout utilities
   --------------------------------------------------------------------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-data); font-weight: 700; font-size: .78rem;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--color-magenta-dark); background: var(--gradient-brand-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: .96rem;
  padding: 12px 24px; border-radius: var(--radius-sm); border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background-color .15s ease;
  text-decoration: none; line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { filter: brightness(1.07); color: #fff; box-shadow: var(--shadow-glow); }
.btn-accent { background: var(--color-accent); color: #fff; }
.btn-accent:hover { background: var(--color-accent-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary-tint); }
.btn-ghost { background: transparent; color: var(--color-ink-soft); }
.btn-sm { padding: 8px 16px; font-size: .86rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------------------------------------------------------------------
   Signature motif: ruled "khata" card — used for notices & key panels
   --------------------------------------------------------------------- */
.ruled-card {
  position: relative;
  background:
    repeating-linear-gradient(
      to bottom,
      #fff 0, #fff 33px, var(--color-primary-tint) 34px
    );
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 18px 20px 18px 26px;
  box-shadow: var(--shadow-sm);
}
.ruled-card + .ruled-card { margin-top: 14px; }
.ruled-card .date-badge {
  display: inline-block; font-family: var(--font-data); font-weight: 700; font-size: .74rem;
  color: var(--color-primary-dark); background: var(--color-white); border: 1px solid var(--color-primary-light);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 6px;
}
.ruled-card h4 { margin: 0 0 4px; font-family: var(--font-body); font-size: 1.05rem; color: var(--color-ink); }
.ruled-card p { margin: 0; color: var(--color-ink-soft); font-size: .92rem; }

/* ---------------------------------------------------------------------
   Cards / panels (general, e.g. dashboard stat cards, feature cards)
   --------------------------------------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.stat-card {
  background: #fff; border-radius: var(--radius-md); padding: 20px 22px;
  border: 1px solid var(--color-border); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 16px; transition: box-shadow .2s ease, transform .2s ease;
}
.stat-card .icon {
  width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; background: var(--color-primary-tint); color: var(--color-primary);
  flex-shrink: 0;
}
.stat-card.accent .icon { background: var(--gradient-brand-soft); color: var(--color-magenta-dark); }
.stat-card .value { font-family: var(--font-data); font-size: 1.5rem; font-weight: 800; color: var(--color-ink); line-height: 1.1; }
.stat-card .label { color: var(--color-ink-soft); font-size: .86rem; margin-top: 2px; }
a.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.feature-card {
  background: #fff; border-radius: var(--radius-md); padding: 26px; border: 1px solid var(--color-border);
  transition: box-shadow .2s ease, transform .2s ease;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.feature-card .icon { width: 52px; height: 52px; border-radius: 14px; background: var(--gradient-brand-soft); color: var(--color-magenta-dark); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 14px; }

/* ---------------------------------------------------------------------
   Status badges / pills
   --------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; font-family: var(--font-data); }
.badge-success { background: var(--color-success-tint); color: var(--color-success); }
.badge-danger { background: var(--color-danger-tint); color: var(--color-danger); }
.badge-warning { background: var(--color-warning-tint); color: var(--color-warning); }
.badge-neutral { background: var(--color-primary-tint); color: var(--color-primary-dark); }

/* ---------------------------------------------------------------------
   Public site — top bar, nav, footer
   --------------------------------------------------------------------- */
.topbar { background: var(--color-primary-dark); color: #fff; font-size: .82rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; gap: 6px; }
.topbar a { color: #E9D5FF; }
.topbar a:hover { color: #fff; }

.navbar { background: #fff; border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 50; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: 46px; border-radius: 10px; object-fit: cover; }
.brand .name-bn { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--color-primary-dark); line-height: 1.2; }
.brand .name-en { font-size: .74rem; color: var(--color-ink-soft); letter-spacing: .03em; }

.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--color-ink); font-weight: 600; font-size: .95rem; position: relative; padding: 6px 0; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--gradient-brand); transition: width .2s ease; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--color-primary-dark); }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links { position: fixed; inset: 0 0 0 auto; width: 78%; max-width: 320px; background: #fff; flex-direction: column;
    padding: 90px 28px; gap: 22px; transform: translateX(100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: inline-flex; }
}

.footer { background: var(--color-primary-dark); color: #D9D3EA; padding: 56px 0 20px; margin-top: 60px; }
.footer h4 { color: #fff; font-family: var(--font-body); font-size: 1rem; margin-bottom: 14px; }
.footer a { color: #E9D5FF; }
.footer a:hover { color: #fff; }
.footer .bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 36px; padding-top: 18px; font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: #C4B5FD; }

/* ---------------------------------------------------------------------
   Hero — soft brand wash + one blurred gradient orb (restrained, not loud)
   --------------------------------------------------------------------- */
.hero { position: relative; background: linear-gradient(160deg, var(--color-primary-tint) 0%, #fff 55%); padding: 56px 0 70px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -140px; right: -120px; width: 460px; height: 460px;
  background: var(--gradient-brand); opacity: .16; border-radius: 50%; filter: blur(70px); pointer-events: none;
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: start; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; } }
.hero h1 { color: var(--color-primary-dark); }
.hero .lead { font-size: 1.08rem; color: var(--color-ink-soft); max-width: 46ch; }
.hero .cta-row { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.notice-board h3 { display: flex; align-items: center; gap: 8px; font-family: var(--font-body); color: var(--color-magenta-dark); font-size: 1rem; margin-bottom: 12px; }

/* ---------------------------------------------------------------------
   Auth pages (login / install) — the boldest brand moment
   --------------------------------------------------------------------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }
.auth-side { background: var(--gradient-brand-wide); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 60px; position: relative; overflow: hidden; }
.auth-side::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(255,255,255,.08) 40px);
}
.auth-side::after {
  content: ''; position: absolute; width: 340px; height: 340px; border-radius: 50%;
  background: rgba(255,255,255,.10); filter: blur(10px); bottom: -140px; left: -100px; pointer-events: none;
}
.auth-side .badge-mark { position: relative; width: 64px; height: 64px; border-radius: 16px; background: rgba(255,255,255,.16); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 28px; }
.auth-side h2 { color: #fff; position: relative; }
.auth-side p { color: #F1E5FF; position: relative; max-width: 40ch; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box .logo-row { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--color-ink); }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .96rem; background: #fff; color: var(--color-ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint); }
.form-hint { font-size: .8rem; color: var(--color-ink-soft); margin-top: 5px; }
.form-error { font-size: .8rem; color: var(--color-danger); margin-top: 5px; }

.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 18px; border: 1px solid transparent; }
.alert-success { background: var(--color-success-tint); color: #15803D; border-color: #BBF7D0; }
.alert-danger { background: var(--color-danger-tint); color: #B91C1C; border-color: #FECACA; }
.alert-warning { background: var(--color-warning-tint); color: #B45309; border-color: #FDE68A; }
.alert-info { background: var(--color-primary-tint); color: var(--color-primary-dark); border-color: var(--color-primary-light); }

/* ---------------------------------------------------------------------
   Install wizard steps
   --------------------------------------------------------------------- */
.install-shell { max-width: 640px; margin: 48px auto; padding: 0 20px; }
.steps { display: flex; justify-content: space-between; margin-bottom: 32px; counter-reset: step; }
.steps li { list-style: none; flex: 1; text-align: center; position: relative; font-size: .78rem; color: var(--color-ink-soft); font-weight: 600; }
.steps li::before {
  counter-increment: step; content: counter(step); display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid var(--color-border); color: var(--color-ink-soft);
  margin: 0 auto 6px; font-family: var(--font-data);
}
.steps li.done::before { background: var(--color-success); border-color: var(--color-success); color: #fff; content: '✓'; }
.steps li.active::before { background: var(--gradient-brand); border-color: transparent; color: #fff; }
.steps li.active { color: var(--color-magenta-dark); }
.steps li:not(:last-child)::after { content: ''; position: absolute; top: 15px; left: 55%; width: 90%; height: 2px; background: var(--color-border); z-index: -1; }

/* ---------------------------------------------------------------------
   Dashboard shell (sidebar + topbar)
   --------------------------------------------------------------------- */
.dash-body { background: var(--color-paper); min-height: 100vh; }
.dash-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); background: var(--color-primary-dark);
  color: #E9D5FF; overflow-y: auto; z-index: 60; transition: transform .2s ease;
}
.dash-sidebar .brand-row { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.dash-sidebar .brand-row .mark { width: 40px; height: 40px; border-radius: 11px; background: var(--gradient-brand); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: #fff; flex-shrink: 0; }
.dash-sidebar .brand-row .school-name { font-family: var(--font-body); font-weight: 700; color: #fff; font-size: .96rem; line-height: 1.25; }
.dash-sidebar .role-tag { font-size: .72rem; color: var(--color-primary-light); }

.dash-nav { padding: 16px 12px; }
.dash-nav .nav-section-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: #C4B5FD; padding: 14px 12px 6px; font-weight: 700; }
.dash-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius-sm); color: #EAE0FB;
  font-size: .92rem; font-weight: 500; margin-bottom: 2px; transition: background .15s ease;
}
.dash-nav a .ico { width: 20px; text-align: center; opacity: .85; }
.dash-nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.dash-nav a.active { background: linear-gradient(135deg, var(--color-magenta) 0%, var(--color-accent) 100%); color: #fff; font-weight: 600; }
.dash-nav a.soon { opacity: .45; cursor: default; }
.dash-nav a.soon:hover { background: transparent; color: #EAE0FB; }
.dash-nav .soon-tag { margin-left: auto; font-size: .65rem; background: rgba(255,255,255,.14); padding: 1px 7px; border-radius: 999px; }

.dash-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.dash-topbar { background: #fff; border-bottom: 1px solid var(--color-border); padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 40; }
.dash-topbar .menu-btn { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--color-ink); }
.dash-topbar .user-chip { display: flex; align-items: center; gap: 10px; }
.dash-topbar .user-chip .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--gradient-brand-soft); color: var(--color-magenta-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-data); overflow: hidden; }
.dash-content { padding: 28px; flex: 1; }
.dash-page-title { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.dash-page-title h1 { font-size: 1.5rem; margin: 0; }
.dash-page-title .breadcrumb { font-size: .82rem; color: var(--color-ink-soft); }

@media (max-width: 980px) {
  .dash-sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-main { margin-left: 0; }
  .dash-topbar .menu-btn { display: inline-block; }
}

/* ---------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; }
table.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data-table th { background: var(--color-primary-tint); color: var(--color-primary-dark); text-align: left; font-weight: 700; padding: 12px 16px; white-space: nowrap; font-family: var(--font-data); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
table.data-table td { padding: 12px 16px; border-top: 1px solid var(--color-border); vertical-align: middle; }
table.data-table tbody tr:hover { background: #FAF9FE; }

/* ---------------------------------------------------------------------
   Empty states
   --------------------------------------------------------------------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--color-ink-soft); }
.empty-state .icon { font-size: 2.4rem; margin-bottom: 10px; }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

/* ---------------------------------------------------------------------
   Printing FROM inside the dashboard shell (reports, tabulation sheets)
   --------------------------------------------------------------------- */
@media print {
  .no-print { display: none !important; }
  .dash-sidebar, .dash-topbar { display: none !important; }
  .dash-main { margin-left: 0 !important; }
  .dash-content { padding: 0 !important; }
  body.dash-body { background: #fff !important; }
  .card { box-shadow: none !important; border: none !important; }
}

/* ---------------------------------------------------------------------
   Filter bar / search / pagination (list pages)
   --------------------------------------------------------------------- */
.filter-bar { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.filter-bar .form-group { margin-bottom: 0; min-width: 160px; }
.avatar-sm { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--gradient-brand-soft); color: var(--color-magenta-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--color-border); font-size: .88rem; color: var(--color-ink); }
.pagination a:hover { background: var(--color-primary-tint); }
.pagination .current { background: var(--gradient-brand); color: #fff; border-color: transparent; }

/* ---------------------------------------------------------------------
   Profile view page
   --------------------------------------------------------------------- */
.profile-header { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 24px; margin-bottom: 22px; }
.profile-header .photo { width: 96px; height: 96px; border-radius: var(--radius-md); object-fit: cover; background: var(--color-primary-tint); flex-shrink: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
@media (max-width: 620px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-grid .item dt { font-size: .78rem; color: var(--color-ink-soft); margin-bottom: 2px; }
.detail-grid .item dd { margin: 0; font-weight: 600; }

/* ---------------------------------------------------------------------
   ID Card (CR80 size, printable)
   --------------------------------------------------------------------- */
.id-card {
  width: 336px; height: 212px; border-radius: 14px; overflow: hidden; position: relative;
  background: #fff; box-shadow: var(--shadow-md); border: 1px solid var(--color-border);
  font-family: var(--font-body); display: flex; flex-direction: column;
}
.id-card .id-head {
  background: var(--gradient-brand-wide);
  color: #fff; padding: 10px 14px; display: flex; align-items: center; gap: 8px;
}
.id-card .id-head .mark { width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.id-card .id-head .sname { font-size: .72rem; font-weight: 700; line-height: 1.15; }
.id-card .id-head .stag { font-size: .58rem; opacity: .9; }
.id-card .id-body { flex: 1; display: flex; gap: 12px; padding: 12px 14px; }
.id-card .id-photo { width: 76px; height: 92px; border-radius: 8px; object-fit: cover; border: 2px solid var(--color-primary-tint); background: var(--color-paper); flex-shrink: 0; }
.id-card .id-name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--color-ink); line-height: 1.2; margin-bottom: 2px; }
.id-card .id-row { font-size: .68rem; color: var(--color-ink-soft); margin-bottom: 3px; }
.id-card .id-row b { color: var(--color-ink); font-family: var(--font-data); }
.id-card .id-foot { background: var(--color-accent-tint); color: var(--color-accent-dark); font-size: .6rem; text-align: center; padding: 5px; font-family: var(--font-data); letter-spacing: .04em; }
.id-card.id-back { padding: 16px 14px; justify-content: space-between; }
.id-card.id-back p { font-size: .66rem; color: var(--color-ink-soft); margin: 0 0 8px; }
.id-card.id-back .sig-row { display: flex; justify-content: space-between; margin-top: auto; }
.id-card.id-back .sig-row div { border-top: 1px solid var(--color-ink-soft); font-size: .6rem; padding-top: 4px; width: 42%; text-align: center; color: var(--color-ink-soft); }

.id-card-pair { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }

@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; top: 0; left: 0; }
  .id-card { box-shadow: none; border: 1px solid #999; }
  @page { size: auto; margin: 10mm; }
}
