@font-face {
  font-family: system-ui;
  src: local("Inter");
}
* {
  box-sizing: border-box;
}
:root {
  --brand: #01c0c8;
  --brand-dark: #007f87;
  --bg: #f4f7fa;
  --panel: #fff;
  --text: #182c3c;
  --muted: #738391;
  --line: #e5ecf0;
  --soft: #e8f9f9;
  --shadow: 0 14px 40px #1534450b;
  --danger: #e25166;
  --green: #17886d;
  --amber: #b37816;
  color-scheme: light;
}
body.dark {
  --bg: #101b26;
  --panel: #182734;
  --text: #edf5fb;
  --muted: #9aafbf;
  --line: #2b3d4b;
  --soft: #153e44;
  --shadow: 0 14px 40px #0002;
  color-scheme: dark;
}
body {
  margin: 0;
  font:
    14px/1.55 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  transition:
    background 0.16s,
    transform 0.16s;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:active {
  transform: translateY(1px);
}
a {
  color: var(--brand-dark);
}
button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 10px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
button:hover {
  background: var(--soft);
}
button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #033b40;
  font-weight: 700;
}
button.danger {
  color: var(--danger);
}
button.ghost {
  border-color: transparent;
  background: transparent;
}
button.small {
  font-size: 12px;
  padding: 6px 9px;
}
.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.app-shell {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 28px 19px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 36px;
}
.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.brand strong {
  font-size: 17px;
  letter-spacing: -0.5px;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.nav-caption {
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
}
.nav {
  display: grid;
  gap: 7px;
}
.nav button {
  justify-content: flex-start;
  border: 0;
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 550;
}
.nav button.active {
  background: var(--soft);
  color: var(--brand-dark);
}
body.dark .nav button.active {
  color: var(--brand);
}
.sidebar-bottom {
  margin-top: auto;
}
.sidebar-note {
  background: var(--soft);
  padding: 17px;
  border-radius: 14px;
  margin-bottom: 22px;
  font-size: 12px;
  color: var(--muted);
}
.sidebar-note strong {
  color: var(--text);
  display: block;
  margin-bottom: 5px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 5px 0;
  border-top: 1px solid var(--line);
}
.profile small {
  display: block;
  color: var(--muted);
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  flex: none;
}
.main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 80px;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.breadcrumb {
  color: var(--muted);
  font-size: 12px;
}
.breadcrumb b {
  color: var(--text);
  font-weight: 500;
}
.top-actions,
.row,
.toolbar,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.top-actions select {
  padding: 7px;
  width: auto;
  border: 0;
}
.notification-count {
  background: var(--danger);
  color: white;
  font-size: 10px;
  min-width: 16px;
  border-radius: 10px;
}
.content {
  padding: 32px 36px 60px;
  max-width: 1800px;
  margin: auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 8px;
}
h1 {
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 0 0 10px;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0 0 14px;
}
p {
  margin: 8px 0;
}
.muted {
  color: var(--muted);
}
.page-head p {
  margin: 0;
  color: var(--muted);
}
.welcome {
  background: linear-gradient(110deg, #084951, #08777e);
  border-radius: 18px;
  padding: 28px 30px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  overflow: hidden;
}
.welcome p {
  color: #b4e1e3;
  max-width: 540px;
}
.welcome .eyebrow {
  color: #77dfe1;
}
.welcome img {
  width: 100px;
  opacity: 0.5;
  margin-right: 20px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin-bottom: 26px;
}
.stat {
  padding: 20px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 14px;
  display: block;
}
.stat .row {
  justify-content: space-between;
}
.stat .stat-icon {
  padding: 8px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--brand-dark);
}
.stat strong {
  font-size: 30px;
  display: block;
  letter-spacing: -1px;
  margin: 12px 0 3px;
}
.stat small {
  color: var(--muted);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 23px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.panel-body {
  padding: 22px;
}
.toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  gap: 9px;
}
.toolbar .search {
  flex: 1;
  min-width: 170px;
  max-width: 360px;
}
.toolbar input,
.toolbar select {
  width: auto;
  max-width: 220px;
}
.toolbar input.search {
  width: 100%;
  max-width: 360px;
}
.filters {
  padding: 14px 20px;
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.filters label {
  font-size: 11px;
}
.filters select,
.filters input {
  max-width: 170px;
}
.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.segmented button {
  padding: 6px 9px;
  border: 0;
  background: none;
  font-size: 12px;
}
.segmented button.active {
  background: var(--panel);
  box-shadow: 0 2px 4px #0001;
  color: var(--brand-dark);
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
  background: var(--bg);
  padding: 13px 19px;
}
td {
  padding: 16px 19px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
tbody tr:hover {
  background: var(--soft);
}
td .sub {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.company-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}
.company-cell button {
  padding: 0;
  border: 0;
  background: none;
  font-weight: 650;
  text-align: left;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 650;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--brand-dark);
  white-space: nowrap;
}
.badge.critical,
.badge.blocked,
.badge.cancelled {
  background: #feecee;
  color: #b83950;
}
.badge.high,
.badge.waiting,
.badge.approval {
  background: #fff4dc;
  color: #956214;
}
.badge.done,
.badge.won {
  background: #e6f8ef;
  color: #168060;
}
.badge.progress {
  background: #eaf0fe;
  color: #426dc4;
}
.badge.low {
  background: #eef1f4;
  color: #657682;
}
.pagination {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 55px 20px;
}
.empty .icon {
  width: 38px;
  height: 38px;
  color: var(--brand);
  margin-bottom: 12px;
}
.empty strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 5px;
}
.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.task-row:last-child {
  border: 0;
}
.task-row .grow {
  flex: 1;
  min-width: 0;
}
.task-row small {
  display: block;
  color: var(--muted);
}
.task-row.critical {
  border-left: 3px solid var(--danger);
}
.task-row[draggable="true"] {
  cursor: grab;
}
.task-row .handle {
  color: var(--muted);
}
.check {
  width: 21px;
  height: 21px;
  padding: 0;
  border-radius: 50%;
}
.timeline-item {
  position: relative;
  padding: 0 0 24px 31px;
  border-left: 1px solid var(--line);
  margin-left: 10px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -10px;
  top: 0;
  width: 20px;
  height: 20px;
  border: 5px solid var(--panel);
  border-radius: 50%;
  background: var(--brand);
}
.timeline-item small {
  color: var(--muted);
  font-size: 11px;
}
.timeline-item p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.kanban {
  display: flex;
  overflow: auto;
  gap: 15px;
  padding: 20px;
  min-height: 420px;
  align-items: flex-start;
}
.kanban-col {
  flex: 0 0 245px;
  background: var(--bg);
  border-radius: 12px;
  padding: 12px;
  min-height: 310px;
  border: 1px solid transparent;
}
.kanban-col.drag-over {
  border-color: var(--brand);
  background: var(--soft);
}
.kanban-title {
  display: flex;
  justify-content: space-between;
  margin: 4px 3px 15px;
  font-weight: 650;
  font-size: 12px;
}
.kanban-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 15px;
  margin-bottom: 10px;
  cursor: grab;
  box-shadow: 0 2px 5px #00004;
}
.kanban-card strong {
  display: block;
  font-size: 13px;
}
.kanban-card small {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}
.kanban-card .row {
  justify-content: space-between;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.member-card {
  padding: 22px;
}
.member-card .avatar {
  width: 46px;
  height: 46px;
  font-size: 18px;
  margin-bottom: 13px;
}
.member-card p {
  white-space: pre-wrap;
  line-height: 1.7;
}
.member-card footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 20px;
}
.tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.tabs button {
  border: 0;
  background: none;
  color: var(--muted);
}
.tabs button.active {
  background: var(--panel);
  color: var(--brand-dark);
  box-shadow: var(--shadow);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--panel);
  transition: border 0.2s;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #01c0c833;
  border-color: var(--brand);
}
textarea {
  min-height: 100px;
  resize: vertical;
}
input[type="checkbox"] {
  display: inline-block;
  width: auto;
  accent-color: var(--brand);
}
input[type="color"] {
  height: 43px;
  padding: 4px;
}
select[multiple] {
  min-height: 100px;
}
.field {
  margin-bottom: 17px;
}
.field small {
  font-size: 11px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.check-label {
  display: flex;
  gap: 9px;
  align-items: center;
  font-weight: 450;
}
.form-error {
  color: var(--danger);
  font-size: 13px;
  margin: 10px 0;
  white-space: pre-wrap;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
.backdrop {
  position: fixed;
  inset: 0;
  background: #08192370;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(3px);
}
.modal {
  width: 680px;
  max-width: 100%;
  max-height: 92vh;
  overflow: auto;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: 0 30px 90px #0003;
}
.modal.large {
  width: 1020px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 2;
}
.modal-body {
  padding: 25px;
}
.modal-head button {
  padding: 5px;
  border: 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 25px;
}
.detail-grid .info {
  background: var(--bg);
  border-radius: 12px;
  padding: 20px;
}
.info dt {
  color: var(--muted);
  font-size: 11px;
  margin-top: 15px;
}
.info dd {
  margin: 3px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.info dt:first-child {
  margin-top: 0;
}
.detail-section {
  margin: 20px 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.prewrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.permission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg);
  padding: 15px;
  border-radius: 10px;
  max-height: 290px;
  overflow: auto;
}
.permission-grid label {
  font-size: 11px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-brand {
  background: linear-gradient(140deg, #073b45, #057a80);
  padding: 8vw;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-brand img {
  width: 100px;
  margin-bottom: 25px;
}
.login-brand h1 {
  font-size: 45px;
  max-width: 480px;
  line-height: 1.18;
}
.login-brand p {
  color: #bee7e8;
  font-size: 17px;
  max-width: 420px;
}
.login-card {
  align-self: center;
  width: 390px;
  max-width: 90%;
  margin: 40px auto;
}
.login-card h1 {
  margin-bottom: 10px;
}
.login-card form {
  margin-top: 30px;
}
.login-card .primary {
  width: 100%;
}
.login-card footer {
  margin-top: 25px;
  color: var(--muted);
  font-size: 11px;
}
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}
.login-options button {
  font-size: 12px;
}
.boot {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.boot img {
  width: 60px;
}
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#loading {
  height: 3px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--brand);
  z-index: 99;
  animation: pulse 0.8s infinite alternate;
}
@keyframes pulse {
  to {
    opacity: 0.35;
  }
}
#toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: grid;
  gap: 10px;
}
.toast {
  background: var(--text);
  color: var(--panel);
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: var(--shadow);
  max-width: 400px;
}
.toast.error {
  background: var(--danger);
  color: #fff;
}
.mobile-menu {
  display: none;
}
.notice {
  background: var(--soft);
  border-radius: 10px;
  padding: 14px;
  margin: 15px 0;
}
.code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  word-break: break-all;
  padding: 14px;
  background: var(--bg);
  border-radius: 8px;
}
.wide-button {
  width: 100%;
}
.file-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.danger-zone {
  border: 1px solid #e2516650;
  padding: 18px;
  border-radius: 12px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.settings-grid .panel-body {
  padding: 24px;
}
.hidden {
  display: none !important;
}
.error-page {
  padding: 40px;
}
.pill {
  padding: 3px 8px;
  border-radius: 30px;
  border: 1px solid var(--line);
  font-size: 11px;
}
.progress-note {
  font-size: 11px;
  color: var(--muted);
  padding: 8px 20px;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
@media (min-width: 1550px) {
  .content {
    padding: 40px 50px;
  }
  .stats {
    gap: 22px;
  }
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .app-shell {
    grid-template-columns: 215px 1fr;
  }
  .sidebar {
    width: 215px;
    padding: 22px 12px;
  }
  .content {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .brand strong {
    font-size: 15px;
  }
  .detail-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 244px;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 0 100vw #0005;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .topbar {
    height: 65px;
    padding: 0 14px;
  }
  .breadcrumb {
    display: none;
  }
  .content {
    padding: 22px 14px;
  }
  .page-head {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  h1 {
    font-size: 25px;
  }
  .welcome {
    padding: 22px;
  }
  .welcome img {
    display: none;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .stat strong {
    font-size: 25px;
  }
  .settings-grid,
  .detail-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .backdrop {
    padding: 8px;
  }
  .modal {
    max-height: 96vh;
  }
  .modal-body {
    padding: 18px;
  }
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-brand {
    display: none;
  }
  .login-card {
    margin: 70px auto;
  }
  .toolbar {
    padding: 14px;
  }
  .toolbar .search {
    max-width: none;
  }
  .permission-grid {
    grid-template-columns: 1fr;
  }
  .top-actions {
    gap: 4px;
  }
  .top-actions button {
    padding: 7px;
  }
  .panel-head {
    padding: 16px;
  }
  .task-row {
    padding: 14px;
  }
  .task-row > .badge {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
