:root {
  --green:#236343;
  --green-hover:#184b32;
  --green-soft:#edf5ef;
  --brown:#554532;
  --sand:#eee5d8;
  --red:#be2932;
  --bg:#f7f8f5;
  --surface:#fff;
  --text:#26382e;
  --muted:#738077;
  --border:#e3e8e1;
  --shadow:0 4px 24px #20332704;
  --sidebar:#173f2c;
  --focus:#bd8e3b;
  color-scheme:light;
}

[data-theme=dark] {
  --green:#90c7a3;
  --green-hover:#b4ddc1;
  --green-soft:#253d30;
  --brown:#ddcbb1;
  --sand:#3f392e;
  --red:#f68a90;
  --bg:#152019;
  --surface:#1d2b22;
  --text:#e3ede5;
  --muted:#a3b5a8;
  --border:#34463a;
  --shadow:none;
  --sidebar:#101c14;
  color-scheme:dark;
}

* {
  box-sizing:border-box;
}

html {
  scroll-behavior:smooth;
  scroll-padding-top:90px;
}

body {
  margin:0;
  font-family:'Segoe UI',Arial,sans-serif;
  font-size:14px;
  line-height:1.6;
  background:var(--bg);
  color:var(--text);
}

button,input {
  font:inherit;
}

button,a,input {
  touch-action:manipulation;
}

button {
  cursor:pointer;
}

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

button:disabled {
  cursor:not-allowed;
  opacity:.5;
}

[hidden] {
  display:none!important;
}

h1,h2,h3,p {
  margin:0;
}

button:focus-visible,a:focus-visible,input:focus-visible,.table-wrap:focus-visible {
  outline:3px solid var(--focus);
  outline-offset:4px;
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
}

.skip-link {
  position:fixed;
  top:-100px;
  left:16px;
  padding:10px;
  background:var(--surface);
  z-index:20;
}

.skip-link:focus {
  top:10px;
}

.sidebar {
  width:238px;
  position:fixed;
  inset:0 auto 0 0;
  background:var(--sidebar);
  color:#e7efe8;
  padding:38px 24px;
  display:flex;
  flex-direction:column;
}

.brand {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  padding:0 16px 36px;
  border-bottom:1px solid #ffffff18;
}




.workspace-label {
  font-size:9px;
  letter-spacing:1.9px;
  color:#99b5a3;
  margin:34px 14px 14px;
}

.nav-link {
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-radius:8px;
  color:#b8ccbe;
  margin-bottom:6px;
  font-size:13px;
}

.nav-link>span:first-child {
  font-size:19px;
}

.nav-link.active,.nav-link:hover {
  background:#ffffff0e;
  color:#fff;
}

.nav-link.active {
  box-shadow:inset 3px 0 #b8cfa4;
}

.nav-count {
  margin-left:auto;
  background:#ffffff14;
  font-size:10px;
  border-radius:5px;
  padding:0 7px;
}

.sidebar-bottom {
  margin-top:auto;
  display:flex;
  align-items:flex-start;
  gap:10px;
  font-size:12px;
  padding:20px 12px 0;
  border-top:1px solid #ffffff18;
}

.sidebar-bottom small {
  display:block;
  font-size:10px;
  color:#9eb6a5;
  margin-top:3px;
}

.sidebar-dot {
  width:7px;
  height:7px;
  background:#b8cfa4;
  border-radius:50%;
  margin-top:7px;
}

.app-shell {
  margin-left:238px;
}

.topbar {
  height:76px;
  background:var(--surface);
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 44px;
}

.breadcrumb {
  color:var(--muted);
  font-size:12px;
}

.breadcrumb span {
  margin:0 14px;
  color:var(--border);
}

.breadcrumb strong {
  font-weight:500;
  color:var(--text);
}

.topbar-actions {
  display:flex;
  gap:20px;
  align-items:center;
}

.internal-tag {
  font-size:10px;
  color:var(--muted);
  border-right:1px solid var(--border);
  padding-right:20px;
}

.icon-button {
  width:32px;
  height:32px;
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:22px;
  border-radius:8px;
}

.icon-button:hover {
  background:var(--green-soft);
}

.avatar {
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:50%;
  background:var(--sand);
  color:var(--brown);
  font-size:10px;
  font-weight:700;
}

main {
  max-width:1500px;
  margin:auto;
  padding:42px 44px 0;
}

.page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:30px;
}

.eyebrow {
  color:var(--green);
  font-size:9px;
  letter-spacing:2px;
  font-weight:700;
  margin-bottom:8px;
}

h1 {
  font-size:clamp(24px,2.4vw,34px);
  font-weight:650;
  line-height:1.3;
  letter-spacing:-1px;
}

h1>span {
  color:var(--red);
}

.subtitle {
  color:var(--muted);
  font-size:13px;
  margin-top:9px;
}

.status-badge {
  font-size:10px;
  border:1px solid var(--border);
  background:var(--surface);
  border-radius:20px;
  padding:7px 12px;
  display:flex;
  gap:7px;
  align-items:center;
  white-space:nowrap;
  color:var(--green);
}

.status-dot {
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
}

.status-badge.warning {
  color:var(--brown);
}

.notice {
  border:1px solid var(--sand);
  background:var(--sand);
  color:var(--brown);
  padding:12px 18px;
  border-radius:10px;
  font-size:12px;
  margin-bottom:20px;
}

.notice strong {
  margin-right:5px;
}

.overview {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  padding:22px 0;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  margin-bottom:30px;
}

.overview>div {
  display:flex;
  align-items:center;
  gap:13px;
  padding:0 24px;
  border-right:1px solid var(--border);
}

.overview>div:first-child {
  padding-left:0;
}

.overview>div:last-child {
  border:0;
}

.overview-icon {
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:10px;
  font-size:20px;
  flex-shrink:0;
}

.green {
  background:var(--green-soft);
  color:var(--green);
}

.sand {
  background:var(--sand);
  color:var(--brown);
}

.red {
  background:#be29320d;
  color:var(--red);
}

.overview small {
  color:var(--muted);
  font-size:10px;
  display:block;
}

.overview strong {
  font-size:12px;
  font-weight:600;
}

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

.content-grid {
  display:grid;
  grid-template-columns:minmax(300px,.85fr) minmax(0,1.4fr);
  gap:24px;
}

.panel {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:var(--shadow);
  overflow:hidden;
  min-width:0;
}

.panel-header {
  display:flex;
  align-items:center;
  gap:12px;
  padding:24px;
  border-bottom:1px solid var(--border);
}

.step-label {
  border:1px solid var(--border);
  color:var(--muted);
  border-radius:7px;
  padding:4px 8px;
  font-size:10px;
  font-weight:600;
}

.panel-header h2 {
  font-size:15px;
  font-weight:650;
}

.panel-header p {
  font-size:11px;
  color:var(--muted);
  margin-top:3px;
}

.file-tag {
  margin-left:auto;
  color:var(--green);
  background:var(--green-soft);
  font-size:9px;
  letter-spacing:1px;
  font-weight:700;
  padding:4px 8px;
  border-radius:4px;
}

form {
  padding:24px;
}

fieldset {
  border:0;
  padding:0;
  margin:0;
  min-width:0;
}

.field-label,label {
  display:block;
  font-size:11px;
  font-weight:600;
  margin-bottom:8px;
}

.presets {
  display:flex;
  gap:8px;
  margin-bottom:24px;
}

.presets button {
  flex:1;
  border:1px solid var(--border);
  background:var(--surface);
  border-radius:7px;
  padding:8px 6px;
  color:var(--muted);
  font-size:11px;
}

.presets button:hover,.presets button.selected {
  background:var(--green-soft);
  border-color:var(--green);
  color:var(--green);
}

.date-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

input {
  width:100%;
  min-width:0;
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px;
  color:var(--text);
  background:var(--bg);
  font-size:12px;
}

.period-summary {
  font-size:10px;
  color:var(--muted);
  margin-top:10px;
}

.filter-note {
  display:flex;
  gap:9px;
  background:var(--bg);
  padding:13px;
  border-radius:8px;
  margin:25px 0 22px;
  color:var(--muted);
  font-size:11px;
}

.filter-note>span {
  color:var(--green);
  font-size:15px;
}

.button {
  border-radius:8px;
  border:1px solid transparent;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:11px 17px;
  font-size:12px;
  font-weight:600;
}

.primary {
  background:var(--green);
  color:var(--surface);
  width:100%;
}

.primary:hover:enabled {
  background:var(--green-hover);
}

.secondary {
  background:var(--surface);
  border-color:var(--border);
  color:var(--green);
}

.secondary:hover {
  background:var(--green-soft);
}

.shortcut {
  text-align:center;
  font-size:9px;
  color:var(--muted);
  margin-top:10px;
}

.empty-state {
  min-height:330px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:28px;
}

.empty-state h3 {
  font-size:16px;
  font-weight:600;
  margin-top:26px;
}

.empty-state p {
  color:var(--muted);
  font-size:12px;
  margin-top:8px;
  max-width:390px;
  overflow-wrap:anywhere;
}

.empty-caption {
  color:var(--muted);
  font-size:8px;
  letter-spacing:1.3px;
  margin-top:25px;
}

.document-illustration {
  position:relative;
  width:79px;
  height:96px;
  border:1px solid var(--border);
  background:var(--bg);
  border-radius:8px;
  padding:23px 14px 12px;
  box-shadow:8px 8px 0 var(--green-soft);
  transform:rotate(-5deg);
}

.document-fold {
  position:absolute;
  right:0;
  top:0;
  border-left:17px solid var(--border);
  border-top:17px solid var(--surface);
}

.document-line {
  display:block;
  width:75%;
  height:4px;
  border-radius:2px;
  background:var(--border);
  margin-bottom:6px;
}

.document-line.short {
  width:50%;
}

.document-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:3px;
  margin-top:11px;
}

.document-grid i {
  height:9px;
  background:var(--green-soft);
  border-radius:2px;
}

.document-check {
  position:absolute;
  right:-15px;
  bottom:-8px;
  background:var(--green);
  color:var(--surface);
  width:28px;
  height:28px;
  border:4px solid var(--surface);
  border-radius:50%;
  font-size:12px;
}

.result-state {
  padding:24px;
}

.result-summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.result-summary small {
  display:block;
  color:var(--muted);
  font-size:11px;
}

.result-summary strong {
  font-size:36px;
  color:var(--green);
  line-height:1.4;
}

#result-period {
  font-size:11px;
  margin:8px 0 18px;
}

.table-wrap {
  overflow:auto;
  border:1px solid var(--border);
  border-radius:8px;
  max-height:310px;
}

table {
  border-collapse:collapse;
  width:100%;
  font-size:11px;
  white-space:nowrap;
}

th,td {
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  text-align:left;
  max-width:260px;
  overflow:hidden;
  text-overflow:ellipsis;
}

th {
  background:var(--bg);
  color:var(--muted);
  font-weight:600;
  position:sticky;
  top:0;
}

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

tbody tr:hover {
  background:var(--green-soft);
}

.preview-note {
  font-size:10px;
  color:var(--muted);
  margin-top:12px;
}

.spinner {
  width:35px;
  height:35px;
  border:3px solid var(--border);
  border-top-color:var(--green);
  border-radius:50%;
  animation:spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform:rotate(360deg);
  }
}

.error-symbol {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  background:#be293212;
  color:var(--red);
  border-radius:50%;
  font-size:22px;
}

#error-state .button {
  margin-top:18px;
}

.form-error {
  color:var(--red);
  font-size:11px;
  margin-top:10px;
}

.guide {
  margin-top:34px;
  padding:28px 0;
  display:grid;
  grid-template-columns:.85fr 1.4fr;
  gap:24px;
  border-top:1px solid var(--border);
}

.guide h2 {
  font-size:16px;
  font-weight:600;
  max-width:240px;
}

.guide ol {
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  gap:22px;
  justify-content:space-between;
}

.guide li {
  display:flex;
  gap:10px;
  align-items:flex-start;
}

.guide li>span {
  background:var(--sand);
  color:var(--brown);
  width:23px;
  height:23px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex-shrink:0;
  font-size:10px;
}

.guide strong {
  font-size:11px;
  font-weight:600;
}

.guide li p {
  font-size:10px;
  color:var(--muted);
  margin-top:4px;
}

footer {
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  font-size:9px;
  padding:20px 0 24px;
  border-top:1px solid var(--border);
}

.footer-divider {
  margin:0 8px;
}

.toast {
  position:fixed;
  bottom:24px;
  right:24px;
  max-width:420px;
  padding:14px 20px;
  border-radius:10px;
  background:var(--surface);
  border:1px solid var(--border);
  border-left:4px solid var(--green);
  box-shadow:0 8px 35px #0002;
  z-index:10;
  font-size:12px;
}

.toast.error {
  border-left-color:var(--red);
}

@media(min-width:1600px) {
  main {
    padding-top:60px;
  }
  .empty-state {
    min-height:370px;
  }
}

@media(max-width:1150px) {
  .sidebar {
    width:200px;
    padding:32px 16px;
  }
  .app-shell {
    margin-left:200px;
  }
  .topbar {
    padding:0 28px;
  }
  main {
    padding:32px 28px 0;
  }
  .page-heading {
    align-items:flex-start;
    flex-direction:column;
    gap:14px;
  }
  .overview>div {
    padding:0 12px;
  }
  .overview strong {
    font-size:11px;
  }
  .guide {
    grid-template-columns:1fr;
  }
  .guide h2 {
    max-width:none;
  }
}

@media(max-width:900px) {
  .content-grid {
    grid-template-columns:1fr;
  }
  .sidebar {
    width:174px;
    padding:28px 12px;
  }
  .app-shell {
    margin-left:174px;
  }
  .brand {
    padding-left:12px;
  }
    .overview {
    gap:18px;
    grid-template-columns:1fr;
  }
  .overview>div {
    padding:0;
    border:0;
  }
  .empty-state {
    min-height:300px;
  }
}

@media(max-width:620px) {
  .sidebar {
    position:static;
    width:100%;
    padding:16px 20px;
    flex-direction:row;
    align-items:center;
    gap:20px;
  }
  .brand {
    padding:0;
    border:0;
  }
    .workspace-label,.sidebar-bottom,.nav-count {
    display:none;
  }
  .sidebar nav {
    display:flex;
    margin-left:auto;
    gap:6px;
  }
  .nav-link {
    font-size:11px;
    padding:8px;
    margin:0;
    gap:5px;
  }
  .nav-link>span:first-child {
    font-size:15px;
  }
  .app-shell {
    margin:0;
  }
  .topbar {
    height:58px;
    padding:0 20px;
  }
  .topbar-actions {
    gap:12px;
  }
  .internal-tag {
    display:none;
  }
  main {
    padding:28px 20px 0;
  }
  h1 {
    font-size:27px;
  }
  .subtitle {
    font-size:12px;
  }
  .overview {
    margin-bottom:22px;
    grid-template-columns:1fr 1fr;
    gap:16px;
  }
  .overview>div:last-child {
    grid-column:1/-1;
  }
  .panel-header,form,.result-state {
    padding:20px;
  }
  .guide ol {
    flex-direction:column;
    gap:18px;
  }
  .guide {
    margin-top:28px;
    padding-top:24px;
  }
  .date-grid {
    gap:10px;
  }
  footer {
    gap:10px;
    flex-direction:column;
  }
  .toast {
    left:20px;
    right:20px;
    bottom:20px;
  }
  .result-summary {
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .notice strong {
    display:block;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto;
  }
  .spinner {
    animation:none;
  }
}

/* Official logo supplied by the company. */
.brand-logo {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
@media (max-width: 620px) {
  .brand {
    flex-shrink: 0;
  }
  .brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 7px;
  }
}

.credentials-link {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: inherit;
}
.credentials-dialog {
  width: min(500px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 80px #0003;
}
.credentials-dialog::backdrop {
  background: #0b211a99;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.dialog-heading h2 {
  font-size: 22px;
  letter-spacing: -.5px;
}
.dialog-intro {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.credentials-status {
  color: var(--green);
  font-size: 11px;
  margin-top: 14px;
}
.credentials-dialog form {
  padding: 22px 0 0;
}
.credentials-dialog .form-group + .form-group {
  margin-top: 18px;
}
.token-input {
  position: relative;
}
.token-input input {
  padding-right: 80px;
}
.token-input button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--green);
  font-size: 11px;
  padding: 5px;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.dialog-actions .button {
  flex: 1;
}
@media (max-width: 620px) {
  .sidebar {
    gap: 12px;
  }
  .sidebar nav {
    flex: 1;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
  }
  .sidebar .credentials-link {
    width: auto;
  }
  .brand-logo {
    width: 44px;
    height: 44px;
  }
  .credentials-dialog {
    padding: 22px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
}
