/*
 * Personal Record Management: clean clinical theme.
 * Loaded after base.css (the teal build of Tabler). Self-hosted: no web fonts or CDNs.
 */

:root {
  --prm-accent: #0f766e;
  --prm-accent-strong: #115e59;
  --prm-accent-soft: #e6f4f2;
  --prm-accent-tint: #f2faf9;
  --prm-bg: #f5f7f9;
  --prm-surface: #ffffff;
  --prm-border: #e3e8ee;
  --prm-border-strong: #cfd7e0;
  --prm-text: #15202b;
  --prm-muted: #5a6675;
  --prm-danger: #b42318;
  --prm-danger-soft: #fdecea;
  --prm-success: #127a46;
  --prm-success-soft: #e7f6ee;
  --prm-warning: #9a5b00;
  --prm-warning-soft: #fff5e0;
  --prm-radius: 10px;
  --prm-radius-sm: 7px;
  --prm-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --prm-shadow-lg: 0 12px 32px -12px rgba(16, 24, 40, .18);
  --prm-sidebar: 16rem;
  --prm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --tblr-font-sans-serif: var(--prm-font);
  --tblr-body-bg: var(--prm-bg);
  --tblr-body-color: var(--prm-text);
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--prm-font);
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--prm-text);
  background: var(--prm-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--prm-accent); }
a:hover { color: var(--prm-accent-strong); }
h1, h2, h3, h4, .h1, .h2, .h3, .h4 { color: var(--prm-text); letter-spacing: -.01em; }
:focus-visible { outline: 3px solid rgba(15, 118, 110, .35); outline-offset: 2px; }
.text-muted, .text-secondary { color: var(--prm-muted) !important; }
.skip-link {
  position: absolute; left: -999px; top: .5rem; z-index: 2000;
  background: var(--prm-text); color: #fff; padding: .5rem 1rem; border-radius: var(--prm-radius-sm);
}
.skip-link:focus { left: .5rem; color: #fff; }

/* ---------- Components on top of Tabler ---------- */

.card {
  border: 1px solid var(--prm-border);
  border-radius: var(--prm-radius);
  box-shadow: var(--prm-shadow);
}
.card-header { border-bottom-color: var(--prm-border); background: transparent; }
.card-title { font-weight: 600; }
.card-footer { background: var(--prm-accent-tint); border-top-color: var(--prm-border); }
.card-md > .card-body, .card-md .card-body { padding: 1.5rem; }
.card .nav-tabs { border-bottom: 1px solid var(--prm-border); padding: 0 .5rem; }
.card .nav-tabs .nav-link, .card .nav-tabs .nav-item.nav-link {
  font-weight: 600; color: var(--prm-text); border: 0; padding: .9rem 1rem;
}
.card .nav-tabs .nav-link.active { color: var(--prm-accent); box-shadow: inset 0 -2px 0 var(--prm-accent); }

.btn { border-radius: var(--prm-radius-sm); font-weight: 600; padding: .5rem 1rem; }
.btn-sm { padding: .3rem .65rem; }
.btn-primary, .btn-success { --tblr-btn-color: var(--prm-accent); --tblr-btn-color-interactive: var(--prm-accent-strong); }
.btn-primary:hover, .btn-success:hover { color: #fff; }
.btn-outline-primary { --tblr-btn-color: var(--prm-accent); }
.btn-ghost {
  background: transparent; border: 1px solid transparent; color: var(--prm-muted);
}
.btn-ghost:hover { background: var(--prm-accent-soft); color: var(--prm-accent-strong); }
.btn-link-danger { background: none; border: 0; padding: 0; color: var(--prm-danger); font-weight: 600; }
.btn-link-danger:hover { text-decoration: underline; }
.w-50 { min-width: 12rem; }
@media (max-width: 575.98px) { .w-50 { width: 100% !important; } }

.form-label { font-weight: 600; color: var(--prm-text); margin-bottom: .35rem; }
.form-control, .form-select {
  border-radius: var(--prm-radius-sm);
  border-color: var(--prm-border-strong);
  padding: .55rem .75rem;
  font-size: .9375rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--prm-accent);
  box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .15);
}
.form-control[readonly] { background: var(--prm-accent-tint); }
.form-hint, .form-text { color: var(--prm-muted); font-size: .8125rem; }
.form-footer { margin-top: 1.5rem; }
.input-group-flat .input-group-text { border-color: var(--prm-border-strong); }

/* Validation and status messages (also styles the older <font color> markup) */
.field-error, font[color="#ff0000"], font[color="red"], font[color="#FF0000"] {
  display: block; color: var(--prm-danger) !important; font-size: .8125rem; margin-top: .3rem;
}
font[color] strong, .field-error strong { font-weight: 500; }
font[color="green"], font[color="#008000"] { color: var(--prm-success) !important; }
p[style*="text-align:center"] > font[color] {
  display: block; padding: .7rem .9rem; border-radius: var(--prm-radius-sm);
  background: var(--prm-danger-soft); font-size: .875rem; text-align: left;
}

.alert {
  border-radius: var(--prm-radius-sm); border: 1px solid transparent; padding: .8rem 1rem;
  display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem;
  box-shadow: none; background: var(--prm-surface);
}
.alert::before { display: none; }
.alert-success { background: var(--prm-success-soft); border-color: #bfe6d0; color: #0b5132; }
.alert-danger { background: var(--prm-danger-soft); border-color: #f6c8c3; color: #7a1a12; }
.alert-warning { background: var(--prm-warning-soft); border-color: #f3dca8; color: #6b3f00; }
.alert-info { background: var(--prm-accent-soft); border-color: #bfe0dc; color: #0b4a45; }

.table { --tblr-table-bg: transparent; font-size: .9rem; }
.table thead th {
  background: var(--prm-accent-tint); color: var(--prm-muted);
  font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border-bottom: 1px solid var(--prm-border); white-space: nowrap;
}
.table td, .table th { border-color: var(--prm-border); vertical-align: middle; }
.table tbody tr:hover { background: #fafcfc; }
.table-responsive { border-radius: var(--prm-radius); }
.card > .table-responsive > .table { margin-bottom: 0; }

.badge { font-weight: 600; border-radius: 999px; padding: .3em .7em; }
.avatar { border-radius: 50%; background-color: var(--prm-accent-soft); color: var(--prm-accent-strong); }
.dropdown-menu { border-radius: var(--prm-radius); border-color: var(--prm-border); box-shadow: var(--prm-shadow-lg); }
.dropdown-item { border-radius: 6px; }
.modal-content { border-radius: var(--prm-radius); }
.list-group-item { border-color: var(--prm-border); }
hr { border-color: var(--prm-border); opacity: 1; }

/* Tables enhanced by prm.js (search, sort, pages) */
.dt-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.dt-toolbar input[type="search"] { max-width: 18rem; }
.dt-footer { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-top: .75rem; color: var(--prm-muted); font-size: .85rem; }
.dt-pages { display: flex; gap: .25rem; }
.dt-pages button {
  min-width: 2rem; height: 2rem; border: 1px solid var(--prm-border-strong); background: #fff;
  border-radius: 6px; color: var(--prm-text); font-size: .85rem;
}
.dt-pages button[aria-current="page"] { background: var(--prm-accent); border-color: var(--prm-accent); color: #fff; }
.dt-pages button:disabled { opacity: .45; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]::after { content: " \2195"; opacity: .35; }
th[data-sort="asc"]::after { content: " \2191"; opacity: .9; }
th[data-sort="desc"]::after { content: " \2193"; opacity: .9; }

/* Inline action forms (delete / status buttons rendered as links) */
.inline-form { display: inline; margin: 0; }
.inline-form button { background: none; border: 0; padding: 0; color: var(--prm-accent); font: inherit; cursor: pointer; }
.inline-form button:hover { text-decoration: underline; }
.inline-form button.is-danger { color: var(--prm-danger); }

/* ---------- Signed-in app shell (patients, hospitals, admins) ---------- */

.app { display: flex; min-height: 100vh; }
.app-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--prm-sidebar); z-index: 1040;
  background: var(--prm-surface); border-right: 1px solid var(--prm-border);
  display: flex; flex-direction: column; overflow-y: auto;
  transition: transform .2s ease;
}
.app-brand {
  display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.25rem;
  font-weight: 700; color: var(--prm-text); text-decoration: none; font-size: 1rem; line-height: 1.2;
}
.app-brand:hover { color: var(--prm-text); text-decoration: none; }
.brand-mark {
  width: 2.1rem; height: 2.1rem; border-radius: 9px; flex: none;
  display: grid; place-items: center; background: var(--prm-accent); color: #fff;
}
.brand-mark svg { width: 1.25rem; height: 1.25rem; }
.brand-logo { max-height: 2.25rem; max-width: 7rem; object-fit: contain; }
.app-brand small { display: block; font-weight: 500; color: var(--prm-muted); font-size: .75rem; }

.app-nav { list-style: none; margin: 0; padding: .25rem .75rem 1rem; }
.app-nav-label {
  padding: 1rem .6rem .35rem; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #8a95a3;
}
.app-nav a, .app-nav button {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  padding: .55rem .65rem; border-radius: 8px; border: 0; background: none;
  color: #334155; font-weight: 500; font-size: .9rem; text-decoration: none; text-align: left;
}
.app-nav a:hover, .app-nav button:hover { background: var(--prm-accent-tint); color: var(--prm-accent-strong); }
.app-nav a[aria-current="page"] { background: var(--prm-accent-soft); color: var(--prm-accent-strong); font-weight: 600; }
.app-nav svg { width: 1.15rem; height: 1.15rem; flex: none; stroke: currentColor; }
.app-sidebar-foot { margin-top: auto; padding: 1rem 1.25rem; border-top: 1px solid var(--prm-border); font-size: .8rem; color: var(--prm-muted); }

.app-body { flex: 1; min-width: 0; margin-left: var(--prm-sidebar); display: flex; flex-direction: column; }
.app-topbar {
  position: sticky; top: 0; z-index: 1020; height: 3.75rem;
  display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--prm-border);
}
.app-topbar .greeting { color: var(--prm-muted); font-size: .9rem; }
.app-topbar .spacer { flex: 1; }
.app-menu-btn { display: none; }
.user-chip { display: flex; align-items: center; gap: .55rem; color: var(--prm-text); text-decoration: none; font-weight: 600; font-size: .875rem; }
.user-chip .avatar { width: 2rem; height: 2rem; display: grid; place-items: center; font-size: .8rem; }
.app-main { flex: 1; padding: 1.5rem 0 2.5rem; }
.app-main > .container-xl, .app-main .container-xl { max-width: 1240px; padding-left: 1.5rem; padding-right: 1.5rem; }
.app-footer { padding: 1rem 1.5rem 1.5rem; color: var(--prm-muted); font-size: .8rem; }
.app-flash { max-width: 1240px; margin: 0 auto 1rem; padding: 0 1.5rem; }
.app-scrim { display: none; }

/* Older page markup inside the shell */
.page-header { margin: 0 0 1.25rem; padding: 0; min-height: 0; }
.page-header .row { align-items: center; }
.page-title { font-size: 1.4rem; font-weight: 700; margin: 0; }
.page-pretitle { color: var(--prm-accent); font-weight: 700; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.page-body { margin-top: 0; }
.page-wrapper { margin-left: 0 !important; }
.row-cards > [class*="col"] { margin-bottom: 0; }
.footer { border-top: 0; background: transparent; }

.stat-card { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; }
.stat-icon {
  width: 2.75rem; height: 2.75rem; border-radius: 10px; flex: none;
  display: grid; place-items: center; background: var(--prm-accent-soft); color: var(--prm-accent-strong);
}
.stat-icon svg { width: 1.35rem; height: 1.35rem; }
.stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.stat-label { color: var(--prm-muted); font-size: .825rem; }

@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); box-shadow: var(--prm-shadow-lg); }
  .app.is-nav-open .app-sidebar { transform: none; }
  .app.is-nav-open .app-scrim { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 1035; }
  .app-body { margin-left: 0; }
  .app-menu-btn { display: inline-flex; }
  .app-topbar { padding: 0 1rem; }
  .app-main > .container-xl, .app-main .container-xl, .app-flash { padding-left: 1rem; padding-right: 1rem; }
  .app-topbar .greeting { display: none; }
}

/* ---------- Public site ---------- */

.site { display: flex; flex-direction: column; min-height: 100vh; background: #fff; }
.site main { flex: 1; }
.site-header {
  position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--prm-border);
}
.site-header .container-xl { display: flex; align-items: center; gap: 1.5rem; height: 4.25rem; }
.site-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.site-nav a { color: #334155; font-weight: 500; font-size: .925rem; padding: .45rem .75rem; border-radius: 8px; text-decoration: none; }
.site-nav a:hover { background: var(--prm-accent-tint); color: var(--prm-accent-strong); }
.site-nav a[aria-current="page"] { color: var(--prm-accent-strong); }
.site-actions { display: flex; gap: .5rem; align-items: center; }
.site-menu-btn { display: none; margin-left: auto; }
@media (max-width: 991.98px) {
  .site-menu-btn { display: inline-flex; }
  .site-nav, .site-actions { display: none; }
  .site-header.is-open .container-xl { flex-wrap: wrap; height: auto; padding-top: .9rem; padding-bottom: .9rem; }
  .site-header.is-open .site-nav, .site-header.is-open .site-actions {
    display: flex; flex-direction: column; align-items: stretch; width: 100%; margin: 0;
  }
  .site-header.is-open .site-actions { flex-direction: row; }
  .site-header.is-open .site-actions .btn { flex: 1; }
}

.hero { background: linear-gradient(180deg, var(--prm-accent-tint) 0%, #fff 100%); padding: 4.5rem 0 3.5rem; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; line-height: 1.12; letter-spacing: -.025em; margin-bottom: 1rem; }
.hero .lead { font-size: 1.125rem; color: var(--prm-muted); max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-actions .btn { padding: .75rem 1.35rem; font-size: 1rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.75rem; padding: 0; list-style: none; color: var(--prm-muted); font-size: .9rem; }
.hero-points li { display: flex; align-items: center; gap: .4rem; }
.hero-points svg { width: 1.1rem; height: 1.1rem; color: var(--prm-accent); }
.hero-visual { position: relative; }
.hero-visual img { width: 100%; border-radius: 16px; box-shadow: var(--prm-shadow-lg); object-fit: cover; aspect-ratio: 4 / 3; }
.hero-badge {
  position: absolute; left: -1rem; bottom: -1.5rem; background: #fff; border-radius: 12px; padding: .75rem 1rem;
  box-shadow: var(--prm-shadow-lg); display: flex; gap: .65rem; align-items: center; font-size: .85rem;
}
.hero-badge strong { display: block; font-size: .95rem; }
@media (max-width: 991.98px) { .hero-badge { left: .75rem; } .hero { padding-top: 2.5rem; } }

.section { padding: 4.5rem 0; }
.section-muted { background: var(--prm-bg); }
.section-head { max-width: 40rem; margin: 0 auto 2.75rem; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 2.8vw, 2.15rem); font-weight: 800; letter-spacing: -.02em; }
.section-head p { color: var(--prm-muted); font-size: 1.05rem; }
.eyebrow { color: var(--prm-accent); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .5rem; }

.feature { height: 100%; padding: 1.5rem; border: 1px solid var(--prm-border); border-radius: 14px; background: #fff; }
.feature h3 { font-size: 1.05rem; font-weight: 700; margin: 1rem 0 .4rem; }
.feature p { color: var(--prm-muted); margin: 0; font-size: .925rem; }
.feature-icon { width: 2.75rem; height: 2.75rem; border-radius: 10px; display: grid; place-items: center; background: var(--prm-accent-soft); color: var(--prm-accent-strong); }
.feature-icon svg { width: 1.4rem; height: 1.4rem; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.steps li { position: relative; padding: 1.5rem; background: #fff; border-radius: 14px; border: 1px solid var(--prm-border); }
.steps li::before {
  counter-increment: step; content: counter(step);
  width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--prm-accent); color: #fff; font-weight: 700; margin-bottom: .9rem;
}
.steps h3 { font-size: 1rem; font-weight: 700; margin-bottom: .35rem; }
.steps p { color: var(--prm-muted); margin: 0; font-size: .9rem; }

.trust { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.trust-item { display: flex; gap: .85rem; align-items: flex-start; }
.trust-item svg { width: 1.4rem; height: 1.4rem; color: var(--prm-accent); flex: none; margin-top: .15rem; }
.trust-item h3 { font-size: .975rem; font-weight: 700; margin: 0 0 .2rem; }
.trust-item p { margin: 0; color: var(--prm-muted); font-size: .9rem; }

.plan-card { height: 100%; display: flex; flex-direction: column; padding: 1.75rem; border: 1px solid var(--prm-border); border-radius: 14px; background: #fff; }
.plan-card.is-featured { border: 2px solid var(--prm-accent); box-shadow: var(--prm-shadow-lg); }
.plan-card h3 { font-size: 1.1rem; font-weight: 700; }
.plan-price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.plan-price del { font-size: 1rem; color: var(--prm-muted); font-weight: 500; margin-left: .35rem; }
.plan-card ul { list-style: none; padding: 0; margin: 1rem 0 1.5rem; color: #334155; font-size: .925rem; }
.plan-card li { padding: .3rem 0 .3rem 1.6rem; position: relative; }
.plan-card li::before { content: ""; position: absolute; left: 0; top: .55rem; width: 1rem; height: .55rem; border-left: 2px solid var(--prm-accent); border-bottom: 2px solid var(--prm-accent); transform: rotate(-45deg); }
.plan-card .btn { margin-top: auto; }

.cta-band { background: var(--prm-accent); color: #fff; border-radius: 18px; padding: 2.75rem; display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.cta-band h2 { color: #fff; font-weight: 800; margin: 0 0 .35rem; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .85); }
.cta-band .btn-light { color: var(--prm-accent-strong); }


.prose { max-width: 48rem; margin: 0 auto; font-size: 1rem; }
.prose h2 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 .6rem; }
.prose h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.prose p, .prose li { color: #334155; }
.page-hero { background: var(--prm-accent-tint); border-bottom: 1px solid var(--prm-border); padding: 2.75rem 0 2.25rem; }
.page-hero h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; margin: 0; }
.page-hero p { color: var(--prm-muted); margin: .5rem 0 0; font-size: 1.05rem; }

.faq details { border: 1px solid var(--prm-border); border-radius: 12px; background: #fff; margin-bottom: .75rem; }
.faq summary { padding: 1rem 1.25rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--prm-accent); font-weight: 700; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 1.25rem 1.1rem; color: #334155; }

.site-footer { background: #0f1c24; color: #b8c4cc; padding: 3.5rem 0 2rem; font-size: .9rem; }
.site-footer a { color: #dbe5ea; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h2 { color: #fff; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; margin-bottom: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: .2rem 0; }
.site-footer .footer-brand { color: #fff; font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .825rem; }
.secure-note { display: inline-flex; align-items: center; gap: .4rem; }
.secure-note svg { width: 1rem; height: 1rem; }

/* ---------- Sign-in and sign-up pages ---------- */

.auth { min-height: calc(100vh - 4.25rem); display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside {
  background: linear-gradient(160deg, var(--prm-accent) 0%, #0b4f4a 100%); color: #e6f4f2;
  padding: 3.5rem; display: flex; flex-direction: column; justify-content: center;
}
.auth-aside h2 { color: #fff; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.auth-aside p { color: rgba(230, 244, 242, .85); font-size: 1.025rem; }
.auth-aside ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.auth-aside li { display: flex; gap: .6rem; padding: .35rem 0; }
.auth-aside li svg { width: 1.2rem; height: 1.2rem; flex: none; margin-top: .15rem; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.25rem; background: #fff; }
.auth-card { width: 100%; max-width: 27rem; }
.auth-card.is-wide { max-width: 40rem; }
.auth-card h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: .35rem; }
.auth-card .sub { color: var(--prm-muted); margin-bottom: 1.75rem; }
.auth-card .btn-primary { width: 100%; padding: .7rem 1rem; font-size: 1rem; }
.auth-switch { margin-top: 1.5rem; text-align: center; color: var(--prm-muted); font-size: .9rem; }
.auth-tabs { display: flex; gap: .25rem; padding: .25rem; background: var(--prm-bg); border-radius: 10px; margin-bottom: 1.5rem; }
.auth-tabs a, .auth-tabs button { flex: 1; text-align: center; padding: .5rem; border-radius: 8px; color: var(--prm-muted); font-weight: 600; font-size: .875rem; text-decoration: none; border: 0; background: none; }
.auth-tabs [aria-selected="true"], .auth-tabs [aria-current="page"] { background: #fff; color: var(--prm-text); box-shadow: var(--prm-shadow); }
@media (max-width: 991.98px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}

.password-field { position: relative; }
.password-field .form-control { padding-right: 4.25rem; }
.password-toggle {
  position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--prm-accent); font-weight: 600; font-size: .8rem; padding: .3rem .5rem;
}

/* ---------- Error pages ---------- */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 3rem 1rem; }
.error-code { font-size: 4.5rem; font-weight: 800; color: var(--prm-accent); line-height: 1; letter-spacing: -.04em; }
.error-page h1 { font-size: 1.5rem; font-weight: 700; margin: 1rem 0 .5rem; }
.error-page p { color: var(--prm-muted); max-width: 30rem; margin: 0 auto 1.5rem; }

/* ---------- Print ---------- */
@media print {
  .app-sidebar, .app-topbar, .app-footer, .site-header, .site-footer, .d-print-none, .dt-toolbar, .dt-footer { display: none !important; }
  .app-body { margin: 0; }
  body, .site { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
