:root {
    --primary: #2563eb;
    --primary-soft: rgba(37, 99, 235, 0.14);
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #ef4444;
    --deep-navy: #0f172a;
    --bg: #f8fbff;
    --text: #0f172a;
    --muted: #475569;
    --card: rgba(255, 255, 255, 0.7);
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(circle at 15% 5%, #dbeafe 0%, #eef4ff 25%, #f8fbff 65%);
    font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

.landing-body { min-height: 100vh; }
.landing-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(130deg, rgba(37,99,235,0.08), rgba(15,23,42,0.04));
    z-index: -1;
}

.glass {
    background: var(--card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.landing-main {
    width: min(1140px, 92%);
    margin: 42px auto;
    display: grid;
    gap: 26px;
}

.hero-card { padding: 54px; text-align: center; }
.hero-badge {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--primary);
    background: var(--primary-soft);
}
.hero-card h1 { margin: 14px 0 10px; font-size: clamp(32px, 5.2vw, 60px); }
.hero-card p { margin: 0 auto; max-width: 720px; color: var(--muted); font-size: 18px; }

.hero-cta {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    border: 0;
    cursor: pointer;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    position: relative;
    overflow: hidden;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 12px 24px rgba(37,99,235,.35); }
.btn-xl { padding: 15px 24px; font-size: 16px; }
.btn-ghost { background: rgba(15, 23, 42, .06); color: var(--deep-navy); }

.ripple::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, .35);
    transform: scale(0);
    opacity: 0;
    transition: transform .45s ease, opacity .45s ease;
}
.ripple:active::after { transform: scale(1); opacity: 1; transition: 0s; }

.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.feature-card { padding: 20px; }
.feature-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(37,99,235,.12);
    font-size: 20px;
}
.feature-card h3 { margin: 12px 0 8px; }
.feature-card p { margin: 0; color: var(--muted); }

.dash-body { min-height: 100vh; }
.dash-gradient {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(37,99,235,0.14), transparent 40%),
                radial-gradient(circle at 10% 90%, rgba(15,23,42,0.08), transparent 40%);
    z-index: -1;
}

.dash-layout {
    width: min(1320px, 96%);
    margin: 18px auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
}

.dash-sidebar { padding: 18px; height: calc(100vh - 36px); position: sticky; top: 18px; }
.brand-box { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(140deg, #2563eb, #1d4ed8);
    font-weight: 900;
}
.brand-title { font-weight: 800; }
.brand-sub { font-size: 12px; color: var(--muted); }

.nav-list { display: grid; gap: 8px; }
.nav-item {
    border: 0;
    background: transparent;
    text-align: left;
    border-radius: 12px;
    padding: 11px 12px;
    font-weight: 650;
    cursor: pointer;
    color: var(--deep-navy);
    transition: background .2s ease, transform .2s ease;
}
.nav-item:hover { background: rgba(37,99,235,.1); transform: translateX(2px); }
.nav-item.active { background: rgba(37,99,235,.16); color: #1d4ed8; }

.dash-main { display: grid; gap: 14px; align-content: start; }
.dash-header {
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dash-header h1 { margin: 0; font-size: 28px; }
.header-sub { margin: 4px 0 0; color: var(--muted); }
.header-right { display: flex; gap: 10px; align-items: center; }

.icon-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(15,23,42,.06);
    cursor: pointer;
    position: relative;
    font-size: 18px;
}

.notif-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: grid;
    place-items: center;
    padding: 0 4px;
}

.profile-chip {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(37,99,235,.1);
    color: #1e3a8a;
    font-weight: 650;
}

.hidden { display: none !important; }
.view-section { display: block; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.stat-card { padding: 18px; }
.stat-card span { color: var(--muted); font-size: 14px; }
.stat-card strong { display: block; font-size: 34px; margin-top: 7px; }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.section-head h2 { margin: 0; }

.teacher-form { padding: 16px; margin-bottom: 12px; }
.teacher-form h3 { margin: 0 0 12px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

input, textarea, select {
    width: 100%;
    border: 1px solid rgba(15,23,42,.14);
    background: rgba(255,255,255,.82);
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
}
textarea { min-height: 88px; margin: 10px 0; resize: vertical; }

.changes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.change-card {
    padding: 15px;
    border-radius: 18px;
    box-shadow: var(--shadow);
    background: rgba(255,255,255,.86);
    transition: transform .2s ease;
}
.change-card:hover { transform: translateY(-4px); }
.change-card h4 { margin: 0 0 7px; font-size: 21px; }
.change-meta { margin: 4px 0; color: var(--muted); font-size: 14px; }
.change-desc { margin: 10px 0 0; }

.change-card.type-atšaukta { border-left: 6px solid var(--danger); }
.change-card.type-perkelta { border-left: 6px solid var(--warning); }
.change-card.type-kita-veikla { border-left: 6px solid var(--success); }

.auth-shell {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.auth-card { padding: 16px; }
.auth-card h3 { margin: 0 0 12px; }

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.admin-block { padding: 16px; }
.admin-users { grid-column: 1 / -1; }
.users-list { display: grid; gap: 8px; margin-top: 10px; }
.user-row {
    background: rgba(15,23,42,.05);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.user-row small { color: var(--muted); }

.notif-panel {
    position: fixed;
    top: 84px;
    right: 24px;
    width: min(420px, calc(100% - 30px));
    max-height: 70vh;
    overflow: auto;
    padding: 12px;
    z-index: 20;
}
.notif-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notif-list { display: grid; gap: 8px; margin-top: 8px; }
.notif-item {
    background: rgba(15,23,42,.06);
    padding: 10px;
    border-radius: 12px;
}
.notif-item.new { background: rgba(37,99,235,.15); }
.notif-item h5 { margin: 0 0 6px; }
.notif-item p { margin: 0; color: var(--muted); }

.status-line {
    min-height: 22px;
    color: #334155;
    margin: 0;
    font-weight: 600;
}

.fade-in { animation: fadeIn .48s ease; }
.slide-up { animation: slideUp .4s ease; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 1024px) {
    .dash-layout { grid-template-columns: 1fr; }
    .dash-sidebar { height: auto; position: static; }
    .card-grid,
    .auth-shell,
    .admin-grid,
    .form-grid,
    .features { grid-template-columns: 1fr; }
}
