html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  background: #eef2f5;
  color: #17202a;
  margin-bottom: 60px;
}

.app-chrome .navbar {
  margin-bottom: 0 !important;
}

.app-container {
  width: 100%;
}

.auth-nav {
  align-items: center;
  display: flex;
  gap: 12px;
}

.auth-nav span {
  color: #526a7b;
  font-size: .9rem;
}

.auth-nav a,
.auth-nav button {
  background: #15212e;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  font-weight: 700;
  padding: 8px 12px;
  text-decoration: none;
}

.auth-nav form {
  margin: 0;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - 118px);
}

.ops-sidebar {
  background: #15212e;
  color: #f5f8fb;
  padding: 24px 18px;
}

.brand-block {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-block span:last-child {
  color: #aebbc7;
  display: block;
  font-size: .82rem;
}

.brand-mark {
  align-items: center;
  background: #29b6a8;
  color: #0c171f;
  display: inline-flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.ops-sidebar nav {
  display: grid;
  gap: 6px;
}

.ops-sidebar a {
  border-radius: 6px;
  color: #d6dee6;
  padding: 10px 12px;
  text-decoration: none;
}

.ops-sidebar a.active,
.ops-sidebar a:hover {
  background: #223345;
  color: #ffffff;
}

.workspace-main {
  padding: 28px;
}

.workspace-header {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.workspace-header h1 {
  font-size: clamp(1.7rem, 2.4vw, 2.5rem);
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0;
  max-width: 780px;
}

.role-line {
  color: #607685;
  margin: 10px 0 0;
}

.eyebrow {
  color: #557081;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.header-actions,
.section-heading,
.card-topline,
.card-footer-line,
.work-card-meta,
.chip-row,
.column-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.primary-action,
.secondary-action,
.icon-button,
.segmented-control button {
  border: 0;
  border-radius: 6px;
  font-weight: 700;
}

.primary-action {
  background: #137c73;
  color: #ffffff;
  display: inline-block;
  padding: 11px 16px;
  text-decoration: none;
}

.auth-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 118px);
  padding: 32px 18px;
}

.auth-panel {
  background: #ffffff;
  border: 1px solid #d7e0e7;
  border-radius: 8px;
  max-width: 460px;
  padding: 28px;
  width: 100%;
}

.auth-brand {
  color: #17202a;
  margin-bottom: 24px;
}

.auth-panel h1 {
  font-size: 1.7rem;
  letter-spacing: 0;
  margin: 0 0 20px;
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-form label {
  color: #425869;
  font-weight: 700;
  margin-top: 8px;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  border: 1px solid #cbd8e0;
  border-radius: 6px;
  padding: 11px 12px;
}

.auth-form span,
.validation-summary {
  color: #b42318;
  font-size: .85rem;
}

.checkbox-line {
  align-items: center;
  display: flex;
  gap: 8px;
}

.checkbox-line input {
  height: 18px;
  width: 18px;
}

.auth-hint,
.auth-copy {
  background: #eef6f5;
  border: 1px solid #d4e9e6;
  border-radius: 8px;
  color: #315c58;
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 12px;
}

.auth-link {
  display: inline-block;
  margin-top: 16px;
  text-decoration: none;
}

.management-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

.management-shell.narrow {
  max-width: 780px;
}

.management-header {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.management-header h1 {
  font-size: 2rem;
  letter-spacing: 0;
  margin: 0;
}

.success-banner {
  background: #e8f6ef;
  border: 1px solid #c3e8d4;
  border-radius: 8px;
  color: #1d6842;
  font-weight: 700;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.row-actions {
  white-space: nowrap;
}

.row-actions a + a {
  margin-left: 12px;
}

.entity-form {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label {
  color: #425869;
  display: grid;
  font-weight: 700;
  gap: 7px;
}

.form-grid label.full-width {
  grid-column: 1 / -1;
}

.form-grid input,
.form-grid select {
  border: 1px solid #cbd8e0;
  border-radius: 6px;
  color: #17202a;
  padding: 11px 12px;
}

.form-grid select[multiple] {
  min-height: 180px;
  padding: 8px;
}

.board-filter-form {
  margin-bottom: 18px;
}

.form-grid small {
  color: #b42318;
  min-height: 18px;
}

.form-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.danger-zone h2 {
  font-size: 1.25rem;
  margin: 0 0 8px;
}

.danger-zone p {
  color: #607685;
}

.danger-action {
  background: #b42318;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  font-weight: 700;
  padding: 11px 16px;
}

.detail-list {
  display: grid;
  gap: 8px 16px;
  grid-template-columns: max-content 1fr;
  margin: 18px 0;
}

.detail-list dt {
  color: #607685;
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
}

.area-tree {
  display: grid;
  gap: 8px;
}

.area-node {
  align-items: center;
  border: 1px solid #e0e8ee;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  min-height: 56px;
  padding-right: 12px;
}

.node-main {
  display: grid;
  gap: 3px;
}

.node-main span {
  color: #607685;
  font-size: .86rem;
}

.node-meta {
  align-items: center;
  display: flex;
  gap: 12px;
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rich-editor-toolbar button {
  background: #edf3f6;
  border: 1px solid #cbd8e0;
  border-radius: 6px;
  color: #1d3a4a;
  font-weight: 700;
  min-width: 40px;
  padding: 6px 10px;
}

.rich-editor {
  background: #ffffff;
  border: 1px solid #cbd8e0;
  border-radius: 6px;
  min-height: 170px;
  padding: 12px;
}

.rich-editor:focus {
  border-color: #137c73;
  outline: none;
}

.rich-content img,
.rich-editor img {
  max-width: 100%;
}

.comment-thread {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.comment-card {
  border: 1px solid #dfe7ed;
  border-radius: 8px;
  padding: 12px;
}

.comment-card header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.comment-card header span {
  color: #607685;
  font-size: .82rem;
}

.secondary-action {
  background: #e4edf2;
  color: #1d3a4a;
  display: inline-block;
  padding: 9px 13px;
  text-decoration: none;
}

.icon-button {
  background: #ffffff;
  border: 1px solid #d3dee5;
  height: 42px;
  width: 42px;
}

.metric-grid,
.project-grid,
.area-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-grid {
  margin-bottom: 18px;
}

.metric-grid article,
.content-band,
.project-card,
.work-card {
  background: #ffffff;
  border: 1px solid #d7e0e7;
  border-radius: 8px;
}

.metric-grid article {
  padding: 16px;
}

.metric-grid span {
  color: #617789;
  display: block;
  font-size: .85rem;
}

.metric-grid strong {
  display: block;
  font-size: 1.9rem;
  line-height: 1;
  margin-top: 8px;
}

.content-band {
  margin-bottom: 18px;
  padding: 20px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: 1.2rem;
  margin: 0;
}

.section-heading.compact {
  align-items: flex-start;
}

.project-card {
  padding: 16px;
}

.project-actions {
  border-top: 1px solid #e2e9ee;
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
}

.project-actions a,
.row-actions a {
  color: #137c73;
  font-weight: 700;
  text-decoration: none;
}

.project-card h3,
.work-card h4,
.iteration-list h3,
.note-list h3,
.idea-list h3 {
  font-size: 1rem;
  margin: 10px 0 4px;
}

.project-card p,
.work-card p,
.iteration-list p,
.note-list p,
.idea-list p {
  color: #627587;
  margin: 0;
}

.health {
  color: #137c73;
  font-size: .85rem;
}

.progress-track {
  background: #e7edf2;
  height: 8px;
  margin: 16px 0 10px;
  overflow: hidden;
}

.progress-track span {
  background: #29b6a8;
  display: block;
  height: 100%;
}

.kanban-board {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  overflow-x: auto;
  padding-bottom: 4px;
}

.kanban-column {
  background: #f4f7f9;
  border: 1px solid #dce5eb;
  border-radius: 8px;
  min-height: 260px;
  padding: 12px;
}

.column-title h3 {
  font-size: .92rem;
  margin: 0;
}

.column-title span {
  background: #ffffff;
  border: 1px solid #d6e0e7;
  border-radius: 99px;
  color: #5d7281;
  min-width: 26px;
  padding: 2px 8px;
  text-align: center;
}

.work-card {
  margin-top: 10px;
  padding: 12px;
}

.work-card-meta,
.chip-row {
  color: #617789;
  font-size: .78rem;
}

.chip-row span,
.status-pill {
  background: #edf3f6;
  border-radius: 99px;
  color: #345366;
  padding: 4px 8px;
}

.segmented-control {
  background: #e8eff4;
  border-radius: 7px;
  display: inline-flex;
  padding: 3px;
}

.segmented-control button {
  background: transparent;
  color: #526a7b;
  padding: 7px 12px;
}

.segmented-control button.active {
  background: #ffffff;
  color: #102433;
}

.split-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr);
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e2e9ee;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #5e7383;
  font-size: .78rem;
  text-transform: uppercase;
}

.iteration-list,
.note-list,
.idea-list {
  display: grid;
  gap: 10px;
}

.iteration-list article,
.note-list article,
.idea-list article,
.area-grid article {
  background: #f7fafb;
  border: 1px solid #dfe7ed;
  border-radius: 8px;
  padding: 14px;
}

.iteration-list article,
.idea-list article {
  display: grid;
  gap: 6px 12px;
  grid-template-columns: 1fr auto;
}

.iteration-list article span,
.idea-list article span {
  color: #607685;
  grid-column: 1 / -1;
}

.note-list span,
.area-grid span {
  color: #607685;
  display: block;
  font-size: .84rem;
}

.area-grid article p {
  color: #607685;
  margin: 10px 0 0;
}

@media (max-width: 1120px) {
  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .ops-sidebar {
    display: none;
  }

  .metric-grid,
  .project-grid,
  .area-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .workspace-main {
    padding: 18px;
  }

  .workspace-header {
    display: block;
  }

  .header-actions {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .metric-grid,
  .project-grid,
  .area-grid {
    grid-template-columns: 1fr;
  }

  .content-band {
    padding: 16px;
  }

  .management-shell {
    padding: 18px;
  }

  .management-header,
  .form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
