@import url(root.css);

html, body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Page transitions — plynny CROSSFADE (dissolve, jak "Fade" w PowerPoincie): czysta zmiana
   opacity, BEZ przesuniecia (translateY usuniety) i wolniej, wiec nowa strona lagodnie "wnika"
   zamiast wyskakiwac. Tlo html = kolor strony, by dissolve szedl przez jasne tlo. */
html { background-color: rgba(var(--background-custom, 244, 245, 250), 1); }
body { opacity: 0; transition: opacity 340ms ease; }
body.pt-in { opacity: 1; }
body.pt-out { opacity: 0; transition: opacity 260ms ease; }

* { font-family: var(--font-custom); user-select: none; }
body { font-family: var(--font-custom); color: rgba(var(--primary), 1); background-color: var(--status-bar-color, #101318); background: var(--status-bar-color, #101318); }
img { pointer-events: none; }

[data-mode="dark"] .background\[set\] { background: url(/assets/img/bg_dark.png); background-position: center; background-size: cover; }
[data-mode="light"] .background\[set\] { background: url(/assets/img/bg_light.png); background-position: center; background-size: cover; }
.background\[unset\] { background: unset; background-color: rgba(var(--background-custom), 1); }
.background\[backdrop\] { background: unset; backdrop-filter: blur(10px); background-color: rgba(var(--background-custom), 0.8); }

[data-theme="default"][data-mode="light"][data-custom] {
    --font-custom: "Roboto", sans-serif;
    --background-custom: 244, 245, 250;
    --navigation-background: 249, 250, 251;
    --blue-inactive: 230, 236, 251;
    --blue-active: 40, 95, 244;
    --label: 105, 105, 120;
    --custom-input: 229, 230, 235;
    --custom-input-color: 105, 105, 120;
    --warning-background: 254, 241, 209;
    --warning-primary: 174, 93, 1;
    --pesel-background: 134, 85, 199;
    --card-info: 217, 233, 254;
    --notification-text: 250, 250, 250;
    --notification-bg: 81, 87, 95;
}
[data-mode="light"] body { background: #f5f6fb; }

[data-theme="default"][data-mode="dark"][data-custom] {
    --font-custom: "Roboto", sans-serif;
    --background-custom: 16, 19, 24;
    --navigation-background: 32, 34, 36;
    --blue-inactive: 10, 40, 78;
    --blue-active: 75, 164, 254;
    --label: 142, 142, 147;
    --custom-input: 31, 34, 39;
    --custom-input-color: 142, 142, 147;
    --warning-background: 93,89,64;
    --warning-primary: 254, 218, 68;
    --pesel-background: 75, 47, 111;
    --card-info: 50, 64, 81;
    --notification-text: 250, 250, 250;
    --notification-bg: 82, 87, 95;
}
[data-mode="dark"] body { background-color: #101318; }

[data-mode="dark"] .login-body {
    background-color: #0B0F12 !important;
}

[data-mode="dark"] .login-bg {
    background: url(/assets/img/bg_dark.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

[data-mode="light"] .login-body {
    background-color: #f0f5f9 !important;
}

[data-mode="light"] .login-bg {
    background: url(/assets/img/bg_light.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.documentFade {
    animation: fade-in 400ms ease-out forwards;
}

.pagePop {
    animation: pop-out 600ms ease-out forwards;
}

.dashboard-navigation-small-title {
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.dashboard-navigation-small-title.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.dashboard-navigation-large-title {
  transition: opacity .18s ease, transform .18s ease;
  will-change: opacity, transform;
}
.dashboard-navigation-large-title.is-hidden {
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  pointer-events: none;
}


[data-mode="dark"] body { background-color: #101318; }

[data-theme="default"][data-mode="dark"] .theme-icon {
    filter: invert(1);
}

[data-theme="default"][data-mode="dark"] .document-icon {
    filter: hue-rotate(-19deg) saturate(120%) brightness(117%) contrast(105%);
}

[data-custom] button.primary {
    color: rgba(var(--secondary), 1) !important;
    background-color: rgba(var(--blue-active), 1) !important;
}

[data-mode="dark"][data-custom] button.secondary {
    color: rgba(var(--blue-active), 1) !important;
    background-color: rgba(var(--blue-inactive), 1) !important;
}

[data-custom] button.secondary {
    color: rgba(var(--blue-active), 1) !important;
    background-color: rgba(var(--blue-inactive), 1) !important;
}

[data-custom] button.alternative {
    color: rgba(var(--blue-active), 1);
    border-color: rgba(var(--blue-active), 1) !important;
    background-color: transparent;
}

[data-custom] input {
    transition: none;
}
[data-custom] input:focus {
    transition: none;
    outline: 2px solid rgba(var(--blue-active), 1);
}

[data-custom] textarea {
    transition: none;
    user-select: text;
}

[data-custom] textarea:focus {
    transition: none;
    outline: 2px solid rgba(var(--blue-active), 1);
}

[data-custom] input.secondary {
    background-color: rgba(var(--custom-input), 1);
    color: rgba(var(--custom-input-color), 1) !important;
}

[data-custom] textarea.secondary {
    background-color: rgba(var(--custom-input), 1);
    color: rgba(var(--primary), 1) !important;
    -webkit-text-fill-color: rgba(var(--primary), 1);
    caret-color: rgba(var(--blue-active), 1);
    border: 1px solid rgba(var(--ring), 0.18);
}

[data-custom] textarea.secondary::placeholder {
    color: rgba(var(--custom-input-color), 0.92);
}

input.secondary:focus {
    outline: none;
}

textarea.secondary:focus {
    outline: none;
}

.secondary { color: rgba(var(--secondary), 1) !important; }
.primary { color: rgba(var(--primary), 1) !important; }
.danger { color: rgba(var(--danger), 1) !important; }
.success { color: rgba(var(--success), 1) !important; }
.warning { color: rgba(var(--warning), 1) !important; }
.disabled { color: rgba(var(--secondary), 1) !important; }
.info { color: rgba(var(--info), 1) !important; }

.indicator { display: none; }
.indicator.active { display: block; background-color: rgba(var(--blue-active), 1); outline: 2px solid rgba(var(--blue-active), 1); outline-offset: 3px; }
.indicator.inactive { display: block; outline: 2px solid rgba(var(--label), 1); outline-offset: 3px; }

.card {
    background-color: rgba(var(--background), 1);
}

.card.white {
    background-color: rgba(255, 255, 255, 1);
}

.card.info {
    background-color: rgba(var(--card-info), 1);
}

.card.warning {
    background-color: rgba(var(--warning-background), 1);
}

.card.warning i {
    color: rgba(var(--warning-primary), 1);
}

[data-custom] .label {
    color: rgba(var(--label), 1);
}

[data-custom] .label.active {
    color: rgba(var(--blue-active), 1);
}

[data-custom] .redirect {
    color: rgba(var(--blue-active), 1);
}

[data-custom] .shadow {
    box-shadow: 0px 10px 10px 0px rgba(0,0,0,0.1);
}

[data-group="password"] input {
    border: 1px solid rgba(var(--ring), 0.5);
}

[data-group="password"] .eye {
    top: 15px !important;
    right: 15px !important;
}

.dashboard-navigation {
    padding-top: env(safe-area-inset-top);
}

[data-standalone].document-screen {
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

[data-standalone].document-screen .dashboard-navigation {
    padding-top: 0;
}

.dashboard-navigation.scrolled {
    border-width: 0px;
}

.navigation {
    /* Flat bottom bar: same colour as the page background, no shadow/blur so it
       blends in and doesn't "stick out" (backdrop[8px] removed from markup too). */
    background-color: rgba(var(--background-custom), 1);
    box-shadow: none;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
}

/* Aktywny wskaźnik (pill) w dolnym pasku nawigacji — jak w mObywatel (Material 3):
   jasnoniebieskie zaokrąglone tło za ikoną aktywnej pozycji (#e7edfb, zmierzone z apki). */
[data-custom] .navigation a { position: relative; }
[data-custom] .navigation a::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 50%;
    width: 68px;
    height: 32px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: transparent;
    transition: background .18s ease;
    z-index: 0;
}
[data-mode="light"] .navigation a:has(.label.active)::before { background: #dbe4f8; }
[data-custom] .navigation a > img,
[data-custom] .navigation a > .label { position: relative; z-index: 1; }

/* Documents top-right icons (chat / notifications) — slightly greyed down. */
#chat-button .theme-icon,
#notif-bell .theme-icon,
#edoreczenia-btn .theme-icon {
    opacity: 1;
    width: 18px;
    height: 18px;
}
/* Ikony nav. KLUCZOWE: klasa .square[20px] w HTML ma min/max-width/height:20px !important,
   wiec nasza reguła BEZ !important nie dzialala (ikony tkwily na 20px — stad "nic sie nie
   zmienia"). Przebijamy min/max+width/height z !important. User chce wyrazne wieksze/grubsze
   (~+50% vs 20px). 28px bylo minimalnie za duze -> -10% => 25px (glif ~78 device; real ~74,
   praktycznie 1:1). Wieksza ikona = grubsze kreski. */
[data-custom] .navigation a img {
    width: 25px !important; height: 25px !important;
    min-width: 25px !important; max-width: 25px !important;
    min-height: 25px !important; max-height: 25px !important;
}
/* Etykiety nav: .text-size[10] = font-size:10px !important -> tez wymaga !important. */
[data-custom] .navigation a .label { font-size: 12px !important; }
/* Powiadomienia: czerwona KROPKA (jak w oryginale), nie licznik. */
#notif-badge { min-width: 9px !important; width: 9px; height: 9px; padding: 0 !important; font-size: 0 !important; line-height: 0 !important; background: #cd291c !important; border-radius: 999px; }

/* "Dodaj dokument" floating button — rounded square, collapses to just "+"
   on scroll (toggled by documentsManager.collapsibleHeader). */
.documents-fab {
    position: fixed;
    right: 16px;
    bottom: 110px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    height: 56px;
    padding: 0 24px;
    border: 0;
    border-radius: 16px;
    /* Zmierzone per-pixel z apki (screen.jpg): FAB fill = rgb(45,93,239) = #2d5def. */
    background-color: rgba(45, 93, 239, 1);
    color: #fff;
    font-family: var(--font-custom);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    /* Subtelny cien jak w oryginale (zmierzony: pas tuz pod pigulka ~rgb219 vs tlo 244).
       Poprzedni 0 12px 30px/.26 tworzyl szara aureole ktora nachodzila na dolne menu. */
    box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
    /* Slow, smooth, no-overshoot easing so collapse/expand glides (no bounce). */
    transition: width .42s cubic-bezier(.4, 0, .2, 1), padding .42s cubic-bezier(.4, 0, .2, 1), gap .42s cubic-bezier(.4, 0, .2, 1);
}
.documents-fab .documents-fab-label { white-space: nowrap; overflow: hidden; max-width: 220px; opacity: 1; transition: max-width .42s cubic-bezier(.4, 0, .2, 1), opacity .34s cubic-bezier(.4, 0, .2, 1); }
.documents-fab .documents-fab-plus { position: relative; display: inline-block; width: 16px; height: 16px; }
.documents-fab .documents-fab-plus::before,
.documents-fab .documents-fab-plus::after { content: ""; position: absolute; background: currentColor; }
.documents-fab .documents-fab-plus::before { top: 50%; left: 0; right: 0; height: 2px; border-radius: 1px; transform: translateY(-50%); }
.documents-fab .documents-fab-plus::after { left: 50%; top: 0; bottom: 0; width: 2px; border-radius: 1px; transform: translateX(-50%); }
.documents-fab.is-collapsed { width: 52px; padding: 0; gap: 0; }
.documents-fab.is-collapsed .documents-fab-label { max-width: 0; opacity: 0; }

/* "Dokumenty" tytul. User WOLI grubszy — weight 500 bylo za cienkie ("popsute"), wracamy 600
   (wczesniej 600 bylo dobrze). Kolor #121317 (ciut ciemniejszy niz #191919, z autodiff). */
.documents-title { font-size: 28px; font-weight: 600; color: #121317; }

/* Tytul "Dokumenty" podniesiony (wiersz mt[16]->mt[8] w HTML = -8px CSS). Zeby karta
   ZOSTALA na miejscu (zmierzona y630 device ~= real y637), kompensujemy +8px tutaj.
   Zmierzone per-pixel: tytul 430->~400 device (real 396), karta bez zmian. Scala 3.7 dev/CSS. */
[data-custom] .documents-layout-root { margin-top: 36px; }

/* "Dostosuj widok" link — muted dark grey (overrides .redirect's blue). */
.documents-customize-link { color: rgba(40, 95, 244, 1) !important; }

.add_document_list .navigation {
    background-color: rgba(var(--navigation-background), 1);
    box-shadow: none;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    border: none;
}

body.add-document-list-open [data-group="navigation"],
body.customize-document-open [data-group="navigation"] {
    position: fixed !important;
    left: 0;
    right: 0;
    top: auto !important;
    bottom: 0 !important;
    width: 100%;
    z-index: 10001 !important;
}

.add_document_list.add-document-list-panel {
    left: 0;
    right: 0;
    height: calc(100% - 80px) !important;
    max-height: calc(100% - 80px);
}

.customize_document_list.customize-document-panel {
    left: 0;
    right: 0;
    height: calc(100% - 80px) !important;
    max-height: calc(100% - 80px);
    transition: transform .3s ease;
}

.customize_document_order_list {
    transition: transform .3s ease;
}

.customize-document-home,
.customize_document_order_list {
    background-color: rgba(var(--background-custom), 1);
}

.customize-document-scroll,
.customize-document-order-scroll {
    padding-top: calc(env(safe-area-inset-top) + var(--responsive-space-xs));
    padding-bottom: var(--responsive-space-l);
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.customize-document-title {
    font-size: 2.25rem;
    line-height: 1.05;
}

.customize-document-subtitle {
    font-size: 1rem;
    line-height: 1.45;
    color: rgba(var(--label), 1);
}

.customize-document-action {
    min-height: 84px;
    background-color: rgba(var(--background), 1);
    color: rgba(var(--primary), 1);
    box-shadow: 0 12px 24px rgba(22, 28, 45, 0.08);
    text-align: left;
}

.customize-document-chevron {
    opacity: 0.72;
}

.customize-layout-card {
    padding: 1.25rem 0.5rem 1rem;
}

.customize-layout-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.customize-layout-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    border: none;
    background: transparent;
    padding: 0.25rem 0.25rem 0;
    color: rgba(var(--primary), 1);
    transition: none !important;
}

.customize-layout-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    transition: none !important;
}

.customize-layout-label {
    min-height: 2.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    transition: none !important;
}

.customize-layout-radio {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 2px solid rgba(var(--label), 0.45);
    transition: none !important;
}

.customize-layout-option.is-active .customize-layout-radio {
    border-color: rgba(var(--blue-active), 1);
}

.customize-layout-option.is-active .customize-layout-radio::after {
    content: "";
    position: absolute;
    inset: 50%;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background-color: rgba(var(--blue-active), 1);
    transform: translate(-50%, -50%);
}

.customize-document-order-card {
    overflow: hidden;
}

.add_document_list .add-document-list-scroll {
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--responsive-space-s);
}

.add_document_list .add-document-list-card {
    flex: 0 0 auto;
    margin-bottom: 0 !important;
    overflow: hidden;
}

.add_document_list .add-document-list-card > .separator\[x\] {
    width: calc(100% - 1.9rem) !important;
    align-self: center;
    background-color: rgba(var(--ring), 0.16);
}

.add_document_list .add-document-list-footer {
    position: sticky;
    bottom: 0;
    z-index: 1;
    padding-bottom: calc(var(--responsive-space-m) + env(safe-area-inset-bottom));
}

.add_document_list .add-document-list-footer button:disabled {
    opacity: 1;
    background-color: rgba(var(--custom-input), 1) !important;
    color: rgba(var(--custom-input-color), 0.4) !important;
    border-color: transparent !important;
}

.border\[custom\] {
    border: 1px solid rgba(var(--ring), 0.2) !important;
}

.card.custom {
    background-color: rgba(var(--background-custom), 1);
}

.expiry {
    height: 3px;
    background-color: rgba(var(--blue-active), 1);
}

.expiry\[time-blank\] { height: 3px; background-color: rgba(var(--blue-inactive), 1); cursor: pointer; }
.expiry\[time-fill\]  { width: 100%; height: 100%; background-color: rgba(var(--blue-active), 1); cursor: pointer; }

.card.mdowod { position: relative; overflow: hidden; }
.card.mdowod > canvas.bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
[data-mode="dark"] .mdowod h1 { color: rgba(var(--secondary), 1); }

.card.school_id { position: relative; overflow: hidden; }
.card.school_id > canvas.bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
[data-mode="dark"] .school_id h1 { color: rgba(var(--secondary), 1); }
.card.student_id { position: relative; overflow: hidden; }
.card.student_id > canvas.bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
[data-mode="dark"] .student_id h1 { color: rgba(var(--secondary), 1); }
.card.mprawojazdy { position: relative; overflow: hidden; }
.card.mprawojazdy > canvas.bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
[data-mode="dark"] .mprawojazdy h1 { color: rgba(var(--secondary), 1); }
.card.wozek { position: relative; overflow: hidden; }
.card.wozek > canvas.bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
[data-mode="dark"] .wozek h1 { color: rgba(var(--secondary), 1); }

.scrollbar\[none\] {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
  
.scrollbar\[none\]::-webkit-scrollbar {
    display: none;
}

.notification {
    background-color: rgba(var(--notification-bg), 1);
    color: rgba(var(--notification-text), 1);
}

#camera{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    background: rgba(var(--navigation-background), 1);
    transform: translateZ(0);
    backface-visibility:hidden;
    -webkit-transform:translateZ(0);
}

[data-custom] .doc_title {
    color: #fff;
    font-size: 16px;
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
}
/* Mniejszy promien rogow karty (oryginal ~14px, nie 20px=xl). */
.documents-layout-overlap [data-document-card] img { border-radius: 16px !important; }

/* (Znak wodny "RP" jako osobna warstwa CSS USUNIETY 2026-07-20 — realna apka ma
   tylko delikatna mikroprint "RP" w lewym dolnym rogu wypalona w obrazku karty, nie
   duze ukosne rzedy. Nakladka dublowala wzor i wygladala zbyt gesto. Zostawiamy sam
   natywny obrazek karty mdowod.png z subtelnym guilloche/orlem.) */

.doc_background{
    position: absolute;
    overflow: hidden;
    top: 10px;
    right: 30px;
    clip-path: path('M 0 20 C 0 1.0000000000000009, 1.0000000000000009 0, 20 0 S 40 1.0000000000000009, 40 20, 39 40 20 40, 0 39, 0 20');
    width: 40px;
    height: 40px;
    z-index: 0;
}

.doc_background-eagle {
    top: 13px;
    right: 34px;
    width: 32px;
    height: 32px;
    overflow: visible;
    clip-path: none;
    transform: scale(1);
    transform-origin: top right;
}

.doc_background-eagle .doc_filter {
    display: none;
}

.doc_filter {
    width: 100%;
    height: 100%;
    background-color: white;
    opacity: 0.2;
}

.doc_eagle {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin-top: auto;
    margin-bottom: auto;
    margin-left: auto;
    margin-right: auto;
    width: 30px;
    z-index: 1;
}

.doc_background-eagle .doc_eagle {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
}

.documents-layout-root {
    position: relative;
    width: 100%;
}

.documents-layout-root[data-documents-ready="0"] {
    opacity: 0;
    pointer-events: none;
}

.documents-layout-root[data-documents-ready="1"] {
    opacity: 1;
    transition: opacity 120ms ease;
}

.documents-layout-view {
    width: 100%;
}

.documents-layout-overlap {
    min-height: 420px;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--responsive-space-xs);
    padding: 0 var(--responsive-space-s) var(--responsive-space-s);
}

.documents-list {
    padding: 0 var(--responsive-space-s) var(--responsive-space-s);
}

.documents-list-card {
    background-color: rgba(var(--background), 1);
    border-radius: 1.05rem;
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.075);
    overflow: hidden;
}

.document-list-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 4.85rem;
    padding: 0 0.95rem;
    background-color: rgba(var(--background), 1);
    cursor: pointer;
    position: relative;
}

.document-list-row::after {
    content: "";
    position: absolute;
    left: 0.95rem;
    right: 0.95rem;
    bottom: 0;
    height: 1px;
    background-color: rgba(var(--ring), 0.13);
}

.document-list-row.document-list-row-divider-strong::after {
    height: 2px;
    background-color: rgba(var(--ring), 0.18);
}

.document-list-row-last-visible::after,
.document-list-row:last-child::after {
    display: none;
}

.document-list-row-media {
    width: 2.65rem;
    min-width: 2.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.document-list-row-icon {
    display: block;
    width: 2.5rem;
    height: auto;
}

.document-list-row-title {
    flex: 1 1 auto;
    color: rgba(var(--primary), 1);
    font-family: "Inter", sans-serif;
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

.document-list-row-chevron {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    opacity: 0.38;
}

.document-screen [data-wrapper] > div:first-child > .card > .separator\[x\],
.document-screen [data-wrapper] > div:first-child > div[data-group="categories"] > .card > .separator\[x\] {
    width: calc(100% - 1.9rem) !important;
    align-self: center;
    background-color: rgba(var(--ring), 0.16);
}

.document-card-compact {
    position: relative;
    overflow: hidden;
    border-radius: 1.35rem;
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.1);
    cursor: pointer;
    transition: none !important;
}

.document-card-compact::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(9, 18, 35, 0.06) 100%);
}

.document-card-compact-grid {
    aspect-ratio: 0.92;
    border-radius: 1.1rem;
}

.document-card-compact-list {
    aspect-ratio: 2.45;
}

.document-card-compact-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none !important;
}

.document-card-compact-badge {
    position: absolute;
    top: 1rem;
    left: 0.82rem;
    width: 1.82rem;
    height: 1.82rem;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    z-index: 2;
}

.document-card-compact-badge-eagle {
    width: 2rem;
    height: 2rem;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
}

.document-card-compact-badge-icon {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

.document-card-compact-badge-icon-eagle {
    width: 100%;
    height: 100%;
}

.document-card-compact-title {
    position: absolute;
    left: 0.95rem;
    right: 0.95rem;
    bottom: 0.95rem;
    color: #fff;
    font-family: "Inter", sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.08;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.document-card-compact-grid .document-card-compact-title {
    left: 0.9rem;
    right: 0.9rem;
    bottom: 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.02;
}

.document-card-compact-list .document-card-compact-title {
    font-size: 1.15rem;
    max-width: 62%;
}

.document-card-compact-grid.document-card-compact-school .document-card-compact-title,
.document-card-compact-grid.document-card-compact-student .document-card-compact-title {
    font-size: 0.8rem;
}

.document-card-compact-school .document-card-compact-title,
.document-card-compact-student .document-card-compact-title {
    font-size: 1.1rem;
}

.document-card-compact-list.document-card-compact-school .document-card-compact-title,
.document-card-compact-list.document-card-compact-student .document-card-compact-title {
    max-width: 46%;
}

.login-logo {
    height: 20px;
    width: auto;
    object-fit: contain;
    display: block;
}

::placeholder {
    font-weight: 600;
}

/* Skeleton shimmer */
.skeleton {
    position: relative;
    color: transparent !important;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(var(--primary), 0.08);
}
.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(var(--primary), 0.06), transparent);
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Pull-to-refresh */
.ptr-indicator {
    height: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: height 200ms ease, opacity 200ms ease;
}
.ptr-spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(var(--primary), 0.15);
    border-top-color: rgba(var(--primary), 0.6);
    border-radius: 50%;
}
.ptr-refreshing .ptr-spinner {
    animation: ptr-spin 0.6s linear infinite;
}
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #e0e0e0;
    border-radius: 31px;
    transition: background 0.3s ease;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 27px;
    height: 27px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider {
    background: #34c759;
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}
.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.35;
    cursor: not-allowed;
}

.nav-active span { color: rgba(var(--blue-active), 1) !important; }
