:root {
  --ink: #18191d;
  --muted: #747780;
  --paper: #f6f7f9;
  --card: #ffffff;
  --line: #e6e7eb;
  --accent: #625bf6;
  --accent-dark: #4f48dc;
  --accent-soft: #eeecff;
  --green: #24865a;
  --red: #cf4b55;
  --shadow: 0 20px 60px rgba(27, 29, 36, .09);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.5 Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar { height: 72px; padding: 0 clamp(20px, 4vw, 58px); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 15; border-bottom: 1px solid rgba(224, 225, 230, .86); background: rgba(250, 250, 251, .84); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-symbol { width: 38px; height: 38px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%; }
.brand-symbol i { width: 14px; height: 14px; display: block; border-radius: 50%; background: var(--ink); transition: transform .45s var(--ease); }
.brand:hover .brand-symbol i { transform: scale(.7); }
.brand > span:last-child { display: flex; flex-direction: column; }
.brand b { font-size: 14px; letter-spacing: -.01em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.operator-badge { padding: 8px 11px; border-radius: 999px; color: var(--accent-dark); background: var(--accent-soft); font-size: 11px; font-weight: 700; white-space: nowrap; }
.quiet-button, .icon-button { border: 1px solid var(--line); color: var(--ink); background: rgba(255, 255, 255, .8); cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.quiet-button { height: 38px; padding: 0 13px; border-radius: 10px; font-size: 13px; }
.quiet-button:hover, .icon-button:hover { border-color: #cbcdd4; background: #fff; transform: translateY(-1px); }

.auth-gate { width: min(1280px, calc(100% - 40px)); min-height: calc(100vh - 72px); margin: auto; padding: 52px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, 430px); align-items: center; gap: clamp(48px, 8vw, 120px); }
.auth-intro { position: relative; min-height: 570px; padding: clamp(42px, 6vw, 82px); overflow: hidden; border: 1px solid #e3e4e9; border-radius: 32px; background: linear-gradient(145deg, #fff 0%, #f7f5ff 48%, #edf5ff 100%); box-shadow: 0 24px 80px rgba(44, 47, 63, .07); animation: reveal .7s var(--ease) both; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.auth-intro h1 { position: relative; z-index: 2; max-width: 700px; margin: 24px 0 18px; font-size: clamp(54px, 6.7vw, 102px); line-height: .96; letter-spacing: -.075em; }
.auth-intro h1 span { color: var(--accent); }
.auth-intro > p { position: relative; z-index: 2; margin: 0; color: var(--muted); font-size: 17px; }
.visual-field { position: absolute; inset: 0; pointer-events: none; }
.orbit { position: absolute; border-radius: 50%; filter: blur(1px); animation: drift 9s ease-in-out infinite alternate; }
.orbit-one { width: 360px; height: 360px; right: -80px; bottom: -110px; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.96), rgba(147,139,255,.42) 38%, rgba(90,188,255,.18) 66%, transparent 70%); }
.orbit-two { width: 190px; height: 190px; right: 26%; bottom: 6%; border: 1px solid rgba(98,91,246,.18); animation-delay: -3s; }
.visual-card { position: absolute; z-index: 2; width: 118px; height: 92px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid rgba(255,255,255,.86); border-radius: 18px; background: rgba(255,255,255,.68); box-shadow: 0 14px 36px rgba(68,70,92,.11); backdrop-filter: blur(16px); animation: float 6s ease-in-out infinite; }
.visual-card span { color: var(--accent); font: 700 10px/1 ui-monospace, Consolas, monospace; }
.visual-card b { font-size: 17px; }
.card-a { right: 37%; bottom: 13%; transform: rotate(-7deg); }
.card-b { right: 18%; bottom: 27%; transform: rotate(4deg); animation-delay: -2s; }
.card-c { right: 3%; bottom: 10%; transform: rotate(-2deg); animation-delay: -4s; }

.auth-card { padding: 18px 4px; animation: reveal .7s .1s var(--ease) both; }
.auth-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--accent); font-size: 20px; box-shadow: 0 10px 24px rgba(98,91,246,.25); }
.auth-card h2 { margin: 28px 0 8px; font-size: 34px; letter-spacing: -.045em; }
.auth-card > p { margin: 0 0 34px; color: var(--muted); font-size: 15px; }
label > span { display: block; margin-bottom: 8px; color: #575a63; font-size: 14px; font-weight: 700; }
input, select { height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline: 0; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus { border-color: rgba(98,91,246,.65); box-shadow: 0 0 0 4px rgba(98,91,246,.09); }
.auth-card input { width: 100%; height: 54px; }
.primary-button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; color: #fff; background: var(--accent); font-weight: 750; cursor: pointer; box-shadow: 0 8px 20px rgba(98,91,246,.2); transition: transform .22s var(--ease), background .2s, box-shadow .22s; }
.primary-button:hover { transform: translateY(-2px); background: var(--accent-dark); box-shadow: 0 12px 26px rgba(98,91,246,.28); }
.primary-button:active { transform: translateY(0) scale(.985); }
.auth-submit { width: 100%; height: 54px; margin-top: 14px; display: flex; align-items: center; justify-content: space-between; padding-inline: 18px; }
.auth-card > small { display: block; margin-top: 13px; color: var(--muted); text-align: center; font-size: 13px; }

.workspace { position: relative; width: min(1400px, calc(100% - 40px)); margin: auto; padding: 72px 0 90px; }
.workspace > * { animation: reveal .52s var(--ease) both; }
.workspace > .metrics { animation-delay: .06s; }
.workspace > .catalog { animation-delay: .12s; }
.workspace-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.account-actions { position: absolute; top: 20px; right: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.workspace-head h1 { margin: 0; font-size: clamp(42px, 5vw, 68px); line-height: 1; letter-spacing: -.065em; }
.workspace-head p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.workspace-head .primary-button { min-width: 132px; }
.workspace-head .primary-button span { margin-right: 6px; }

.metrics { margin-top: 38px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: 0 8px 30px rgba(32,34,43,.035); }
.metrics article { min-height: 104px; padding: 20px 22px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.metrics article:last-child { border: 0; }
.metrics span { color: var(--muted); font-size: 13px; }
.metrics strong { margin-top: auto; font-size: 30px; letter-spacing: -.04em; }
.metrics small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.capacity-notice { margin-top: 12px; padding: 13px 15px; display: flex; gap: 10px; border: 1px solid #f0dfb6; border-radius: 12px; color: #725c21; background: #fff9e9; font-size: 14px; }

.catalog { margin-top: 54px; }
.catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.catalog-head h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.catalog-head h2 b { font: inherit; }
.catalog-head h2 span { margin-left: 0; color: inherit; font-size: inherit; font-weight: inherit; }
.catalog-tools { display: flex; gap: 8px; }
.catalog-tools .filter-select { width: auto; min-width: 132px; height: 38px; margin: 0; padding: 0 44px 0 12px; appearance: none; -webkit-appearance: none; border: 1px solid var(--line); border-radius: 10px; color: #555861; background-color: #fff; background-image: linear-gradient(45deg, transparent 50%, #686b73 50%), linear-gradient(135deg, #686b73 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-repeat: no-repeat; background-size: 5px 5px; font-size: 12px; font-weight: 650; }
.catalog-tools .filter-select:focus { border-color: rgba(98,91,246,.55); box-shadow: 0 0 0 3px rgba(98,91,246,.08); }
.search { width: min(300px, 38vw); height: 42px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: box-shadow .2s, border-color .2s; }
.search:focus-within { border-color: rgba(98,91,246,.55); box-shadow: 0 0 0 4px rgba(98,91,246,.08); }
.search span { padding-left: 13px; color: #999ca5; font-size: 20px; }
.search input { width: 100%; height: 40px; border: 0; box-shadow: none; background: transparent; }
.icon-button { width: 42px; height: 42px; border-radius: 12px; font-size: 18px; }
.project-grid-wrap { margin-top: 14px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project-card { min-width: 0; border: 1px solid #e9e9ec; border-radius: 16px; background: var(--card); box-shadow: 0 8px 24px rgba(32,34,43,.035); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.project-card:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(32,34,43,.06); }
.project-previews { padding: 12px 12px 0; display: grid; grid-template-columns: minmax(0, 20fr) minmax(78px, 4.5fr); gap: 8px; align-items: stretch; }
.project-preview { position: relative; min-width: 0; overflow: hidden; border-radius: 10px; background: #f2f2f4; isolation: isolate; }
.project-preview-landscape { aspect-ratio: 2 / 1; }
.project-preview-portrait { aspect-ratio: 9 / 20; }
.project-preview-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.project-preview-frame { width: 100%; height: 100%; display: block; border: 0; opacity: 0; background: #fff; pointer-events: none; transition: opacity .35s ease; }
.project-preview.preview-ready .project-preview-frame { opacity: 1; }
.preview-wait, .preview-placeholder { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; color: var(--muted); background: #f2f2f4; font-size: 11px; transition: opacity .25s; }
.preview-wait i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(98,91,246,.1); animation: previewPulse 1.2s ease-in-out infinite; }
.project-preview.preview-ready .preview-wait { opacity: 0; pointer-events: none; }
.project-preview-sample { padding: 14px; display: flex; align-items: center; color: #17171b; background: #f3f4ed; }
.project-preview-sample strong { position: relative; z-index: 1; max-width: 68%; font-size: clamp(14px, 2vw, 28px); line-height: 1; letter-spacing: -.04em; }
.project-preview-sample i { position: absolute; right: -12%; bottom: -36%; width: 56%; aspect-ratio: 1; border-radius: 42% 58% 65% 35%; background: #c8ff45; transform: rotate(-16deg); }
.project-preview-sample.sample-kitchen { color: #2b1b19; background: #fff5e8; }
.project-preview-sample.sample-kitchen i { background: #ff7a59; }
.project-preview-sample.sample-event { color: #17152e; background: #f4f0ff; }
.project-preview-sample.sample-event i { background: #6558f5; }
.project-preview-sample.sample-quiz { color: #101c3a; background: #eef4ff; }
.project-preview-sample.sample-quiz i { background: #2f6bff; }
.project-preview-portrait.project-preview-sample { align-items: flex-start; padding-top: 34%; }
.project-preview-portrait.project-preview-sample strong { max-width: 100%; font-size: 12px; }
.project-preview-portrait.project-preview-sample i { right: -48%; bottom: -4%; width: 126%; opacity: .42; }
.project-card-body { padding: 14px; }
.project-card-head { min-height: 48px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.project-identity { min-width: 0; }
.project-identity > strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; letter-spacing: -.02em; }
.project-identity > div { margin-top: 3px; display: flex; align-items: center; gap: 7px; color: var(--muted); }
.project-identity small, .project-identity time { font-size: 11px; }
.project-identity i { width: 3px; height: 3px; border-radius: 50%; background: #c8cad1; }
.version-control { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }
.version-control label { display: flex; align-items: center; gap: 6px; }
.version-control label > span { display: none; }
.version-control .version-select { width: 156px; max-width: none; margin: 0; }
.project-facts { margin-top: 9px; padding-top: 11px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; border-top: 1px solid #eeeeF1; color: var(--muted); font-size: 11px; }
.project-facts > span { white-space: nowrap; }
.project-facts > i { width: 3px; height: 3px; border-radius: 50%; background: #c8cad0; }
table { width: 100%; border-collapse: collapse; }
th { padding: 14px 16px; color: #91949d; background: #fafafb; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
td { padding: 18px 16px; border-top: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
tbody tr { transition: background .2s, transform .22s var(--ease); animation: rowIn .42s var(--ease) both; }
tbody tr:hover { background: #fafaff; }
.project-cell { display: flex; align-items: center; }
.project-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: var(--accent); background: var(--accent-soft); font-weight: 850; }
.project-cell strong, .size strong { display: block; font-size: 15px; }
.project-cell small, .muted { color: var(--muted); font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; color: var(--green); background: #e9f6ef; font-size: 12px; font-weight: 750; }
.status i { width: 5px; height: 5px; border-radius: 50%; background: #3ca673; }
.version-select { height: 34px; max-width: 165px; margin-top: 5px; padding: 0 8px; border-radius: 8px; font-size: 12px; }
.project-card .actions { position: relative; margin-top: 13px; display: grid; grid-template-columns: 1fr 1fr 38px; gap: 8px; }
.project-card .actions a, .project-card .actions button { height: 38px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; color: #555861; background: #fff; text-decoration: none; font-size: 12px; font-weight: 750; cursor: pointer; transition: transform .18s var(--ease), border-color .18s, color .18s; }
.project-card .actions a:hover, .project-card .actions button:hover { transform: translateY(-1px); border-color: #c9cad2; color: var(--ink); }
.project-card .actions .open { border-color: var(--ink); color: #fff; background: var(--ink); }
.project-card .actions .open:hover { color: #fff; background: #292a30; }
.project-card .actions .open span { opacity: .62; }
.project-card .actions .update-action { border-color: #d7d4ff; color: var(--accent-dark); background: #fff; }
.project-card .actions .update-action:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.project-card .actions > .open, .project-card .actions > .update-action { width: 100%; }
.actions .danger { color: var(--red); }
.more-actions { position: relative; }
.more-actions summary { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #555861; background: #fff; list-style: none; font-size: 12px; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.more-actions summary::-webkit-details-marker { display: none; }
.more-actions[open] summary { border-color: #c9cad2; color: var(--ink); }
.more-menu { position: absolute; right: 0; bottom: 46px; z-index: 8; width: 148px; padding: 5px; display: grid; gap: 1px; border: 1px solid #e5e6ea; border-radius: 10px; background: #fff; box-shadow: 0 12px 32px rgba(27,29,36,.13); }
.project-card .more-menu button { width: 100%; height: 34px; padding: 0 10px; justify-content: flex-start; border: 0; border-radius: 7px; color: #45474e; background: transparent; box-shadow: none; font-size: 12px; font-weight: 650; }
.project-card .more-menu button:hover { border: 0; color: var(--ink); background: #f5f5f7; transform: none; }
.project-card .more-menu button.danger { margin-top: 3px; color: var(--red); }
.project-card .more-menu button.danger:hover { color: var(--red); background: #fff1f2; }
.empty { padding: 72px 20px; text-align: center; }
.empty > span { width: 42px; height: 42px; display: grid; place-items: center; margin: auto; border-radius: 13px; color: var(--accent); background: var(--accent-soft); font-size: 20px; }
.empty h3 { margin: 14px 0 5px; font-size: 17px; }
.empty p { margin: 0; color: var(--muted); font-size: 13px; }

dialog { width: min(700px, calc(100vw - 24px)); padding: 0; border: 0; overflow: visible; background: transparent; }
dialog#teamDialog { width: min(1040px, calc(100vw - 24px)); }
dialog#deleteDialog { width: min(420px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(29,30,36,.34); backdrop-filter: blur(7px); }
dialog[open] .modal { animation: modalIn .35s var(--ease) both; }
.modal { padding: 30px; border: 1px solid rgba(255,255,255,.8); border-radius: 22px; background: rgba(255,255,255,.97); box-shadow: var(--shadow); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 25px; }
.dialog-head h2 { margin: 8px 0 0; font-size: 32px; letter-spacing: -.045em; }
.close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: #777a83; background: #fff; font-size: 22px; cursor: pointer; transition: background .2s; }
.close:hover { background: #f5f5f7; }
.delete-confirm-panel { padding: 28px; }
.delete-warning { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--red); background: #fff0f1; font-size: 18px; font-weight: 850; }
.delete-confirm-panel h2 { margin: 20px 0 8px; font-size: 24px; letter-spacing: -.035em; }
.delete-confirm-panel p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.delete-confirm-panel p strong { color: var(--ink); }
.confirm-actions { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
#deleteDialog .confirm-actions button { height: 42px; border: 1px solid var(--line); border-radius: 10px; color: #555861; background: #fff; font-size: 13px; font-weight: 750; cursor: pointer; }
#deleteDialog .confirm-actions button:hover { border-color: #c9cad2; }
#deleteDialog .confirm-actions .confirm-delete { border-color: var(--red); color: #fff; background: var(--red); }
#deleteDialog .confirm-actions .confirm-delete:hover { border-color: #b93c47; background: #b93c47; }
#deleteDialog .confirm-actions button:disabled { opacity: .58; cursor: wait; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.publish-form > label { display: block; margin-top: 15px; }
.publish-form label small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.publish-form input { width: 100%; }
#publisher[readonly] { color: #666a73; background: #f5f5f7; }
.slug-input { display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.slug-input:focus-within { border-color: rgba(98,91,246,.65); box-shadow: 0 0 0 4px rgba(98,91,246,.09); }
.slug-input.slug-error { border-color: var(--red); box-shadow: 0 0 0 4px rgba(207,75,85,.08); }
.slug-input.slug-warning { border-color: #d69232; box-shadow: 0 0 0 4px rgba(214,146,50,.08); }
.slug-input b { padding-left: 14px; color: var(--muted); }
.slug-input input { border: 0; box-shadow: none; }
.publish-form .slug-message { min-height: 18px; margin-top: 7px; font-size: 13px; font-weight: 700; }
.slug-message.error { color: var(--red); }
.slug-message.warning { color: #a8660c; }
.slug-message.owned, .slug-message.available { color: var(--green); }
.slug-message.checking { color: var(--muted); font-weight: 500; }
.drop-zone { min-height: 154px; display: flex !important; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #d0d2d9; border-radius: 16px; background: #fafafa; cursor: pointer; transition: border-color .2s, background .2s, transform .24s var(--ease); }
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); background: #f7f6ff; transform: translateY(-2px); }
.drop-zone input { display: none; }
.drop-zone i { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); font: 800 10px/1 ui-monospace, Consolas, monospace; }
.drop-zone strong { max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.drop-zone small { margin-top: 4px !important; }
.upload-progress { margin-top: 16px; }
.upload-progress > div { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.upload-progress em { height: 6px; display: block; margin-top: 8px; overflow: hidden; border-radius: 99px; background: #ececf1; }
.upload-progress em i { width: 0; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #75baff, var(--accent)); background-size: 200% 100%; animation: shimmer 2s linear infinite; transition: width .3s var(--ease); }
.form-message { min-height: 19px; margin: 12px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.form-message.error { color: var(--red); }
.submit { width: 100%; height: 52px; margin-top: 4px; }
.submit:disabled { opacity: .58; cursor: wait; }

.team-panel { padding: 30px; }
.team-tabs { display: flex; gap: 28px; margin: -4px 0 26px; border-bottom: 1px solid var(--line); }
.team-tab { position: relative; padding: 0 0 13px; border: 0; color: var(--muted); background: transparent; font-size: 15px; font-weight: 750; cursor: pointer; }
.team-tab::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ""; background: var(--accent); transform: scaleX(0); transform-origin: center; transition: transform .22s var(--ease); }
.team-tab.active { color: var(--ink); }
.team-tab.active::after { transform: scaleX(1); }
.team-tab:focus-visible { outline: 2px solid rgba(98,91,246,.35); outline-offset: 5px; }
.team-tab-panel { min-height: 420px; }
.member-section, .audit-section { min-width: 0; }
.section-title { min-height: 50px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-title h3 { margin: 0; font-size: 19px; }
.section-title p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.member-form { max-width: 720px; margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, .65fr) auto; gap: 8px; }
.member-form input { min-width: 0; }
.member-form #memberPrefix { text-transform: uppercase; }
.member-form button { box-shadow: none; }
.new-code { margin-top: 12px; padding: 14px; border: 1px solid #dcd8ff; border-radius: 14px; background: var(--accent-soft); }
.new-code span, .new-code strong { display: block; }
.new-code span { color: var(--muted); font-size: 12px; }
.new-code strong { margin: 8px 0; color: var(--accent-dark); font: 800 20px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.new-code button, .member-row button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: #555861; background: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.member-list, .audit-list { max-height: 390px; margin-top: 14px; overflow: auto; border-top: 1px solid var(--line); }
.member-row, .audit-row { padding: 12px 2px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.member-row strong, .audit-row strong { display: block; font-size: 13px; }
.member-row small, .audit-row small { color: var(--muted); font-size: 11px; }
.member-actions { display: flex; gap: 5px; }
.member-row button.disable { color: var(--red); }
.member-row button.enable { color: var(--green); }
.member-row .inactive { opacity: .45; }
.audit-row { align-items: flex-start; }
.audit-row time { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.audit-empty { padding: 28px 6px; color: var(--muted); text-align: center; font-size: 12px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 30; max-width: 360px; padding: 13px 16px; border-radius: 12px; color: #fff; background: #24252a; box-shadow: var(--shadow); opacity: 0; transform: translateY(20px) scale(.98); transition: opacity .25s, transform .3s var(--ease); pointer-events: none; font-size: 14px; }
.toast.show { opacity: 1; transform: none; }

@keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes previewPulse { 50% { transform: scale(.72); opacity: .58; } }
@keyframes drift { to { transform: translate3d(-18px, -12px, 0) scale(1.04); } }
@keyframes float { 0%,100% { margin-top: 0; } 50% { margin-top: -9px; } }

@media (max-width: 980px) {
  .auth-gate { width: min(720px, calc(100% - 32px)); grid-template-columns: 1fr; gap: 22px; padding-block: 28px 52px; }
  .auth-intro { min-height: 430px; }
  .auth-card { padding: 28px 10px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics article:nth-child(2) { border-right: 0; }
  .metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar { height: 64px; padding-inline: 16px; }
  .brand small, .operator-badge { display: none !important; }
  .brand-symbol { width: 34px; height: 34px; }
  .top-actions { gap: 5px; }
  .quiet-button { height: 36px; padding-inline: 10px; font-size: 12px; }
  .auth-gate { min-height: calc(100vh - 64px); }
  .auth-intro { min-height: 360px; padding: 32px 25px; border-radius: 24px; }
  .auth-intro h1 { font-size: clamp(48px, 15vw, 66px); }
  .visual-card { width: 92px; height: 72px; padding: 12px; border-radius: 14px; }
  .visual-card b { font-size: 14px; }
  .card-a { right: 54%; }
  .card-b { right: 27%; }
  .card-c { right: 2%; }
  .workspace { width: calc(100% - 28px); padding-top: 76px; }
  .workspace-head { align-items: center; }
  .account-actions { top: 18px; gap: 8px; }
  .workspace-head h1 { font-size: 43px; }
  .workspace-head p { display: none; }
  .workspace-head .primary-button { min-width: 112px; padding-inline: 13px; }
  .metrics { margin-top: 26px; }
  .metrics article { min-height: 90px; padding: 16px; }
  .metrics strong { font-size: 22px; }
  .catalog { margin-top: 38px; }
  .catalog-head { align-items: flex-start; flex-direction: column; }
  .catalog-tools { width: 100%; flex-wrap: wrap; }
  .catalog-tools .filter-select { min-width: 0; flex: 1 1 128px; }
  .search { width: auto; flex: 1; }
  .project-grid { gap: 13px; }
  .project-previews { grid-template-columns: minmax(0, 20fr) minmax(66px, 4.5fr); gap: 7px; padding: 10px; }
  .project-card-body { padding: 13px; }
  .project-facts { grid-template-columns: 1fr 1fr; }
  .project-card-head { flex-direction: column; gap: 12px; }
  .version-control { width: 100%; justify-content: space-between; }
  .project-card .actions { grid-template-columns: 1fr 1fr auto; }
  .modal, .team-panel { padding: 22px 17px; border-radius: 18px; }
  .dialog-head h2 { font-size: 26px; }
  .form-grid, .member-form { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
