:root {
  --blue: #315fbf; --blue-dark: #234b9d; --blue-soft: #edf3ff; --ink: #17233d;
  --muted: #6d7890; --line: #e2e7f0; --paper: #ffffff; --bg: #f4f6fa; --danger: #c8424f;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 46%) 1fr; background: var(--paper); }
.login-panel { width: min(430px, calc(100% - 64px)); margin: auto; padding: 56px 0; }
.brand-mark { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 19px; color: white; background: var(--blue); font-size: 28px; font-weight: 800; box-shadow: 0 12px 26px rgba(49,95,191,.23); }
.brand-mark.small { width: 42px; height: 42px; border-radius: 13px; font-size: 20px; box-shadow: none; }
.eyebrow { margin: 28px 0 8px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
h1, h2, p { margin-top: 0; }
.login-panel h1 { margin-bottom: 12px; font-size: 30px; letter-spacing: -.03em; }
.muted { color: var(--muted); line-height: 1.75; }
.login-form { display: grid; gap: 18px; margin-top: 36px; }
label { display: grid; gap: 8px; color: #344158; font-size: 13px; font-weight: 650; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--ink); background: white; transition: .18s; }
input, select { height: 44px; padding: 0 13px; }
textarea { min-height: 116px; padding: 12px 13px; resize: vertical; line-height: 1.55; font-family: inherit; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49,95,191,.1); }
.primary, .secondary { min-height: 42px; padding: 0 18px; border-radius: 10px; border: 0; font-weight: 700; }
.primary { color: white; background: var(--blue); }
.primary:hover { background: var(--blue-dark); }
.secondary { color: #40506c; background: #edf0f5; }
.wide { width: 100%; }
.form-error { min-height: 18px; margin: -4px 0; color: var(--danger); font-size: 13px; }
.login-tip { margin: 22px 0 0; color: #8b94a7; font-size: 12px; line-height: 1.7; }
.login-visual { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 76px; color: white; background: linear-gradient(145deg, #234b9d, #315fbf 52%, #5a84d7); }
.visual-grid { position: absolute; inset: 0; opacity: .14; background-image: linear-gradient(rgba(255,255,255,.45) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.45) 1px, transparent 1px); background-size: 48px 48px; transform: perspective(700px) rotateX(55deg) scale(1.4); }
.visual-copy { position: relative; max-width: 520px; }
.visual-copy span { display: block; margin-bottom: 18px; font-size: 80px; font-weight: 200; opacity: .45; }
.visual-copy h2 { margin-bottom: 18px; font-size: 36px; }
.visual-copy p { max-width: 430px; line-height: 1.8; opacity: .78; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 246px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 246px; display: flex; flex-direction: column; padding: 22px 14px 16px; color: #dfe8fa; background: #17284b; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand strong, .brand span { display: block; }
.brand strong { color: white; font-size: 16px; }
.brand span { margin-top: 4px; color: #879bbd; font-size: 11px; }
.nav-dashboard, .resource-button, .module-button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 0; border-radius: 9px; color: #b9c8e3; background: transparent; text-align: left; font-size: 13px; }
.nav-dashboard { margin-top: 18px; }
.nav-dashboard:hover, .resource-button:hover, .module-button:hover, .nav-dashboard.active, .resource-button.active, .module-button.active { color: white; background: rgba(96,140,226,.19); }
.nav-dashboard.active, .resource-button.active, .module-button.active { box-shadow: inset 3px 0 #7ba4ff; }
.nav-group { margin-top: 18px; }
.nav-group-title { padding: 0 12px 7px; color: #6f84aa; font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.resource-button { justify-content: space-between; }
.resource-button b { min-width: 25px; padding: 2px 7px; border-radius: 12px; color: #8da4ca; background: rgba(255,255,255,.06); font-size: 10px; text-align: center; }
.sidebar-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.09); color: #98a9c7; font-size: 12px; }
.sidebar-footer button { border: 0; color: #98a9c7; background: transparent; }
.main { grid-column: 2; min-width: 0; }
.topbar { min-height: 92px; display: flex; justify-content: space-between; align-items: center; padding: 18px 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); }
.breadcrumb { margin-bottom: 7px; color: #8892a5; font-size: 11px; }
.topbar h1 { margin: 0; font-size: 22px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; color: #748097; font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #38a66d; box-shadow: 0 0 0 4px #e4f6ed; }
.menu-button { display: none; }
.content { padding: 28px 34px 48px; }
.welcome-card { position: relative; overflow: hidden; padding: 30px; border-radius: 16px; color: white; background: linear-gradient(115deg, #315fbf, #547fd1); box-shadow: 0 12px 30px rgba(49,95,191,.17); }
.welcome-card::after { content: ""; position: absolute; right: -40px; top: -90px; width: 260px; height: 260px; border: 50px solid rgba(255,255,255,.08); border-radius: 50%; }
.welcome-card h2 { margin-bottom: 10px; font-size: 24px; }
.welcome-card p { margin: 0; opacity: .75; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 16px; margin-top: 20px; }
.metric-card, .panel { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 5px 18px rgba(30,45,75,.035); }
.metric-card { padding: 20px; }
.metric-card span { color: var(--muted); font-size: 12px; }
.metric-card strong { display: block; margin-top: 12px; font-size: 28px; }
.metric-card em { color: var(--blue); font-size: 12px; font-style: normal; }
.dashboard-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 20px; margin-top: 20px; }
.panel { padding: 22px; }
.panel-header, .resource-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.panel h3 { margin: 0; font-size: 15px; }
.activity-list { margin: 18px 0 0; padding: 0; list-style: none; }
.activity-list li { display: grid; grid-template-columns: 9px 1fr auto; gap: 11px; align-items: center; padding: 12px 0; border-top: 1px solid #edf0f5; font-size: 12px; }
.activity-list i { width: 7px; height: 7px; border-radius: 50%; background: #7ca1e7; }
.activity-list time { color: #929bad; }
.category-bars { display: grid; gap: 15px; margin-top: 21px; }
.category-bar > div { display: flex; justify-content: space-between; margin-bottom: 7px; color: #58657d; font-size: 12px; }
.category-bar > .category-fill { display: block; height: 7px; border-radius: 5px; background: linear-gradient(90deg, #315fbf, #81a5eb); }
.resource-toolbar { margin-bottom: 18px; }
.resource-toolbar .copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.toolbar-actions { display: flex; gap: 10px; }
.search { width: 260px; padding-left: 38px; background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23808aa0' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") 13px center no-repeat; }
.table-panel { overflow: hidden; padding: 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 13px 15px; color: #758097; background: #f7f8fb; text-align: left; white-space: nowrap; }
td { max-width: 280px; padding: 14px 15px; border-top: 1px solid #edf0f5; color: #354159; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
tr:hover td { background: #fafbfe; }
.row-actions { display: flex; gap: 8px; }
.text-button { padding: 5px 8px; border: 0; border-radius: 6px; color: var(--blue); background: var(--blue-soft); }
.text-button.danger { color: var(--danger); background: #fff0f1; }
.empty { padding: 70px 20px; color: #8b95a8; text-align: center; }
.table-footer { padding: 13px 16px; border-top: 1px solid var(--line); color: #8791a3; font-size: 11px; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(17,28,51,.35); backdrop-filter: blur(2px); }
.drawer { position: fixed; inset: 0 0 0 auto; z-index: 41; width: min(620px, 94vw); display: grid; grid-template-rows: auto 1fr auto; background: white; box-shadow: -16px 0 44px rgba(21,35,62,.17); }
.drawer header, .drawer footer { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer footer { justify-content: flex-end; gap: 10px; border: 0; border-top: 1px solid var(--line); }
.drawer .eyebrow { margin: 0 0 6px; }
.drawer h2 { margin: 0; font-size: 20px; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 50%; color: #647088; background: #f0f2f6; font-size: 23px; }
.editor-form { overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 17px; padding: 24px; }
.editor-field.full { grid-column: 1 / -1; }
.field-help { color: #929bad; font-size: 10px; font-weight: 400; }
.checkbox-wrap { display: flex; align-items: center; height: 44px; }
.checkbox-wrap input { width: 20px; height: 20px; }
.toast { position: fixed; z-index: 60; right: 28px; bottom: 28px; max-width: 360px; padding: 13px 18px; border-radius: 10px; color: white; background: #20304e; box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 13px; }
.toast.error { background: #a83440; }

.module-nav { display: grid; gap: 5px; margin-top: 16px; }
.module-button { padding: 10px; }
.module-icon { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #9fb7e4; background: rgba(255,255,255,.07); font-size: 12px; font-weight: 750; }
.module-button.active .module-icon { color: white; background: #315fbf; }
.module-copy { min-width: 0; display: grid; gap: 3px; }
.module-copy strong { font-size: 13px; font-weight: 650; }
.module-copy small { overflow: hidden; color: #7187ad; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.module-button.active small { color: #9fb2d5; }
.welcome-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.welcome-eyebrow { margin-bottom: 8px !important; font-size: 10px; font-weight: 800; letter-spacing: .16em; opacity: .68 !important; }
.welcome-actions { position: relative; z-index: 1; display: flex; gap: 10px; }
.welcome-actions button { height: 38px; padding: 0 15px; border: 1px solid rgba(255,255,255,.28); border-radius: 9px; color: white; background: rgba(255,255,255,.12); font-weight: 650; }
.business-header { min-height: 54px; display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px; }
.business-header p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.business-tabs { display: flex; gap: 4px; margin-bottom: 24px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #edf0f5; overflow-x: auto; }
.business-tab { min-width: 92px; height: 34px; padding: 0 12px; border: 0; border-radius: 7px; color: #68758d; background: transparent; font-size: 11px; font-weight: 650; white-space: nowrap; }
.business-tab b { margin-left: 6px; padding: 1px 5px; border-radius: 8px; color: #8792a5; background: rgba(255,255,255,.65); font-size: 8px; }
.business-tab.active { color: var(--blue); background: white; box-shadow: 0 2px 8px rgba(40,57,91,.08); }
.course-grid, .assignment-grid { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 16px; }
.course-card, .assignment-card { display: flex; flex-direction: column; min-height: 280px; padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 5px 18px rgba(30,45,75,.035); }
.course-card-head, .assignment-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.course-code { display: inline-block; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.course-card h3, .assignment-card h3 { margin: 18px 0 10px; font-size: 17px; }
.course-card > p, .assignment-card > p { flex: 1; margin-bottom: 18px; color: #7a8598; font-size: 12px; line-height: 1.65; }
.course-meta, .assignment-foot { display: flex; justify-content: space-between; gap: 10px; color: #7f899c; font-size: 11px; }
.course-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 16px 0; }
.course-stats span { padding: 10px 5px; border-radius: 8px; color: #7c8799; background: #f5f7fa; text-align: center; font-size: 10px; }
.course-stats b { display: block; margin-bottom: 3px; color: #344159; font-size: 17px; }
.card-actions { display: flex; gap: 9px; margin-top: 16px; }
.card-actions button { flex: 1; min-height: 36px; font-size: 11px; }
.status-chip { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 12px; font-size: 10px; font-weight: 650; white-space: nowrap; }
.status-chip.positive { color: #258159; background: #e9f7f0; }
.status-chip.pending { color: #9c6a1f; background: #fff5df; }
.status-chip.negative { color: #a74752; background: #fff0f1; }
.record-no { width: 64px; color: #8e98aa; font-variant-numeric: tabular-nums; }
.operation-summary { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(330px, .8fr); gap: 16px; margin-bottom: 18px; }
.course-overview { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.course-overview h2 { margin: 10px 0; font-size: 22px; }
.course-overview p { max-width: 600px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.progress-ring { flex: 0 0 100px; width: 100px; height: 100px; display: grid; place-content: center; border: 8px solid #dfe8fb; border-top-color: var(--blue); border-radius: 50%; text-align: center; }
.progress-ring strong { font-size: 21px; }.progress-ring span { color: #8b95a7; font-size: 9px; }
.operation-metrics, .three-metrics, .service-summary, .analytics-hero { display: grid; gap: 10px; }
.operation-metrics { grid-template-columns: repeat(2, 1fr); }
.operation-metrics div, .three-metrics div, .service-summary div, .analytics-hero div { display: grid; align-content: center; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.operation-metrics b, .three-metrics b, .service-summary b, .analytics-hero strong { color: #25344e; font-size: 23px; }.operation-metrics span, .three-metrics span, .service-summary span, .analytics-hero span { margin-top: 5px; color: #8b95a8; font-size: 10px; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.two-columns .panel { min-width: 0; overflow: hidden; }
.three-metrics, .service-summary { grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }
.analytics-hero { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.course-selector { width: min(320px, 100%); height: 36px; padding: 0 34px 0 12px; border: 1px solid #dce3ed; border-radius: 9px; color: #354159; background: white; font-size: 11px; }
.classroom-board { margin-bottom: 18px; }
.live-session { color: white; background: linear-gradient(120deg, #244f9e, #315fbf); }
.live-session h2 { margin: 24px 0 9px; }.live-session > p { color: rgba(255,255,255,.7); }
.live-head { display: flex; justify-content: space-between; align-items: center; }.live-head > div { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #7af0b1; box-shadow: 0 0 0 5px rgba(122,240,177,.14); }
.live-stats { display: flex; gap: 28px; margin-top: 24px; }.live-stats span { color: rgba(255,255,255,.72); font-size: 11px; }.live-stats b { margin-right: 5px; color: white; font-size: 20px; }
.submission-progress { margin: 10px 0 16px; }.submission-progress > div { display: flex; justify-content: space-between; margin-bottom: 8px; color: #778296; font-size: 10px; }.submission-progress i { display: block; height: 7px; border-radius: 5px; background: #edf0f5; overflow: hidden; }.submission-progress i span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.text-button.success { color: #27815b; background: #e9f7f0; }
.empty-business { min-height: 260px; display: grid; place-items: center; align-content: center; padding: 45px 20px; color: #8a94a7; text-align: center; }
.empty-business h3 { margin: 14px 0 7px; color: #465269; }.empty-business p { margin-bottom: 18px; font-size: 12px; }.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--blue); background: var(--blue-soft); font-size: 24px; }
.advanced-note { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding: 15px 18px; border: 1px solid #dce5f5; border-radius: 11px; color: #67758b; background: #f3f7fe; font-size: 11px; }.advanced-note strong { color: #315fbf; font-size: 13px; }
.advanced-selector { display: flex; align-items: center; gap: 9px; }.advanced-selector label { color: #68758d; font-size: 11px; font-weight: 650; white-space: nowrap; }.advanced-selector select { width: 210px; height: 36px; padding: 0 32px 0 11px; border-radius: 9px; font-size: 11px; }
.record-identity { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px; padding: 13px 15px; border-radius: 10px; color: #68758b; background: #f3f6fa; font-size: 11px; }.record-identity code { color: #315fbf; font-size: 10px; }
.multi-select { min-height: 122px; padding: 7px; }.multi-select option { padding: 7px 9px; border-radius: 6px; }.multi-select option:checked { color: #315fbf; background: #eaf1ff; }
.openid-button { max-width: 210px; padding: 5px 8px; border: 1px solid #dbe4f4; border-radius: 7px; color: #315fbf; background: #f4f7fd; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-context { min-height: 42px; margin-bottom: 14px; }
.business-header > .primary { min-height: 36px; padding: 0 15px; font-size: 11px; }
.panel-header .text-button { padding: 5px 9px; font-size: 10px; }
.panel-header + .table-scroll,
.panel-header + .empty-business { margin-top: 16px; }
.two-columns > .panel > .panel-header { padding-bottom: 2px; }
@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }.login-visual { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }.dashboard-grid { grid-template-columns: 1fr; }
  .course-grid, .assignment-grid { grid-template-columns: repeat(2, 1fr); }.operation-summary { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }.main { margin: 0; }.sidebar { transform: translateX(-100%); transition: .2s; }.sidebar.open { transform: none; }
  .menu-button { display: block; width: 38px; height: 38px; border: 0; border-radius: 9px; background: #edf1f7; }
  .topbar { justify-content: flex-start; gap: 14px; padding: 14px 18px; }.topbar-actions { margin-left: auto; }.content { padding: 20px 16px 40px; }
  .resource-toolbar { align-items: flex-start; flex-direction: column; }.toolbar-actions { width: 100%; }.search { min-width: 0; flex: 1; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }.metric-card { padding: 15px; }.editor-form { grid-template-columns: 1fr; }.editor-field.full { grid-column: auto; }
  .welcome-card, .business-header { align-items: flex-start; flex-direction: column; }.welcome-actions { flex-wrap: wrap; }.course-grid, .assignment-grid, .two-columns { grid-template-columns: 1fr; }.three-metrics, .service-summary, .analytics-hero { grid-template-columns: repeat(2, 1fr); }.course-context .course-selector { width: 100%; }
}
