:root {
    --ink: #1a1f36;
    --ink-soft: #4d5875;
    --muted: #8d97b0;
    --line: #e3e7f2;
    --brand: #2b3a9e;
    --brand-deep: #151a4b;
    --accent: #ffb703;
    --violet: #5b6bff;
    --bg: #f4f6fc;
    --danger: #d64545;
    --ok: #2f9e5f;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

[hidden] {
    display: none !important;
}

/* ---------------- 登录 ---------------- */

.login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at 20% 0%, #2b3a9e 0%, #151a4b 55%, #0d1030 100%);
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 24px 26px;
    box-shadow: 0 24px 60px rgba(6, 10, 40, 0.35);
}

.brand-mark {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
}

.brand-mark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.login-title {
    margin: 0;
    text-align: center;
    font-size: 26px;
    letter-spacing: 0.6px;
    color: var(--brand-deep);
}

.login-sub {
    margin: 6px 0 22px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.login-foot {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.auth-switch {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    font-size: 12.5px;
    color: var(--brand);
    cursor: pointer;
}

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

.auth-switch .dot {
    color: #c3cae0;
    font-size: 12px;
}

.req {
    color: var(--danger);
    font-style: normal;
    margin-left: 2px;
}

.code-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.code-row input {
    flex: 1 1 auto;
    min-width: 0;
}

button.code-send {
    flex: 0 0 auto;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 11px;
    white-space: nowrap;
}

button.code-send:disabled {
    opacity: 0.6;
}

.auth-lead {
    margin: 0 0 14px;
    text-align: left;
    line-height: 1.55;
}

/* ---------------- 待用验证码 ---------------- */

.codes-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.code-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #f7f9fd;
    font-size: 13px;
}

.code-who {
    color: var(--ink);
    font-weight: 500;
}

.code-value {
    font-family: "SFMono-Regular", Consolas, "Courier New", monospace;
    font-size: 16px;
    letter-spacing: 3px;
    color: var(--brand-deep);
    background: #eef1ff;
    border-radius: 7px;
    padding: 1px 8px;
}

.code-meta {
    margin-left: auto;
    font-size: 11.5px;
    color: var(--muted);
}

/* ---------------- 顶部 ---------------- */

.hero {
    background: linear-gradient(135deg, #1b2270, #2b3a9e 55%, #4b5ce0);
    color: #fff;
    padding: calc(16px + env(safe-area-inset-top)) 16px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hero h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.hero p {
    margin: 5px 0 0;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.76);
}

.user-chip {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-family: inherit;
    white-space: nowrap;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

.caret {
    opacity: 0.7;
    margin-left: 2px;
}

.menu {
    position: fixed;
    top: calc(56px + env(safe-area-inset-top));
    right: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(21, 26, 75, 0.18);
    overflow: hidden;
    z-index: 60;
    min-width: 128px;
}

.menu button {
    display: block;
    width: 100%;
    border: 0;
    background: #fff;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    text-align: left;
}

.menu button + button {
    border-top: 1px solid var(--line);
}

/* ---------------- 页签 ---------------- */

.tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
    overflow-x: auto;
}

.tab {
    flex: 1;
    min-width: 62px;
    border: 0;
    background: transparent;
    padding: 12px 4px;
    font-size: 14px;
    color: var(--muted);
    font-family: inherit;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tab.active {
    color: var(--brand);
    font-weight: 600;
    border-bottom-color: var(--brand);
}

main {
    padding: 14px 14px calc(28px + env(safe-area-inset-bottom));
    max-width: 780px;
    margin: 0 auto;
}

/* ---------------- 卡片与表单 ---------------- */

.card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 3px 14px rgba(21, 26, 75, 0.06);
}

.card h2 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.card-head h2 {
    margin: 0;
}

.sub-title {
    margin: 16px 0 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    padding-left: 9px;
    border-left: 3px solid var(--violet);
}

.muted {
    color: var(--muted);
    font-size: 12px;
}

.field {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.field > span {
    font-size: 12.5px;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #f7f9fd;
    border-radius: 11px;
    padding: 11px 12px;
    font-size: 15px;
    color: var(--ink);
    font-family: inherit;
    appearance: none;
}

textarea {
    resize: vertical;
    line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--violet);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(91, 107, 255, 0.12);
}

input:disabled,
select:disabled,
textarea:disabled {
    color: var(--ink-soft);
    background: #f2f4f9;
}

.grid3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

@media (max-width: 460px) {
    .grid3 {
        grid-template-columns: 1fr 1fr;
    }

    .grid3 .field:first-child {
        grid-column: 1 / -1;
    }
}

.hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--muted);
}

.error {
    margin: 4px 0 12px;
    color: var(--danger);
    font-size: 13px;
}

button.primary {
    width: 100%;
    border: 0;
    background: linear-gradient(120deg, var(--brand) 0%, var(--violet) 100%);
    color: #fff;
    border-radius: 12px;
    padding: 13px 0;
    font-size: 15.5px;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.3px;
}

button.primary:disabled {
    opacity: 0.65;
}

button.ghost {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-soft);
    border-radius: 11px;
    padding: 11px 18px;
    font-size: 14px;
    font-family: inherit;
}

/* ---------------- 分段控件 ---------------- */

.segmented {
    display: flex;
    background: #eef1f9;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 12px;
}

.seg {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 9px 4px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink-soft);
    border-radius: 9px;
}

.seg.active {
    background: #fff;
    color: var(--brand);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(21, 26, 75, 0.1);
}

/* ---------------- 预约条目 ---------------- */

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

.item {
    border-left: 4px solid var(--brand);
    background: #f2f5ff;
    border-radius: 11px;
    padding: 11px 12px;
}

.item-online {
    border-left-color: var(--violet);
    background: #f4f2ff;
}

.item-past {
    border-left-color: #c9d0e0;
    background: #f7f8fc;
    opacity: 0.86;
}

.item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.item-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.item-time {
    font-size: 14px;
    font-weight: 600;
}

.item-hours {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.item-topic {
    margin-top: 5px;
    font-size: 13px;
    color: var(--ink-soft);
    word-break: break-word;
}

.item-note {
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
    word-break: break-word;
}

.item-minutes {
    margin-top: 6px;
    padding: 7px 9px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--ink-soft);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 96px;
    overflow: hidden;
}

.item-meeting {
    margin-top: 4px;
    font-size: 12.5px;
    color: #4b3fc4;
    font-weight: 500;
    word-break: break-all;
}

.item-actions {
    display: flex;
    gap: 8px;
    margin-top: 9px;
    flex-wrap: wrap;
}

.badge {
    font-size: 10.5px;
    border-radius: 6px;
    padding: 1.5px 7px;
    line-height: 1.5;
    white-space: nowrap;
}

.badge-room {
    background: #dde6ff;
    color: #2b3a9e;
}

.badge-online {
    background: #e8e3ff;
    color: #4b3fc4;
}

.badge-mine {
    background: var(--accent);
    color: #4a3200;
}

.badge-admin {
    background: #2b3a9e;
    color: #fff;
}

.badge-member {
    background: #e7ebf7;
    color: var(--ink-soft);
}

.badge-off {
    background: #f3d5d5;
    color: var(--danger);
}

.mini-btn {
    border: 1px solid var(--brand);
    background: #fff;
    color: var(--brand);
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 12px;
    font-family: inherit;
}

.mini-btn-danger {
    border-color: var(--danger);
    color: var(--danger);
}

.mini-btn-plain {
    border-color: var(--line);
    color: var(--ink-soft);
}

.mini-btn-share {
    border-color: #f0c66b;
    background: #fff8e6;
    color: #8a5a00;
}

.share-system {
    width: 100%;
    margin-top: 10px;
}

.empty {
    padding: 20px 0;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ---------------- 表格 ---------------- */

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    min-width: 100%;
}

.stat-table th,
.stat-table td {
    padding: 8px 9px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

.stat-table th {
    background: #f2f5fc;
    color: var(--ink-soft);
    font-weight: 600;
}

.stat-table td.num,
.stat-table th:not(:first-child) {
    text-align: right;
}

.stat-table .total-row td {
    font-weight: 700;
    background: #f7f9ff;
    color: var(--brand);
}

.empty-cell {
    text-align: center !important;
    color: var(--muted);
    padding: 18px 0 !important;
}

/* ---------------- 成员 ---------------- */

.user-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 11px;
    background: #f7f9fd;
    flex-wrap: wrap;
}

.user-row + .user-row {
    margin-top: 8px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    margin-right: 7px;
}

.user-meta {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 3px;
}

.user-actions {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: wrap;
}

/* ---------------- 弹层 ---------------- */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(12, 16, 45, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 80;
    padding: 0;
}

@media (min-width: 640px) {
    .modal {
        align-items: center;
        padding: 24px;
    }
}

.modal-card {
    background: #fff;
    width: 100%;
    max-width: 560px;
    border-radius: 18px 18px 0 0;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
    max-height: 90vh;
    overflow-y: auto;
}

@media (min-width: 640px) {
    .modal-card {
        border-radius: 18px;
    }
}

.modal-card h2 {
    margin: 0 0 14px;
    font-size: 16px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.modal-actions .primary {
    flex: 1;
}

/* ---------------- 提示 ---------------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(28px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    background: rgba(21, 26, 75, 0.94);
    color: #fff;
    padding: 10px 18px;
    border-radius: 11px;
    font-size: 14px;
    max-width: 86vw;
    text-align: center;
    z-index: 90;
    box-shadow: 0 10px 28px rgba(10, 14, 40, 0.3);
}

/* ---------------- 添加到桌面 ---------------- */

.install-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #1e2660 0%, #2b3a9e 100%);
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(10, 14, 40, 0.34);
    z-index: 85;
}

.install-bar[hidden] {
    display: none;
}

.install-bar-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.install-bar-text b {
    font-size: 14px;
    font-weight: 600;
}

.install-bar-text span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.74);
}

.install-bar-go {
    flex: none;
    border: 0;
    border-radius: 10px;
    padding: 8px 15px;
    background: var(--accent);
    color: #241a05;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.install-bar-close {
    flex: none;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 20px;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
}

body.has-install-bar {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

body.has-install-bar .toast {
    bottom: calc(96px + env(safe-area-inset-bottom));
}

/* ---------------- 访问地址 ---------------- */

.net-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0 0;
}

.net-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fbfcff;
}

.net-row-main {
    flex: 1;
    min-width: 0;
}

.net-row-label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.net-row-url {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13.5px;
    color: var(--brand-deep);
    word-break: break-all;
}

.net-row-copy {
    flex: none;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--brand);
    border-radius: 8px;
    padding: 6px 11px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.net-row-copy:active {
    background: var(--bg);
}

.net-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 5px;
    font-size: 10px;
    line-height: 16px;
    vertical-align: middle;
}

.net-tag.lan {
    background: #e8ecff;
    color: #3b4bc0;
}

.net-tag.ts {
    background: #e6f7ee;
    color: #1d7a4c;
}

.net-tag.pub {
    background: #fdecc8;
    color: #9a5b00;
}

/* ---------------- 拍照识别纪要 ---------------- */

.ocr-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.ocr-btn {
    font-size: 13px;
    padding: 7px 12px;
    white-space: nowrap;
}

.ocr-hint {
    flex: 1 1 160px;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

/* ---------------- 会议照片 ---------------- */

.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.item-attendees {
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--ink-soft);
}

.photo-strip {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.photo-strip img {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #eef2fa;
}

.photo-more {
    width: 62px;
    height: 62px;
    border-radius: 9px;
    border: 1px dashed var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--muted);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.photo-grid:empty {
    margin-bottom: 0;
}

.photo-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #eef2fa;
}

.photo-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-del {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(20, 24, 50, 0.72);
    color: #fff;
    font-size: 13px;
    line-height: 22px;
    padding: 0;
    cursor: pointer;
}

.photo-add {
    width: 100%;
    margin-bottom: 6px;
}

.photo-add[disabled] {
    opacity: 0.55;
}

.export-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.export-row .primary {
    flex: 1 1 180px;
}

.export-row .ghost {
    flex: 1 1 180px;
}

/* ---------------- 照片查看 ---------------- */

.photo-view {
    position: fixed;
    inset: 0;
    background: rgba(8, 11, 32, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    z-index: 95;
}

.photo-view img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 10px;
}

.photo-view .ghost {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    background: transparent;
    padding: 8px 22px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
}

/* ---------------- 提醒条 ---------------- */

.reminder-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 14px -2px;
    padding: 10px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff4d6, #ffe9b8);
    border: 1px solid #f0cf85;
    color: #7a5000;
    font-size: 13.5px;
    line-height: 1.45;
}

.reminder-close {
    border: 0;
    background: transparent;
    color: #9a7420;
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
}

/* ---------------- 课题组信息与协作标签 ---------------- */

.item-group {
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
}

.badge-shared {
    background: #eef0ff;
    color: #4353c4;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.chip {
    border: 1px solid var(--line);
    background: #f7f9fd;
    color: var(--ink-soft);
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chip.chip-on {
    border-color: var(--brand);
    background: #eaedff;
    color: var(--brand);
    font-weight: 600;
}

.chip[disabled] {
    opacity: 0.75;
    cursor: default;
}

/* ---------------- 开关行 ---------------- */

.switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    font-size: 13.5px;
    color: var(--ink-soft);
    cursor: pointer;
}

.switch-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--brand);
    flex: 0 0 auto;
}

#settingsOk {
    white-space: pre-line;
    color: var(--ok);
}

/* ---------------- 电脑端排版 ---------------- */

@media (min-width: 980px) {
    body {
        font-size: 15.5px;
    }

    .hero {
        padding: 22px 32px 20px;
    }

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

    .tabs {
        justify-content: center;
        padding: 0 24px;
    }

    .tab {
        flex: 0 0 auto;
        min-width: 108px;
        font-size: 15px;
        padding: 14px 20px;
    }

    main {
        max-width: 1140px;
        padding: 22px 24px 48px;
    }

    .panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 18px;
        align-items: start;
    }

    .card {
        margin-bottom: 0;
        padding: 20px 22px;
        border-radius: 18px;
    }

    .panel-users .card:last-child,
    .panel-settings .card:last-child,
    .panel-mine .card:last-child {
        grid-column: 1 / -1;
    }

    .reminder-bar {
        max-width: 1092px;
        margin: 16px auto -2px;
    }

    .item-actions .mini-btn {
        padding: 5px 14px;
        font-size: 12.5px;
    }

    .photo-strip img,
    .photo-more {
        width: 74px;
        height: 74px;
    }

    .modal-card {
        max-width: 640px;
    }

    /* 桌面端鼠标悬停反馈 */
    .mini-btn:hover,
    .chip:hover:not([disabled]) {
        background: #eef2ff;
    }

    .mini-btn-danger:hover {
        background: #fdeeee;
    }

    .tab:hover:not(.active) {
        color: var(--ink-soft);
    }

    .photo-strip img:hover {
        transform: scale(1.04);
    }

    .photo-strip img {
        transition: transform 0.15s ease;
    }
}

/* ---------------- 使用率热力图 ---------------- */

.heat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.heat-title {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.heat-title strong {
    font-size: 16.5px;
    letter-spacing: 0.5px;
}

.heat-title .muted {
    font-size: 12px;
}

.month-nav {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--brand);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.month-nav:active {
    background: #eef2ff;
}

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

.heat-stat {
    background: #f7f9fd;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 9px 4px;
    text-align: center;
}

.heat-stat b {
    display: block;
    font-size: 17px;
    color: var(--brand);
    line-height: 1.25;
}

.heat-stat span {
    font-size: 11.5px;
    color: var(--muted);
}

.heat-calendar {
    margin-top: 4px;
}

.heat-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 5px;
}

.heat-weekdays span {
    text-align: center;
    font-size: 11.5px;
    color: var(--muted);
}

.heat-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.heat-cell {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1.1;
    color: #7d88a3;
    background: #f2f5fb;
    padding: 0;
    font-family: inherit;
}

.heat-cell.empty {
    background: transparent;
    border-color: transparent;
}

.heat-cell.level-0 {
    background: #f2f5fb;
    color: #9aa4bd;
}

.heat-cell.level-1 {
    background: #dfe6ff;
    color: #3a4a9e;
}

.heat-cell.level-2 {
    background: #b9c6ff;
    color: #232f7a;
}

.heat-cell.level-3 {
    background: #7d8ffb;
    color: #fff;
}

.heat-cell.level-4 {
    background: #2b3a9e;
    color: #fff;
}

.heat-cell.weekend {
    border-color: #eef0f8;
}

.heat-cell.today {
    box-shadow: 0 0 0 2px var(--accent) inset;
}

.heat-cell .cell-day {
    font-size: 12.5px;
    font-weight: 600;
}

.heat-cell .cell-count {
    font-size: 9.5px;
    opacity: 0.85;
    margin-top: 1px;
}

.heat-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 12px;
    font-size: 11.5px;
}

.heat-legend .heat-cell {
    width: 15px;
    height: 15px;
    aspect-ratio: auto;
    border-radius: 4px;
    display: inline-block;
}

.slot-wrap {
    overflow-x: auto;
    margin: 0 -4px;
    padding: 0 4px;
}

.slot-grid {
    display: grid;
    grid-template-columns: 26px repeat(14, 1fr);
    gap: 3px;
    min-width: 420px;
}

.slot-label {
    font-size: 10px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-cell {
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    background: #f2f5fb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8.5px;
    color: #5a6480;
}

.slot-cell.s1 { background: #dfe6ff; }
.slot-cell.s2 { background: #b9c6ff; }
.slot-cell.s3 { background: #7d8ffb; color: #fff; }
.slot-cell.s4 { background: #2b3a9e; color: #fff; }

.slot-hour {
    font-size: 8.5px;
    color: var(--muted);
    text-align: center;
    transform: scale(0.92);
}

/* ---------------- 课题结题材料 ---------------- */

.project-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.project-row {
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 11px 13px;
    background: #fbfcff;
}

.project-row-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.project-name {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--ink);
    word-break: break-all;
}

.project-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
    line-height: 1.5;
}

.project-row .mini-btn {
    flex: 0 0 auto;
}

/* ---------------- 日历订阅 ---------------- */

.calendar-url {
    margin: 10px 0 4px;
    padding: 10px 12px;
    background: #f2f5fb;
    border: 1px dashed var(--line);
    border-radius: 10px;
    font-size: 11.5px;
    color: var(--ink-soft);
    word-break: break-all;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    line-height: 1.5;
}

#calendarHint {
    white-space: pre-line;
}

@media (min-width: 980px) {
    .heat-stat b {
        font-size: 20px;
    }

    .heat-cell {
        border-radius: 10px;
    }

    /* 热力图以单列居中呈现，避免日历被拉宽 */
    .panel-heat {
        grid-template-columns: minmax(0, 1fr);
        max-width: 680px;
        margin: 0 auto;
    }
}
