:root {
    --primary-color: #38bdf8;      /* sky / electric blue */
    --secondary-color: #0b1224;    /* deep space */
    --accent-color: #22d3ee;       /* cyan */
    --violet: #8b5cf6;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --bg-color: #070b16;
    --bg-elev: #0c1322;
    --text-color: #e6edf7;
    --text-light: #8a98b8;
    --white: #ffffff;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-2: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.09);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glow: 0 0 28px rgba(56, 189, 248, 0.32);
    --radius: 14px;
    --container-width: 1200px;
    --grad-ai: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #8b5cf6 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 18% 8%, rgba(56, 189, 248, 0.10), transparent 42%),
        radial-gradient(circle at 82% 78%, rgba(139, 92, 246, 0.10), transparent 42%),
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 42px 42px, 42px 42px;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: rgba(7, 11, 22, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: var(--grad-ai);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    -webkit-text-fill-color: var(--cyan);
    color: var(--cyan);
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.6));
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-light);
    transition: color 0.3s, text-shadow 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-color);
    text-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    background: var(--grad-ai);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--grad-ai);
    color: var(--white);
    border-radius: var(--radius);
    transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(56, 189, 248, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(56, 189, 248, 0.5);
    filter: brightness(1.08);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: var(--cyan);
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(56, 189, 248, 0.12);
    color: var(--white);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    padding: 110px 0 90px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
        linear-gradient(180deg, rgba(12, 19, 34, 0.6), rgba(7, 11, 22, 0));
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    z-index: 0;
    animation: floatGlow 12s ease-in-out infinite;
}

.hero::before {
    background: rgba(34, 211, 238, 0.35);
    top: -160px;
    left: -80px;
}

.hero::after {
    background: rgba(139, 92, 246, 0.32);
    bottom: -200px;
    right: -60px;
    animation-delay: -6s;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.4);
    background: rgba(34, 211, 238, 0.08);
    color: var(--cyan);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 26px;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
}

.hero-eyebrow .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
    animation: pulse 1.8s ease-in-out infinite;
}

.hero h1 {
    font-size: 52px;
    margin-bottom: 22px;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #bae6fd 45%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 .accent {
    background: var(--grad-ai);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.85;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* Sections */
.section {
    padding: 70px 0;
    position: relative;
}

.section-eyebrow {
    display: block;
    text-align: center;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 44px;
    background: linear-gradient(135deg, #e6edf7, #7dd3fc 60%, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    position: relative;
    background: linear-gradient(160deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.6), transparent);
    opacity: 0.5;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 14px 44px rgba(56, 189, 248, 0.16);
}

.card h3 {
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Capability (AI) cards */
.capability-card .feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 22px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--cyan);
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.25);
}

.capability-card:nth-child(2) .feature-icon {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.25);
}

.capability-card:nth-child(3) .feature-icon {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.25);
}

.capability-card .step {
    position: absolute;
    top: 22px;
    right: 26px;
    font-size: 40px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    letter-spacing: 2px;
}

/* Footer */
footer {
    background: #05080f;
    color: var(--text-light);
    padding: 50px 0 30px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

footer h3,
footer h4 {
    color: var(--text-color);
    margin-bottom: 12px;
}

footer .logo {
    margin-bottom: 6px;
}

.footer-links li + li {
    margin-top: 8px;
}

.footer-links a {
    color: var(--text-light);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--cyan);
}

.footer-bottom {
    margin-top: 40px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 20px;
    font-size: 14px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-light);
}

.form-control {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    color: var(--text-color);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.form-control::placeholder {
    color: rgba(138, 152, 184, 0.6);
}

.form-control:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

select.form-control option {
    background: var(--bg-elev);
    color: var(--text-color);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.badge-tech {
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
    border-color: rgba(34, 211, 238, 0.3);
}

.badge-budget {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

.badge-score {
    background: rgba(251, 146, 60, 0.12);
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.3);
}

/* Dashboard / Matching */
.match-dashboard {
    display: flex;
    gap: 30px;
}

.match-sidebar {
    width: 300px;
    background: linear-gradient(160deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border-color);
    padding: 22px;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.match-results {
    flex: 1;
}

.match-score {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.hero-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-primary {
    background: var(--white);
    color: var(--secondary-color);
}

.hero-outline {
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
}

.runtime-info {
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(160deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 28px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.14);
}

.stat-value {
    font-size: 38px;
    font-weight: 800;
    background: var(--grad-ai);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-light);
    margin-top: 10px;
}

.feature-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.stack-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.loading-state,
.empty-state {
    background: linear-gradient(160deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    color: var(--text-light);
}

.muted {
    color: var(--text-light);
}

.badge-row,
.meta-row,
.tag-row,
.attachment-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.meta-row {
    color: var(--text-light);
    font-size: 14px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--cyan);
    font-size: 13px;
}

.patent-card {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.patent-card-main {
    flex: 1;
}

.patent-card-side {
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.patent-title {
    margin-bottom: 10px;
}

.score-circle {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grad-ai);
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.4);
}

.file-link {
    color: var(--cyan);
    font-weight: 600;
}

.file-link:hover {
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}

.dual-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
}

.detail-panel {
    min-height: 260px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
    color: var(--text-light);
}

.checkbox-row,
.checkbox-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    width: 100%;
}

.pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-btn {
    background: var(--surface-2);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.page-btn.active-page {
    background: var(--grad-ai);
    color: var(--white);
    border: none;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.status-message {
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 14px;
    border: 1px solid transparent;
}

.status-message.success {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

.status-message.error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.status-message.info {
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.3);
}

.narrow-layout {
    max-width: 900px;
    margin: 0 auto;
}

.center-intro {
    text-align: center;
    margin-bottom: 30px;
}

.form-title {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    margin-top: 30px;
}

.form-title:first-child {
    margin-top: 0;
}

.submit-row {
    margin-top: 30px;
    text-align: center;
}

.demand-summary h3 {
    margin-bottom: 10px;
}

.matching-entry {
    margin-bottom: 30px;
}

.loading-panel {
    background: linear-gradient(160deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 24px;
}

.loading-panel i {
    font-size: 36px;
    color: var(--cyan);
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.6));
}

.radar-chart-placeholder {
    width: 100%;
    min-height: 180px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 20px;
    border: 1px dashed rgba(56, 189, 248, 0.3);
    background: rgba(34, 211, 238, 0.04);
    color: var(--text-light);
}

.info-block {
    margin-top: 20px;
}

.match-card {
    border-left: 4px solid transparent;
}

.match-card.high-match {
    border-left-color: var(--accent-color);
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.18);
}

.match-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.score-badge {
    background: var(--grad-ai);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.dimension-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}

.dimension-item + .dimension-item {
    margin-top: 10px;
}

.dimension-label {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--text-light);
}

.dimension-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
}

.dimension-fill {
    height: 100%;
    background: var(--grad-ai);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.match-card-ai-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 999px;
    margin-bottom: 8px;
    box-shadow: 0 0 14px rgba(118, 75, 162, 0.5);
}

.ai-reason-box {
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-left: 3px solid var(--cyan);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 10px 0;
    font-size: 13px;
    color: #bae6fd;
}

.ai-reason-box i {
    color: var(--cyan);
}

.ai-summary-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.08));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-left: 4px solid var(--violet);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.ai-summary-box h4 {
    margin: 0 0 10px 0;
    color: #c4b5fd;
    font-size: 15px;
}

.ai-summary-box p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
}

.ai-summary-box .meta-row {
    color: #c4b5fd;
}

.ai-summary-box .meta-row span {
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 3px 10px;
    border-radius: 999px;
    margin-right: 8px;
}

/* Animations */
@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

@media (max-width: 992px) {
    .dual-layout,
    .match-dashboard {
        grid-template-columns: 1fr;
        display: grid;
    }

    .match-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    nav {
        height: auto;
        padding: 16px 0;
        flex-direction: column;
        gap: 16px;
    }

    .nav-links {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding: 70px 0 60px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero p {
        font-size: 18px;
    }

    .form-row,
    .patent-card,
    .match-header {
        flex-direction: column;
    }

    .patent-card-side {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
}

.small-btn {
    padding: 6px 10px;
    font-size: 13px;
}

/* Admin / login shared */
.admin-login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.16), transparent 45%),
        radial-gradient(circle at 80% 90%, rgba(139, 92, 246, 0.16), transparent 45%),
        linear-gradient(135deg, #0a1426, #102542 60%, #0b1224);
}

.admin-login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.admin-login-card {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(160deg, rgba(18, 26, 46, 0.92), rgba(12, 19, 34, 0.94));
    border: 1px solid rgba(56, 189, 248, 0.22);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(56, 189, 248, 0.12);
}

.admin-login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.admin-login-brand i {
    font-size: 40px;
    color: var(--cyan);
    margin-bottom: 12px;
    filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.6));
}

.admin-login-brand h1 {
    background: var(--grad-ai);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-login-btn {
    width: 100%;
}

.admin-login-links {
    margin-top: 18px;
    text-align: center;
}

.admin-login-links a {
    color: var(--cyan);
    margin: 0 6px;
}

/* Admin panel */
.admin-body {
    background: var(--bg-color);
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.admin-sidebar {
    background: #0a1426;
    border-right: 1px solid var(--border-color);
    color: var(--white);
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    gap: 24px;
}

.admin-sidebar .logo {
    color: var(--white);
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-nav-item {
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
    padding: 12px 14px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.25s, color 0.25s;
}

.admin-nav-item.active,
.admin-nav-item:hover {
    background: rgba(56, 189, 248, 0.14);
    color: var(--white);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.admin-sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-side-link {
    width: 100%;
    text-align: center;
}

.admin-main {
    padding: 24px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-two-col {
    display: grid;
    grid-template-columns: minmax(320px, 420px) 1fr;
    gap: 24px;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
    color: var(--text-color);
}

.admin-table th {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.04);
}

.admin-table tr:hover td {
    background: rgba(56, 189, 248, 0.05);
}

.admin-list-card {
    border: 1px solid var(--border-color);
    background: var(--surface);
    border-radius: 10px;
    padding: 14px;
}

.admin-list-card + .admin-list-card {
    margin-top: 12px;
}

@media (max-width: 1100px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        gap: 16px;
    }

    .admin-two-col {
        grid-template-columns: 1fr;
    }
}

/* ===== Theme toggle button ===== */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface-2);
    color: var(--text-color);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.theme-toggle:hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.theme-toggle i {
    color: var(--cyan);
}

/* ===== Switch toggle ===== */
.switch-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    transition: 0.25s;
}

.switch-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background: var(--text-light);
    border-radius: 50%;
    transition: 0.25s;
}

.switch input:checked + .switch-slider {
    background: var(--grad-ai);
    border-color: transparent;
}

.switch input:checked + .switch-slider::before {
    transform: translateX(24px);
    background: var(--white);
}

.switch-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

/* ===== Account box (右上角登录状态按钮) ===== */
.account-box {
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
}

.account-menu {
    position: relative;
}

.account-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px 5px 5px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface-2);
    color: var(--text-color);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.account-btn:hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.account-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--grad-ai);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.account-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-caret {
    font-size: 11px;
    color: var(--text-light);
    transition: transform 0.2s;
}

.account-menu.open .account-caret {
    transform: rotate(180deg);
}

.account-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
    z-index: 1200;
}

.account-menu.open .account-dropdown {
    display: block;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}

.account-info .muted {
    font-size: 12px;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 14px;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

.account-item i {
    width: 16px;
    color: var(--cyan);
    text-align: center;
}

.account-item:hover {
    background: var(--surface-2);
}

.account-danger,
.account-danger i {
    color: #ef4444;
}

/* ===== Profile modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 11, 22, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    padding: 24px;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-head h3 {
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 18px;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-color);
}

.profile-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.profile-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-row .muted {
    flex-shrink: 0;
}

/* ===== Light theme overrides ===== */
[data-theme="light"] {
    --bg-color: #eef2f7;
    --bg-elev: #ffffff;
    --text-color: #1a2233;
    --text-light: #5b6678;
    --white: #ffffff;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --border-color: #e3e8ef;
    --shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
    --secondary-color: #0b1224;
}

[data-theme="light"] body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 18% 8%, rgba(56, 189, 248, 0.10), transparent 42%),
        radial-gradient(circle at 82% 78%, rgba(139, 92, 246, 0.07), transparent 42%),
        linear-gradient(rgba(15, 23, 42, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.022) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 42px 42px, 42px 42px;
}

[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.82);
    border-bottom-color: #e3e8ef;
}

[data-theme="light"] .nav-links a {
    color: #5b6678;
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
    color: #0b1224;
    text-shadow: none;
}

[data-theme="light"] .hero {
    color: #0b1224;
    background:
        radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.16), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, var(--bg-color) 100%);
}

[data-theme="light"] .hero h1 {
    background: linear-gradient(135deg, #0b1224 0%, #0ea5e9 55%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero p {
    color: #475569;
    opacity: 1;
}

[data-theme="light"] .hero-primary {
    background: #0b1224;
    color: #ffffff;
}

[data-theme="light"] .hero-outline {
    border-color: #0b1224;
    color: #0b1224;
    background: transparent;
}

[data-theme="light"] .section-title {
    background: linear-gradient(135deg, #0b1224, #0ea5e9 60%, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .card,
[data-theme="light"] .stat-card,
[data-theme="light"] .match-sidebar,
[data-theme="light"] .loading-panel {
    background: #ffffff;
    border-color: #e3e8ef;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: var(--shadow);
}

[data-theme="light"] .card::before {
    background: linear-gradient(90deg, transparent, rgba(14, 165, 238, 0.5), transparent);
}

[data-theme="light"] .card h3 {
    color: var(--text-color);
}

[data-theme="light"] .card:hover {
    border-color: rgba(14, 165, 238, 0.45);
    box-shadow: 0 12px 32px rgba(14, 165, 238, 0.14);
}

[data-theme="light"] .loading-state,
[data-theme="light"] .empty-state {
    background: #ffffff;
    border-color: #e3e8ef;
}

[data-theme="light"] .capability-card .step {
    color: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .form-control {
    background: #f7f9fc;
    border-color: #d8dee8;
    color: #1a2233;
}

[data-theme="light"] .form-control::placeholder {
    color: #9aa6b8;
}

[data-theme="light"] select.form-control option {
    background: #ffffff;
    color: #1a2233;
}

[data-theme="light"] .badge {
    background: #f1f5f9;
    color: #475569;
    border-color: #e3e8ef;
}

[data-theme="light"] .badge-tech {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae0fb;
}

[data-theme="light"] .badge-budget {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

[data-theme="light"] .badge-score {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fed7aa;
}

[data-theme="light"] .tag-chip {
    background: #eef6ff;
    border-color: #cfe5ff;
    color: #0369a1;
}

[data-theme="light"] .muted,
[data-theme="light"] .meta-row {
    color: #5b6678;
}

[data-theme="light"] .dimension-group {
    background: #f7f9fc;
    border-color: #e3e8ef;
}

[data-theme="light"] .dimension-bar {
    background: #e3e8ef;
}

[data-theme="light"] .radar-chart-placeholder {
    background: #f7f9fc;
    border-color: #c7d2da;
    color: #64748b;
}

[data-theme="light"] .page-btn {
    background: #ffffff;
    color: #475569;
    border-color: #e3e8ef;
}

[data-theme="light"] .ai-reason-box {
    background: #eef6ff;
    border-color: #bae0fb;
    border-left-color: #0ea5e9;
    color: #0c4a6e;
}

[data-theme="light"] .ai-reason-box i {
    color: #0ea5e9;
}

[data-theme="light"] .ai-summary-box {
    background: #f5f3ff;
    border-color: #ddd6fe;
    border-left-color: #7c3aed;
}

[data-theme="light"] .ai-summary-box h4 {
    color: #6d28d9;
}

[data-theme="light"] .ai-summary-box p {
    color: #1a2233;
}

[data-theme="light"] .ai-summary-box .meta-row {
    color: #6d28d9;
}

[data-theme="light"] .ai-summary-box .meta-row span {
    background: #ede9fe;
    border-color: #ddd6fe;
}

[data-theme="light"] footer {
    background: #0b1224;
    color: #94a3b8;
}

[data-theme="light"] footer h3,
[data-theme="light"] footer h4 {
    color: #e2e8f0;
}

[data-theme="light"] .footer-links a {
    color: #94a3b8;
}

[data-theme="light"] .footer-links a:hover {
    color: #38bdf8;
}

[data-theme="light"] .admin-login-page {
    background:
        radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.14), transparent 45%),
        radial-gradient(circle at 80% 90%, rgba(139, 92, 246, 0.12), transparent 45%),
        linear-gradient(135deg, #eef2f7, #e2e8f0 60%, #eef2f7);
}

[data-theme="light"] .admin-login-card {
    background: #ffffff;
    border-color: #e3e8ef;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .admin-table th {
    background: #f7f9fc;
    color: #475569;
}

[data-theme="light"] .admin-table tr:hover td {
    background: #f1f7ff;
}

[data-theme="light"] .admin-list-card {
    background: #ffffff;
    border-color: #e3e8ef;
}
