:root {
    --bg: #f4fbf7;
    --paper: rgba(255, 255, 255, 0.96);
    --ink: #10251c;
    --muted: #607469;
    --line: rgba(16, 37, 28, 0.10);
    --green: #0f7a4f;
    --green-strong: #075f3b;
    --green-soft: #e4f6ed;
    --mint: #f0fbf5;
    --danger: #b94a3a;
    --shadow: 0 18px 45px rgba(14, 95, 59, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(15, 122, 79, 0.12), transparent 24rem),
        radial-gradient(circle at 88% 12%, rgba(58, 183, 124, 0.14), transparent 25rem),
        linear-gradient(160deg, #f8fffb 0%, #f1faf5 48%, #eaf6ef 100%);
}

body.market-theme {
    --paper: rgba(255, 255, 255, 0.92);
    --ink: #1a120f;
    --muted: #645247;
    --line: rgba(255, 107, 43, 0.18);
    --green: #ff6b2b;
    --green-strong: #d93a14;
    --green-soft: rgba(183, 255, 74, 0.16);
    --mint: #fff4ec;
    --danger: #bc1f00;
    --shadow: 0 24px 60px rgba(170, 57, 20, 0.18);
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 120, 70, 0.32), transparent 22rem),
        radial-gradient(circle at 88% 12%, rgba(190, 255, 88, 0.22), transparent 24rem),
        radial-gradient(circle at 72% 82%, rgba(255, 79, 31, 0.18), transparent 24rem),
        linear-gradient(135deg, #fff5ee 0%, #fffdf5 44%, #f3ffe6 100%);
}

body.market-theme .topbar,
body.market-theme .panel,
body.market-theme .stat-card,
body.market-theme .hero-card,
body.market-theme .market-card,
body.market-theme .result-box,
body.market-theme .rules-card,
body.market-theme .table-shell,
body.market-theme .chat-message {
    border-color: rgba(255, 107, 43, 0.20);
}

body.market-theme .market-topbar {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 231, 0.94) 54%, rgba(183, 255, 74, 0.18)),
        var(--paper);
}

body.market-theme .panel,
body.market-theme .hero-card,
body.market-theme .stat-card,
body.market-theme .market-card,
body.market-theme .result-box,
body.market-theme .rules-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 241, 0.94));
}

body.market-theme .market-nav-grid a {
    border-color: rgba(255, 107, 43, 0.24);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 243, 234, 0.94) 62%, rgba(183, 255, 74, 0.12));
    color: var(--ink);
}

body.market-theme .market-nav-grid a::after,
body.market-theme .eyebrow,
body.market-theme .section-kicker {
    color: var(--green-strong);
}

body.market-theme input,
body.market-theme select,
body.market-theme textarea {
    border-color: rgba(255, 107, 43, 0.22);
    background: rgba(255, 252, 249, 0.98);
}

body.market-theme input:focus,
body.market-theme select:focus,
body.market-theme textarea:focus {
    outline: 2px solid rgba(255, 107, 43, 0.24);
    border-color: rgba(255, 107, 43, 0.42);
}

body.market-theme .primary-button {
    background: linear-gradient(135deg, #ff7a45, #d52f08 78%);
    box-shadow: 0 14px 28px rgba(213, 47, 8, 0.22);
}

body.market-theme .secondary-button {
    background: linear-gradient(135deg, #c8ff65, #70e63c 78%);
    color: #18220e;
    box-shadow: 0 14px 28px rgba(112, 230, 60, 0.18);
}

body.market-theme .ghost-button,
body.market-theme .tag,
body.market-theme .pill-row span,
body.market-theme .chat-message.mine {
    background: rgba(183, 255, 74, 0.18);
    color: #285b15;
    border-color: rgba(183, 255, 74, 0.34);
}

body.market-theme .scanner-frame {
    border-color: rgba(255, 107, 43, 0.26);
    background:
        linear-gradient(145deg, rgba(255, 107, 43, 0.24), rgba(183, 255, 74, 0.18)),
        #fff8f2;
}

body.market-theme .product-thumb {
    background:
        linear-gradient(145deg, rgba(255, 107, 43, 0.26), rgba(183, 255, 74, 0.20)),
        #fffaf6;
}

body.market-theme .chat-box {
    border-color: rgba(255, 107, 43, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 244, 235, 0.88), rgba(255, 255, 255, 0.95));
}

.low-carbon-admin-hero {
    background:
        linear-gradient(135deg, rgba(15, 122, 79, 0.12), rgba(255, 255, 255, 0.95)),
        var(--paper);
}

.compact-input {
    width: 110px;
    min-height: 42px;
    padding: 8px 10px;
}

.compact-button {
    min-height: 42px;
    padding: 0 14px;
}

.danger-button {
    background: rgba(185, 74, 58, 0.10);
    color: var(--danger);
    border: 1px solid rgba(185, 74, 58, 0.18);
}

.table-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.point-library-grid {
    display: grid;
    gap: 14px;
    max-height: 760px;
    overflow: auto;
    padding-right: 4px;
}

.point-library-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(15, 122, 79, 0.12);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 251, 245, 0.86)),
        #ffffff;
    box-shadow: 0 12px 26px rgba(16, 37, 28, 0.06);
}

.point-library-card.is-editing {
    border-color: rgba(210, 138, 22, 0.42);
    box-shadow: 0 16px 34px rgba(210, 138, 22, 0.14);
}

.point-library-head,
.point-library-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.point-library-head strong {
    display: block;
    font-size: 1.04rem;
}

.point-library-head span:not(.tag),
.point-library-card p {
    color: var(--muted);
    line-height: 1.62;
}

.point-library-card p {
    margin: 0;
}

.point-library-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.point-library-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--green-strong);
    background: rgba(15, 122, 79, 0.08);
    font-size: 0.84rem;
}

.point-library-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.empty-card {
    padding: 16px;
    border: 1px dashed rgba(15, 122, 79, 0.22);
    border-radius: 20px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
}

.task-submission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

.task-record-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 18px;
}

.task-record-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.task-record-tabs button {
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid rgba(15, 122, 79, 0.12);
    background: rgba(15, 122, 79, 0.08);
    color: var(--green-strong);
    font-weight: 800;
}

.task-record-tabs button.active {
    color: #ffffff;
    background: linear-gradient(135deg, #0f7a4f, #43b274);
    box-shadow: 0 12px 24px rgba(15, 122, 79, 0.16);
}

.task-submission-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(15, 122, 79, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
}

.task-submission-card.status-approved {
    border-color: rgba(15, 122, 79, 0.22);
    background: linear-gradient(145deg, rgba(15, 122, 79, 0.08), rgba(255, 255, 255, 0.94) 48%);
}

.task-submission-card.status-rejected {
    border-color: rgba(190, 61, 47, 0.22);
    background: linear-gradient(145deg, rgba(190, 61, 47, 0.08), rgba(255, 255, 255, 0.94) 48%);
}

.task-submission-body {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
}

.task-evidence-thumb {
    display: block;
    min-height: 132px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--green-soft);
}

.task-evidence-thumb img {
    width: 100%;
    height: 100%;
    min-height: 132px;
    object-fit: cover;
    display: block;
}

.task-status-pill,
.task-record-meta {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.84rem;
    font-weight: 800;
}

.task-status-pill.is-pending {
    color: #8a5a00;
    background: rgba(240, 174, 75, 0.18);
}

.task-status-pill.is-approved {
    color: var(--green-strong);
    background: rgba(15, 122, 79, 0.12);
}

.task-status-pill.is-rejected {
    color: #9d2f24;
    background: rgba(190, 61, 47, 0.12);
}

.task-record-meta {
    color: var(--muted);
    background: rgba(29, 42, 34, 0.06);
}

.inline-map-link {
    margin-left: 8px;
    color: var(--green-strong);
    text-decoration: none;
    font-weight: 900;
}

.muted-cell {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.86rem;
}

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

.task-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.task-template-card button {
    margin-top: 8px;
}

.low-carbon-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(15, 122, 79, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 30px rgba(16, 37, 28, 0.06);
}

.low-carbon-subnav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--green-strong);
    text-decoration: none;
    font-weight: 800;
    background: rgba(15, 122, 79, 0.08);
}

.low-carbon-subnav a.active {
    color: #ffffff;
    background: linear-gradient(135deg, #0f7a4f, #43b274);
    box-shadow: 0 12px 24px rgba(15, 122, 79, 0.18);
}

.admin-map-panel {
    overflow: hidden;
}

.map-head-actions,
.map-search-row,
.map-admin-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.map-head-actions {
    justify-content: flex-end;
}

.map-admin-flow {
    margin: -4px 0 16px;
}

.map-admin-flow span {
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--green-strong);
    background: rgba(15, 122, 79, 0.08);
    font-size: 0.88rem;
    font-weight: 700;
}

.map-search-card {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid rgba(15, 122, 79, 0.12);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(240, 251, 245, 0.82)),
        #ffffff;
}

.map-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.map-search-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.map-search-result {
    display: grid;
    gap: 6px;
    padding: 13px 14px;
    border: 1px solid rgba(15, 122, 79, 0.12);
    border-radius: 18px;
    color: inherit;
    background: rgba(255, 255, 255, 0.88);
    text-align: left;
    cursor: pointer;
}

.map-search-result strong {
    font-size: 0.98rem;
}

.map-search-result span {
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.86rem;
}

.admin-campus-map {
    position: relative;
    min-height: 470px;
    border: 1px solid rgba(15, 122, 79, 0.16);
    border-radius: 30px;
    overflow: hidden;
    cursor: crosshair;
    background:
        radial-gradient(circle at 18% 14%, rgba(51, 151, 105, 0.18), transparent 16rem),
        radial-gradient(circle at 82% 72%, rgba(15, 122, 79, 0.13), transparent 18rem),
        linear-gradient(145deg, #e8f6ee 0%, #f7fffb 54%, #e1f0e7 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.compact-admin-map {
    min-height: 420px;
}

.admin-campus-map.is-real-map {
    background: #eef6f0;
    cursor: grab;
}

.admin-campus-map.is-real-map::before {
    display: none;
}

.admin-campus-map.is-real-map:active {
    cursor: grabbing;
}

.admin-campus-map::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.36;
    background-image:
        linear-gradient(rgba(15, 122, 79, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 122, 79, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
}

.admin-campus-map-bg,
.admin-campus-map-bg span {
    position: absolute;
}

.admin-campus-map-bg {
    inset: 0;
}

.map-water {
    left: 10%;
    bottom: 9%;
    width: 28%;
    height: 22%;
    border-radius: 58% 42% 48% 52%;
    background:
        radial-gradient(circle at 30% 35%, rgba(255, 255, 255, 0.52), transparent 28%),
        linear-gradient(135deg, rgba(122, 189, 176, 0.45), rgba(51, 151, 105, 0.18));
    border: 1px solid rgba(51, 151, 105, 0.18);
}

.map-loop {
    border-radius: 999px;
    border: 12px solid rgba(15, 122, 79, 0.12);
    transform: rotate(-12deg);
}

.map-loop-one {
    left: 19%;
    top: 17%;
    width: 47%;
    height: 48%;
}

.map-loop-two {
    right: 14%;
    top: 20%;
    width: 35%;
    height: 44%;
    border-color: rgba(195, 151, 72, 0.16);
    transform: rotate(18deg);
}

.map-road {
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(15, 122, 79, 0.10);
    box-shadow: 0 12px 30px rgba(15, 122, 79, 0.08);
}

.map-road-main {
    left: 7%;
    top: 55%;
    width: 86%;
    transform: rotate(-7deg);
}

.map-road-cross {
    left: 43%;
    top: 8%;
    width: 18px;
    height: 82%;
    transform: rotate(12deg);
}

.map-building {
    display: grid;
    place-items: center;
    padding: 9px 12px;
    border-radius: 18px;
    color: rgba(16, 37, 28, 0.72);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 122, 79, 0.12);
    font-size: 0.86rem;
    font-weight: 800;
    box-shadow: 0 16px 30px rgba(15, 122, 79, 0.08);
}

.building-one {
    left: 18%;
    top: 18%;
}

.building-two {
    left: 47%;
    top: 29%;
}

.building-three {
    right: 12%;
    top: 19%;
}

.building-four {
    right: 20%;
    bottom: 16%;
}

.admin-map-pin {
    position: absolute;
    z-index: 5;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.admin-map-pin:hover {
    transform: translate(-50%, -50%) scale(1.04);
}

.admin-map-pin:hover .admin-map-label,
.admin-map-pin.selected .admin-map-label {
    opacity: 1;
    transform: translate(-50%, -118%) scale(1);
}

.admin-map-heat {
    position: absolute;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(15, 122, 79, 0.32), rgba(15, 122, 79, 0.04) 64%, transparent 72%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.admin-map-marker {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 15px 15px 15px 5px;
    transform: rotate(-45deg);
    color: #ffffff;
    background: linear-gradient(135deg, #0f7a4f, #43b274);
    box-shadow: 0 18px 30px rgba(15, 122, 79, 0.25);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1;
}

.admin-map-marker::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 11px 11px 11px 4px;
    border: 1px solid rgba(255, 255, 255, 0.42);
}

.admin-map-marker span {
    position: relative;
    z-index: 1;
    transform: rotate(45deg);
    display: block;
    max-width: 28px;
    overflow: hidden;
    color: #ffffff;
    text-overflow: clip;
    white-space: nowrap;
}

.admin-map-tree,
.admin-map-landmark {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
}

.admin-map-tree {
    width: 76px;
    height: 98px;
    transform-origin: 50% 100%;
    transform: scale(0.86);
}

.admin-map-tree.growth-1 {
    transform: scale(0.68);
}

.admin-map-tree.growth-2 {
    transform: scale(0.78);
}

.admin-map-tree.growth-3 {
    transform: scale(0.90);
}

.admin-map-tree.growth-4 {
    transform: scale(1.02);
}

.admin-map-tree.growth-5 {
    transform: scale(1.14);
}

.admin-map-tree.growth-6 {
    transform: scale(1.26);
}

.admin-map-tree-shadow,
.admin-map-landmark::after {
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 54px;
    height: 12px;
    border-radius: 999px;
    background: rgba(15, 122, 79, 0.18);
    transform: translateX(-50%);
    content: "";
}

.admin-map-trunk {
    position: absolute;
    left: 50%;
    bottom: 13px;
    width: 10px;
    height: 48px;
    border-radius: 999px;
    background: linear-gradient(180deg, #9a6837, #6f421f);
    transform: translateX(-50%);
}

.admin-map-crown {
    position: absolute;
    left: 50%;
    bottom: 48px;
    width: 66px;
    height: 58px;
    border-radius: 55% 45% 48% 52%;
    background:
        radial-gradient(circle at 28% 30%, rgba(255, 255, 255, 0.22), transparent 28%),
        radial-gradient(circle at 35% 74%, #43b274 0 28%, transparent 29%),
        radial-gradient(circle at 70% 62%, #147a54 0 32%, transparent 33%),
        linear-gradient(145deg, #65c98f, #0f7a4f);
    box-shadow: 0 16px 26px rgba(15, 122, 79, 0.24);
    transform: translateX(-50%);
}

.admin-map-blossoms {
    position: absolute;
    inset: 14px 8px 34px;
    z-index: 4;
    pointer-events: none;
}

.admin-map-blossoms i,
.admin-map-landmark-tree i {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #ffd1df;
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 4px 8px rgba(203, 91, 122, 0.16);
    transform: translate(-50%, -50%);
}

.admin-map-tree-level {
    position: absolute;
    right: 6px;
    bottom: 14px;
    z-index: 5;
    padding: 4px 6px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 122, 79, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.58);
    font-size: 0.66rem;
    font-weight: 900;
    box-shadow: 0 8px 16px rgba(15, 122, 79, 0.18);
}

.admin-map-landmark {
    position: absolute;
    z-index: 4;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.admin-map-landmark-tree {
    position: relative;
    display: block;
    width: 112px;
    height: 132px;
    transform-origin: 50% 100%;
    transform: scale(var(--landmark-scale, 1));
}

.admin-map-landmark-tree::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 22px;
    width: 13px;
    height: 72px;
    border-radius: 999px;
    background: linear-gradient(180deg, #9a6837, #6f421f);
    transform: translateX(-50%);
}

.admin-map-landmark-tree::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 72px;
    width: 88px;
    height: 78px;
    border-radius: 56% 44% 50% 50%;
    background:
        radial-gradient(circle at 26% 34%, rgba(255, 255, 255, 0.42), transparent 26%),
        radial-gradient(circle at 32% 72%, #ffbfd2 0 28%, transparent 29%),
        radial-gradient(circle at 73% 66%, #ffc8d8 0 32%, transparent 33%),
        linear-gradient(145deg, #ffe1ea, #ff9fbd);
    box-shadow: 0 18px 32px rgba(203, 91, 122, 0.22);
    transform: translateX(-50%);
}

.admin-map-landmark-tree i {
    z-index: 3;
    background: #ff8fb2;
}

.admin-map-landmark-label {
    position: absolute;
    left: 50%;
    top: -6px;
    width: max-content;
    max-width: 240px;
    padding: 9px 12px;
    border-radius: 999px;
    color: #7a3e19;
    background: rgba(255, 247, 251, 0.96);
    border: 1px solid rgba(203, 91, 122, 0.16);
    box-shadow: 0 14px 28px rgba(122, 62, 25, 0.12);
    font-size: 0.82rem;
    font-weight: 900;
    transform: translate(-50%, -100%);
    pointer-events: none;
}

.admin-map-pin.selected .admin-map-marker {
    background: linear-gradient(135deg, #d28a16, #0f7a4f);
    box-shadow: 0 18px 30px rgba(210, 138, 22, 0.24);
}

.admin-map-label {
    position: absolute;
    left: 50%;
    top: -16px;
    z-index: 4;
    width: max-content;
    max-width: 220px;
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 122, 79, 0.12);
    box-shadow: 0 14px 28px rgba(16, 37, 28, 0.12);
    font-size: 0.82rem;
    font-weight: 800;
    opacity: 0;
    transform: translate(-50%, -102%) scale(0.96);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.map-admin-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.92rem;
}

.map-admin-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--green);
}

.legend-dot.hot {
    box-shadow: 0 0 0 8px rgba(15, 122, 79, 0.12);
}

.legend-dot.fresh {
    background: #7abdb0;
}

.legend-dot.selected {
    background: #d28a16;
}

.page-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 30px auto 42px;
    display: grid;
    gap: 20px;
}

.workspace-shell {
    gap: 24px;
}

.login-shell {
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.35fr 0.75fr;
    gap: 22px;
    align-items: center;
}

.login-hero,
.login-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 34px;
    box-shadow: var(--shadow);
    padding: 34px;
}

.login-card {
    display: grid;
    gap: 8px;
}

.login-badges,
.account-list,
.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-badges {
    margin-top: 22px;
}

.login-badges span {
    padding: 9px 12px;
    border-radius: 999px;
    background: white;
    color: var(--green);
    border: 1px solid var(--line);
}

.account-list {
    margin-top: 8px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.workspace-topbar {
    padding: 26px 28px;
}

.workspace-topbar h1 {
    max-width: none;
    font-size: clamp(2rem, 3.2vw, 3.1rem);
}

.market-topbar {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(236, 250, 239, 0.95)),
        var(--paper);
}

.topbar h1 {
    font-size: clamp(1.8rem, 3.5vw, 3.2rem);
}

.topbar-actions {
    align-items: center;
    justify-content: flex-end;
}

.hero-card,
.panel,
.stat-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 32px;
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 26px;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -110px;
    width: 300px;
    height: 300px;
    border-radius: 48% 52% 40% 60%;
    background: rgba(36, 107, 75, 0.08);
}

.market-hero {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 18px;
    align-items: stretch;
    border: 1px solid rgba(15, 122, 79, 0.14);
    border-radius: 32px;
    padding: 28px;
    box-shadow: var(--shadow);
    background:
        linear-gradient(135deg, rgba(15, 122, 79, 0.10), transparent 42%),
        linear-gradient(315deg, rgba(238, 177, 83, 0.18), transparent 36%),
        rgba(255, 255, 255, 0.93);
}

.market-hero h2 {
    max-width: 18em;
    font-size: clamp(1.8rem, 3vw, 3rem);
}

.market-nav-grid {
    display: grid;
    gap: 12px;
}

.market-nav-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    color: var(--green-strong);
    background: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-weight: 800;
}

.market-nav-grid a::after {
    content: "进入";
    color: var(--muted);
    font-size: 0.86rem;
}

.eyebrow,
.section-kicker {
    margin: 0 0 10px;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.16;
}

h1 {
    max-width: 13em;
    font-size: clamp(2.15rem, 4.8vw, 4.4rem);
}

h2 {
    font-size: 1.45rem;
}

.hero-text,
.muted {
    color: var(--muted);
    line-height: 1.8;
}

.hero-text {
    max-width: 64ch;
    margin: 18px 0 0;
}

.hero-stack {
    display: grid;
    gap: 14px;
    align-self: center;
    z-index: 1;
}

.hero-metric,
.rules-card,
.result-box {
    border: 1px solid var(--line);
    background: white;
    border-radius: 22px;
    padding: 18px;
}

.hero-metric span,
.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.hero-metric strong,
.stat-card strong {
    font-size: 1.12rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-band {
    display: grid;
    gap: 16px;
}

.band-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.compact-stats .stat-card {
    min-height: 122px;
    padding: 20px 22px;
    border-radius: 24px;
}

.compact-stats .stat-card strong {
    font-size: 1.9rem;
}

.stat-card {
    padding: 22px;
    background:
        linear-gradient(145deg, rgba(36, 107, 75, 0.10), transparent),
        var(--paper);
}

.stat-card strong {
    font-size: 1.55rem;
}

.stat-card.warning {
    background:
        linear-gradient(145deg, rgba(15, 122, 79, 0.08), transparent),
        var(--paper);
}

.workbench-grid,
.data-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
}

.workspace-grid {
    display: grid;
    gap: 20px;
    align-items: start;
}

.workspace-stack {
    display: grid;
    gap: 20px;
    align-content: start;
}

.student-primary-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
}

.student-secondary-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.95fr);
}

.admin-primary-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
}

.admin-tools-grid,
.admin-secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
    padding: 24px;
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-stack {
    display: grid;
    gap: 18px;
}

.form-section {
    display: grid;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid rgba(29, 42, 34, 0.08);
}

.form-section:first-child {
    padding-top: 0;
    border-top: none;
}

.form-section h3 {
    margin: 0;
    font-size: 1rem;
}

.compose-panel label {
    margin-top: 0;
}

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(29, 42, 34, 0.16);
    border-radius: 16px;
    background: #fbfffc;
    color: var(--ink);
    padding: 12px 14px;
}

textarea {
    min-height: 105px;
    resize: vertical;
    line-height: 1.65;
}

.field-help {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.58;
}

.code-area {
    min-height: 380px;
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 0.9rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.button-row.compact-row {
    margin-top: 12px;
}

.passport-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

button {
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(29, 42, 34, 0.12);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    transform: none;
    box-shadow: none;
}

.primary-button {
    background: var(--green-strong);
    color: white;
}

.secondary-button {
    background: var(--green);
    color: white;
}

.ghost-button {
    background: var(--green-soft);
    color: var(--green);
}

.full-button {
    width: 100%;
    margin-top: 14px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border-radius: 999px;
    padding: 12px 18px;
}

.check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
}

.check-row label {
    align-items: center;
    flex-direction: row;
    color: var(--ink);
}

.check-row input {
    width: auto;
}

.result-box {
    margin-top: 18px;
    display: grid;
    gap: 8px;
    color: var(--muted);
    line-height: 1.65;
}

.result-box.compact {
    margin-top: 10px;
}

.result-box strong {
    color: var(--ink);
}

.notification-unread {
    border-color: rgba(255, 107, 43, 0.34);
    box-shadow: 0 0 0 1px rgba(255, 107, 43, 0.10);
}

.rules-card {
    margin-top: 18px;
}

.rules-card.no-margin {
    margin-top: 0;
}

ul {
    margin: 12px 0 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.7;
}

.tag {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 0.86rem;
    white-space: nowrap;
}

.table-shell {
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    background: white;
}

.card-list {
    display: grid;
    gap: 12px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 14px;
}

.market-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(15, 122, 79, 0.06), transparent 55%),
        #ffffff;
    padding: 16px;
}

.product-card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 14px;
}

.product-thumb {
    min-height: 128px;
    border-radius: 18px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--muted);
    background:
        linear-gradient(145deg, rgba(15, 122, 79, 0.14), rgba(240, 174, 75, 0.14)),
        #f8fbf6;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    min-width: 0;
}

.market-card-head,
.pill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.market-card-head {
    margin-bottom: 10px;
}

.pill-row {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.pill-row span {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--green);
    background: var(--green-soft);
    padding: 7px 10px;
    font-size: 0.84rem;
}

.inline-link {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.inline-link:hover {
    text-decoration: underline;
}

.slim-card {
    display: grid;
    gap: 8px;
}

.chat-box {
    min-height: 360px;
    max-height: 520px;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(240, 251, 245, 0.74), rgba(255, 255, 255, 0.92));
    padding: 14px;
}

.chat-message {
    width: min(76%, 520px);
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 18px 18px 18px 4px;
    background: white;
    padding: 11px 13px;
}

.chat-message.mine {
    justify-self: end;
    border-radius: 18px 18px 4px 18px;
    background: var(--green-soft);
}

.chat-message strong {
    font-size: 0.82rem;
    color: var(--green);
}

.chat-message span {
    line-height: 1.55;
}

.chat-system {
    justify-self: center;
    color: var(--muted);
    font-size: 0.86rem;
}

.chat-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 12px;
}

.scanner-frame {
    position: relative;
    min-height: 260px;
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(15, 122, 79, 0.16), rgba(240, 174, 75, 0.12)),
        #f8fbf6;
}

.scanner-frame video {
    width: 100%;
    height: 100%;
    min-height: 260px;
    display: block;
    object-fit: cover;
}

#scanner-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 700;
}

#scanner-placeholder.hidden {
    display: none;
}

.timeline-list {
    display: grid;
    gap: 14px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    margin-top: 6px;
    border-radius: 999px;
    background: var(--green-strong);
    box-shadow: 0 0 0 5px rgba(255, 107, 43, 0.12);
}

.timeline-content {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    padding: 14px 16px;
    color: var(--muted);
}

.timeline-content strong {
    color: var(--ink);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--mint);
}

.full-span {
    grid-column: 1 / -1;
}

.status-panel,
.queue-panel,
.records-panel,
.leaderboard-panel,
.audit-panel,
.account-table-panel,
.import-panel {
    min-width: 0;
}

.status-panel .card-list,
.queue-panel .card-list,
.records-panel .card-list {
    max-height: 560px;
    overflow: auto;
    padding-right: 4px;
}

.leaderboard-panel .table-shell,
.audit-panel .table-shell,
.account-table-panel .table-shell {
    max-height: 100%;
}

.hidden {
    display: none;
}

th,
td {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(29, 42, 34, 0.08);
    text-align: left;
    font-size: 0.93rem;
}

tbody tr:last-child td {
    border-bottom: none;
}

@media (max-width: 980px) {
    .hero-card,
    .market-hero,
    .login-shell,
    .workbench-grid,
    .data-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .student-primary-grid,
    .student-secondary-grid,
    .admin-primary-grid,
    .admin-tools-grid,
    .admin-secondary-grid {
        grid-template-columns: 1fr;
    }

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

    .login-shell {
        min-height: auto;
        margin-top: 18px;
        margin-bottom: 28px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .band-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .product-card {
        grid-template-columns: 1fr;
    }

    .task-submission-body {
        grid-template-columns: 1fr;
    }

    .task-record-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .task-record-tabs button {
        flex: 1 1 calc(50% - 10px);
    }

    .product-thumb {
        min-height: 190px;
    }

    .chat-input-row {
        grid-template-columns: 1fr;
    }

    .passport-search-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 20px, 1240px);
        margin-top: 14px;
    }

    .hero-card,
    .login-hero,
    .login-card,
    .topbar,
    .panel {
        padding: 18px;
        border-radius: 22px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

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

    .map-search-row {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 10px 8px;
        font-size: 0.82rem;
    }
}

@media (max-width: 540px) {
    .compact-stats,
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

    .workspace-topbar {
        padding: 20px;
    }
}

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

.workspace-link-card {
    min-width: 0;
    min-height: 180px;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 22px;
    text-decoration: none;
    color: var(--ink);
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        linear-gradient(145deg, rgba(15, 122, 79, 0.08), rgba(255, 255, 255, 0.96)),
        #ffffff;
    box-shadow: 0 14px 34px rgba(19, 34, 29, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.workspace-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(19, 34, 29, 0.12);
    border-color: rgba(15, 122, 79, 0.22);
}

.workspace-link-card strong {
    font-size: 1.16rem;
}

.workspace-link-card p,
.workspace-link-card span {
    margin: 0;
    line-height: 1.72;
    color: var(--muted);
}

body.student-portal {
    --paper: rgba(255, 255, 255, 0.9);
    --ink: #1f2340;
    --muted: #66718f;
    --line: rgba(83, 97, 150, 0.14);
    --green: #596fa8;
    --green-strong: #455b95;
    --green-soft: rgba(95, 114, 171, 0.12);
    --mint: #f5f5ff;
    --danger: #d34f63;
    --shadow: 0 26px 60px rgba(76, 90, 145, 0.16);
    font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 8%, rgba(149, 169, 255, 0.22), transparent 22rem),
        radial-gradient(circle at 92% 10%, rgba(196, 210, 255, 0.32), transparent 24rem),
        radial-gradient(circle at 50% 100%, rgba(255, 223, 193, 0.18), transparent 28rem),
        linear-gradient(180deg, #f7f8ff 0%, #f4f6ff 44%, #fbf7f1 100%);
}

body.student-portal .page-shell {
    width: min(1320px, calc(100% - 36px));
    margin-top: 28px;
    margin-bottom: 44px;
    gap: 24px;
}

body.student-portal .workspace-shell {
    gap: 26px;
}

body.student-portal .topbar,
body.student-portal .panel,
body.student-portal .stat-card,
body.student-portal .table-shell,
body.student-portal .market-card,
body.student-portal .result-box {
    border-color: rgba(83, 97, 150, 0.14);
    box-shadow: var(--shadow);
}

body.student-portal .student-topbar {
    padding: 28px 30px 24px;
    border-radius: 38px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 241, 255, 0.96) 52%, rgba(232, 241, 255, 0.96)),
        var(--paper);
}

.student-topbar-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.student-brand {
    display: grid;
    gap: 12px;
    max-width: 760px;
}

body.student-portal .student-brand h1 {
    max-width: none;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    letter-spacing: -0.03em;
}

.student-subtitle {
    margin: 0;
    max-width: 52ch;
    color: var(--muted);
    line-height: 1.78;
    font-size: 1rem;
}

.student-utility {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.student-profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(83, 97, 150, 0.14);
    background: rgba(255, 255, 255, 0.82);
    color: var(--ink);
    font-weight: 700;
}

.subtle-button {
    min-height: 48px;
    padding-inline: 16px;
}

.student-nav {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(83, 97, 150, 0.10);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.student-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(83, 97, 150, 0.12);
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.student-nav-link:hover {
    transform: translateY(-1px);
    color: var(--green-strong);
    box-shadow: 0 12px 24px rgba(76, 90, 145, 0.12);
}

.student-nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #7188c7, #4b5f96 78%);
    border-color: transparent;
    box-shadow: 0 16px 32px rgba(75, 95, 150, 0.24);
}

.notification-bell-shell {
    position: relative;
}

.notification-bell {
    position: relative;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 20px;
    border: 1px solid rgba(83, 97, 150, 0.14);
    background: rgba(255, 255, 255, 0.82);
    color: var(--green-strong);
    box-shadow: 0 14px 30px rgba(76, 90, 145, 0.10);
}

.notification-bell svg {
    width: 22px;
    height: 22px;
}

.notification-bell.has-unread {
    color: #30437a;
}

.notification-bell.is-open {
    background: linear-gradient(135deg, #7188c7, #4b5f96);
    color: #ffffff;
    border-color: transparent;
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #d34f63;
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(211, 79, 99, 0.28);
}

.notification-popover {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 20;
    width: min(360px, calc(100vw - 36px));
    padding: 18px;
    border-radius: 26px;
    border: 1px solid rgba(83, 97, 150, 0.14);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 30px 56px rgba(43, 56, 103, 0.22);
    backdrop-filter: blur(18px);
}

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

.notification-popover-list {
    max-height: 380px;
    overflow: auto;
    padding-right: 4px;
}

.notification-empty {
    padding: 14px 4px 4px;
    color: var(--muted);
    line-height: 1.7;
}

.student-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.student-portal .stat-card {
    min-height: 140px;
    padding: 22px 24px;
    border-radius: 28px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(244, 240, 255, 0.92));
}

body.student-portal .student-stat-grid .stat-card:nth-child(1) {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 244, 255, 0.96));
}

body.student-portal .student-stat-grid .stat-card:nth-child(2) {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 250, 255, 0.94));
}

body.student-portal .student-stat-grid .stat-card:nth-child(3) {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 243, 255, 0.94));
}

body.student-portal .student-stat-grid .stat-card:nth-child(4) {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 240, 0.94));
}

body.student-portal .compact-stats .stat-card strong {
    font-size: 2rem;
}

.student-workspace-panel {
    padding: 28px;
}

.student-overview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.workspace-inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 999px;
    text-decoration: none;
}

.workspace-link-badge {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--green-strong);
    font-weight: 800;
    font-size: 0.92rem;
}

.workspace-link-arrow {
    margin-top: auto;
    font-weight: 700;
    color: var(--green-strong);
}

body.student-portal .workspace-link-card {
    min-height: 220px;
    padding: 24px;
    border-radius: 30px;
    box-shadow: 0 18px 40px rgba(67, 84, 140, 0.12);
}

.workspace-link-card.accent-lilac {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 238, 255, 0.96));
}

.workspace-link-card.accent-blue {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.96));
}

.workspace-link-card.accent-cream {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 237, 0.96));
}

.student-dashboard-grid {
    grid-template-columns: minmax(0, 1.34fr) minmax(320px, 0.86fr);
}

body.student-portal .student-secondary-grid {
    grid-template-columns: minmax(0, 1.26fr) minmax(320px, 0.84fr);
}

body.student-portal .admin-dashboard-grid,
.admin-dashboard-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
}

body.student-portal .student-primary-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.82fr);
}

body.student-portal .panel {
    padding: 26px;
    border-radius: 32px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 247, 255, 0.94));
}

body.student-portal .market-card {
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(247, 245, 255, 0.92), rgba(255, 255, 255, 0.98));
}

body.student-portal .notification-popover .market-card {
    border-radius: 20px;
    box-shadow: none;
    background:
        linear-gradient(145deg, rgba(247, 245, 255, 0.9), rgba(255, 255, 255, 0.98));
}

body.student-portal .market-card-head {
    align-items: flex-start;
}

body.student-portal .tag,
body.student-portal .ghost-button {
    background: rgba(95, 114, 171, 0.10);
    color: #4b5f96;
    border: 1px solid rgba(95, 114, 171, 0.12);
}

body.student-portal .primary-button {
    background: linear-gradient(135deg, #7188c7, #4b5f96 78%);
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(75, 95, 150, 0.24);
}

body.student-portal .secondary-button {
    background: linear-gradient(135deg, #8eb7d7, #6e92c8 78%);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(110, 146, 200, 0.20);
}

body.student-portal input,
body.student-portal select,
body.student-portal textarea {
    border-radius: 18px;
    border-color: rgba(83, 97, 150, 0.14);
    background: rgba(251, 251, 255, 0.96);
    color: var(--ink);
}

body.student-portal input:focus,
body.student-portal select:focus,
body.student-portal textarea:focus {
    outline: 2px solid rgba(95, 114, 171, 0.16);
    border-color: rgba(95, 114, 171, 0.28);
}

body.student-portal .table-shell {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
}

.student-helper-panel {
    min-height: 100%;
}

.student-tip-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 10px;
}

body.student-portal .student-tip-list li {
    color: var(--muted);
    line-height: 1.78;
}

@media (max-width: 980px) {
    .student-topbar-main,
    .student-overview-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .student-utility {
        justify-content: flex-start;
    }

    .student-stat-grid,
    .student-dashboard-grid,
    body.student-portal .student-primary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body.student-portal .page-shell {
        width: min(100% - 20px, 1320px);
    }

    .notification-popover {
        right: -6px;
        width: min(340px, calc(100vw - 24px));
    }
}

@media (max-width: 640px) {
    body.student-portal .student-topbar,
    body.student-portal .panel,
    body.student-portal .stat-card {
        padding: 20px;
        border-radius: 24px;
    }

    .student-nav,
    .student-utility {
        width: 100%;
    }

    .student-nav-link,
    .student-profile-chip,
    .subtle-button {
        width: 100%;
        justify-content: center;
    }

    .notification-bell-shell {
        width: 100%;
    }

    .notification-bell {
        width: 100%;
    }

    .notification-popover {
        left: 0;
        right: auto;
        width: 100%;
    }

    .workspace-inline-action {
        width: 100%;
    }
}

main .low-carbon-subnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(15, 122, 79, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 30px rgba(16, 37, 28, 0.06);
}

main .low-carbon-subnav > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--green-strong);
    text-decoration: none;
    font-weight: 800;
    background: rgba(15, 122, 79, 0.08);
    border: 1px solid transparent;
}

main .low-carbon-subnav > a:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 122, 79, 0.16);
    background: rgba(15, 122, 79, 0.12);
}

main .low-carbon-subnav > a.active {
    color: #ffffff;
    text-decoration: none;
    background: linear-gradient(135deg, #0f7a4f, #43b274);
    box-shadow: 0 12px 24px rgba(15, 122, 79, 0.18);
}
