:root {
  --bg: #07090d;
  --surface: #0d1118;
  --surface-2: #121823;
  --surface-3: #171f2b;
  --line: #242e3d;
  --line-soft: rgba(255,255,255,.07);
  --text: #f3f6fa;
  --muted: #8b98aa;
  --muted-2: #617084;
  --accent: #4de0d2;
  --accent-2: #74a7ff;
  --danger: #ff6d7a;
  --warning: #f3bd68;
  --success: #66d69a;
  --shadow: 0 24px 70px rgba(0,0,0,.36);
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; overflow-x: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.auth-view { min-height: 100vh; display: grid; grid-template-columns: minmax(440px, 44%) 1fr; position: relative; overflow: hidden; }
.auth-brand { position: absolute; z-index: 4; left: 42px; top: 34px; display: flex; align-items: center; gap: 12px; }
.auth-brand strong, .brand strong { display: block; letter-spacing: .02em; }
.auth-brand small, .brand small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .22em; margin-top: 2px; }
.brand-mark { width: 31px; height: 31px; position: relative; transform: rotate(45deg); }
.brand-mark span { position: absolute; width: 13px; height: 13px; border: 1px solid var(--accent); background: rgba(77,224,210,.08); }
.brand-mark span:nth-child(1) { left: 0; top: 0; }
.brand-mark span:nth-child(2) { right: 0; top: 0; }
.brand-mark span:nth-child(3) { left: 0; bottom: 0; }
.auth-panel { background: #0a0d12; display: flex; flex-direction: column; justify-content: center; padding: 120px max(42px, 9vw) 80px 42px; border-right: 1px solid var(--line-soft); z-index: 2; }
.auth-panel > div { width: 100%; max-width: 470px; }
.eyebrow { margin: 0 0 16px; color: var(--accent); text-transform: uppercase; letter-spacing: .18em; font-size: 11px; font-weight: 700; }
.auth-panel h1 { margin: 0; font-size: clamp(34px, 4vw, 56px); letter-spacing: -.045em; line-height: .98; }
.lead { margin: 22px 0 34px; color: var(--muted); line-height: 1.65; max-width: 430px; }
.form-stack { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: #cbd4df; font-size: 13px; font-weight: 600; }
input, textarea, select { width: 100%; border: 1px solid var(--line); background: #0a0f16; color: var(--text); border-radius: 8px; outline: none; padding: 12px 13px; transition: border-color .2s, box-shadow .2s, background .2s; }
input:focus, textarea:focus, select:focus { border-color: rgba(77,224,210,.65); box-shadow: 0 0 0 3px rgba(77,224,210,.08); background: #0d131b; }
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.form-error { margin: 18px 0 0; color: #ff9aa3; background: rgba(255,109,122,.08); border-left: 2px solid var(--danger); padding: 10px 12px; max-width: 470px; font-size: 13px; }
.auth-visual { position: relative; background: radial-gradient(circle at 68% 38%, rgba(77,224,210,.09), transparent 28%), radial-gradient(circle at 40% 78%, rgba(116,167,255,.07), transparent 30%), #07090d; overflow: hidden; }
.grid-lines { position: absolute; inset: 0; opacity: .19; background-image: linear-gradient(rgba(255,255,255,.11) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.11) 1px, transparent 1px); background-size: 58px 58px; mask-image: linear-gradient(90deg, transparent, black 20%, black); }
.signal { position: absolute; border: 1px solid rgba(77,224,210,.22); transform: rotate(45deg); animation: pulse 7s ease-in-out infinite; }
.signal-a { width: 210px; height: 210px; right: 22%; top: 25%; }
.signal-b { width: 390px; height: 390px; right: 9%; top: 12%; animation-delay: -2s; }
.signal-c { width: 620px; height: 620px; right: -7%; top: -1%; animation-delay: -4s; border-color: rgba(116,167,255,.13); }
.visual-copy { position: absolute; left: 8%; bottom: 9%; display: grid; gap: 8px; }
.visual-copy span { color: var(--accent); font: 700 12px/1 monospace; }
.visual-copy strong { font-size: clamp(26px, 4vw, 52px); letter-spacing: -.04em; }
.visual-copy small { color: var(--muted); letter-spacing: .08em; }
@keyframes pulse { 0%,100% { opacity: .5; transform: rotate(45deg) scale(.98); } 50% { opacity: 1; transform: rotate(45deg) scale(1.03); } }

.button { border: 0; border-radius: 8px; min-height: 42px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 13px; cursor: pointer; transition: transform .18s, background .18s, border-color .18s, opacity .18s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.button.primary { background: var(--accent); color: #03110f; box-shadow: 0 10px 32px rgba(77,224,210,.12); }
.button.primary:hover { background: #70eadf; }
.button.secondary { background: var(--surface-3); border: 1px solid var(--line); }
.button.ghost { background: transparent; border: 1px solid var(--line); color: #c9d3df; }
.button.danger { background: rgba(255,109,122,.1); color: #ffadb4; border: 1px solid rgba(255,109,122,.24); }
.button.small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.icon-button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; border-radius: 7px; cursor: pointer; color: var(--muted); }
.icon-button:hover { color: var(--text); border-color: #3a475a; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 258px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 258px; background: #090c11; border-right: 1px solid var(--line-soft); padding: 24px 16px 18px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px 22px; border-bottom: 1px solid var(--line-soft); }
.main-nav { padding: 18px 0; display: grid; gap: 4px; }
.main-nav a { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 11px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
.main-nav a:hover { color: var(--text); background: rgba(255,255,255,.035); }
.main-nav a.active { color: var(--text); background: rgba(77,224,210,.07); box-shadow: inset 2px 0 var(--accent); }
.nav-symbol { width: 20px; color: var(--muted-2); text-align: center; font-size: 16px; }
.main-nav a.active .nav-symbol { color: var(--accent); }
.sidebar-projects { min-height: 0; flex: 1; padding-top: 12px; border-top: 1px solid var(--line-soft); overflow: hidden; display: flex; flex-direction: column; }
.sidebar-section-title { display: flex; align-items: center; justify-content: space-between; padding: 0 7px 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .13em; font-size: 10px; font-weight: 800; }
#sidebar-project-list { overflow-y: auto; display: grid; gap: 2px; padding-right: 3px; }
.sidebar-project { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 10px; min-height: 38px; padding: 0 8px; border-radius: 7px; color: #aeb9c7; font-size: 12px; }
.sidebar-project:hover, .sidebar-project.active { background: rgba(255,255,255,.035); color: var(--text); }
.project-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.project-dot.active { background: var(--success); box-shadow: 0 0 10px rgba(102,214,154,.5); }
.sidebar-project small { color: var(--muted-2); font: 700 9px/1 monospace; }
.sidebar-footer { padding-top: 12px; border-top: 1px solid var(--line-soft); position: relative; }
.connection-state { color: var(--muted-2); font-size: 10px; display: flex; align-items: center; gap: 7px; padding: 0 8px 10px; }
.connection-state span { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }
.connection-state.online span { background: var(--success); box-shadow: 0 0 8px rgba(102,214,154,.5); }
.user-card { width: 100%; border: 0; background: transparent; border-radius: 8px; padding: 9px 8px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.user-card:hover { background: rgba(255,255,255,.035); }
.user-card strong { display: block; font-size: 12px; }
.user-card small { display: block; color: var(--muted); margin-top: 2px; font-size: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, rgba(77,224,210,.22), rgba(116,167,255,.18)); border: 1px solid rgba(77,224,210,.22); display: grid; place-items: center; color: #c8fffa; font-size: 11px; font-weight: 800; }
.avatar.tiny { width: 26px; height: 26px; border-radius: 7px; font-size: 9px; }
.avatar.micro { width: 20px; height: 20px; border-radius: 6px; font-size: 8px; }
.chevron { color: var(--muted-2); }
.popover { position: absolute; left: 8px; right: 8px; bottom: 64px; padding: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); }
.popover button { width: 100%; border: 0; background: transparent; text-align: left; border-radius: 6px; padding: 9px 10px; cursor: pointer; color: #d6dee8; }
.popover button:hover { background: rgba(255,255,255,.05); }

.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 12; min-height: 91px; padding: 20px clamp(22px, 3.3vw, 52px); display: flex; justify-content: space-between; align-items: center; background: rgba(7,9,13,.88); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line-soft); }
.breadcrumb { margin: 0 0 5px; color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.topbar-actions { display: flex; gap: 9px; }
.view { padding: 30px clamp(22px, 3.3vw, 52px) 60px; max-width: 1800px; margin: 0 auto; }

.page-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 30px; }
.page-intro h2 { margin: 0; font-size: clamp(26px, 3vw, 40px); letter-spacing: -.04em; }
.page-intro p { margin: 10px 0 0; color: var(--muted); line-height: 1.6; max-width: 680px; }
.meta-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 7px; color: #cdd6e1; font-size: 11px; font-weight: 700; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.status.active::before { background: var(--success); box-shadow: 0 0 9px rgba(102,214,154,.45); }
.status.paused::before { background: var(--warning); }
.status.completed::before { background: var(--accent-2); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; background: var(--surface); }
.stat { min-height: 116px; padding: 22px; border-right: 1px solid var(--line); display: grid; align-content: space-between; }
.stat:last-child { border-right: 0; }
.stat span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .11em; }
.stat strong { font-size: 34px; letter-spacing: -.04em; font-weight: 650; }
.stat small { color: var(--muted-2); }

.layout-two { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); gap: 22px; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.section + .section { margin-top: 22px; }
.section-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 18px; border-bottom: 1px solid var(--line-soft); }
.section-header h3 { margin: 0; font-size: 13px; letter-spacing: .01em; }
.section-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.section-body { padding: 18px; }
.section-body.flush { padding: 0; }
.text-button { border: 0; background: transparent; color: var(--accent); cursor: pointer; padding: 6px; font-size: 12px; font-weight: 700; }

.project-table { width: 100%; border-collapse: collapse; }
.project-table th { padding: 10px 18px; color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; text-align: left; border-bottom: 1px solid var(--line-soft); }
.project-table td { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 12px; }
.project-table tr:last-child td { border-bottom: 0; }
.project-table tbody tr { cursor: pointer; transition: background .15s; }
.project-table tbody tr:hover { background: rgba(255,255,255,.022); }
.project-name { display: grid; gap: 4px; }
.project-name strong { font-size: 13px; }
.project-name small { color: var(--muted); max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code { font: 700 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); letter-spacing: .06em; }
.progress { height: 5px; background: #1a2230; border-radius: 6px; overflow: hidden; min-width: 100px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.progress-label { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; color: var(--muted); font-size: 10px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -7px; box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }

.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.activity-item:first-child { padding-top: 0; }
.activity-item:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-item p { margin: 1px 0 4px; color: #c9d2dd; font-size: 12px; line-height: 1.45; }
.activity-item small { color: var(--muted-2); font-size: 10px; }
.activity-time { color: var(--muted-2); font-size: 9px; white-space: nowrap; padding-top: 4px; }
.empty { min-height: 210px; display: grid; place-items: center; text-align: center; padding: 35px; color: var(--muted); }
.empty strong { display: block; color: #dce3eb; margin-bottom: 7px; }
.empty p { margin: 0 0 18px; max-width: 380px; line-height: 1.55; }

.project-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.project-heading { display: flex; gap: 18px; align-items: flex-start; }
.project-code-box { width: 52px; height: 52px; border: 1px solid rgba(77,224,210,.25); background: rgba(77,224,210,.055); display: grid; place-items: center; border-radius: 10px; color: var(--accent); font: 800 10px/1 monospace; letter-spacing: .06em; }
.project-header h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.035em; }
.project-header p { margin: 0; color: var(--muted); max-width: 720px; line-height: 1.55; }
.project-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.project-tabs button { border: 0; background: transparent; color: var(--muted); min-height: 44px; padding: 0 14px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 12px; font-weight: 700; }
.project-tabs button:hover { color: var(--text); }
.project-tabs button.active { color: var(--text); border-color: var(--accent); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr); gap: 22px; }
.project-pulse { padding: 24px; min-height: 230px; background: radial-gradient(circle at 85% 15%, rgba(77,224,210,.08), transparent 26%), var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pulse-head { display: flex; align-items: center; justify-content: space-between; }
.pulse-head span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .14em; }
.pulse-score { font-size: 54px; letter-spacing: -.06em; margin: 33px 0 10px; }
.pulse-score small { font-size: 18px; color: var(--muted-2); }
.big-progress { height: 7px; background: #19212d; overflow: hidden; }
.big-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.pulse-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin-top: 12px; }
.metric-list { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-soft); margin: 24px -24px -24px; }
.metric-list > div { padding: 17px; border-right: 1px solid var(--line-soft); }
.metric-list > div:last-child { border-right: 0; }
.metric-list strong { display: block; font-size: 18px; }
.metric-list span { color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.task-compact { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.task-compact:last-child { border-bottom: 0; }
.priority-line { width: 3px; height: 30px; border-radius: 2px; background: var(--muted-2); }
.priority-line.high { background: var(--warning); }
.priority-line.urgent { background: var(--danger); }
.task-compact strong { display: block; font-size: 12px; margin-bottom: 4px; }
.task-compact small { color: var(--muted); font-size: 10px; }
.member-list { display: grid; gap: 11px; }
.member-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; }
.member-row strong { display: block; font-size: 12px; }
.member-row small { color: var(--muted); font-size: 10px; }
.role-badge { color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 4px 7px; font-size: 9px; }

.board { display: grid; grid-template-columns: repeat(4, minmax(255px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.board-column { min-width: 255px; background: #0a0e14; border: 1px solid var(--line); border-radius: 10px; min-height: 490px; }
.board-column.drag-over { border-color: rgba(77,224,210,.6); background: rgba(77,224,210,.025); }
.board-head { min-height: 48px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.board-head strong { font-size: 11px; }
.board-head span { color: var(--muted-2); font-size: 10px; }
.board-tasks { padding: 9px; display: grid; gap: 8px; align-content: start; min-height: 430px; }
.task-card { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 13px; cursor: grab; transition: transform .15s, border-color .15s, background .15s; }
.task-card:hover { transform: translateY(-1px); border-color: #354154; background: #141b26; }
.task-card.dragging { opacity: .4; }
.task-card-header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.task-card .task-code { color: var(--muted-2); font: 700 9px/1 ui-monospace, monospace; }
.priority { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.priority.high { color: var(--warning); }
.priority.urgent { color: #ff9099; }
.task-card h4 { margin: 0 0 7px; font-size: 12px; line-height: 1.4; }
.task-card p { margin: 0 0 13px; color: var(--muted); font-size: 10px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.task-card-footer { display: flex; align-items: center; justify-content: space-between; color: var(--muted-2); font-size: 9px; }
.task-card-footer .assignee { display: flex; align-items: center; gap: 6px; }
.board-add { width: 100%; border: 1px dashed #2a3443; background: transparent; color: var(--muted); border-radius: 7px; min-height: 36px; cursor: pointer; }
.board-add:hover { color: var(--text); border-color: #415064; }

.docs-layout { min-height: 620px; display: grid; grid-template-columns: 230px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.docs-nav { border-right: 1px solid var(--line); padding: 13px; background: #0a0e14; }
.docs-nav button { width: 100%; border: 0; background: transparent; color: var(--muted); text-align: left; border-radius: 7px; padding: 11px 10px; cursor: pointer; font-size: 11px; font-weight: 700; }
.docs-nav button:hover, .docs-nav button.active { background: rgba(255,255,255,.04); color: var(--text); }
.doc-area { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.doc-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line-soft); }
.doc-toolbar strong { font-size: 13px; }
.doc-toolbar small { display: block; color: var(--muted); margin-top: 3px; }
.doc-editor { width: 100%; min-height: 560px; border: 0; border-radius: 0; background: transparent; padding: 25px clamp(20px, 4vw, 55px); font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; color: #d8e0ea; resize: none; box-shadow: none !important; }

.git-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 22px; }
.repo-connect { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.repo-identity { display: flex; align-items: center; gap: 12px; }
.repo-symbol { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--surface-3); border-radius: 8px; display: grid; place-items: center; font: 800 14px/1 monospace; }
.repo-identity strong { display: block; font-size: 12px; }
.repo-identity small { color: var(--muted); }
.commit-list { display: grid; }
.commit { display: grid; grid-template-columns: 8px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.commit:last-child { border-bottom: 0; }
.commit-dot { width: 7px; height: 7px; border: 1px solid var(--accent); border-radius: 50%; margin-top: 5px; }
.commit strong { display: block; font-size: 11px; font-weight: 650; line-height: 1.45; }
.commit small { color: var(--muted); font-size: 9px; }
.commit code { color: var(--accent); font-size: 9px; }
.branch-list { display: grid; gap: 8px; }
.branch { border: 1px solid var(--line-soft); background: #0b0f15; border-radius: 7px; padding: 10px; display: flex; justify-content: space-between; gap: 10px; font: 10px/1.4 ui-monospace, monospace; }
.branch span:last-child { color: var(--muted-2); }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.checkbox-list { display: grid; gap: 8px; }
.check-row { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: center; padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 7px; }
.check-row input { width: auto; }
.check-row strong { font-size: 11px; }
.check-row small { display: block; color: var(--muted); font-size: 9px; }
.danger-zone { border-color: rgba(255,109,122,.25); }
.danger-zone .section-header { border-color: rgba(255,109,122,.15); }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.team-card { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 17px; display: grid; grid-template-columns: 42px 1fr; gap: 13px; }
.team-card .avatar { width: 42px; height: 42px; }
.team-card h3 { margin: 2px 0 4px; font-size: 13px; }
.team-card p { margin: 0; color: var(--muted); font-size: 10px; }
.team-card footer { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; justify-content: space-between; color: var(--muted-2); font-size: 9px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.68); backdrop-filter: blur(7px); display: grid; place-items: center; padding: 20px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: #0d121a; border: 1px solid #2a3546; border-radius: 13px; box-shadow: var(--shadow); }
.modal.wide { width: min(760px, 100%); }
.modal-header { min-height: 67px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.modal-close { width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.modal-body { padding: 21px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 20px; border-top: 1px solid var(--line); }
.inline-error { color: #ff9ca5; font-size: 11px; margin-top: 12px; }

.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 8px; width: min(360px, calc(100vw - 44px)); }
.toast { background: #141b25; border: 1px solid #2c394b; border-left: 3px solid var(--accent); padding: 13px 14px; border-radius: 9px; box-shadow: var(--shadow); animation: toast-in .24s ease-out; font-size: 12px; line-height: 1.45; }
.toast.error { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.loading { min-height: 350px; display: grid; place-items: center; color: var(--muted); }
.loader { width: 28px; height: 28px; border: 2px solid #273243; border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .layout-two, .overview-grid, .git-grid, .settings-grid { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(4, 280px); }
}
@media (max-width: 780px) {
  .auth-view { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { padding: 120px 25px 50px; border-right: 0; }
  .auth-brand { left: 25px; }
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; padding: 12px 15px; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { border: 0; padding: 0; }
  .brand small, .sidebar-projects, .sidebar-footer .connection-state, .user-card span:not(.avatar), .chevron { display: none; }
  .main-nav { margin-left: auto; padding: 0; display: flex; }
  .main-nav a { width: 40px; padding: 0; justify-content: center; }
  .main-nav a { font-size: 0; }
  .nav-symbol { font-size: 16px; }
  .sidebar-footer { padding: 0 0 0 8px; border: 0; }
  .user-card { display: block; padding: 0; }
  .workspace { min-width: 0; }
  .topbar { top: 64px; min-height: 78px; padding: 15px 18px; }
  .topbar-actions .secondary { display: none !important; }
  .view { padding: 23px 18px 45px; }
  .page-intro, .project-header { align-items: flex-start; flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 17px; min-height: 100px; }
  .stat strong { font-size: 28px; }
  .project-table th:nth-child(3), .project-table td:nth-child(3), .project-table th:nth-child(4), .project-table td:nth-child(4) { display: none; }
  .metric-list { grid-template-columns: 1fr 1fr; }
  .metric-list > div:nth-child(2) { border-right: 0; }
  .metric-list > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .docs-nav button { white-space: nowrap; width: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .modal-backdrop { padding: 10px; }
}
