:root {
  --workspace-nav-width: 224px;
  --field-hint: #62747d;
  --field-placeholder: #667982;
  --workspace-sidebar: #132932;
  --workspace-sidebar-ink: #dbe7e9;
  --workspace-sidebar-muted: #9fb6bc;
}
:root[data-theme="dark"] {
  --field-hint: #9db4bb;
  --field-placeholder: #92aab2;
}
.atlas-topbar,
.station-body .atlas-topbar {
  position: relative;
  z-index: 1350;
  gap: 20px;
  padding: 0 clamp(14px, 2vw, 28px);
  background: var(--surface);
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.station-body .atlas-topbar { position: sticky; top: 0; }
.atlas-topbar .brand { color: var(--ink); min-width: max-content; }
.atlas-topbar .brand small { margin-top: 4px; color: var(--field-hint); }
.atlas-location {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  color: var(--field-hint);
  font-size: 12px;
  white-space: nowrap;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}
.atlas-location .icon { width: 12px; height: 12px; flex: none; }
.atlas-location strong { color: var(--ink); font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.atlas-account { min-width: 0; gap: 9px; }
.atlas-account-name { max-width: 185px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atlas-account small { color: var(--field-hint); }
.atlas-account .avatar { flex: none; background: #dcefeb; color: #18594f; }
.atlas-topbar .language-switch select,
.atlas-account button,
.atlas-menu-toggle {
  min-height: 38px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.atlas-topbar .language-switch select { width: auto; max-width: 115px; }
.atlas-account button { width: 38px; padding: 0; margin: 0; }
.atlas-account button:hover, .atlas-menu-toggle:hover { color: var(--ink); background: var(--hover); }
.atlas-menu-toggle, .atlas-menu-close, .atlas-sidebar-head { display: none; }

.station-shell { display: grid; grid-template-columns: var(--workspace-nav-width) minmax(0, 1fr); }
.atlas-sidebar {
  align-self: stretch;
  flex: 0 0 var(--workspace-nav-width);
  min-width: 0;
  padding: 22px 12px;
  background: var(--workspace-sidebar);
  color: var(--workspace-sidebar-ink);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #55737c transparent;
}
.station-shell .atlas-sidebar {
  position: sticky;
  top: var(--header);
  align-self: start;
  height: calc(100dvh - var(--header));
}
.atlas-nav-group + .atlas-nav-group {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #ffffff1c;
}
.atlas-nav-group p {
  margin: 0 9px 7px;
  color: var(--workspace-sidebar-muted);
  font-size: 11px;
  font-weight: 650;
}
.atlas-nav-group ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.atlas-nav-group a {
  display: flex;
  align-items: center;
  min-height: 39px;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
}
.atlas-nav-group .icon { width: 17px; height: 17px; flex: none; color: var(--workspace-sidebar-muted); }
.atlas-nav-group a:hover { background: #ffffff12; }
.atlas-nav-group a[aria-current="page"] { background: #1d4748; color: #effffa; border-color: #3e7270; font-weight: 650; }
.atlas-nav-group a[aria-current="page"] .icon { color: #a9e5d5; }
.atlas-nav-group a:focus-visible, .atlas-menu-close:focus-visible { outline: 2px solid #a9e5d5; outline-offset: 1px; }

input::placeholder, textarea::placeholder { color: var(--field-placeholder); opacity: 1; }
.field-hint {
  display: block;
  margin: 0;
  color: var(--field-hint);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}
label > .field-hint { margin-top: 3px; }
.permits-fields label > .field-hint, .permits-action-form label > .field-hint { margin-top: 0; }
.permits-panel p.field-hint { color: var(--field-hint); }
.permits-page .permits-panel { border-radius: 12px; }
.permits-page .permits-type { color: var(--field-hint); font-size: 12px; }
.permits-page .permits-page-heading { margin-bottom: 22px; }
.permits-page .permits-fields { gap: 16px 20px; }
.permits-page :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
  border-radius: 8px;
  font-size: 13px;
}
.permits-fields label, .permits-action-form label { font-size: 13px; }
.permits-fields label > :is(input, select, textarea),
.permits-action-form label > :is(input, select, textarea) { margin-top: 3px; }
.permits-page .permits-progress { gap: 6px; }
.permits-page .permits-progress li.current { box-shadow: inset 0 -2px 0 var(--station-accent); }
.permits-page .permits-list { border-radius: 12px; }
.permits-page .permit-list-link:hover { background: var(--hover); }

.auth-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-visual { min-height: 100%; background: #132932; }
.auth-visual img.auth-station-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-visual::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(145deg, #102831ed 4%, #10283199 64%, #10283166); }
.auth-visual .auth-story, .auth-visual .auth-visual-footer { color: #dfedf0; }
.auth-story { margin-top: clamp(60px, 13vh, 135px); }
.auth-form-panel { background: #f4f7f7; }
.auth-card { width: min(410px, 100%); padding: clamp(20px, 3vw, 35px); border: 1px solid #dce6e7; border-radius: 16px; background: #fff; }
.auth-card h1 { color: #17363e; }
.auth-card .auth-intro { color: var(--field-hint); font-size: 14px; margin-bottom: 24px; }
.auth-card label { color: #203b43; font-size: 13px; margin: 17px 0; }
.auth-card input { font-size: 14px; }
.auth-card .auth-security { color: var(--field-hint); font-size: 12px; }

@media (max-width: 1050px) {
  .station-shell { grid-template-columns: minmax(0, 1fr); }
  .atlas-topbar { gap: 11px; }
  .atlas-location { display: none; }
  .atlas-menu-toggle { display: inline-flex; gap: 6px; padding: 0 8px; }
  .atlas-menu-toggle .icon, .atlas-menu-close .icon { width: 19px; height: 19px; }
  .atlas-sidebar, .station-shell .atlas-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1510;
    width: min(292px, 88vw);
    height: 100dvh;
    visibility: hidden;
    padding-top: 12px;
    box-shadow: 9px 0 26px #101e2933;
  }
  .atlas-menu-open { overflow: hidden; }
  .atlas-menu-open .atlas-sidebar { visibility: visible; }
  .atlas-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: #10212f83;
  }
  .atlas-sidebar-head { display: flex; justify-content: space-between; align-items: center; padding: 0 0 10px 9px; }
  .atlas-menu-close { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; background: transparent; color: inherit; border-color: #ffffff40; }
  .atlas-menu-close:hover { background: #ffffff14; }
  .atlas-nav-group a { min-height: 43px; font-size: 13px; }
}
@media (max-width: 740px) {
  .station-shell { display: block; }
  .atlas-topbar .atlas-account-name { display: none; }
  .auth-layout { grid-template-columns: minmax(0, 1fr); }
  .auth-visual { display: none; }
  .auth-form-panel { min-height: 100dvh; padding: 30px 16px 65px; }
  .auth-card { max-width: 410px; }
  .auth-card::before { margin-bottom: 16px; }
}
@media (max-width: 440px) {
  .atlas-topbar, .station-body .atlas-topbar { gap: 7px; padding-inline: 9px; }
  .atlas-account { gap: 5px; }
  .atlas-topbar .language-switch select { max-width: 95px; }
  .atlas-topbar .brand { gap: 5px; }
  .atlas-topbar .brand img { width: 29px; height: 29px; }
  .atlas-topbar .brand small { letter-spacing: .65px; }
}
@media (max-width: 365px) {
  .atlas-menu-toggle { width: 38px; justify-content: center; }
  .atlas-menu-toggle span { display: none; }
}
@media print {
  .atlas-topbar, .atlas-sidebar, .atlas-nav-backdrop { display: none !important; }
  .station-shell { display: block; }
}
