* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, Helvetica, sans-serif; background: #f8fafc; color: #0f172a; line-height: 1.5; min-height: 100vh; }
body.page-home { background: linear-gradient(160deg, rgba(219,234,254,.35) 0%, rgba(236,253,245,.3) 35%, rgba(224,242,254,.25) 65%, rgba(220,252,231,.3) 100%), #f8fafc; }
a { color: #1e3a5f; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Public site header (NIRA-style) */
.gov-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.gov-topbar { background: #2563eb; color: #fff; font-size: 13px; }
.gov-topbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
.gov-topbar-left, .gov-topbar-right { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.gov-topbar a { color: #fff; text-decoration: none; font-weight: 500; }
.gov-topbar a:hover { text-decoration: underline; opacity: 1; }
.gov-header { background: #fff; border-bottom: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(15,23,42,.06); position: sticky; top: 0; z-index: 100; }
.gov-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.gov-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex-shrink: 0; }
.gov-logo:hover { text-decoration: none; }
.gov-logo-icon { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #1e3a5f, #2563eb); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; box-shadow: 0 2px 8px rgba(37,99,235,.25); }
.gov-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.gov-logo-text strong { font-size: 13px; color: #2563eb; text-transform: uppercase; letter-spacing: .3px; }
.gov-logo-text span { font-size: 11px; color: #64748b; max-width: 220px; }
.gov-menu { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; flex: 1; justify-content: center; }
.gov-menu-link { padding: 8px 14px; border-radius: 6px; color: #334155; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.gov-menu-link:hover { background: #f1f5f9; text-decoration: none; color: #1e3a5f; }
.gov-menu-link.gov-menu-active { color: #2563eb; background: #eff6ff; }
.gov-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.gov-btn-primary { display: inline-flex; align-items: center; padding: 10px 20px; background: #2563eb; color: #fff; border-radius: 6px; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; box-shadow: 0 2px 6px rgba(37,99,235,.3); }
.gov-btn-primary:hover { background: #1d4ed8; text-decoration: none; color: #fff; }
.lang-switcher { position: relative; }
.lang-globe { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #e2e8f0; background: #fff; color: #2563eb; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: .15s; }
.lang-globe:hover { border-color: #2563eb; background: #eff6ff; }
.lang-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 150px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.12); overflow: hidden; z-index: 200; }
.lang-dropdown.open { display: block; }
.lang-dropdown a { display: block; padding: 11px 16px; color: #334155; font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 1px solid #f1f5f9; }
.lang-dropdown a:last-child { border-bottom: none; }
.lang-dropdown a:hover { background: #f8fafc; text-decoration: none; color: #2563eb; }
.lang-dropdown a.active { background: #eff6ff; color: #2563eb; }
@media (max-width: 900px) {
  .gov-header-inner { justify-content: center; }
  .gov-menu { order: 3; width: 100%; justify-content: center; padding-bottom: 4px; }
  .gov-logo-text span { display: none; }
}
@media (max-width: 560px) {
  .gov-topbar-inner { justify-content: center; font-size: 12px; }
  .gov-topbar-left, .gov-topbar-right { justify-content: center; }
  .gov-menu-link { padding: 6px 10px; font-size: 13px; }
  .gov-btn-primary { padding: 8px 14px; font-size: 13px; }
}

.nav { background: #1e3a5f; color: #fff; padding: 16px 24px; }
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.nav h1 { font-size: 18px; font-weight: bold; }
.nav p { font-size: 13px; color: #bfdbfe; }
.nav-links { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nav-links a { color: #fff; padding: 8px 14px; border-radius: 6px; text-decoration: none; }
.nav-links a:hover { text-decoration: none; opacity: .9; }
.nav-links a.btn-nav-login { background: #2563eb; color: #fff; font-weight: bold; }
.nav-links a.btn-nav-login:hover { background: #1d4ed8; opacity: 1; }
.nav-links a.btn-light { background: rgba(255,255,255,.15); }
.nav-back { color: #bfdbfe !important; font-size: 14px; padding: 0 !important; }

.container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 48px 24px; }
.container-md { max-width: 640px; margin: 0 auto; padding: 32px 24px; }
.card { background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.08); padding: 24px; margin-bottom: 24px; }
.page-title { text-align: center; margin-bottom: 32px; }
.page-title h2 { font-size: 28px; margin-bottom: 8px; }
.page-title p { color: #64748b; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.stat-num { font-size: 32px; font-weight: bold; color: #1e3a5f; }
.stat-label { font-size: 14px; color: #64748b; margin-top: 4px; }

.btn { display: inline-block; padding: 12px 24px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; text-align: center; }
.btn:hover { opacity: .92; text-decoration: none; }
.btn-block { display: block; width: 100%; }
.btn-primary { background: #1e3a5f; color: #fff; }
.btn-gold { background: #c9a227; color: #1e3a5f; }
.btn-outline { background: #fff; border: 1px solid #cbd5e1; color: #334155; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.text-right { text-align: right; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-10 { margin-top: 40px; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
th { background: #f1f5f9; text-align: left; padding: 12px 20px; font-size: 11px; text-transform: uppercase; color: #64748b; }
td { padding: 14px 20px; border-top: 1px solid #e2e8f0; font-size: 14px; }
tr:hover td { background: #f8fafc; }
.mono { font-family: monospace; color: #1e3a5f; font-weight: 600; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: #334155; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px;
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.radio-group { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.radio-group label { flex: 1; min-width: 180px; text-align: center; padding: 16px; border: 2px solid #e2e8f0; border-radius: 8px; cursor: pointer; }
.radio-group input { display: none; }
.radio-group label:has(input:checked) { border-color: #1e3a5f; background: #f0f4f8; font-weight: bold; color: #1e3a5f; }

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-warn { background: #fef9c3; color: #854d0e; }
.empty { text-align: center; padding: 48px 20px; color: #64748b; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; align-items: start; }
.qr-box { text-align: center; }
.qr-box img { max-width: 220px; margin: 16px auto; display: block; border: 1px solid #e2e8f0; border-radius: 8px; }

.id-card { max-width: 400px; margin: 0 auto; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.15); background: #fff; }
.id-header { padding: 16px; color: #fff; display: flex; justify-content: space-between; align-items: flex-start; }
.id-header.gov { background: #1e3a5f; }
.id-header.fwr { background: #2d5016; }
.id-header-sub { font-size: 11px; text-transform: uppercase; opacity: .75; }
.id-header-title { font-size: 18px; font-weight: bold; margin-top: 2px; }
.id-badge { background: #c9a227; color: #1e3a5f; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; }
.id-body { padding: 24px; }
.id-photo { width: 80px; height: 96px; border-radius: 8px; border: 2px solid #e2e8f0; overflow: hidden; background: #f1f5f9; flex-shrink: 0; }
.id-photo img { width: 100%; height: 100%; object-fit: cover; }
.id-photo-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 32px; color: #94a3b8; }
.id-top { display: flex; gap: 16px; margin-bottom: 16px; }
.id-name { font-size: 20px; font-weight: bold; }
.id-position { font-size: 14px; color: #64748b; margin-top: 2px; }
.id-number { font-family: monospace; font-size: 14px; font-weight: 600; color: #1e3a5f; margin-top: 4px; }
.id-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 13px; margin-top: 16px; }
.id-meta label { color: #64748b; font-size: 11px; display: block; margin-bottom: 2px; }
.id-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #e2e8f0; padding-top: 16px; margin-top: 16px; }
.id-footer img { width: 80px; height: 80px; }
.status { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: bold; }
.status-active, .status-ACTIVE { background: #dcfce7; color: #166534; }
.status-revoked, .status-REVOKED { background: #fee2e2; color: #991b1b; }
.status-expired, .status-EXPIRED { background: #fef9c3; color: #854d0e; }

.login-box { max-width: 420px; margin: 60px auto; background: #fff; padding: 32px; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.login-box h2 { text-align: center; margin-bottom: 24px; font-size: 24px; }
.demo-box { background: #eff6ff; color: #1e40af; padding: 12px; border-radius: 8px; font-size: 12px; margin-top: 16px; }
.center-link { text-align: center; margin-top: 16px; font-size: 14px; }

.home-page { position: relative; min-height: calc(100vh - 140px); overflow: hidden; background: linear-gradient(135deg, rgba(30,58,95,.07) 0%, rgba(45,80,22,.06) 45%, rgba(59,130,246,.05) 70%, rgba(45,80,22,.07) 100%); }
.home-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.home-content { position: relative; z-index: 1; }

.float-icon { position: absolute; opacity: .09; font-size: 42px; filter: blur(.2px); animation: floatDrift linear infinite; user-select: none; }
.fi-1  { top: 8%;  left: 6%;   font-size: 38px; animation-duration: 22s; animation-delay: 0s; }
.fi-2  { top: 18%; left: 82%;  font-size: 44px; animation-duration: 26s; animation-delay: -4s; }
.fi-3  { top: 55%; left: 12%;  font-size: 36px; animation-duration: 20s; animation-delay: -8s; }
.fi-4  { top: 72%; left: 78%;  font-size: 40px; animation-duration: 24s; animation-delay: -2s; }
.fi-5  { top: 35%; left: 45%;  font-size: 48px; animation-duration: 28s; animation-delay: -6s; opacity: .07; }
.fi-6  { top: 85%; left: 35%;  font-size: 34px; animation-duration: 21s; animation-delay: -10s; }
.fi-7  { top: 12%; left: 55%;  font-size: 32px; animation-duration: 23s; animation-delay: -3s; }
.fi-8  { top: 48%; left: 88%;  font-size: 46px; animation-duration: 27s; animation-delay: -12s; }
.fi-9  { top: 65%; left: 52%;  font-size: 36px; animation-duration: 19s; animation-delay: -5s; }
.fi-10 { top: 28%; left: 22%;  font-size: 40px; animation-duration: 25s; animation-delay: -7s; }
.fi-11 { top: 42%; left: 68%;  font-size: 38px; animation-duration: 22s; animation-delay: -9s; }
.fi-12 { top: 78%; left: 58%;  font-size: 42px; animation-duration: 26s; animation-delay: -1s; }
.fi-13 { top: 5%;  left: 72%;  font-size: 34px; animation-duration: 20s; animation-delay: -11s; }
.fi-14 { top: 88%; left: 8%;   font-size: 44px; animation-duration: 24s; animation-delay: -6s; }
.fi-15 { top: 62%; left: 28%;  font-size: 38px; animation-duration: 23s; animation-delay: -4s; }
.fi-16 { top: 22%; left: 38%;  font-size: 30px; animation-duration: 21s; animation-delay: -8s; opacity: .08; }

@keyframes floatDrift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(18px, -28px) rotate(4deg); }
  50%  { transform: translate(-12px, -52px) rotate(-3deg); }
  75%  { transform: translate(22px, -24px) rotate(2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.home-hero { text-align: center; padding: 64px 24px 48px; }
.home-hero h2 { font-size: 36px; margin-bottom: 12px; color: #1e3a5f; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.home-hero > p { font-size: 18px; color: #475569; margin-bottom: 48px; max-width: 560px; margin-left: auto; margin-right: auto; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; max-width: 800px; margin: 0 auto; }
.home-card { background: rgba(255,255,255,.88); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.6); border-radius: 16px; padding: 32px; box-shadow: 0 8px 24px rgba(30,58,95,.08); text-decoration: none; color: inherit; display: block; transition: transform .2s, box-shadow .2s; }
.home-card:hover { transform: translateY(-6px); text-decoration: none; box-shadow: 0 16px 32px rgba(30,58,95,.12); border-color: rgba(30,58,95,.15); }
.home-card-icon { font-size: 40px; margin-bottom: 16px; }
.home-card h3 { font-size: 22px; margin-bottom: 8px; color: #1e3a5f; }
.home-card p { color: #64748b; }

.tabs { display: flex; background: #f1f5f9; border-radius: 8px; padding: 4px; margin-bottom: 24px; }
.tab-btn { flex: 1; padding: 10px; border: none; background: transparent; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; color: #64748b; }
.tab-btn.active { background: #fff; color: #1e3a5f; box-shadow: 0 1px 3px rgba(0,0,0,.1); font-weight: 600; }

.dash-tabs { display: none !important; }

/* Dashboard switch buttons */
.switch-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.switch-btn { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: 14px; text-decoration: none; border: 2px solid #e2e8f0; background: #fff; transition: all .2s ease; box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.switch-btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.switch-icon { font-size: 32px; flex-shrink: 0; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #f1f5f9; }
.switch-text { display: flex; flex-direction: column; gap: 4px; }
.switch-text strong { font-size: 15px; font-weight: 700; color: #334155; line-height: 1.3; }
.switch-text small { font-size: 13px; color: #64748b; font-weight: 500; }

.switch-gov.active { border-color: #1e3a5f; background: #1e3a5f; box-shadow: 0 6px 20px rgba(30,58,95,.3); }
.switch-gov.active .switch-icon { background: rgba(255,255,255,.15); }
.switch-gov.active .switch-text strong { color: #fff; }
.switch-gov.active .switch-text small { color: #bfdbfe; }
.switch-gov:not(.active):hover { border-color: #1e3a5f; }

.switch-fwr.active { border-color: #2d5016; background: #2d5016; box-shadow: 0 6px 20px rgba(45,80,22,.3); }
.switch-fwr.active .switch-icon { background: rgba(255,255,255,.15); }
.switch-fwr.active .switch-text strong { color: #fff; }
.switch-fwr.active .switch-text small { color: #bbf7d0; }
.switch-fwr:not(.active):hover { border-color: #2d5016; }

.content-box { background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 2px 12px rgba(0,0,0,.06); border: 1px solid #e2e8f0; }
.content-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #e2e8f0; flex-wrap: wrap; }
.content-head h2 { font-size: 20px; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.content-head p { font-size: 14px; color: #64748b; margin: 0; }
.content-box table { box-shadow: none; border: 1px solid #e2e8f0; }

.type-buttons, .overview-grid, .dash-topbar, .section-panel, .dash-section, .section-header { display: none !important; }

.role-badge { background: #c9a227; color: #1e3a5f; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; }
.role-tag { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: bold; }
.role-super { background: #dbeafe; color: #1e40af; }
.role-user { background: #f1f5f9; color: #475569; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.qr-reader { min-height: 280px; border: 2px solid rgba(30,58,95,.2); border-radius: 12px; overflow: hidden; background: #000; }
.qr-hint { text-align: center; font-size: 13px; color: #64748b; margin-top: 12px; }
.verify-result { text-align: center; font-weight: 600; padding: 16px; border-radius: 8px; margin-bottom: 24px; }
.verify-result.valid { background: #dcfce7; color: #166534; }
.verify-result.invalid { background: #fef9c3; color: #854d0e; }
.link-box { background: #f8fafc; padding: 12px; border-radius: 8px; font-family: monospace; font-size: 12px; word-break: break-all; }
.status-btns { display: flex; flex-wrap: wrap; gap: 8px; }

footer.site-footer { text-align: center; padding: 24px; color: #64748b; font-size: 13px; border-top: 1px solid #e2e8f0; margin-top: 40px; }
.footer-credit { margin-top: 8px; font-size: 12px; color: #64748b; line-height: 1.5; }

.hidden { display: none !important; }

@media (max-width: 640px) {
  .container, .container-sm, .container-md { padding: 20px 16px; }
  table { font-size: 12px; }
  th, td { padding: 10px 12px; }
  .home-hero h2 { font-size: 28px; }
  .float-icon { font-size: 28px !important; opacity: .06; }
  .home-hero { padding: 40px 16px 32px; }
  .switch-btns { grid-template-columns: 1fr; }
  .switch-btn { padding: 18px 20px; }
  .content-head { flex-direction: column; align-items: flex-start; }
  .content-box { padding: 20px; }
}

/* ===== ID Card Print ===== */
.print-id-page { background: #e2e8f0; min-height: 100vh; padding: 24px; }
.print-toolbar { max-width: 900px; margin: 0 auto 24px; background: #fff; border-radius: 12px; padding: 20px 24px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.print-toolbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.print-toolbar h1 { font-size: 20px; color: #1e3a5f; margin-bottom: 4px; }
.print-toolbar p { font-size: 14px; color: #64748b; margin: 0; }
.print-toolbar-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.print-tip { font-size: 12px; color: #64748b; margin: 12px 0 0; }

.print-sheet { display: flex; flex-wrap: wrap; gap: 32px; justify-content: center; max-width: 900px; margin: 0 auto; }
.print-card-block { text-align: center; }
.print-side-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #64748b; margin-bottom: 10px; }

.id-print-card {
  width: 85.6mm; height: 53.98mm; background: #fff; border-radius: 3mm;
  overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.15);
  border: 0.3mm solid #cbd5e1; position: relative; text-align: left;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.id-print-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 2.5mm 3mm 1.5mm; color: #fff; }
.id-print-front.gov .id-print-header { background: linear-gradient(135deg, #1e3a5f, #2a5080); }
.id-print-front.fwr .id-print-header { background: linear-gradient(135deg, #2d5016, #3d6b22); }
.id-print-ministry { font-size: 5pt; text-transform: uppercase; letter-spacing: .4px; opacity: .85; }
.id-print-title { font-size: 8pt; font-weight: 700; margin-top: 0.5mm; }
.id-print-badge { background: #2563eb; color: #fff; font-size: 6pt; font-weight: 800; padding: 1mm 2mm; border-radius: 1mm; }
.id-print-gold-bar { height: 1mm; background: linear-gradient(90deg, #2563eb, #3b82f6, #2563eb); }
.id-print-body { display: flex; gap: 2.5mm; padding: 2mm 3mm; align-items: flex-start; }
.id-print-photo { width: 18mm; height: 22mm; border: 0.4mm solid #cbd5e1; border-radius: 1.5mm; overflow: hidden; background: #f1f5f9; flex-shrink: 0; }
.id-print-photo img { width: 100%; height: 100%; object-fit: cover; }
.id-print-photo-empty { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 6pt; color: #94a3b8; }
.id-print-name { font-size: 9pt; font-weight: 800; color: #0f172a; line-height: 1.15; }
.id-print-position { font-size: 6.5pt; color: #475569; margin-top: 0.5mm; }
.id-print-idnum { font-family: monospace; font-size: 7pt; font-weight: 700; color: #1e3a5f; margin-top: 1mm; }
.id-print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1mm 2mm; padding: 0 3mm 1.5mm; font-size: 5.5pt; }
.id-print-grid span { display: block; font-size: 4.5pt; color: #64748b; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 0.2mm; }
.id-print-grid div { color: #0f172a; font-weight: 600; line-height: 1.2; }
.id-print-footer { display: flex; justify-content: space-between; align-items: center; padding: 1.5mm 3mm; border-top: 0.3mm solid #e2e8f0; margin-top: 0.5mm; }
.id-print-footer .status { font-size: 5pt; padding: 0.8mm 2mm; }
.id-print-signature { font-size: 5pt; color: #94a3b8; font-style: italic; }

.id-print-back { display: flex; flex-direction: column; }
.id-print-back.gov .id-print-back-header { background: #1e3a5f; }
.id-print-back.fwr .id-print-back-header { background: #2d5016; }
.id-print-back-header { color: #fff; text-align: center; font-size: 7pt; font-weight: 700; padding: 2mm; letter-spacing: .3px; }
.id-print-back-body { flex: 1; display: flex; align-items: center; gap: 3mm; padding: 2mm 3mm; }
.id-print-qr { width: 22mm; height: 22mm; border: 0.3mm solid #e2e8f0; border-radius: 1mm; flex-shrink: 0; }
.id-print-back-meta { flex: 1; min-width: 0; }
.id-print-back-id { font-family: monospace; font-size: 7pt; font-weight: 800; color: #1e3a5f; margin-bottom: 1mm; }
.id-print-back-hint { font-size: 5.5pt; color: #475569; line-height: 1.3; margin-bottom: 1mm; }
.id-print-back-url { font-size: 4pt; color: #94a3b8; word-break: break-all; line-height: 1.2; }
.id-print-back-footer { text-align: center; font-size: 4.5pt; color: #64748b; padding: 1.5mm; border-top: 0.3mm solid #e2e8f0; background: #f8fafc; }

.no-print { }

@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body.print-id-page { background: #fff !important; padding: 0 !important; }
  .no-print { display: none !important; }
  .print-sheet { display: block !important; max-width: none !important; margin: 0 !important; }
  .print-card-block { page-break-inside: avoid; margin-bottom: 15mm; }
  .print-card-block:last-child { margin-bottom: 0; }
  .id-print-card { box-shadow: none !important; break-inside: avoid; margin: 0 auto; }
}
