/* Learni modern UI kit: shared base for gradual redesign */
:root {
    --lr-bg: #eef4ef;
    --lr-bg-soft: #e5efe8;
    --lr-surface: #ffffff;
    --lr-surface-soft: #f8fbf9;
    --lr-border: #d2e0d6;
    --lr-border-strong: #bfd2c3;
    --lr-text: #17241c;
    --lr-muted: #5a6d5f;
    --lr-primary: #1f7f49;
    --lr-primary-strong: #17653a;
    --lr-primary-soft: #eaf5ed;
    --lr-danger: #b7424a;
    --lr-radius: 14px;
    --lr-shadow: 0 10px 26px rgba(26, 56, 36, 0.08);
    --lr-shadow-soft: 0 6px 16px rgba(26, 56, 36, 0.06);
}

* {
    box-sizing: border-box;
}

body.lr-body {
    margin: 0;
    min-height: 100vh;
    color: var(--lr-text);
    font-family: "Segoe UI", "Roboto", sans-serif;
    background:
        radial-gradient(circle at 12% -18%, rgba(53, 147, 86, 0.14), transparent 48%),
        radial-gradient(circle at 88% -10%, rgba(39, 119, 71, 0.1), transparent 42%),
        linear-gradient(180deg, var(--lr-bg-soft) 0%, var(--lr-bg) 46%, #f5f8f6 100%);
}

.lr-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--lr-border);
    box-shadow: 0 8px 20px rgba(22, 58, 35, 0.08);
}

.lr-topbar-inner {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.lr-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--lr-text);
    text-decoration: none;
}

.lr-brand:hover {
    color: var(--lr-text);
}

.lr-brand-logo {
    width: 31px;
    height: 31px;
    object-fit: contain;
}

.lr-brand-text {
    line-height: 1.15;
}

.lr-brand-title {
    font-size: 1rem;
    font-weight: 700;
}

.lr-brand-sub {
    font-size: 0.76rem;
    color: var(--lr-muted);
}

.lr-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.lr-topbar-btn {
    text-decoration: none;
    color: #223327;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--lr-border);
    border-radius: 10px;
    padding: 0.45rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.16s ease;
}

.lr-topbar-btn:hover {
    background: var(--lr-primary-soft);
    border-color: #abc6b3;
    color: #113723;
    transform: translateY(-1px);
}

.lr-main {
    max-width: 1300px;
    margin-inline: auto;
    padding: 1rem 0.85rem 1.4rem;
}

.lr-hero {
    border-radius: 18px;
    background: linear-gradient(128deg, #154d30 0%, #1f8b52 62%, #2ba764 100%);
    border: 1px solid rgba(21, 71, 43, 0.36);
    box-shadow: 0 16px 32px rgba(23, 82, 49, 0.26);
    padding: 1rem 1.12rem;
    margin-bottom: 0.95rem;
    color: #f4fff7;
}

.lr-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    align-items: start;
}

.lr-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    color: #f3fff6;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 0.28rem 0.58rem;
    margin-bottom: 0.5rem;
}

.lr-hero-title {
    margin: 0;
    font-size: clamp(1.28rem, 1.8vw, 1.82rem);
    line-height: 1.24;
    font-weight: 700;
    color: #ffffff;
}

.lr-hero-text {
    margin: 0.45rem 0 0;
    font-size: 0.91rem;
    color: rgba(234, 255, 241, 0.9);
    max-width: 64ch;
}

.lr-hero-stats {
    display: none !important;
}

.lr-hero-stat {
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    padding: 0.5rem 0.6rem;
}

.lr-hero-stat-value {
    display: block;
    font-size: 1.02rem;
    line-height: 1.15;
    font-weight: 700;
    color: #fff;
}

.lr-hero-stat-label {
    display: block;
    margin-top: 0.08rem;
    font-size: 0.76rem;
    color: rgba(240, 255, 245, 0.92);
}

.lr-surface {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--lr-border);
    border-radius: var(--lr-radius);
    box-shadow: var(--lr-shadow);
    backdrop-filter: blur(3px);
}

.lr-surface-body {
    padding: 0.98rem;
}

.lr-section-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #1a3527;
}

.lr-section-sub {
    margin: 0.2rem 0 0;
    font-size: 0.84rem;
    color: var(--lr-muted);
}

.lr-card-grid {
    display: grid;
    gap: 0.72rem;
}

.lr-card {
    border: 1px solid var(--lr-border);
    border-radius: 12px;
    background: #fff;
    transition: all 0.14s ease;
}

.lr-card:hover {
    transform: translateY(-1px);
    border-color: #b8ccb9;
    box-shadow: var(--lr-shadow-soft);
}

.lr-card-body {
    padding: 0.95rem;
}

.lr-card-title {
    margin: 0;
    font-size: 1rem;
    color: #224032;
    font-weight: 700;
}

.lr-card-text {
    margin: 0.45rem 0 0;
    color: var(--lr-muted);
    font-size: 0.9rem;
}

.lr-meta {
    margin: 0.55rem 0 0;
    font-size: 0.8rem;
    color: #6a7d70;
}

.lr-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.17rem 0.48rem;
    border: 1px solid #d3e3d7;
    border-radius: 999px;
    font-size: 0.72rem;
    color: #345345;
    background: #f7fbf8;
    white-space: nowrap;
}

.btn.lr-btn-primary {
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.88rem;
    border: 1px solid var(--lr-primary);
    background: linear-gradient(135deg, var(--lr-primary) 0%, #2a9f61 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(24, 100, 58, 0.2);
    transition: all 0.14s ease;
}

.btn.lr-btn-primary:hover,
.btn.lr-btn-primary:focus {
    border-color: var(--lr-primary-strong);
    background: linear-gradient(135deg, var(--lr-primary-strong) 0%, #1d7c49 100%);
    color: #fff;
    transform: translateY(-1px);
}

.btn.lr-btn-outline {
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.88rem;
    border: 1px solid #a9c9b3;
    color: #1d6f40;
    background: #fff;
    transition: all 0.14s ease;
}

.btn.lr-btn-outline:hover,
.btn.lr-btn-outline:focus {
    background: var(--lr-primary-soft);
    border-color: #86ad96;
    color: #145532;
    transform: translateY(-1px);
}

.btn.lr-btn-danger {
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.88rem;
    border: 1px solid #e2b2b7;
    color: var(--lr-danger);
    background: #fff;
    transition: all 0.14s ease;
}

.btn.lr-btn-danger:hover,
.btn.lr-btn-danger:focus {
    background: #fdf2f3;
    border-color: #d58189;
    color: #992e36;
    transform: translateY(-1px);
}

.lr-alert {
    border: 1px solid var(--lr-border);
    border-radius: 10px;
    font-size: 0.9rem;
    box-shadow: var(--lr-shadow-soft);
}

.lr-empty {
    border: 1px dashed #c4d8c9;
    border-radius: 10px;
    background: #fcfefd;
    color: #5d6f63;
    font-size: 0.9rem;
    padding: 0.85rem;
}

.lr-line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Reusable inline spoiler (short text -> full text in place) */
.lr-inline-spoiler-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    margin-top: 0.28rem;
    border: 1px solid #bfd5c6;
    border-radius: 999px;
    background: #f5fbf7;
    color: #1e6b3d;
    padding: 0.18rem 0.52rem;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    transition: all .15s ease;
}

.lr-inline-spoiler-toggle:hover {
    background: #eaf6ef;
    border-color: #9fc3ad;
    color: #155633;
}

.lr-inline-spoiler-toggle i {
    font-size: 0.72rem;
    transition: transform .18s ease;
}

.lr-inline-spoiler-toggle.is-open i {
    transform: rotate(180deg);
}

.item-desc-inline {
    display: block;
}

/* Unified sizing and look for Bootstrap primitives on redesigned pages */
body.lr-body .btn {
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.88rem;
}

body.lr-body .btn.btn-sm {
    border-radius: 8px;
    font-size: 0.81rem;
    padding: 0.26rem 0.56rem;
}

body.lr-body .btn-outline-secondary,
body.lr-body .btn-outline-primary,
body.lr-body .btn-outline-success {
    border-color: #a9c9b3;
    color: #1d6f40;
    background: #fff;
}

body.lr-body .btn-outline-secondary:hover,
body.lr-body .btn-outline-primary:hover,
body.lr-body .btn-outline-success:hover {
    background: var(--lr-primary-soft);
    border-color: #86ad96;
    color: #145532;
}

body.lr-body .btn-success,
body.lr-body .btn-primary {
    border-color: var(--lr-primary);
    background: linear-gradient(135deg, var(--lr-primary) 0%, #2a9f61 100%);
    color: #fff;
}

body.lr-body .btn-success:hover,
body.lr-body .btn-primary:hover {
    border-color: var(--lr-primary-strong);
    background: linear-gradient(135deg, var(--lr-primary-strong) 0%, #1d7c49 100%);
    color: #fff;
}

body.lr-body .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #f8fcf9;
    --bs-table-hover-bg: #f4faf6;
    border-color: #dce8df;
}

body.lr-body .table thead th,
body.lr-body .lr-table thead th {
    background: #f2f8f4;
    color: #294b38;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    border-bottom-width: 1px;
}

body.lr-body .badge {
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 0.28rem 0.52rem;
}

body.lr-body .badge.bg-success {
    background: #e7f6ec !important;
    color: #1a7b45 !important;
    border: 1px solid #b8dcc5;
}

body.lr-body .badge.bg-warning,
body.lr-body .badge.bg-warning.text-dark {
    background: #fff7df !important;
    color: #8a6a11 !important;
    border: 1px solid #ead497;
}

body.lr-body .badge.bg-danger {
    background: #fdeff0 !important;
    color: #a3323b !important;
    border: 1px solid #e7b7bc;
}

body.lr-body .badge.bg-secondary {
    background: #eef2ef !important;
    color: #55685c !important;
    border: 1px solid #d7e0d9;
}

body.lr-body .badge.bg-info,
body.lr-body .badge.bg-info.text-dark,
body.lr-body .badge.bg-primary {
    background: #eaf2ff !important;
    color: #30579a !important;
    border: 1px solid #c8daf8;
}

/* Auth + landing pages */
.lr-auth-shell {
    max-width: 520px;
    margin: 1.15rem auto 1.8rem;
}

.lr-auth-card {
    border: 1px solid var(--lr-border);
    border-radius: var(--lr-radius);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--lr-shadow);
    overflow: hidden;
}

.lr-auth-head {
    background: #f2f8f4;
    border-bottom: 1px solid #dce8df;
    color: #1f6b3d;
    font-weight: 700;
    padding: 0.85rem 0.95rem;
}

.lr-auth-body {
    padding: 1rem;
}

.lr-auth-logo {
    display: block;
    height: 84px;
    width: auto;
    margin: 0 auto 0.8rem;
}

.lr-auth-links {
    margin-top: 0.85rem;
    text-align: center;
    font-size: 0.88rem;
    color: var(--lr-muted);
}

.lr-auth-links a {
    text-decoration: none;
}

.lr-landing-shell {
    max-width: 980px;
    margin-inline: auto;
}

.lr-landing-panel {
    border: 1px solid var(--lr-border);
    border-radius: var(--lr-radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--lr-shadow);
    padding: 1rem;
}

@media (max-width: 900px) {
    .lr-hero-grid {
        grid-template-columns: 1fr;
    }

    .lr-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .lr-topbar-inner {
        min-height: auto;
        flex-direction: column;
        align-items: flex-start;
        padding: 0.6rem 0;
    }

    .lr-topbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .lr-topbar-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}
