:root {
    --bg-100: #0b0f14;
    --bg-200: #121821;
    --bg-300: #18212c;
    --bg-400: #1f2a36;
    --bg-500: #273444;

    --card: rgba(21, 29, 38, 0.92);
    --card-2: rgba(26, 36, 48, 0.92);

    --white-100: #ffffff;
    --white-90: rgba(255, 255, 255, 0.90);
    --white-80: rgba(255, 255, 255, 0.80);
    --white-70: rgba(255, 255, 255, 0.70);
    --white-60: rgba(255, 255, 255, 0.60);

    --text: #e8edf3;
    --text-soft: #aab7c5;
    --border: rgba(255, 255, 255, 0.08);

    --primary: #4f8cff;
    --primary-soft: rgba(79, 140, 255, 0.18);

    --blue: #3b82f6;
    --green: #22c55e;
    --purple: #8b5cf6;
    --orange: #f59e0b;
    --pink: #ec4899;
    --red: #ef4444;
    --cyan: #06b6d4;

    --shadow: 0 18px 45px rgba(0, 0, 0, 0.30);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;

    --sidebar-width: 280px;
}

html[data-theme="light"] {
    --bg-100: #f3f6fb;
    --bg-200: #ffffff;
    --bg-300: #eef3f8;
    --bg-400: #e3ebf4;
    --bg-500: #d6e1ec;

    --card: rgba(255, 255, 255, 0.94);
    --card-2: rgba(246, 249, 252, 0.96);

    --white-100: #0f172a;
    --white-90: rgba(15, 23, 42, 0.90);
    --white-80: rgba(15, 23, 42, 0.80);
    --white-70: rgba(15, 23, 42, 0.70);
    --white-60: rgba(15, 23, 42, 0.60);

    --text: #0f172a;
    --text-soft: #5b6b7f;
    --border: rgba(15, 23, 42, 0.08);

    --primary-soft: rgba(79, 140, 255, 0.12);

    --shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(79, 140, 255, 0.16), transparent 30%),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.12), transparent 25%),
        linear-gradient(180deg, var(--bg-100) 0%, var(--bg-200) 100%);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.portal-shell {
    display: flex;
    min-height: 100vh;
}

.portal-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--bg-300) 0%, var(--bg-200) 100%);
    border-right: 1px solid var(--border);
    padding: 26px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 8px 0;
}

.brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    font-size: 20px;
    box-shadow: var(--shadow);
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.brand-subtitle {
    font-size: 13px;
    color: var(--text-soft);
    margin-top: 4px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border-radius: 14px;
    color: var(--text-soft);
    transition: 0.2s ease;
    border: 1px solid transparent;
}

.side-link:hover,
.side-link.active {
    background: var(--primary-soft);
    color: var(--text);
    border-color: var(--border);
}

.sidebar-footer {
    margin-top: auto;
}

.theme-btn,
.theme-icon-btn {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: 0.2s ease;
}

.theme-btn {
    width: 100%;
    border-radius: 14px;
    padding: 14px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.theme-icon-btn {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
}

.theme-btn:hover,
.theme-icon-btn:hover {
    transform: translateY(-1px);
    background: var(--card-2);
}

.portal-main {
    flex: 1;
    padding: 28px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue);
    font-weight: 700;
}

.topbar h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
}

.topbar-text {
    margin: 10px 0 0;
    max-width: 760px;
    color: var(--text-soft);
    line-height: 1.6;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 24px;
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
    box-shadow: var(--shadow);
    margin-bottom: 28px;
    overflow: hidden;
    position: relative;
}

.hero-badge {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 14px;
}

.hero-card h2 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.2;
}

.hero-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
    max-width: 700px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.stat-box {
    min-width: 120px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

html[data-theme="light"] .stat-box {
    background: rgba(15, 23, 42, 0.03);
}

.stat-box strong {
    display: block;
    font-size: 24px;
    margin-bottom: 6px;
}

.stat-box span {
    color: var(--text-soft);
    font-size: 14px;
}

.hero-right {
    min-height: 220px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-panel {
    position: relative;
    z-index: 2;
    width: 220px;
    height: 220px;
    border-radius: 30px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
}

html[data-theme="light"] .hero-panel {
    background: rgba(255, 255, 255, 0.65);
}

.hero-panel i {
    font-size: 44px;
    background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-panel span {
    font-size: 16px;
    font-weight: 700;
}

.hero-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
    opacity: 0.85;
}

.orb-1 {
    width: 140px;
    height: 140px;
    background: rgba(59, 130, 246, 0.24);
    top: 10px;
    right: 80px;
}

.orb-2 {
    width: 120px;
    height: 120px;
    background: rgba(139, 92, 246, 0.24);
    bottom: 18px;
    left: 28px;
}

.section-head {
    margin: 10px 0 18px;
}

.section-head h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.section-head p {
    margin: 0;
    color: var(--text-soft);
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 34px;
}

.system-card {
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: 0.22s ease;
}

.system-card:hover {
    transform: translateY(-4px);
}

.system-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.system-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-size: 28px;
    color: #fff;
    box-shadow: var(--shadow);
}

.icon-lms {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.icon-hrms {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.icon-helpdesk {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.icon-assets {
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.icon-students {
    background: linear-gradient(135deg, #6366f1, #3b82f6);
}

.system-badge {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

html[data-theme="light"] .system-badge {
    background: rgba(15, 23, 42, 0.04);
}

.system-content h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.system-subtitle {
    font-size: 14px;
    color: var(--text-soft);
    margin-bottom: 12px;
}

.system-content p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
    min-height: 92px;
}

.system-actions {
    margin-top: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #2563eb);
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.roadmap-card {
    padding: 22px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.roadmap-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
    font-size: 20px;
}

.roadmap-blue {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.roadmap-green {
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.roadmap-purple {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.roadmap-card h3 {
    margin: 2px 0 8px;
    font-size: 18px;
}

.roadmap-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.portal-footer {
    padding: 10px 4px 30px;
    color: var(--text-soft);
    font-size: 14px;
}

@media (max-width: 1200px) {
    .system-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .roadmap-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .portal-shell {
        flex-direction: column;
    }

    .portal-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .portal-main {
        padding: 20px;
    }

    .system-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .hero-card,
    .system-card,
    .roadmap-card {
        padding: 18px;
    }

    .topbar h1 {
        font-size: 28px;
    }

    .hero-card h2 {
        font-size: 24px;
    }

    .system-content h3 {
        font-size: 22px;
    }

    .hero-stats {
        flex-direction: column;
    }
}