:root {
      --ink: #243447;
      --muted: #718096;
      --line: rgba(36, 52, 71, .14);
      --surface: #ffffff;
      --surface-2: #ffffff;
      --surface-3: #f2f8f9;
      --canvas: #f6fafb;
      --accent: #10a39d;
      --accent-strong: #078b86;
      --danger: #e5484d;
      --warning: #d69e2e;
      --shadow: 0 12px 32px rgba(35, 70, 82, .10);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }
    * { box-sizing: border-box; }
    body { margin: 0; color: var(--ink); background: var(--canvas); min-height: 100vh; }
    button, input, select, textarea { font: inherit; }
    button { cursor: pointer; }
    .shell { width: min(1440px, calc(100% - 48px)); margin: 0 auto; position: relative; }
    .topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
    .brand { display: flex; align-items: center; gap: 12px; letter-spacing: 0; }
    a.brand { color: inherit; text-decoration: none; }
    .brand-mark { width: 30px; height: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; transform: rotate(45deg); }
    .brand-mark i { display: block; background: var(--accent); border-radius: 2px; }
    .brand-mark i:nth-child(2) { opacity: .55; }
    .brand-mark i:nth-child(3) { opacity: .35; }
    .brand-mark i:nth-child(4) { background: transparent; border: 1px solid var(--accent); }
    .brand-name { font-size: 15px; font-weight: 760; }
    .top-actions { display: flex; align-items: center; gap: 10px; }
    .status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
    .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(16, 163, 157, .10); }
    .status.offline::before { background: var(--danger); box-shadow: none; }
    .ghost, .primary, .danger-button { border: 1px solid var(--line); color: var(--ink); background: var(--surface); border-radius: 5px; padding: 10px 14px; transition: transform .2s, border-color .2s, background .2s, color .2s; }
    a.ghost { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
    .ghost:hover, .danger-button:hover { border-color: rgba(16, 163, 157, .55); background: var(--surface-3); transform: translateY(-1px); }
    .primary { border-color: var(--accent); color: #ffffff; background: var(--accent); font-weight: 760; }
    .primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); transform: translateY(-1px); }
    .danger-button { color: var(--danger); }
    .page { padding: 32px 0 80px; animation: enter .55s ease both; }
    @keyframes enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
    .eyebrow { color: var(--accent-strong); text-transform: uppercase; letter-spacing: 0; font-size: 10px; font-weight: 760; }
    h1, h2, h3, p { margin: 0; }
    h1 { font-size: 48px; line-height: 1.05; letter-spacing: 0; max-width: 700px; }
    h2 { font-size: 24px; letter-spacing: 0; }
    h3 { font-size: 16px; }
    .group-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; }
    .group-tab { color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 100px; padding: 8px 14px; font-size: 12px; }
    .group-tab.active, .group-tab:hover { color: #ffffff; border-color: var(--accent); background: var(--accent); }
    .works-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
    .work-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; box-shadow: var(--shadow); animation: rise .4s ease both; }
    @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
    .preview { position: relative; width: 100%; overflow: hidden; background: #f4fbfc; aspect-ratio: 16 / 10; min-height: 0; }
    .preview iframe { position: absolute; left: 0; top: 0; width: 1200px; height: 750px; border: 0; display: block; transform-origin: top left; }
    .work-meta { padding: 14px 15px 16px; display: flex; justify-content: space-between; gap: 12px; }
    .work-title { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .work-detail { color: var(--muted); font-size: 11px; margin-top: 6px; }
    .work-tag { color: var(--accent); font-size: 10px; white-space: nowrap; padding-top: 2px; }
    .empty { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 64px 0; color: var(--muted); text-align: center; }
    .admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 30px; align-items: start; }
    .admin-sidebar { position: sticky; top: 20px; align-self: start; padding-right: 16px; border-right: 1px solid var(--line); }
    .admin-nav-list { display: grid; gap: 4px; }
    .admin-nav-item { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid transparent; border-left: 3px solid transparent; border-radius: 4px; color: var(--muted); background: transparent; text-align: left; font: inherit; font-size: 13px; }
    .admin-nav-item:hover { color: var(--ink); background: var(--surface-3); }
    .admin-nav-item.active { border-left-color: var(--accent); color: var(--ink); background: #eaf7f6; font-weight: 700; }
    .admin-main { min-width: 0; }
    .task-subsection + .task-subsection { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
    .section { border-top: 1px solid var(--line); padding: 24px 0 30px; }
    .section:first-child { padding-top: 0; border-top: 0; }
    .section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
    .section-head p { color: var(--muted); font-size: 12px; }
    .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .form-grid .wide { grid-column: 1 / -1; }
    label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; }
    input, select, textarea { width: 100%; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 11px 12px; outline: none; }
    input:focus, select:focus, textarea:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(16, 163, 157, .10); }
    textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
    .check-field { display: flex; align-items: center; gap: 9px; min-height: 39px; }
    .check-field input { width: 16px; height: 16px; padding: 0; accent-color: var(--accent); }
    #taskReferenceFiles { min-height: 140px; }
    .form-foot { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
    .hint { color: var(--muted); font-size: 11px; }
    .metrics { display: flex; gap: 22px; color: var(--muted); font-size: 12px; }
    .metrics strong { color: var(--ink); font-size: 18px; margin-right: 5px; }
    .task-list { display: grid; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface); }
    .list-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
    .monitor-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .subsection-divider { height: 1px; background: var(--line); margin: 24px 0; }
    .record-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .monitor-records { margin-top: 28px; }
    .record-grid h4 { margin: 0 0 8px; font-size: 14px; }
    .record-list { display: grid; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface); }
    .record-row { padding: 14px 16px; font-size: 12px; display: grid; grid-template-columns: auto auto 1fr; gap: 6px 10px; }
    .record-row + .record-row { border-top: 1px solid var(--line); }
    .record-row-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
    .record-row-head [data-open-monitor-emails] { margin-left: auto; }
    .record-row p { grid-column: 1 / -1; margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
    .record-row .ok { color: #16803a; }
    .record-row .error { color: #b42318; }
    .modal-record-list { max-height: min(560px, 65svh); overflow-y: auto; padding: 0 26px 26px; }
    .task-row { display: grid; grid-template-columns: minmax(0, 1.35fr) 90px 120px auto; gap: 16px; align-items: center; padding: 14px 16px; }
    .task-row + .task-row { border-top: 1px solid var(--line); }
    .task-main { min-width: 0; }
    .task-name { display: flex; gap: 9px; align-items: center; font-size: 13px; font-weight: 700; }
    .task-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .task-info { color: var(--muted); font-size: 11px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--muted); }
    .dot.on { background: var(--accent); box-shadow: 0 0 0 4px rgba(16, 163, 157, .10); }
    .dot.running { background: var(--warning); animation: pulse 1.2s ease infinite; }
    @keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(245, 204, 112, .16); } }
    .task-state { font-size: 11px; color: var(--muted); }
    .task-state.error { color: var(--danger); }
    .task-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
    .mini { padding: 7px 9px; font-size: 11px; }
    .file-list { display: grid; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface); }
    .file-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
    .file-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px auto; gap: 16px; align-items: center; padding: 14px 16px; }
    .file-row + .file-row { border-top: 1px solid var(--line); }
    .file-main { min-width: 0; }
    .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
    .file-meta { color: var(--muted); font-size: 11px; margin-top: 5px; }
    .file-type { color: var(--accent-strong); font-size: 11px; font-weight: 760; text-transform: uppercase; }
    .file-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
    .file-favorite.active { color: var(--accent-strong); border-color: rgba(16, 163, 157, .55); background: #eaf7f6; }
    .notice { color: var(--muted); border: 1px dashed var(--line); padding: 18px; font-size: 12px; line-height: 1.55; }
    [hidden] { display: none !important; }
    .modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(36, 52, 71, .35); backdrop-filter: blur(12px); }
    .modal { width: min(450px, 100%); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 26px; box-shadow: var(--shadow); animation: enter .25s ease both; }
    .modal h2 { margin: 8px 0 8px; }
    .modal p { color: var(--muted); font-size: 12px; line-height: 1.55; margin-bottom: 20px; }
    .modal form { display: grid; gap: 13px; }
    .modal .form-foot { justify-content: flex-end; }
    .task-modal { width: min(780px, 100%); max-height: min(860px, calc(100svh - 40px)); display: flex; flex-direction: column; overflow: hidden; padding: 0; }
    .task-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
    .task-modal-head h2 { margin: 0 0 7px; }
    .task-modal-head p { margin: 0; }
    .task-modal form { overflow-y: auto; padding: 22px 26px 26px; }
    .task-modal .form-foot { flex-wrap: wrap; }
    .preview-open { position: absolute; top: 8px; right: 8px; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255, 255, 255, .42); border-radius: 5px; color: #ffffff; background: rgba(24, 42, 48, .78); font: inherit; font-size: 20px; line-height: 1; }
    .preview-open:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
    .preview-backdrop { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; padding: 20px; background: rgba(36, 52, 71, .55); backdrop-filter: blur(7px); }
    .preview-dialog { width: min(1440px, 96vw); height: min(920px, 94svh); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #ffffff; box-shadow: var(--shadow); }
    .preview-dialog-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
    .preview-dialog-head strong { font-size: 14px; }
    .preview-dialog-head .file-meta { margin-top: 4px; }
    #previewFrame, #filePreviewFrame { width: 100%; flex: 1; min-height: 0; border: 0; background: #ffffff; }
    #toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: 360px; padding: 12px 15px; color: var(--ink); background: var(--surface-3); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 5px; box-shadow: var(--shadow); font-size: 12px; animation: enter .2s ease both; }
    #toast.error { border-left-color: var(--danger); }
    @media (max-width: 980px) { .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .admin-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 22px; } }
    @media (max-width: 760px) { .admin-layout { grid-template-columns: 1fr; gap: 20px; } .admin-sidebar { position: static; padding: 0 0 10px; border-right: 0; border-bottom: 1px solid var(--line); } .admin-nav-list { display: flex; overflow-x: auto; } .admin-nav-item { width: auto; min-width: max-content; border-left: 0; border-bottom: 2px solid transparent; text-align: center; } .admin-nav-item.active { border-left-color: transparent; border-bottom-color: var(--accent); } }
    @media (max-width: 640px) { .shell { width: min(100% - 28px, 1440px); } .topbar { height: 66px; } .top-actions .status { display: none; } .page { padding-top: 26px; } h1 { font-size: 42px; } .works-grid { grid-template-columns: 1fr; } .form-grid, .file-filters, .list-filters, .record-grid { grid-template-columns: 1fr; } .form-grid .wide { grid-column: auto; } .task-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; } .task-state { grid-row: 2; } .task-actions { grid-row: 1 / span 2; grid-column: 2; flex-direction: column; } .file-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; } .file-type { grid-row: 2; } .preview-dialog { width: 100%; height: 100%; max-height: 100svh; border-radius: 0; } .preview-backdrop { padding: 0; } .task-modal { max-height: calc(100svh - 24px); } .task-modal-head { padding: 20px 18px 16px; } .task-modal form { padding: 18px 18px 20px; } }
