* {
  box-sizing: border-box;
}
:root {
  color-scheme: light;
  --ink: #172e4a;
  --muted: #52677c;
  --navy: #002470;
  --blue: #286ca6;
  --line: #dce5ed;
  --paper: #fff;
  --back: #f2f6fa;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--back);
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.58;
}
a {
  color: var(--blue);
}
:focus-visible {
  outline: 3px solid #4891cd;
  outline-offset: 3px;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.043em;
  font-weight: 650;
}
h2 {
  font-size: 1.32rem;
  letter-spacing: -0.028em;
  line-height: 1.25;
}
h3 {
  font-size: 1.05rem;
}
.brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
.brand img {display:block;object-fit:contain;flex:none}
.brand strong {
  font-size: 1rem;
  letter-spacing: 0.025em;
  white-space: nowrap;
}
.brand small,
.identity small {
  display: block;
  margin-top: 0.24rem;
  color: #c1d5e8;
  font-size: 0.81rem;
}
.sign-in {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) 1.05fr;
  background: #fff;
}
.brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 5.5rem);
  color: white;
  background: linear-gradient(150deg, #091e4c, #103470 75%, #305b89);
  min-height: 100%;
}
.brand-panel h1 {
  margin: clamp(4rem, 14vh, 10rem) 0 1.8rem;
  font-size: clamp(4.25rem, 8vw, 8.5rem);
  font-weight: 550;
  letter-spacing: -0.065em;
  line-height: 0.96;
}
.skyline {
  position: absolute;
  bottom: -1px;
  left: 8%;
  width: 95%;
  height: 43%;
  z-index: -1;
  opacity: 0.73;
  display: flex;
  align-items: flex-end;
  transform: skewY(-7deg);
  transform-origin: 100% 100%;
}
.skyline i {
  border: 1px solid #7d9bb8;
  background:
    repeating-linear-gradient(90deg, transparent 0 16px, #7390ad 16px 17px),
    repeating-linear-gradient(0deg, #42658a 0 10px, #274d74 10px 20px, #9bb0c4 20px 21px);
  height: 60%;
  width: 32%;
  border-top: 5px solid #92b0c5;
}
.skyline i:nth-child(2) {
  height: 94%;
  width: 43%;
}
.skyline i:nth-child(3) {
  height: 74%;
  width: 28%;
}
.login-column {
  align-self: center;
  justify-self: center;
  width: min(78%, 390px);
  padding: 3rem 0;
}
.login-form {
  display: grid;
  gap: 1.4rem;
}
.login-form h2 {
  font-size: 2.55rem;
  letter-spacing: -0.055em;
  margin-bottom: 0.65rem;
}
label {
  display: grid;
  gap: 0.44rem;
  font-size: 0.9rem;
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b6c6d6;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0.66rem 0.8rem;
  font-weight: 400;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
}
textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.4;
}
select {
  appearance: none;
  padding-right: 2.25rem;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23536b82' stroke-width='1.5'/%3E%3C/svg%3E")
    no-repeat right 0.8rem center;
}
.password {
  position: relative;
}
.password input {
  padding-right: 6.4rem;
}
.password button {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--blue);
  font-size: 0.87rem;
  font-weight: 600;
  padding: 0.5rem;
}
.btn,
.nav a,
.icon-button,
.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn,
.download {
  min-height: 42px;
  padding: 0.64rem 1rem;
  border-radius: 7px;
  border: 1px solid var(--line);
  font-size: 0.91rem;
  line-height: 1.28;
  font-weight: 600;
  background: white;
  color: var(--ink);
  text-decoration: none;
}
.btn:hover,
.download:hover {
  background: #edf4fa;
}
.btn.primary {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.btn.primary:hover {
  background: #294f7d;
}
.icon-button {
  border: 0;
  background: transparent;
  color: inherit;
  width: 38px;
  height: 38px;
  border-radius: 6px;
}
.icon-button:hover {
  background: #879caf26;
}
.workspace {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100svh;
}
.sidebar {
  background: #102e61;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1.55rem 1.1rem;
  position: sticky;
  top: 0;
  height: 100svh;
}
.sidebar .brand {
  padding: 0.18rem 0.35rem 2.4rem;
}
.nav {
  display: grid;
  gap: 0.28rem;
}
.nav a {
  justify-content: flex-start;
  min-height: 44px;
  border-radius: 7px;
  text-decoration: none;
  padding: 0.73rem 0.85rem;
  color: #d9e7f2;
  font-size: 0.96rem;
  gap: 0.78rem;
}
.nav a:hover {
  background: #244a76;
}
.nav a[aria-current="page"] {
  background: #e8f1f8;
  color: #193963;
  font-weight: 650;
}
.nav a[aria-current="page"] svg {
  color: #2c6795;
}
.identity {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.68rem;
  border-top: 1px solid #426083;
  padding: 0.95rem 0.1rem 0;
  min-width: 0;
}
.identity > div {
  flex: 1;
  min-width: 0;
}
.identity strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.93rem;
}
.identity small {
  line-height: 1.25;
}
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #c9e6d3;
  color: #234834;
  font-size: 0.8rem;
  font-weight: 750;
}
.workarea {
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1.2rem, 3vw, 3.2rem);
  min-height: 66px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}
.today {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.today svg {
  width: 16px;
  height: 16px;
}
#content {
  max-width: 1510px;
  margin: 0 auto;
  padding: clamp(1.5rem, 3.1vw, 3.3rem);
  outline: none;
}
.page-head,
.section-head,
.dialog-head,
.dialog-actions,
.pager,
.report-row,
.tools {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  justify-content: space-between;
}
.page-head {
  margin: 0 0 1.65rem;
  flex-wrap: wrap;
}
.page-head p {
  margin: 0.52rem 0 0;
  color: var(--muted);
}
.section-head {
  padding: 1.25rem 1.45rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}
.metric {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 0.9rem;
  min-height: 120px;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  text-align: left;
  color: var(--ink);
}
.metric:hover {
  border-color: #80a3c2;
}
.metric span {
  font-size: 0.9rem;
  color: var(--muted);
}
.metric b {
  font-size: clamp(1.65rem, 2.7vw, 2.6rem);
  overflow-wrap: anywhere;
  line-height: 1.05;
  font-weight: 630;
  letter-spacing: -0.055em;
}
.metric:first-child {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.metric:first-child span {
  color: #dceaf8;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.78fr);
  gap: 1.15rem;
  align-items: start;
}
.box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  overflow: hidden;
}
.full-box {
  margin-top: 1.2rem;
}
.funnel {
  display: grid;
  padding: 1.25rem 1.4rem;
  gap: 0.95rem;
}
.bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  font-size: 0.91rem;
}
.bar progress {
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 12px;
  background: #e8eff5;
  grid-column: span 2;
  overflow: hidden;
  color: #3d7bb4;
  appearance: none;
}
.bar progress::-webkit-progress-bar {
  background: #e8eff5;
}
.bar progress::-webkit-progress-value {
  background: var(--blue);
  border-radius: 12px;
}
.bar progress::-moz-progress-bar {
  background: var(--blue);
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  text-align: left;
}
th,
td {
  padding: 0.85rem 1.12rem;
  border-bottom: 1px solid #e6edf3;
  text-align: left;
  overflow-wrap: anywhere;
}
tbody tr:last-child td {
  border-bottom: 0;
}
th {
  font-size: 0.8rem;
  font-weight: 600;
  color: #52667c;
  background: #f8fafc;
  white-space: nowrap;
}
td.compact {
  white-space: nowrap;
}
.sub {
  display: block;
  font-size: 0.81rem;
  color: var(--muted);
  margin-top: 0.25rem;
  font-weight: 400;
}
.text-link {
  border: 0;
  background: none;
  color: #215e92;
  font: inherit;
  font-weight: 600;
  padding: 0;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.text-link:hover {
  text-decoration: underline;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 0.29rem 0.52rem;
  background: #e9eff4;
  color: #41566d;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}
.b-new,
.b-selection {
  background: #e7f1fc;
  color: #255a8b;
}
.b-working,
.b-viewing {
  background: #fff1d2;
  color: #77591e;
}
.b-qualified,
.b-won {
  background: #e4f2e1;
  color: #34613c;
}
.b-paperwork {
  background: #f0eafa;
  color: #685284;
}
.b-lost {
  background: #f3e7e8;
  color: #82444e;
}
.filters {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.filters .search {
  position: relative;
  flex: 1;
  min-width: 160px;
}
.search input {
  padding-left: 2.5rem;
}
.search svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  color: var(--muted);
}
.filters select {
  width: auto;
  min-width: 145px;
}
.filters input,
.filters select {
  min-height: 41px;
}
.filters .btn {
  min-height: 41px;
}
.empty {
  padding: 2.35rem 1.45rem;
  display: grid;
  gap: 0.5rem;
  justify-items: start;
}
.empty p {
  color: var(--muted);
  line-height: 1.45;
}
.empty .btn {
  margin-top: 0.45rem;
}
.pager,
.report-row {
  padding: 0.95rem 1.23rem;
  flex-wrap: wrap;
}
.pager {
  border-top: 1px solid var(--line);
  font-size: 0.89rem;
  color: var(--muted);
}
.pager .tools {
  margin-left: auto;
}
.report-row + .report-row {
  border-top: 1px solid var(--line);
}
.report-row strong {
  display: block;
}
.report-row small {
  color: var(--muted);
}
.download svg {
  width: 17px;
}
dialog {
  width: min(650px, calc(100% - 1.5rem));
  max-height: 90svh;
  padding: 0;
  border: 1px solid #bacbdc;
  border-radius: 13px;
  color: var(--ink);
  box-shadow: 0 18px 70px #112c4e44;
  overflow: auto;
}
dialog::backdrop {
  background: #142c46a8;
}
.dialog-head {
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 1.3rem;
}
.record-form,
.dialog-content {
  padding: 1.35rem;
  display: grid;
  gap: 1.1rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-section {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 0.9rem 0 0;
  margin: 0;
  min-width: 0;
}
.form-section legend {
  padding: 0 0.6rem 0 0;
  font-weight: 650;
  color: var(--muted);
  font-size: 0.86rem;
}
.dialog-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 1.05rem;
}
.dialog-actions .secondary-action {
  margin-right: auto;
}
.muted {
  color: var(--muted);
  line-height: 1.5;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.check input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--blue);
}
.form-error,
.failure {
  background: #fff1ef;
  border: 1px solid #f1c6c1;
  border-radius: 7px;
  padding: 0.8rem 1rem;
  color: #8a3031;
  line-height: 1.45;
}
.failure .btn {
  margin-top: 0.6rem;
}
.toast {
  position: fixed;
  bottom: 1.3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  max-width: 90vw;
  background: #163653;
  color: white;
  padding: 0.75rem 1.1rem;
  border-radius: 8px;
  box-shadow: 0 3px 20px #16365324;
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 214px minmax(0, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    padding: 1.3rem 0.8rem;
  }
  .topbar {
    min-height: 58px;
  }
  .metric {
    padding: 1rem;
    min-height: 105px;
  }
}
@media (max-width: 800px) {
  .workspace {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 0.65rem 1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
  }
  .sidebar .brand {
    padding: 0;
  }
  .sidebar .brand img {
    width: 45px;
    height: 45px;
  }
  .sidebar .brand small {
    display: none;
  }
  .identity {
    margin: 0;
    padding: 0;
    border: 0;
    grid-column: 2;
    grid-row: 1;
  }
  .identity .avatar,
  .identity > div {
    display: none;
  }
  #navigation {
    grid-column: 1/-1;
  }
  .nav {
    display: flex;
    overflow: auto;
  }
  .nav a {
    min-height: 36px;
    padding: 0.43rem 0.62rem;
    font-size: 0.875rem;
    white-space: nowrap;
  }
  .nav svg {
    width: 16px;
  }
  .topbar {
    min-height: 43px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    min-height: 87px;
  }
  .page-head {
    margin-bottom: 1.1rem;
  }
  .sign-in {
    grid-template-columns: minmax(240px, 0.8fr) 1fr;
  }
  .brand-panel {
    padding: 2rem;
  }
  .brand-panel h1 {
    font-size: 4rem;
  }
}
@media (max-width: 560px) {
  .sign-in {
    display: block;
  }
  .brand-panel {
    min-height: 102px;
    display:flex;align-items:center;gap:1rem;
    padding:1.2rem 1.4rem;
  }
  .brand-panel h1 {
    margin:0;
    font-size: 1.1rem;
    letter-spacing: 0;
    font-weight: 450;
  }
  .brand-panel .brand img {width:64px;height:64px}
  .brand-panel h1 br {
    display: none;
  }
  .brand-panel h1 br:after {
    content: " ";
  }
  .brand-panel .skyline {
    height: 74%;
    left: 62%;
    width: 45%;
  }
  .login-column {
    width: auto;
    padding: 2.6rem 1.45rem;
  }
  .login-form h2 {
    font-size: 2.05rem;
  }
  .topbar {
    font-size: 0.79rem;
  }
  .today {
    gap: 0.25rem;
  }
  #content {
    padding: 1.3rem 0.82rem;
  }
  .nav a {
    gap: 0.3rem;
  }
  .metrics {
    gap: 0.55rem;
  }
  .metrics .metric {
    padding: 0.85rem;
  }
  .section-head {
    padding: 0.95rem 1rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .filters {
    padding: 0.75rem;
  }
  .filters .search {
    flex-basis: 100%;
  }
  .filters select {
    flex: 1;
    min-width: 100px;
  }
  .dialog-actions > .btn {
    flex-grow: 1;
  }
  .dialog-actions .secondary-action {
    margin-right: 0;
  }
  th,
  td {
    padding: 0.72rem 0.8rem;
  }
  .dashboard-grid {
    gap: 0.75rem;
  }
  .login-form {
    gap: 1rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .btn,
  .nav a,
  .metric {
    transition:
      background 0.12s,
      border-color 0.12s;
  }
}
