/* =========================================================================
   Orari AAB — Ultra 2026 (Landing Publik + Login)
   Dizajn akademik modern (inspiruar nga Coursera, Notion timeline).
   Paletë blu universitet + pastel për kategori. Tipografi system-ui bold.
   ========================================================================= */

:root {
    --primary: #0369a1;
    --primary-600: #0284c7;
    --primary-700: #075985;
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --accent: #0ea5e9;
    --ink: #0f172a;
    --ink-2: #1e293b;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --line: #e2e8f0;
    --line-2: #cbd5e1;
    --bg: #ffffff;
    --bg-2: #f8fafc;
    --bg-3: #f1f5f9;
    --warning: #d97706;
    --success: #059669;
    --danger: #dc2626;

    /* Kategori orësh — pastel akademik */
    --cat-ligj: #3b82f6;
    --cat-ligj-bg: #dbeafe;
    --cat-ligj-ink: #1e40af;
    --cat-ushtr: #8b5cf6;
    --cat-ushtr-bg: #ede9fe;
    --cat-ushtr-ink: #5b21b6;
    --cat-lab: #10b981;
    --cat-lab-bg: #d1fae5;
    --cat-lab-ink: #047857;
    --cat-sem: #f59e0b;
    --cat-sem-bg: #fef3c7;
    --cat-sem-ink: #92400e;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-2: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-3: 0 20px 40px rgba(2, 132, 199, 0.12), 0 8px 16px rgba(15, 23, 42, 0.06);

    --font-sys: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Dark mode tokens */
[data-theme="dark"] {
    --ink: #f1f5f9;
    --ink-2: #e2e8f0;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --line: #1e293b;
    --line-2: #334155;
    --bg: #0b1220;
    --bg-2: #0f172a;
    --bg-3: #1e293b;
    --primary-50: rgba(3, 105, 161, 0.12);
    --primary-100: rgba(3, 105, 161, 0.2);
    --cat-ligj-bg: rgba(59, 130, 246, 0.18);
    --cat-ligj-ink: #93c5fd;
    --cat-ushtr-bg: rgba(139, 92, 246, 0.18);
    --cat-ushtr-ink: #c4b5fd;
    --cat-lab-bg: rgba(16, 185, 129, 0.18);
    --cat-lab-ink: #6ee7b7;
    --cat-sem-bg: rgba(245, 158, 11, 0.18);
    --cat-sem-ink: #fcd34d;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-3: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Base (scoped) */
body.u-public {
    margin: 0;
    background: var(--bg-2);
    color: var(--ink);
    font-family: var(--font-sys);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.55;
    transition: background 0.3s ease, color 0.3s ease;
}
body.u-public *, body.u-public *::before, body.u-public *::after { box-sizing: border-box; }
body.u-public a { color: var(--primary); text-decoration: none; }
body.u-public a:hover { color: var(--primary-700); text-decoration: underline; }

/* Header bar */
.u-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.u-nav-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.u-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.u-brand-mark {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: grid; place-items: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}
.u-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.u-brand-text b { font-size: 15px; color: var(--ink); }
.u-brand-text small { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.u-nav-spacer { flex: 1; }
.u-nav-actions { display: flex; align-items: center; gap: 8px; }
.u-icon-btn {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
}
.u-icon-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.u-btn-admin {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.15s ease;
}
.u-btn-admin:hover { background: var(--primary); color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-2); }

/* Hero */
.u-hero {
    position: relative;
    padding: 56px 24px 36px;
    background:
        radial-gradient(ellipse 70% 90% at 20% 0%, var(--primary-50) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 90% 10%, rgba(14, 165, 233, 0.08) 0%, transparent 60%),
        var(--bg-2);
    overflow: hidden;
}
.u-hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: 0.35;
    mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, #000 30%, transparent 80%);
    pointer-events: none;
}
.u-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    text-align: center;
}
.u-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: var(--primary-100);
    color: var(--primary-700);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
}
.u-pill i { font-size: 11px; }
.u-hero h1 {
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin: 0 0 14px;
    color: var(--ink);
}
.u-hero h1 .u-grad {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.u-hero p {
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto 28px;
}

/* Search bar qendror */
.u-search {
    max-width: 720px;
    margin: 0 auto 20px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 6px 6px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-3);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.u-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent), var(--shadow-3); }
.u-search i.fa-magnifying-glass, .u-search i.fa-search { color: var(--muted); font-size: 16px; }
.u-search input {
    flex: 1;
    border: 0; outline: 0;
    background: transparent;
    padding: 14px 4px;
    font: inherit;
    color: var(--ink);
    font-size: 15px;
}
.u-search input::placeholder { color: var(--muted-2); }
.u-search button {
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: all 0.15s ease;
    display: inline-flex; align-items: center; gap: 8px;
}
.u-search button:hover { transform: translateY(-1px); box-shadow: 0 10px 25px rgba(2, 132, 199, 0.4); }

/* Shortcut CTA */
.u-shortcuts {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.u-chip-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s ease;
}
.u-chip-link:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-2); }
.u-chip-link i { color: var(--primary); }

/* Stats strip */
.u-stats {
    max-width: 1320px;
    margin: -28px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}
.u-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-2);
}
.u-stat { display: flex; align-items: center; gap: 14px; padding: 4px 8px; }
.u-stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}
.u-stat:nth-child(1) .u-stat-icon { background: var(--cat-ligj-bg); color: var(--cat-ligj-ink); }
.u-stat:nth-child(2) .u-stat-icon { background: var(--cat-ushtr-bg); color: var(--cat-ushtr-ink); }
.u-stat:nth-child(3) .u-stat-icon { background: var(--cat-lab-bg); color: var(--cat-lab-ink); }
.u-stat:nth-child(4) .u-stat-icon { background: var(--cat-sem-bg); color: var(--cat-sem-ink); }
.u-stat-num {
    font-size: clamp(1.4rem, 2.2vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1;
}
.u-stat-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

/* Container */
.u-wrap { max-width: 1320px; margin: 0 auto; padding: 36px 24px 60px; }

/* Sticky filter bar */
.u-filterbar {
    position: sticky;
    top: 68px;
    z-index: 30;
    margin-bottom: 22px;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-1);
}
.u-filter-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}
.u-filter-title .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-100); }
.u-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    align-items: end;
}
.u-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.u-field label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.u-field select, .u-field input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.u-field select:focus, .u-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.u-filter-actions { display: flex; gap: 8px; align-items: end; }
.u-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
}
.u-btn-primary { background: var(--primary); color: #fff; }
.u-btn-primary:hover { background: var(--primary-700); transform: translateY(-1px); box-shadow: var(--shadow-2); color: #fff; text-decoration: none; }
.u-btn-ghost { background: var(--bg); color: var(--ink-2); border-color: var(--line); }
.u-btn-ghost:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* Semester info strip */
.u-sem-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--bg) 100%);
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 22px;
    font-size: 14px;
}
.u-sem-strip .label { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.u-sem-strip strong { color: var(--ink); font-weight: 700; }
.u-sem-strip .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 6px; }
.u-sem-strip .spacer { flex: 1; }
.u-sem-strip .count {
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}

/* Grid (desktop) — rewrite of .schedule-grid */
body.u-public .schedule-container { margin-top: 0; }
body.u-public .schedule-grid {
    display: grid;
    grid-template-columns: 110px repeat(6, minmax(140px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-2);
}
body.u-public .schedule-header { display: contents; }
body.u-public .schedule-header .header-cell {
    background: linear-gradient(180deg, var(--bg-3) 0%, var(--bg) 100%);
    padding: 14px 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-2);
    text-align: center;
    border: 0;
}
body.u-public .schedule-header .header-cell.today {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
    color: #fff;
    position: relative;
}
body.u-public .schedule-header .header-cell.today::after {
    content: "SOT";
    position: absolute;
    top: 4px; right: 6px;
    font-size: 9px;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 6px;
    border-radius: 999px;
    letter-spacing: 0.08em;
}
body.u-public .time-cell {
    background: var(--bg);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    font-feature-settings: "tnum";
}
body.u-public .time-cell > span:first-child {
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}
body.u-public .time-cell .time-range {
    font-size: 14px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
body.u-public .time-cell .time-range + .time-range { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }
body.u-public .schedule-cell {
    background: var(--bg);
    padding: 6px;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    border: 0;
}
body.u-public .schedule-cell:hover { background: var(--bg-2); }
body.u-public .schedule-block {
    position: relative;
    background: var(--bg) !important;
    border-radius: 10px;
    padding: 9px 10px;
    cursor: pointer;
    border: 1px solid transparent;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-1);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    overflow: hidden;
    color: var(--ink);
}
body.u-public .schedule-block::before {
    content: "";
    position: absolute; inset: 0;
    background: currentColor;
    opacity: 0.08;
    pointer-events: none;
}
body.u-public .schedule-block:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-3);
    border-color: color-mix(in srgb, currentColor 40%, transparent);
    z-index: 2;
}
body.u-public .schedule-block[data-cat="ligjerate"] { color: var(--cat-ligj-ink); border-left-color: var(--cat-ligj); }
body.u-public .schedule-block[data-cat="ushtrime"]  { color: var(--cat-ushtr-ink); border-left-color: var(--cat-ushtr); }
body.u-public .schedule-block[data-cat="laborator"] { color: var(--cat-lab-ink); border-left-color: var(--cat-lab); }
body.u-public .schedule-block[data-cat="seminar"]   { color: var(--cat-sem-ink); border-left-color: var(--cat-sem); }

body.u-public .schedule-block .block-type {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: currentColor;
    color: #fff !important;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}
body.u-public .schedule-block .block-course {
    font-size: 12px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
    position: relative; z-index: 1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.u-public .schedule-block .block-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10.5px;
    color: var(--ink-2);
    position: relative; z-index: 1;
}
body.u-public .schedule-block .block-details span { display: flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.u-public .schedule-block .block-details i { font-size: 9px; color: var(--muted); width: 10px; }

/* Empty cell accents */
body.u-public .schedule-cell:empty::before,
body.u-public .schedule-cell:not(:has(.schedule-block))::before {
    content: "";
    position: absolute;
    inset: 20% 30%;
    background: repeating-linear-gradient(45deg, transparent 0 6px, var(--line) 6px 7px);
    opacity: 0.4;
    border-radius: 6px;
}

/* Legend */
body.u-public .schedule-legend {
    margin-top: 18px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 12.5px;
    color: var(--ink-2);
}
body.u-public .schedule-legend .legend-item { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
body.u-public .schedule-legend .legend-color { width: 14px; height: 14px; border-radius: 4px; }

/* Mobile day tabs */
body.u-public .day-tabs {
    display: none;
    gap: 6px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
}
body.u-public .day-tabs::-webkit-scrollbar { display: none; }
body.u-public .day-tab {
    flex: 1 0 auto;
    min-width: 60px;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-2);
    font-weight: 700;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
body.u-public .day-tab:hover { background: var(--bg-2); color: var(--primary); }
body.u-public .day-tab.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-1); }

/* Mobile list */
body.u-public .schedule-list { display: none; flex-direction: column; gap: 10px; }
body.u-public .schedule-list-item {
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-1);
}
body.u-public .list-time { text-align: center; font-variant-numeric: tabular-nums; }
body.u-public .list-time > div:first-child { font-size: 15px; font-weight: 800; color: var(--ink); }
body.u-public .list-content { border-left: 3px solid var(--primary); padding-left: 10px; }
body.u-public .list-course { font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
body.u-public .list-details { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); }
body.u-public .list-details i { margin-right: 4px; }
body.u-public .empty-state { text-align: center; color: var(--muted); padding: 40px 20px; background: var(--bg); border: 1px dashed var(--line); border-radius: var(--radius); }
body.u-public .empty-state i { font-size: 28px; color: var(--muted-2); margin-bottom: 10px; }

/* Modal styling (detail) */
body.u-public .modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}
body.u-public .modal-overlay.show { display: flex; animation: u-fade 0.2s ease; }
body.u-public .modal {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: u-pop 0.25s cubic-bezier(0.18, 1, 0.4, 1);
}
body.u-public .modal-header { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--bg-2); }
body.u-public .modal-header h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
body.u-public .modal-close {
    background: transparent; border: 0; width: 30px; height: 30px; border-radius: 8px;
    color: var(--muted); cursor: pointer; font-size: 14px; display: grid; place-items: center;
}
body.u-public .modal-close:hover { background: var(--bg-3); color: var(--ink); }
body.u-public .modal-body { padding: 18px 22px; }
body.u-public .popover-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
body.u-public .popover-row:last-child { border-bottom: 0; }
body.u-public .popover-label { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.06em; }
body.u-public .popover-value { color: var(--ink); font-weight: 600; }
body.u-public .badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }

@keyframes u-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes u-pop { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* Skeleton loader */
.u-skeleton {
    position: relative;
    overflow: hidden;
    background: var(--bg-3);
    border-radius: 8px;
}
.u-skeleton::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bg) 70%, transparent), transparent);
    animation: u-shimmer 1.4s infinite;
}
@keyframes u-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Alert */
.u-alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 18px;
    background: color-mix(in srgb, var(--warning) 10%, var(--bg));
    border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent);
    border-left: 4px solid var(--warning);
    border-radius: var(--radius);
    color: color-mix(in srgb, var(--warning) 80%, var(--ink));
    margin-bottom: 22px;
    font-size: 14px;
}
.u-alert i { font-size: 16px; margin-top: 2px; }

/* Footer */
.u-foot {
    max-width: 1320px; margin: 0 auto;
    padding: 36px 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.u-foot a { color: var(--primary); font-weight: 600; }

/* Responsive */
@media (max-width: 1024px) {
    body.u-public .schedule-grid { grid-template-columns: 90px repeat(6, minmax(120px, 1fr)); font-size: 12px; }
}
@media (max-width: 768px) {
    body.u-public .schedule-container { overflow-x: auto; }
    body.u-public .schedule-grid { display: none; }
    body.u-public .day-tabs { display: flex; }
    body.u-public .schedule-list { display: flex; }
    body.u-public .schedule-legend { display: none; }
    .u-hero { padding: 36px 20px 28px; }
    .u-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .u-filterbar { position: static; }
    .u-sem-strip { font-size: 13px; }
}

/* Print — optimized export PDF */
@media print {
    body.u-public { background: #fff !important; color: #000 !important; }
    .u-nav, .u-filterbar, .u-search, .u-shortcuts, .u-btn, .u-icon-btn, .u-foot, .u-stats, .day-tabs, .schedule-list, .u-hero p, .u-pill, .no-print { display: none !important; }
    .u-hero { background: #fff !important; padding: 10px 0 !important; }
    .u-hero::before { display: none; }
    .u-hero h1 { font-size: 18pt !important; color: #000 !important; margin: 0 0 6px; }
    .u-sem-strip { background: #fff !important; border: 1px solid #000 !important; border-left: 4px solid #000 !important; margin: 8px 0; }
    .u-wrap { padding: 0 10mm; }
    body.u-public .schedule-grid { display: grid !important; box-shadow: none; border: 1px solid #000; }
    body.u-public .schedule-block { break-inside: avoid; box-shadow: none; border: 1px solid #999 !important; border-left: 3px solid #000 !important; }
    body.u-public .schedule-block::before { display: none; }
    body.u-public .schedule-block .block-type { background: #000 !important; color: #fff !important; }
    body.u-public .schedule-header .header-cell.today { background: #000 !important; color: #fff !important; }
    body.u-public .schedule-header .header-cell { background: #eee !important; color: #000 !important; }
    .u-legend { display: flex !important; }
    a { color: #000 !important; text-decoration: none !important; }
}

/* =========================================================================
   LOGIN ULTRA
   ========================================================================= */
body.u-login {
    margin: 0;
    font-family: var(--font-sys);
    color: var(--ink);
    background: var(--bg-2);
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}
body.u-login *, body.u-login *::before, body.u-login *::after { box-sizing: border-box; }
body.u-login a { color: var(--primary); text-decoration: none; font-weight: 600; }

.u-log-hero {
    padding: 64px 60px;
    background:
        radial-gradient(ellipse 60% 80% at 0% 100%, color-mix(in srgb, var(--primary) 25%, transparent) 0%, transparent 60%),
        radial-gradient(ellipse 60% 60% at 100% 0%, rgba(14, 165, 233, 0.3) 0%, transparent 60%),
        linear-gradient(135deg, var(--primary-700) 0%, var(--primary) 60%, var(--accent) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.u-log-hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 80%);
    pointer-events: none;
}
.u-log-brand { display: flex; align-items: center; gap: 14px; position: relative; }
.u-log-brand-mark {
    width: 54px; height: 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    display: grid; place-items: center;
    color: #fff;
    font-size: 22px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.u-log-brand b { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; display: block; }
.u-log-brand small { font-size: 11px; opacity: 0.8; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.u-log-content { position: relative; max-width: 520px; }
.u-log-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 22px;
    backdrop-filter: blur(10px);
}
.u-log-content h1 {
    font-size: clamp(2rem, 3.5vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin: 0 0 18px;
}
.u-log-content p { font-size: 15px; opacity: 0.92; line-height: 1.65; max-width: 460px; }
.u-log-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; max-width: 520px; position: relative; }
.u-log-feat {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 16px;
    display: flex; gap: 12px; align-items: flex-start;
    transition: transform 0.2s ease, background 0.2s ease;
}
.u-log-feat:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.15); }
.u-log-feat-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.22);
    display: grid; place-items: center;
    flex-shrink: 0;
    font-size: 14px;
}
.u-log-feat b { font-size: 13px; font-weight: 700; display: block; margin-bottom: 2px; }
.u-log-feat span { font-size: 12px; opacity: 0.85; line-height: 1.4; }
.u-log-foot { position: relative; font-size: 12px; opacity: 0.8; display: flex; gap: 14px; flex-wrap: wrap; }
.u-log-foot a { color: #fff; opacity: 0.95; }

/* Login form side */
.u-log-form-side { padding: 48px 56px; display: flex; align-items: center; justify-content: center; }
.u-log-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: var(--shadow-3);
    position: relative;
}
.u-log-card-head { text-align: center; margin-bottom: 26px; }
.u-log-card-head .ic {
    width: 58px; height: 58px; margin: 0 auto 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: grid; place-items: center;
    color: #fff; font-size: 22px;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.4);
}
.u-log-card-head h2 { font-size: 22px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.02em; color: var(--ink); }
.u-log-card-head p { font-size: 13px; color: var(--muted); margin: 0; }

.u-log-alert { padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.u-log-alert.err { background: color-mix(in srgb, var(--danger) 10%, var(--bg)); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); }
.u-log-alert.ok { background: color-mix(in srgb, var(--success) 10%, var(--bg)); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); color: var(--success); }

.u-log-group { margin-bottom: 16px; }
.u-log-group label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; letter-spacing: 0.02em; }
.u-log-wrap { position: relative; }
.u-log-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.u-log-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.u-log-input:focus { border-color: var(--primary); background: var(--bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
/* Fushat me buton shfaq/fshih (fjalekalimi) — leri vend ne te djathte qe
   teksti i shtypur te mos mbulohet nga butoni i syrit. */
.u-log-input.has-toggle { padding-right: 44px; }
.u-log-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.u-log-toggle:hover { color: var(--primary); }

.u-log-btn {
    width: 100%;
    padding: 13px 18px;
    border: 0; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 10px 22px rgba(2, 132, 199, 0.3);
    transition: all 0.15s ease;
    letter-spacing: 0.01em;
}
.u-log-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(2, 132, 199, 0.45); }

.u-log-back {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
.u-log-back a { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 968px) {
    body.u-login { grid-template-columns: 1fr; }
    .u-log-hero { padding: 40px 28px; min-height: 260px; }
    .u-log-content h1 { font-size: 1.8rem; }
    .u-log-grid { display: none; }
    .u-log-form-side { padding: 30px 22px 50px; }
}
