:root {
  --ink: #10282a;
  --ink-soft: #2e4243;
  --muted: #7d8c8c;
  --green: #08765f;
  --green-dark: #075746;
  --green-soft: #e9f3ef;
  --cream: #f5f6f3;
  --line: #dfe5e2;
  --white: #fff;
  --gold: #e9b64e;
  --orange: #ef7b33;
  --red: #d1535b;
  --blue: #3d88ad;
  --sidebar: 292px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 38, 34, .025), 0 12px 34px rgba(11, 38, 34, .035);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

h1,
h2,
h3,
.brand {
  font-family: "Manrope", sans-serif;
}

h1 {
  margin: 7px 0 8px;
  font-size: clamp(28px, 2.1vw, 38px);
  line-height: 1.12;
  letter-spacing: -1.25px;
}

h2 {
  margin: 6px 0 20px;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -.45px;
}

p {
  color: var(--muted);
}

/* Application frame */

.shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar);
  padding: 31px 24px 24px;
  overflow: hidden auto;
  flex-direction: column;
  color: #f5fbf9;
  background:
    linear-gradient(180deg, rgba(4, 37, 42, .77), rgba(3, 39, 42, .91)),
    url("../img/zellige-mosaic.715893d3eac6.png") center / cover no-repeat;
  box-shadow: inset -1px 0 rgba(255, 255, 255, .12);
}

.sidebar::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 29, 34, .24), transparent 55%, rgba(0, 24, 28, .17));
  content: "";
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  color: #fff;
  font-size: 19px;
  letter-spacing: -.35px;
}

.sidebar > .brand {
  margin: 0 6px 44px;
}

.brand-mark {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 12px;
  background: linear-gradient(145deg, #f2ca6d, #dca238);
  box-shadow: 0 7px 20px rgba(0, 0, 0, .18);
  color: #17383a;
  font: 800 17px "Manrope", sans-serif;
}

.brand strong span {
  color: var(--gold);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar nav p {
  margin: 27px 12px 8px;
  color: rgba(222, 238, 233, .74);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.sidebar nav a {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 13px;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(238, 248, 245, .88);
  font-size: 14px;
  font-weight: 600;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.sidebar nav a:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, .09);
  color: #fff;
}

.sidebar nav a.active {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(1, 31, 35, .57);
  box-shadow: inset 3px 0 var(--gold), 0 8px 20px rgba(0, 0, 0, .11);
  color: #fff;
}

.sidebar nav svg,
.user-card button svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 23px 5px 0;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #f4cd72, #dca43f);
  color: #123235;
  font-weight: 800;
}

.user-identity {
  min-width: 0;
  flex: 1;
}

.user-identity strong,
.user-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-identity strong {
  color: #fff;
  font-size: 13px;
}

.user-identity small {
  margin-top: 2px;
  color: rgba(227, 242, 238, .7);
  font-size: 11px;
}

.user-card form {
  margin: 0;
}

.user-card button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(240, 249, 246, .85);
  cursor: pointer;
}

.user-card button:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.main {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  display: flex;
  height: 89px;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .95);
}

.topbar-context {
  display: flex;
  flex-direction: column;
}

.topbar-context small,
.eyebrow {
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.topbar-context b {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  text-transform: capitalize;
}

.help {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 16px;
  transition: border-color .18s ease, color .18s ease;
}

.help:hover {
  border-color: var(--green);
  color: var(--green);
}

.menu,
.nav-backdrop {
  display: none;
}

.content {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 46px 40px 58px;
}

/* Shared controls */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 31px;
}

.page-head p {
  margin: 0;
  font-size: 15px;
}

.dashboard-head {
  align-items: center;
}

.btn {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.btn.primary {
  background: linear-gradient(120deg, #0a7a62, #0c876c);
  box-shadow: 0 8px 22px rgba(8, 118, 95, .14);
  color: #fff;
}

.btn.primary:hover {
  background: linear-gradient(120deg, #086a56, #0a745e);
  box-shadow: 0 10px 25px rgba(8, 118, 95, .2);
}

.btn.dark {
  background: var(--ink);
  color: #fff;
}

.btn.light {
  border-color: #e5ebe8;
  background: #eff4f2;
  color: var(--green);
}

.btn.danger {
  border-color: #f4d9d6;
  background: #fceceb;
  color: #a43d3d;
}

.btn.danger:hover {
  background: #f8dcda;
}

.btn:disabled {
  transform: none;
  opacity: .45;
  cursor: not-allowed;
}

.wide {
  width: 100%;
}

.mosaic-btn {
  min-width: 215px;
  justify-content: space-between;
  border-color: rgba(255, 255, 255, .16);
  background:
    linear-gradient(90deg, rgba(1, 50, 53, .83), rgba(2, 52, 55, .74)),
    url("../img/zellige-mosaic.715893d3eac6.png") center 47% / 150% auto;
  box-shadow: 0 8px 22px rgba(6, 58, 55, .13);
  color: #fff;
}

.mosaic-btn:hover {
  box-shadow: 0 11px 28px rgba(6, 58, 55, .2);
}

input,
select,
textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #d7e0dc;
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #a1acab;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #3b9c83;
  box-shadow: 0 0 0 3px rgba(8, 118, 95, .1);
}

.alert {
  margin-bottom: 20px;
  padding: 13px 16px;
  border: 1px solid #cde8de;
  border-radius: 9px;
  background: #e7f5ef;
  color: #11634f;
}

.alert.error,
.errorlist {
  border-color: #f2d2ce;
  background: #fcebe9;
  color: #a03e3e;
}

.alert.warning {
  border-color: #f0d8ac;
  background: #fff4e2;
  color: #865c1e;
}

.errorlist {
  margin: 6px 0 0;
  padding: 9px 12px 9px 29px;
  border-radius: 7px;
  font-size: 12px;
}

/* Dashboard */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.kpi {
  position: relative;
  min-height: 171px;
  overflow: hidden;
  padding: 27px 24px 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease, transform .2s ease;
}

.kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(11, 38, 34, .07);
}

.kpi::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: #98aaa4;
  content: "";
}

.kpi.orange::before {
  background: var(--orange);
}

.kpi.blue::before {
  background: var(--blue);
}

.kpi.green::before {
  background: #19a276;
}

.kpi.red::before {
  background: var(--red);
}

.kpi small {
  color: #7b8989;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.kpi strong {
  display: block;
  margin: 18px 0 16px;
  color: #0f292b;
  font: 700 37px/1 "Manrope", sans-serif;
  letter-spacing: -1px;
}

.kpi a {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.kpi a span {
  display: inline-block;
  margin-left: 3px;
  transition: transform .18s ease;
}

.kpi a:hover span {
  transform: translateX(3px);
}

.kpi-icon {
  position: absolute;
  top: 21px;
  right: 21px;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 10px;
  background: #f4f6f5;
  color: var(--ink);
}

.kpi-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.panel-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, .8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.panel-title > a {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.rate {
  color: var(--green);
  font: 800 30px/1 "Manrope", sans-serif;
  letter-spacing: -1px;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 6px;
  background: #e9eeec;
}

.progress i {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0c7d64, #32a57f);
}

.money-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 27px;
}

.money-grid div + div {
  padding-left: 29px;
  border-left: 1px solid var(--line);
}

.money-grid small,
.mini-stats span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}

.money-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font: 700 22px "Manrope", sans-serif;
}

.money-grid em {
  font: 600 10px "DM Sans", sans-serif;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mini-stats div {
  padding: 18px 15px;
  border: 1px solid #edf0ef;
  border-radius: 10px;
  background: #f6f8f7;
}

.mini-stats b {
  display: block;
  margin-bottom: 7px;
  font: 700 24px/1 "Manrope", sans-serif;
}

/* Tables and list pages */

.table-panel {
  overflow: hidden;
  padding: 0;
}

.table-panel > .panel-title {
  padding: 28px 27px 10px;
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

th {
  padding: 13px 16px;
  border-block: 1px solid var(--line);
  background: #f8faf9;
  color: #7e8c8b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.15px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 16px;
  border-bottom: 1px solid #edf1ef;
  vertical-align: middle;
}

tbody tr {
  transition: background .15s ease;
}

tbody tr:hover {
  background: #fbfdfc;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.client-name {
  color: var(--ink);
  font-weight: 700;
}

.client-name:hover {
  color: var(--green);
}

.priority,
.status {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 6px;
  background: #edf3f0;
  color: #47675e;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.priority.urgent {
  background: #fce8e4;
  color: #b24b3f;
}

.priority.high {
  background: #fff0df;
  color: #af641f;
}

.priority.normal {
  background: #e9f0ed;
  color: #527065;
}

.priority.done {
  background: #dcf1e7;
  color: #23765d;
}

.priority.closed {
  background: #eceeed;
  color: #69736f;
}

.danger-text {
  color: var(--red) !important;
}

.muted,
.empty {
  color: var(--muted);
}

.empty {
  padding: 42px;
  text-align: center;
}

.arrow-btn {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  transition: background .16s ease, border-color .16s ease;
}

.arrow-btn:hover {
  border-color: #c8d9d3;
  background: var(--green-soft);
}

.period-tabs {
  display: flex;
  width: max-content;
  gap: 5px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.period-tabs a {
  padding: 8px 14px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.period-tabs a.active {
  background: var(--green);
  box-shadow: 0 4px 12px rgba(8, 118, 95, .15);
  color: #fff;
}

.filters {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) minmax(170px, 1fr) minmax(160px, 1fr) auto;
  gap: 10px;
  margin-bottom: 18px;
}

.filters:has(input[name="q"]:only-of-type) {
  grid-template-columns: minmax(280px, 1fr) auto;
}

.date-range-filters {
  grid-template-columns: minmax(190px, 260px) minmax(190px, 260px) auto auto;
  align-items: end;
}

.date-range-filters label span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.date-range-filters .btn {
  min-height: 43px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 21px;
}

.pagination .pagination-arrow {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--green);
  box-shadow: 0 4px 12px rgba(9, 55, 47, .06);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.pagination a.pagination-arrow:hover {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  transform: translateY(-1px);
}

.pagination .pagination-arrow.is-disabled {
  box-shadow: none;
  opacity: .35;
}

.pagination .pagination-status {
  min-width: 72px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* Detail pages and forms */

.back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 19px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 25px;
}

.detail-head h1 {
  margin-top: 13px;
}

.detail-head p {
  margin: 0;
}

.deadline {
  min-width: 205px;
  padding: 18px 23px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 11px;
  background:
    linear-gradient(90deg, rgba(2, 49, 50, .91), rgba(4, 67, 62, .86)),
    url("../img/zellige-mosaic.715893d3eac6.png") center / 200% auto;
  box-shadow: 0 10px 25px rgba(4, 61, 57, .12);
  color: #fff;
  text-align: right;
}

.deadline small,
.deadline b,
.deadline span {
  display: block;
}

.deadline small {
  color: #a8cec1;
  font-size: 9px;
  letter-spacing: 1.5px;
}

.deadline b {
  margin: 5px 0;
  font: 700 23px "Manrope", sans-serif;
}

.deadline span {
  color: #c5dcd5;
  font-size: 11px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, .65fr);
  gap: 18px;
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}

.field.full,
.full {
  grid-column: 1 / -1;
}

.field label,
.stack-form label,
.login-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.info-card dl {
  display: grid;
  grid-template-columns: minmax(105px, .7fr) minmax(0, 1fr);
  margin: 0 0 20px;
}

.info-card dt,
.info-card dd {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.info-card dt {
  color: var(--muted);
  font-size: 11px;
}

.info-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.delete-contract-link {
  margin-top: 9px;
}

.history {
  margin-top: 18px;
}

.timeline {
  margin-top: 20px;
}

.timeline article {
  position: relative;
  padding: 0 0 24px 29px;
  border-left: 1px solid #dbe5e1;
}

.timeline article:last-child {
  border-left-color: transparent;
}

.timeline article > i {
  position: absolute;
  top: 4px;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px #e9f3ef;
}

.timeline b,
.timeline span {
  display: block;
}

.timeline span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.timeline p {
  margin: 9px 0 4px;
  color: #455655;
}

.timeline small {
  color: var(--green);
}

.stack-form p {
  margin: 0 0 15px;
}

.delete-panel {
  max-width: 680px;
  margin: 30px auto 0;
}

.delete-panel h1 {
  margin: 10px 0;
}

.delete-warning {
  margin: 23px 0;
  padding: 16px;
  border: 1px solid #efd2a1;
  border-radius: 9px;
  background: #fff4e2;
  color: #7d501b;
}

.delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Imports */

.import-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.import-card {
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--green);
}

.import-card-upcoming {
  border-top-color: var(--orange);
}

.import-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.import-card-head h2 {
  max-width: 410px;
  margin-top: 7px;
}

.import-kind-icon {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 12px;
  background: #edf6f2;
  color: var(--green);
}

.import-card-upcoming .import-kind-icon {
  background: #fff3e6;
  color: #c96c22;
}

.import-kind-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.import-card-intro {
  min-height: 48px;
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.upload form {
  margin-bottom: 18px;
}

.dropzone {
  margin-bottom: 13px;
  padding: 34px 25px;
  border: 1.5px dashed #b4cbc2;
  border-radius: 12px;
  background: linear-gradient(145deg, #f7faf8, #f0f6f3);
  color: var(--green);
  font-size: 28px;
  text-align: center;
}

.dropzone-arrow {
  display: block;
  color: var(--green);
  font-size: 28px;
  line-height: 1;
}

.import-card-upcoming .dropzone-arrow {
  color: #c96c22;
}

.dropzone label,
.dropzone small {
  display: block;
  margin: 8px;
  color: var(--ink);
  font-size: 13px;
}

.dropzone small {
  color: var(--muted);
  font-size: 11px;
}

.dropzone input {
  margin-top: 11px;
}

.import-card-points {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.import-card-points span {
  padding: 5px 8px;
  border-radius: 6px;
  background: #f2f6f4;
  color: #60716f;
  font-size: 10px;
  font-weight: 700;
}

.import-guidance {
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 28px;
  margin-bottom: 18px;
  background: linear-gradient(110deg, #f6faf8, #fff);
}

.import-guidance h2 {
  margin-top: 7px;
}

.import-guidance p {
  margin: 0;
  color: #536563;
}

.import-history {
  margin-bottom: 18px;
}

.import-notes {
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

.import-notes b {
  color: var(--ink);
}

.import-notes p {
  margin: 5px 0 16px;
  font-size: 12px;
}

.import-list a {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.import-list a:hover b {
  color: var(--green);
}

.import-list b,
.import-list span {
  display: block;
}

.import-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.report .kpi {
  min-height: 120px;
}

.preview-messages {
  margin-bottom: 15px;
  padding: 15px 18px;
  border-radius: 9px;
}

.preview-messages b {
  display: block;
  margin-bottom: 7px;
}

.preview-messages ul {
  margin: 0;
  padding-left: 20px;
}

.preview-messages.warning {
  background: #fff3df;
  color: #8b5a1d;
}

.preview-messages.errors {
  background: #fbe8e6;
  color: #9f3d3d;
}

.preview-summary {
  display: flex;
  gap: 55px;
  margin-bottom: 16px;
}

.preview-summary small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}

.preview-summary .status {
  margin: 3px;
}

.preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* Login */

.auth-body {
  overflow: hidden;
  background: #fff;
}

.login-page {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(520px, 1.08fr) minmax(500px, .92fr);
  background: #fff;
}

.login-visual {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: center;
  overflow: hidden;
  padding: clamp(55px, 8vw, 150px);
  background:
    linear-gradient(110deg, rgba(4, 22, 27, .57), rgba(4, 28, 31, .33)),
    url("../img/zellige-mosaic.715893d3eac6.png") center / cover no-repeat;
  color: #fff;
}

.login-visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 15, 18, .08), rgba(0, 20, 23, .34));
  content: "";
}

.visual-content {
  position: relative;
  z-index: 1;
  width: min(100%, 630px);
}

.brand-light {
  margin-bottom: clamp(70px, 12vh, 120px);
}

.login-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(44px, 4.15vw, 66px);
  line-height: 1.06;
  letter-spacing: -2.7px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .2);
}

.login-hero h1 em {
  color: #f2bd52;
  font-style: normal;
}

.login-hero > p {
  max-width: 620px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, .92);
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.75;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .24);
}

.visual-stat {
  margin-top: 66px;
  padding-left: 18px;
  border-left: 2px solid var(--gold);
}

.visual-stat b,
.visual-stat span {
  display: block;
}

.visual-stat b {
  color: #fff;
  font-size: 14px;
}

.visual-stat span {
  margin-top: 5px;
  color: rgba(255, 255, 255, .8);
}

.login-form {
  display: grid;
  min-height: 100svh;
  padding: 48px;
  place-items: center;
  background:
    radial-gradient(circle at 15% 10%, rgba(8, 118, 95, .025), transparent 34%),
    #fff;
}

.login-form form {
  width: min(470px, 100%);
}

.login-form .eyebrow {
  display: inline-block;
  margin-bottom: 13px;
}

.login-form h2 {
  margin: 0 0 11px;
  color: #102528;
  font-size: clamp(31px, 2.3vw, 39px);
  letter-spacing: -1.35px;
}

.login-form form > p {
  margin: 0 0 39px;
  font-size: 16px;
}

.login-field {
  margin-top: 19px;
}

.login-field label {
  margin-bottom: 8px;
  color: #203233;
  font-size: 13px;
}

.login-field input {
  min-height: 59px;
  padding: 15px 16px;
  border-radius: 9px;
  font-size: 15px;
}

.login-submit {
  min-height: 55px;
  justify-content: center;
  margin-top: 28px;
  font-size: 14px;
}

.login-submit svg {
  position: absolute;
  margin-left: 140px;
}

.login-form footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 64px;
  color: #9aa7a4;
  font-size: 10px;
}

.secure-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5aa58e;
}

.mobile-brand {
  display: none;
}

/* Responsive layout */

@media (max-width: 1300px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(290px, .8fr);
  }
}

@media (min-width: 761px) and (max-width: 920px) {
  :root {
    --sidebar: 88px;
  }

  .sidebar {
    padding-inline: 14px;
  }

  .sidebar > .brand {
    margin-inline: auto;
  }

  .sidebar .brand strong,
  .sidebar nav a span,
  .sidebar nav p,
  .user-identity,
  .user-card form {
    display: none;
  }

  .sidebar nav a {
    justify-content: center;
  }

  .sidebar nav a.active {
    box-shadow: inset 0 3px var(--gold), 0 8px 20px rgba(0, 0, 0, .11);
  }

  .user-card {
    justify-content: center;
    padding-inline: 0;
  }
}

@media (max-width: 1050px) {
  .panel-row,
  .detail-grid,
  .import-choice-grid {
    grid-template-columns: 1fr;
  }

  .login-page {
    grid-template-columns: minmax(440px, .95fr) minmax(430px, 1.05fr);
  }

  .login-visual {
    padding: 55px;
  }

  .login-hero h1 {
    font-size: 45px;
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar: 0px;
  }

  body.nav-open {
    overflow: hidden;
  }

  .sidebar {
    width: 280px;
    padding: 27px 20px 22px;
    transform: translateX(-102%);
    transition: transform .22s ease;
  }

  .nav-open .sidebar {
    transform: none;
  }

  .sidebar > .brand {
    margin: 0 6px 37px;
  }

  .sidebar .brand strong,
  .sidebar nav a span,
  .sidebar nav p,
  .user-identity,
  .user-card form {
    display: block;
  }

  .sidebar nav a {
    justify-content: flex-start;
  }

  .sidebar nav a.active {
    box-shadow: inset 3px 0 var(--gold), 0 8px 20px rgba(0, 0, 0, .11);
  }

  .user-card {
    justify-content: flex-start;
    padding-inline: 5px;
  }

  .nav-backdrop {
    position: fixed;
    z-index: 40;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(7, 25, 26, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }

  .nav-open .nav-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    height: 75px;
    padding: 0 17px;
  }

  .menu {
    display: grid;
    width: 39px;
    height: 39px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
  }

  .menu svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
  }

  .topbar-context {
    margin-right: auto;
    margin-left: 13px;
  }

  .content {
    padding: 28px 15px 45px;
  }

  .page-head,
  .detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-head {
    margin-bottom: 25px;
  }

  .page-head .btn {
    width: 100%;
  }

  .kpi-grid,
  .panel-row,
  .money-grid,
  .form-grid,
  .import-guidance {
    grid-template-columns: 1fr;
  }

  .kpi {
    min-height: 154px;
  }

  .money-grid div + div {
    margin-top: 18px;
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .panel {
    padding: 21px 18px;
  }

  .table-panel {
    padding: 0;
  }

  .table-panel > .panel-title {
    padding: 22px 18px 8px;
  }

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

  .period-tabs {
    max-width: 100%;
    overflow: auto;
  }

  .deadline {
    width: 100%;
    text-align: left;
  }

  .info-card dl {
    grid-template-columns: 1fr;
  }

  .info-card dt {
    padding-bottom: 2px;
    border-bottom: 0;
  }

  .info-card dd {
    padding-top: 2px;
  }

  .delete-actions,
  .preview-summary,
  .preview-actions {
    flex-direction: column;
  }

  .delete-actions .btn,
  .preview-actions form,
  .preview-actions button {
    width: 100%;
  }

  .login-page {
    display: block;
    min-height: 100svh;
  }

  .login-visual {
    display: none;
  }

  .login-form {
    min-height: 100svh;
    padding: 32px 22px;
  }

  .mobile-brand {
    display: flex;
    margin-bottom: 55px;
    color: var(--ink);
  }

  .mobile-brand strong span {
    color: #d89d31;
  }

  .login-form h2 {
    font-size: 31px;
  }

  .login-form footer {
    margin-top: 46px;
  }
}

@media (max-width: 460px) {
  .topbar-context small {
    display: none;
  }

  .topbar-context b {
    margin: 0;
    font-size: 11px;
  }

  .help {
    width: 36px;
    height: 36px;
  }

  h1 {
    font-size: 29px;
  }

  .mini-stats {
    grid-template-columns: 1fr;
  }
}
