:root {
    --sidebar-width: 280px;
    --primary: #2563eb;
    --dark: #0f172a;
    --navy: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --panel: rgba(255, 255, 255, 0.98);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #0284c7 0%, #075985 100%);
    --gradient-4: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-5: linear-gradient(135deg, #059669 0%, #065f46 100%);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    background: #f5f7fb;
    color: var(--navy);
    font-family: 'Noto Sans TC', 'DM Sans', system-ui, sans-serif;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 34px 24px;
    background: #0f172a;
    color: #fff;
    overflow-y: auto;
}

.brand {
    display: grid;
    gap: 18px;
    margin-bottom: 42px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
}

.brand-logo { width: 150px; height: auto; display: block; }
.nav-group { margin-bottom: 28px; }

.nav-label {
    margin: 0 0 12px;
    padding-left: 12px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.month-nav { display: grid; gap: 4px; }

.nav-item {
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    display: block;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-item:hover,
.nav-item:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    outline: none;
}

.nav-item.active {
    background: var(--primary);
    color: #fff;
    transform: translateX(2px);
}

.nav-item.secondary { border: 1px solid rgba(255, 255, 255, 0.1); }

.sidebar-actions {
    margin-top: auto;
    display: grid;
    gap: 20px;
}

.primary-button {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: var(--dark);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.primary-button:hover { background: #e0e7ff; }

.mode-button {
    justify-self: start;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.mode-button:hover {
    border-color: rgba(203, 213, 225, 0.55);
    color: #e2e8f0;
}

.report-exit-button {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 10;
    display: none;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.86);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3);
}

.report-exit-button:hover { background: #1e293b; }

.language-switch {
    color: #64748b;
    font-size: 13px;
}

.language-switch a {
    color: #cbd5e1;
    font-weight: 800;
    text-decoration: none;
}

.language-switch a.active { color: #fff; }
.language-switch span { margin: 0 8px; }

.main-container {
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
}

.view { display: none; }
.view.active { display: block; }

.record-panel {
    min-height: 100vh;
    padding: 60px 80px;
    background: #f8fafc;
}

.record-header {
    margin-bottom: 34px;
}

.record-header p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.record-header h1 {
    margin: 0;
    color: var(--dark);
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -0.6px;
}

.record-section {
    margin-bottom: 24px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.record-section h2 {
    margin: 0 0 20px;
    color: var(--dark);
    font-size: 18px;
}

.record-event-list {
    display: grid;
    gap: 16px;
}

.record-event {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: 24px 28px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.record-date {
    color: var(--dark);
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.record-date span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
}

.record-event-title {
    margin-bottom: 7px;
    color: var(--dark);
    font-size: 17px;
    font-weight: 800;
}

.record-event-meta {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.record-link {
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    overflow-wrap: anywhere;
}

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

.record-status {
    justify-self: end;
    padding: 8px 14px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 800;
}

.record-event.sent .record-status { background: #dff7ee; color: #047857; }
.record-event.scheduled .record-status { background: #eaf2ff; color: #2563eb; }
.record-event.progress .record-status { background: #fef3c7; color: #d97706; }

.list-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid #f1f5f9;
}

.list-row:last-child { border-bottom: none; }
.list-info { flex: 1; min-width: 0; }
.list-title { margin-bottom: 4px; color: var(--dark); font-weight: 800; }
.list-meta { color: var(--muted); font-size: 13px; line-height: 1.45; }

.btn-outline {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--dark);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.btn-outline:hover { background: #f8fafc; }

.record-topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.record-topic-list span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--navy);
    font-size: 13px;
    font-weight: 800;
}

.empty-note {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.hub-panel {
    min-height: 100vh;
    padding: clamp(32px, 5vw, 72px);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 34rem),
        linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
}

.hub-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: end;
    max-width: 1180px;
    margin: 0 auto 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.hub-hero h1 {
    margin: 0;
    color: var(--dark);
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1;
    letter-spacing: -1.5px;
}

.hub-hero p:not(.eyebrow) {
    max-width: 720px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
}

.selected-record,
.archive-section {
    max-width: 1180px;
    margin: 0 auto;
}

.record-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    margin-bottom: 34px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.record-card.featured {
    border-color: rgba(37, 99, 235, 0.22);
}

.record-card h2 {
    margin: 0;
    color: var(--dark);
    font-size: clamp(24px, 3vw, 38px);
    letter-spacing: -0.5px;
}

.record-card p:not(.eyebrow) {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.record-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.record-stats span {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    padding: 9px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.record-stats strong {
    color: var(--dark);
    font-size: 18px;
}

.record-actions {
    display: grid;
    gap: 12px;
    justify-items: end;
}

.open-report-button,
.record-actions .primary-button {
    padding: 0 20px;
    background: var(--primary);
    color: #fff;
}

.open-report-button:hover,
.record-actions .primary-button:hover {
    background: #1d4ed8;
}

.secondary-link {
    color: var(--primary);
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
}

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

.archive-section {
    padding-bottom: 48px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
    color: var(--dark);
    font-size: 24px;
}

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

.archive-card {
    display: grid;
    gap: 18px;
    align-content: space-between;
    min-height: 170px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.archive-card.active {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.13);
}

.archive-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.archive-card h3 {
    margin: 0;
    color: var(--dark);
    font-size: 20px;
}

.archive-card-top span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 900;
}

.archive-card p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.text-button {
    justify-self: start;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
}

.text-button:hover {
    text-decoration: underline;
}

.report-stage {
    min-height: 100vh;
    padding: 42px 28px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
    animation: float 25s infinite ease-in-out;
}

.bg-shape-1 { width: 600px; height: 600px; background: var(--gradient-1); top: -250px; left: 20px; }
.bg-shape-2 { width: 500px; height: 500px; background: var(--gradient-2); bottom: -200px; right: -120px; animation-delay: 7s; }
.bg-shape-3 { width: 450px; height: 450px; background: var(--gradient-3); top: 36%; right: -80px; animation-delay: 14s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(40px, -40px) scale(1.08) rotate(90deg); }
    50% { transform: translate(-30px, 30px) scale(0.92) rotate(180deg); }
    75% { transform: translate(30px, 40px) scale(1.04) rotate(270deg); }
}

.presentation {
    width: min(100%, 1400px);
    position: relative;
    z-index: 1;
    padding: clamp(28px, 4.8vw, 70px);
    border-radius: 34px;
    background: var(--panel);
    box-shadow: 0 50px 110px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.presentation::before,
.presentation::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    opacity: 0.06;
    pointer-events: none;
}

.presentation::before {
    top: 0;
    left: 0;
    background: var(--gradient-1);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.presentation::after {
    right: 0;
    bottom: 0;
    background: var(--gradient-2);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.report-header {
    position: relative;
    margin-bottom: clamp(36px, 5vw, 58px);
}

.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 13px 28px;
    border-radius: 999px;
    background: var(--gradient-4);
    color: white;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 12px 35px rgba(250, 112, 154, 0.35);
}

.report-header h1 {
    margin: 0 0 12px;
    font-family: 'Playfair Display', 'Noto Sans TC', serif;
    font-size: clamp(44px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -1px;
    color: var(--dark);
}

.report-header p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 21px);
    font-weight: 700;
}

.content-grid { display: grid; gap: 30px; }

.section {
    padding: clamp(22px, 3vw, 38px);
    border-radius: 26px;
    color: white;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.section-newsletter { background: var(--gradient-1); }
.section-scheduled { background: var(--gradient-5); }
.section-queue { background: linear-gradient(135deg, #334155 0%, #0f172a 100%); }

.section-title {
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(20px, 2.4vw, 30px);
    line-height: 1.2;
}

.section-title svg { width: 28px; height: 28px; flex: 0 0 auto; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}

.calendar-month,
.glass-panel {
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 22px;
    background: rgba(15, 23, 42, 0.24);
    font-size: 18px;
    font-weight: 900;
}

.calendar-events {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.calendar-event {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
}

.event-date {
    padding-top: 2px;
    color: var(--primary);
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.event-title {
    margin-bottom: 5px;
    font-size: 17px;
    font-weight: 900;
}

.event-subtitle {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.event-status {
    display: inline-flex;
    margin-top: 9px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.status-sent { background: #dcfce7; color: #047857; }
.status-scheduled { background: #dbeafe; color: #1d4ed8; }
.status-progress { background: #fef3c7; color: #b45309; }

.event-link,
.file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.event-link:hover,
.file-link:hover { text-decoration: underline; }

.item-list {
    margin: 0;
    padding: 20px;
    display: grid;
    gap: 14px;
    list-style: none;
}

.item {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
}

.bullet-point {
    width: 10px;
    height: 10px;
    margin-top: 7px;
    border-radius: 50%;
    background: currentColor;
}

.item-text { font-size: 17px; font-weight: 900; }
.item-note { margin-top: 5px; color: var(--muted); font-size: 13px; }

.topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 20px;
    list-style: none;
}

.topic-list li {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
    font-size: 14px;
    font-weight: 900;
}

.workspace-panel {
    min-height: 100vh;
    padding: 60px 80px;
    background: #f8fafc;
}

.workspace-panel h1 {
    margin: 0 0 28px;
    color: var(--dark);
    font-size: 34px;
}

.workspace-card {
    max-width: 860px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
}

#lock-screen {
    display: grid;
    justify-items: start;
    gap: 12px;
}

#lock-screen p { margin: 0; font-weight: 900; }

#pass-input {
    width: min(100%, 280px);
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
}

.primary-button { padding: 0 24px; background: var(--dark); color: #fff; }
.workspace-links { display: grid; gap: 14px; }
.workspace-links[hidden] { display: none; }

.workspace-links a {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 8px 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--navy);
    text-decoration: none;
}

.workspace-links span {
    grid-row: span 2;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.workspace-links strong { font-size: 17px; }
.workspace-links small { color: var(--muted); font-size: 14px; }

body.report-mode .sidebar { display: none; }
body.report-mode .main-container { height: auto; min-height: 100vh; }
body.report-mode .report-stage { padding: 24px; }
body.report-mode .presentation { min-height: calc(100vh - 48px); }
body.report-mode .report-exit-button { display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 900px) {
    body { display: block; background: #0f172a; }
    .sidebar { width: 100%; height: auto; padding: 24px 20px; }
    .brand { margin-bottom: 24px; }
    .brand-logo { width: 128px; }
    .main-container { height: auto; }
    .record-panel { min-height: auto; padding: 32px 20px; }
    .record-header { margin-bottom: 24px; }
    .record-header h1 { font-size: 28px; }
    .record-section { padding: 22px 18px; border-radius: 14px; }
    .record-event { grid-template-columns: 64px 1fr; gap: 16px; align-items: start; padding: 20px 18px; }
    .record-date { font-size: 22px; text-align: left; }
    .record-status { grid-column: 2; justify-self: start; }
    .list-row { align-items: flex-start; flex-direction: column; }
    .hub-panel { padding: 32px 20px; }
    .hub-hero { grid-template-columns: 1fr; align-items: start; }
    .record-card { grid-template-columns: 1fr; padding: 22px; }
    .record-actions { justify-items: start; }
    .section-heading { display: block; }
    .report-stage { min-height: auto; padding: 20px; }
    .presentation { border-radius: 22px; }
    .calendar-event { grid-template-columns: 58px minmax(0, 1fr); padding: 16px; }
    .event-date { font-size: 18px; }
    .workspace-panel { min-height: auto; padding: 32px 20px; }
}
