:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #173126;
  background: #edf4ef;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.card { width: min(420px, 100%); padding: 36px; border-radius: 18px; background: white; box-shadow: 0 18px 55px rgba(27, 67, 47, .13); }
.brand { color: #2b7a4b; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
h1 { margin: 6px 0 8px; font-size: 2rem; }
h2 { margin: 0 0 8px; font-size: 1.1rem; }
label { display: block; margin: 18px 0 7px; font-weight: 650; }
input[type="email"], input[type="password"], select { width: 100%; padding: 12px 13px; border: 1px solid #afc3b5; border-radius: 8px; background: white; }
input:focus, select:focus { outline: 3px solid rgba(43, 122, 75, .18); border-color: #2b7a4b; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: 400; }
button { border: 0; border-radius: 8px; padding: 11px 16px; background: #287247; color: white; font-weight: 700; }
.card button { width: 100%; margin-top: 18px; }
button:hover { background: #1f5b38; }
.secondary { padding: 8px 12px; background: white; color: #235f3c; border: 1px solid #b6cbbd; }
.muted { color: #63756b; }
.small { font-size: .85rem; line-height: 1.45; }
.error { padding: 10px; border-radius: 7px; color: #8a1f1f; background: #fdeaea; }
.notice { padding: 10px; border-radius: 7px; color: #624c12; background: #fff6d9; }

.app-shell { min-height: 100vh; }
header { height: 64px; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; background: white; border-bottom: 1px solid #dce7df; }
header strong { color: #287247; margin-right: 8px; }
.account { display: flex; align-items: center; gap: 12px; }
.workspace { height: calc(100vh - 64px); display: grid; grid-template-columns: 320px 1fr; }
aside { padding: 20px; overflow-y: auto; background: #f8fbf9; border-right: 1px solid #dce7df; }
#map { min-width: 0; background: #d9e4dc; }
.downloads-heading, .layers-heading { margin-top: 28px; }
#map-file-list:not(:empty) { overflow: hidden; background: white; border: 1px solid #d7e3da; border-radius: 9px; }
.map-file-item { display: block; padding: 10px; color: #235f3c; background: white; font-weight: 650; overflow-wrap: anywhere; }
.map-file-item + .map-file-item { border-top: 1px solid #e5ede7; }
.map-file-item:hover { background: #eef6f0; }
#layer-list:not(:empty) { overflow: hidden; background: white; border: 1px solid #d7e3da; border-radius: 9px; }
.layer-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; background: white; }
.layer-item + .layer-item { border-top: 1px solid #e5ede7; }
.layer-name { display: flex; align-items: center; gap: 9px; min-width: 0; margin: 0; }
.layer-name span { overflow: hidden; text-overflow: ellipsis; }
.layer-actions { display: flex; gap: 4px; }
.layer-actions button { width: 30px; height: 30px; padding: 0; background: #e5efe8; color: #235f3c; }
.layer-actions button:disabled { opacity: .35; cursor: default; }

.admin-shell { min-height: 100vh; }
.admin-content { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; padding: 28px; }
.admin-list-panel, .user-editor-panel { padding: 24px; border: 1px solid #d7e3da; border-radius: 12px; background: white; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.section-heading h1 { margin-top: 0; }
.section-heading p { margin: 0; }
.table-scroll { overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; }
.users-table th, .users-table td { padding: 12px; border-bottom: 1px solid #e2ebe5; text-align: left; }
.users-table th { color: #52675b; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.users-table td:last-child { width: 1%; white-space: nowrap; }
.table-actions { display: flex; gap: 8px; }
.table-actions button { padding: 7px 10px; }
.danger { background: #a93434; }
.danger:hover { background: #832727; }
.danger:disabled, button:disabled { opacity: .5; cursor: default; }
.user-editor-panel label:first-of-type { margin-top: 12px; }
.user-editor-panel .notice { margin-top: 18px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

@media (max-width: 720px) {
  .workspace { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  aside { max-height: 44vh; border-right: 0; border-bottom: 1px solid #dce7df; }
  .account #account-name { display: none; }
  .admin-content { grid-template-columns: 1fr; padding: 16px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .account #admin-account-name { display: none; }
}
