:root {
  --navy: #1a2530;
  --navy-light: #253240;
  --navy-soft: #314151;
  --orange: #e06c00;
  --orange-dark: #b85a00;
  --orange-soft: #fff4e8;
  --white: #fff;
  --page: #f5f7fa;
  --line: #e2e8f0;
  --muted: #667085;
  --text: #1a202c;
  --green: #20a66a;
  --red: #d94d5c;
  --blue: #3578c6;
  --shadow: 0 10px 30px rgba(26, 37, 48, .08);
  --shadow-hover: 0 16px 40px rgba(26, 37, 48, .13);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--text); font-family: Raleway, sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(224, 108, 0, .25); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: "Playfair Display", serif; color: var(--navy); }

.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 248px; padding: 26px 18px; display: flex; flex-direction: column; background: var(--navy); color: var(--white); box-shadow: 8px 0 30px rgba(18, 27, 36, .12); }
.brand { display: flex; align-items: center; gap: 13px; padding: 0 8px 30px; color: var(--white); text-decoration: none; }
.brand strong { display: block; font-family: "Playfair Display", serif; font-size: 19px; }
.brand small { display: block; margin-top: 2px; color: #aab5bf; font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; }
.logo { width: 38px; height: 38px; flex: 0 0 38px; overflow: hidden; border-radius: 10px; box-shadow: 0 7px 22px rgba(0, 0, 0, .22); }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo.large { width: 58px; height: 58px; margin: 0 auto; }

.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 9px; color: #bdc6ce; font-weight: 600; font-size: 12px; text-decoration: none; transition: .2s ease; }
.sidebar nav a span { width: 19px; color: #8f9ba6; font-size: 17px; text-align: center; }
.sidebar nav a b { margin-left: auto; padding: 2px 7px; border-radius: 99px; background: rgba(255,255,255,.1); color: #dce3e8; font-size: 9px; }
.sidebar nav a:hover { color: var(--white); background: rgba(255,255,255,.07); }
.sidebar nav a.active { color: var(--white); background: var(--orange); box-shadow: 0 8px 20px rgba(224, 108, 0, .24); }
.sidebar nav a.active span { color: var(--white); }
.sidebar-foot { margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.workspace-account { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.workspace-account strong, .workspace-account small { display: block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-account strong { color: var(--white); font-size: 11px; }
.workspace-account small { margin-top: 3px; color: #96a3ad; font-size: 9px; }
.server-state { display: flex; align-items: center; gap: 8px; color: #9eabb5; font-size: 10px; }
.server-state i, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px rgba(32,166,106,.5); }
.status-dot.error { background: var(--red); }
.text-button { padding: 10px 0 0; border: 0; background: none; color: #9eabb5; font-size: 10px; cursor: pointer; }
.text-button:hover { color: var(--orange); }

.main { min-height: 100vh; margin-left: 248px; padding: 0 34px 50px; }
.topbar { height: 94px; margin-bottom: 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.4px; }
.eyebrow { margin: 0; color: #8993a2; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.eyebrow.light { color: #ffd2aa; }
.top-actions { display: flex; align-items: center; gap: 11px; }
.date-chip { padding-right: 8px; color: var(--muted); font-size: 11px; text-transform: capitalize; }
.menu-button { display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--navy); cursor: pointer; }

.button { min-height: 37px; padding: 9px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 8px; color: var(--white); font-size: 11px; font-weight: 700; text-decoration: none; cursor: pointer; transition: .2s ease; }
.button.primary { background: var(--orange); box-shadow: 0 7px 18px rgba(224,108,0,.2); }
.button.primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.button.secondary { border-color: var(--line); background: var(--white); color: var(--navy); }
.button.secondary:hover { border-color: #c9d1dc; background: #f8fafc; }
.button.github { background: #24292f; }
.button.github:hover { background: #000; }
.button.wide { width: 100%; }
.icon-button, .close-button { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--navy); cursor: pointer; }
.icon-button { width: 32px; height: 32px; }
.close-button { width: 34px; height: 34px; font-size: 21px; }

.view { display: none; animation: enter .22s ease; }
.view.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } }

.hero { min-height: 235px; padding: 40px 44px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; border-radius: 18px; background: radial-gradient(circle at 82% 32%, rgba(224,108,0,.22), transparent 30%), linear-gradient(125deg, var(--navy), var(--navy-light)); box-shadow: var(--shadow); }
.hero h2 { margin: 11px 0 12px; color: var(--white); font-size: 37px; line-height: 1.12; letter-spacing: -1.2px; }
.hero h2 em { color: #f5a65e; font-style: normal; }
.hero p { max-width: 550px; margin: 0; color: #bdc7cf; line-height: 1.65; }
.hero-code { width: 245px; height: 122px; padding: 21px; position: relative; border: 1px solid rgba(255,255,255,.15); border-radius: 13px; background: rgba(9,15,21,.42); box-shadow: 0 18px 45px rgba(0,0,0,.2); transform: rotate(-2deg); }
.hero-code span { display: block; margin-bottom: 17px; color: #65d59e; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.hero-code code { color: #c7d0d8; font-size: 11px; }
.hero-code code b { color: var(--white); }
.hero-code i { position: absolute; left: 21px; right: 21px; bottom: 18px; height: 3px; border-radius: 4px; background: linear-gradient(90deg, var(--orange) 72%, rgba(255,255,255,.12) 72%); }

.stats { margin: 18px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat, .panel, .team-card, .repo-card, .rule-card, .github-panel, .activity-table { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 4px 15px rgba(26,37,48,.04); }
.stat { padding: 19px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.stat-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: var(--orange-soft); color: var(--orange); font-style: normal; }
.stat strong { display: block; margin: 12px 0 3px; color: var(--navy); font-family: "Playfair Display", serif; font-size: 27px; }
.stat small { color: #8993a2; font-size: 9px; }
.overview-grid { margin-bottom: 18px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }
.panel { padding: 21px; }
.panel-head { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; }
.panel-head h3 { margin: 5px 0 0; font-size: 16px; }
.panel-head a { color: var(--orange); font-size: 10px; font-weight: 700; text-decoration: none; }
.progress-row { margin-top: 15px; }
.progress-meta { margin-bottom: 7px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.progress-bar { height: 6px; overflow: hidden; border-radius: 20px; background: #edf0f4; }
.progress-bar i { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--orange), #ef9b4c); }
.stack-list { display: grid; gap: 9px; }
.repo-mini { padding: 11px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.repo-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: var(--navy); color: var(--white); }
.repo-mini strong, .run-row strong { display: block; color: var(--navy); font-size: 11px; }
.repo-mini small, .run-row small { color: #8993a2; font-size: 9px; }
.repo-mini .status-dot { margin-left: auto; }
.run-list { display: grid; }
.run-row { min-height: 49px; padding: 11px 4px; display: grid; grid-template-columns: 28px 1.3fr 1fr 120px; align-items: center; gap: 10px; border-top: 1px solid #edf0f4; }
.run-row:first-child { border-top: 0; }
.run-mark { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #e9f8f1; color: var(--green); font-size: 10px; font-style: normal; }
.run-mark.failed { background: #fff0f2; color: var(--red); }
.badge, .plan-pill { width: max-content; padding: 4px 8px; display: inline-flex; border-radius: 99px; background: #eef2f6; color: #5d6876; font-size: 8px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }

.section-tools { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-tools p { margin: 0; color: var(--muted); font-size: 11px; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(235px,1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.column { min-height: 500px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #edf1f5; }
.column-head { padding: 3px 4px 13px; display: flex; align-items: center; justify-content: space-between; }
.column-head h3 { margin: 0; color: var(--navy); font-family: Raleway, sans-serif; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.column-head b { padding: 2px 7px; border-radius: 99px; background: var(--white); color: var(--muted); font-size: 9px; }
.task-card { margin-bottom: 10px; padding: 14px; border: 1px solid #dce2e9; border-radius: 11px; background: var(--white); box-shadow: 0 4px 12px rgba(26,37,48,.05); cursor: grab; transition: .18s ease; }
.task-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.task-card.dragging { opacity: .45; }
.task-card h4 { margin: 9px 0 7px; font-family: Raleway, sans-serif; font-size: 12px; }
.task-card p { margin: 0 0 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.task-foot, .card-meta { display: flex; align-items: center; justify-content: space-between; color: #7d8795; font-size: 8px; }
.priority { width: 7px; height: 7px; margin-right: 5px; display: inline-block; border-radius: 50%; }
.priority.urgent, .priority.high { background: var(--red); }
.priority.medium { background: var(--orange); }
.priority.low { background: var(--blue); }

.team-grid, .repo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; }
.team-card, .repo-card, .rule-card { padding: 19px; transition: .2s ease; }
.team-card:hover, .repo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.team-card header, .repo-card header, .rule-card header { display: flex; justify-content: space-between; align-items: flex-start; }
.team-card h3, .repo-card h3, .rule-card h3 { margin: 0; font-size: 16px; }
.team-card p, .repo-card p, .rule-card p { color: var(--muted); font-size: 10px; line-height: 1.55; }
.team-color { width: 10px; height: 10px; border-radius: 50%; }
.member-role-list { margin: 14px 0; display: grid; gap: 7px; }
.member-role-list > div { display: grid; grid-template-columns: 30px 1fr 115px; align-items: center; gap: 8px; }
.member-role-list .avatar { margin: 0; }
.member-role-list strong { overflow: hidden; color: var(--navy); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.member-role-list select { min-width: 0; padding: 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--muted); font-size: 8px; }
.avatars { display: flex; margin: 15px 0; }
.avatar { width: 30px; height: 30px; margin-left: -5px; display: grid; place-items: center; border: 2px solid var(--white); border-radius: 50%; background: var(--navy-light); color: var(--white); font-size: 8px; font-weight: 700; }
.avatar:first-child { margin-left: 0; }
.card-meta { padding-top: 13px; border-top: 1px solid var(--line); }
.repo-card code { padding: 9px; display: block; overflow: hidden; border-radius: 7px; background: #f2f5f8; color: #5e6977; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.repo-actions { margin-top: 14px; display: flex; gap: 7px; }
.repo-actions .button { flex: 1; min-height: 32px; padding: 6px; }
.rule-list { display: grid; gap: 11px; }
.rule-card { display: grid; grid-template-columns: 1fr 160px 170px 80px; align-items: center; gap: 15px; }
.rule-card p { margin: 4px 0 0; }
.activity-table { overflow: hidden; }
.activity-table .run-row { padding: 14px 18px; grid-template-columns: 30px 1.2fr 1fr 130px 140px; }
.empty { padding: 28px; color: #8993a2; font-size: 11px; text-align: center; }

.github-panel { margin-bottom: 22px; padding: 22px; }
.github-intro { display: flex; align-items: center; gap: 14px; }
.github-intro h2 { margin: 3px 0; font-size: 21px; }
.github-intro p:last-child { margin: 0; color: var(--muted); font-size: 10px; }
.github-mark { width: 45px; height: 45px; display: grid; place-items: center; flex: 0 0 45px; border-radius: 50%; background: #24292f; color: var(--white); font-size: 11px; font-weight: 800; }
.github-actions { margin-top: -39px; display: flex; justify-content: flex-end; }
.github-browser { margin-top: 21px; padding-top: 18px; border-top: 1px solid var(--line); }
.github-profile { display: flex; align-items: center; gap: 10px; }
.github-profile img { width: 38px; height: 38px; border-radius: 50%; background: #edf1f5; }
.github-profile strong, .github-profile small { display: block; }
.github-profile strong { color: var(--navy); font-size: 11px; }
.github-profile small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.github-profile .plan-pill { margin-left: 8px; }
.github-profile .text-button { margin-left: auto; padding: 0; color: var(--orange-dark); }
.github-search { margin-top: 16px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.github-search input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.github-repos { margin-top: 12px; display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.github-repo { padding: 13px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.github-repo > div { min-width: 0; flex: 1; }
.github-repo strong, .github-repo small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.github-repo strong { color: var(--navy); font-size: 10px; }
.github-repo small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.github-repo .button { min-height: 30px; padding: 5px 9px; }

.file-manager, .chat-shell, .settings-card, .calendar-board, .agenda { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 4px 15px rgba(26,37,48,.04); }
.file-manager { overflow: hidden; }
.file-head, .file-row { padding: 12px 17px; display: grid; grid-template-columns: 1.6fr .8fr 100px 130px 100px; align-items: center; gap: 12px; }
.file-head { background: var(--navy); color: var(--white); font-size: 9px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.file-row { border-top: 1px solid var(--line); font-size: 10px; }
.file-row:first-child { border-top: 0; }
.file-row strong { color: var(--navy); }
.file-row span { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.file-actions { display: flex; justify-content: flex-end; gap: 5px; }
.file-actions button { min-height: 29px; padding: 5px 8px; }

.calendar-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; }
.calendar-board { padding: 18px; display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; }
.calendar-weekday { padding: 5px; color: var(--muted); font-size: 9px; font-weight: 700; text-align: center; text-transform: uppercase; }
.calendar-day { min-height: 105px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfc; }
.calendar-day.muted { opacity: .35; }
.calendar-day > b { color: var(--navy); font-size: 10px; }
.calendar-item { margin-top: 6px; padding: 5px 6px; overflow: hidden; border-left: 3px solid var(--orange); border-radius: 4px; background: var(--orange-soft); color: var(--navy); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.agenda { padding: 20px; }
.agenda h3 { margin: 5px 0 16px; }
.agenda-item { padding: 11px 0; display: grid; grid-template-columns: 42px 1fr; gap: 10px; border-top: 1px solid var(--line); }
.agenda-item:first-child { border-top: 0; }
.agenda-date { color: var(--orange); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.agenda-item strong, .agenda-item small { display: block; }
.agenda-item strong { color: var(--navy); font-size: 10px; }
.agenda-item small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.chat-shell { max-width: 900px; margin: 0 auto; overflow: hidden; }
.chat-shell > header { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.chat-shell h2 { margin: 4px 0 0; font-size: 18px; }
.status-live { padding: 5px 9px; border-radius: 99px; background: #e9f8f1; color: var(--green); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.chat-messages { height: 480px; padding: 20px; overflow-y: auto; background: #f8fafc; }
.chat-message { max-width: 72%; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px 11px 11px; background: var(--white); }
.chat-message.mine { margin-left: auto; border-color: #f3c69c; border-radius: 11px 4px 11px 11px; background: var(--orange-soft); }
.chat-message header { margin-bottom: 5px; display: flex; justify-content: space-between; gap: 15px; }
.chat-message strong { color: var(--navy); font-size: 9px; }
.chat-message time { color: var(--muted); font-size: 8px; }
.chat-message p { margin: 0; font-size: 10px; line-height: 1.55; white-space: pre-wrap; }
.chat-form { padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 9px; border-top: 1px solid var(--line); }
.chat-form textarea { resize: none; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }

.settings-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; }
.settings-card { padding: 21px; }
.settings-card.wide { grid-column: 1 / -1; }
.settings-card > p { margin: -7px 0 18px; color: var(--muted); font-size: 10px; }
.module-list { display: grid; gap: 8px; }
.module-row { padding: 11px 12px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 9px; }
.module-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: var(--orange-soft); color: var(--orange); }
.module-row strong, .module-row small { display: block; }
.module-row strong { color: var(--navy); font-size: 10px; }
.module-row small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.switch { width: 40px; height: 22px; margin-left: auto; position: relative; border: 0; border-radius: 99px; background: #ccd4dc; cursor: pointer; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); transition: .18s; }
.switch.on { background: var(--orange); }
.switch.on::after { left: 21px; }
.module-config { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; }
.module-config + .switch { margin-left: 0; }
.workflow-editor { margin-bottom: 14px; display: grid; gap: 8px; }
.workflow-step { padding: 9px; display: grid; grid-template-columns: 30px 1fr 110px 80px 30px; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; }
.workflow-step .handle { color: #9aa4b1; text-align: center; cursor: grab; }
.workflow-step input[type=text] { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 7px; }
.workflow-step input[type=color] { width: 36px; height: 31px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; }
.workflow-step label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.workflow-step .remove-step { border: 0; background: none; color: var(--red); cursor: pointer; }
.role-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.role-card { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.role-card header { display: flex; align-items: center; gap: 8px; }
.role-card i { width: 9px; height: 9px; border-radius: 50%; }
.role-card h4 { margin: 0; font-family: Raleway,sans-serif; font-size: 11px; }
.permission-list { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.permission-list span { padding: 3px 6px; border-radius: 5px; background: #eef2f6; color: var(--muted); font-size: 7px; }
.permission-fieldset { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 1px solid var(--line); border-radius: 9px; }
.permission-fieldset legend { padding: 0 5px; color: var(--navy); font-size: 10px; font-weight: 700; }
.permission-fieldset label { display: flex; align-items: center; gap: 7px; }
.permission-fieldset input { width: auto; }

.login-screen { position: fixed; inset: 0; z-index: 100; padding: 20px; display: grid; place-items: center; background: radial-gradient(circle at 50% 20%, rgba(224,108,0,.18), transparent 31%), var(--navy); }
.login-card { width: min(410px,100%); padding: 35px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: var(--white); box-shadow: 0 28px 80px rgba(0,0,0,.3); text-align: center; }
.login-card h1 { margin: 12px 0 8px; font-size: 26px; }
.login-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.form-error { min-height: 16px; margin-top: 8px; color: var(--red); font-size: 10px; }

dialog { width: min(525px,calc(100% - 30px)); padding: 0; border: 0; background: transparent; color: var(--text); }
dialog::backdrop { background: rgba(17,27,36,.72); backdrop-filter: blur(3px); }
.modal-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: 0 25px 70px rgba(0,0,0,.24); }
.modal-card header { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-card h2 { margin: 4px 0 0; font-size: 19px; }
.modal-card > div { padding: 20px 22px; display: grid; gap: 14px; }
.modal-card footer { padding: 15px 22px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: #fafbfc; }
.modal-card label { display: grid; gap: 7px; color: #596473; font-size: 10px; font-weight: 700; }
.modal-card input, .modal-card select, .modal-card textarea { width: 100%; padding: 10px 11px; border: 1px solid #d8dee7; border-radius: 8px; background: var(--white); color: var(--text); outline: none; }
.modal-card input:focus, .modal-card select:focus, .modal-card textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(224,108,0,.09); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 80; padding: 12px 16px; border-radius: 9px; background: var(--navy); color: var(--white); box-shadow: 0 12px 30px rgba(0,0,0,.22); font-size: 10px; opacity: 0; transform: translateY(80px); transition: .2s; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: #7f2630; }

@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2,1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .team-grid, .repo-grid { grid-template-columns: repeat(2,1fr); }
  .hero-code { display: none; }
  .rule-card { grid-template-columns: 1fr 120px 130px; }
  .github-repos { grid-template-columns: 1fr; }
  .calendar-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card.wide { grid-column: auto; }
  .role-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: .22s ease; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; padding: 0 16px 35px; }
  .topbar { height: 78px; }
  .menu-button { display: block; }
  .topbar > div:first-of-type { margin-right: auto; margin-left: 10px; }
  .date-chip { display: none; }
  .top-actions .button { width: 37px; padding: 0; overflow: hidden; font-size: 0; }
  .top-actions .button:first-letter { font-size: 16px; }
  .hero { min-height: 215px; padding: 28px 24px; }
  .hero h2 { font-size: 29px; }
  .stats, .team-grid, .repo-grid { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(4,280px); }
  .rule-card { grid-template-columns: 1fr; }
  .run-row, .activity-table .run-row { grid-template-columns: 28px 1fr 90px; }
  .run-row > *:nth-child(3), .activity-table .run-row > *:nth-child(3) { display: none; }
  .section-tools { align-items: flex-start; }
  .section-tools p { max-width: 55%; }
  .form-grid { grid-template-columns: 1fr; }
  .github-actions { margin: 15px 0 0; justify-content: flex-start; }
  .github-profile { flex-wrap: wrap; }
  .github-profile .text-button { margin-left: 0; }
  .file-head { display: none; }
  .file-row { grid-template-columns: 1fr auto; }
  .file-row span:nth-child(2), .file-row span:nth-child(3), .file-row span:nth-child(4) { display: none; }
  .calendar-board { overflow-x: auto; grid-template-columns: repeat(7,110px); }
  .settings-grid, .role-grid { grid-template-columns: 1fr; }
  .workflow-step { grid-template-columns: 25px 1fr 55px 30px; }
  .workflow-step label { display: none; }
}

/* GitHub x Devlynx professional theme */
:root {
  --navy: #0d1117;
  --navy-light: #161b22;
  --navy-soft: #21262d;
  --orange: #e66a00;
  --orange-dark: #bd5700;
  --orange-soft: #fff1e5;
  --page: #f6f8fa;
  --line: #d0d7de;
  --muted: #57606a;
  --text: #24292f;
  --blue: #0969da;
  --green: #1a7f37;
  --red: #cf222e;
  --shadow: 0 1px 0 rgba(27,31,36,.04), 0 3px 12px rgba(27,31,36,.08);
  --shadow-hover: 0 8px 24px rgba(140,149,159,.2);
  --radius: 8px;
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 14px; }
h1, h2, h3, h4 { font-family: inherit; font-weight: 600; letter-spacing: -.02em; }
.sidebar { width: 260px; padding: 20px 14px; background: #0d1117; border-right: 1px solid #30363d; box-shadow: none; }
.main { margin-left: 260px; padding: 0 32px 48px; }
.brand { padding: 0 8px 22px; }
.brand strong { font-family: inherit; font-size: 16px; }
.brand small { color: #8b949e; letter-spacing: .8px; }
.logo { width: 34px; height: 34px; flex-basis: 34px; border-radius: 7px; box-shadow: none; }
.sidebar nav { gap: 2px; }
.sidebar nav a { padding: 8px 10px; border-radius: 6px; color: #c9d1d9; font-size: 12px; font-weight: 500; }
.sidebar nav a:hover { background: #21262d; }
.sidebar nav a.active { background: #21262d; box-shadow: inset 3px 0 var(--orange); }
.sidebar nav a.active::after { content: ''; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--orange); }
.sidebar nav a.active b { margin-left: 0; }
.topbar { height: 74px; margin-bottom: 24px; }
.topbar h1 { font-size: 20px; }
.eyebrow { color: #6e7781; font-size: 8px; letter-spacing: 1.1px; }
.button { min-height: 32px; padding: 6px 12px; border-radius: 6px; font-size: 11px; box-shadow: 0 1px 0 rgba(27,31,36,.1); }
.button.primary { background: var(--orange); box-shadow: 0 1px 0 rgba(27,31,36,.1); }
.button.secondary { border-color: rgba(27,31,36,.15); background: #f6f8fa; }
.hero { min-height: 205px; padding: 34px 38px; border: 1px solid #30363d; border-radius: 10px; background: radial-gradient(circle at 82% 35%, rgba(230,106,0,.2), transparent 28%), linear-gradient(120deg,#0d1117,#161b22); box-shadow: var(--shadow); }
.hero h2 { font-size: 32px; }
.hero-code { border-color: #30363d; border-radius: 6px; background: #0d1117; transform: none; }
.stat, .panel, .team-card, .repo-card, .rule-card, .github-panel, .activity-table, .file-manager, .chat-shell, .settings-card, .calendar-board, .agenda { border-radius: 8px; box-shadow: none; }
.stat:hover, .panel:hover, .team-card:hover, .repo-card:hover { border-color: #afb8c1; box-shadow: var(--shadow); transform: none; }
.stat strong { font-family: inherit; font-size: 24px; }
.stat-icon { border: 1px solid #ffd8b5; border-radius: 6px; }
.column { border-radius: 8px; background: #eef1f4; }
.task-card { border-radius: 6px; box-shadow: none; }
.task-card:hover { border-color: #8c959f; box-shadow: var(--shadow); transform: none; }
.badge, .plan-pill { border: 1px solid #d8dee4; border-radius: 20px; background: #f6f8fa; }
.repo-card code { border: 1px solid #d8dee4; border-radius: 6px; background: #f6f8fa; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.github-panel { border-color: #afb8c1; }
.github-mark { border-radius: 50%; background: #24292f; }
.github-repo { border-radius: 6px; background: #fff; }
.modal-card { border-radius: 8px; }
.modal-card header { background: #f6f8fa; }
.close-button, .icon-button { border-radius: 6px; }
.settings-grid { gap: 16px; }
.settings-card { padding: 18px; }
.workflow-step, .module-row, .role-card { border-radius: 6px; }
.workflow-log { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; }
.workflow-log-row { min-height: 62px; padding: 11px 13px; display: grid; grid-template-columns: 28px minmax(0,1fr) 160px; align-items: center; gap: 10px; border-top: 1px solid var(--line); background: #fff; }
.workflow-log-row:first-child { border-top: 0; }
.workflow-log-row:hover { background: #f6f8fa; }
.log-icon { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #d8dee4; border-radius: 50%; background: #f6f8fa; color: var(--orange); font-size: 10px; font-weight: 700; }
.log-main { min-width: 0; }
.log-main > div { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.log-main strong { color: #24292f; font-size: 10px; }
.log-main p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.log-transition { padding: 3px 7px; border-radius: 20px; background: var(--orange-soft); color: var(--orange-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; }
.log-transition b { margin: 0 3px; }
.log-meta { text-align: right; }
.log-meta strong, .log-meta time { display: block; }
.log-meta strong { color: #24292f; font-size: 9px; }
.log-meta time { margin-top: 3px; color: #8c959f; font-size: 8px; }
.audit-count { color: #6e7781; font-size: 9px; }
.activity-section { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.permission-fieldset { background: #f6f8fa; }
.toast { border: 1px solid #30363d; border-radius: 6px; background: #24292f; }

@media (max-width: 760px) {
  .main { margin-left: 0; }
  .workflow-log-row { grid-template-columns: 28px 1fr; }
  .log-meta { grid-column: 2; text-align: left; }
}
