:root {
  --ink:#192a29;
  --muted:#6c7b77;
  --line:#dfe6df;
  --paper:#f5f7f2;
  --green:#234e40;
  --lime:#d4f188;
  --white:#fff;
  --warm:#eef2e9;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-size:14px;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
}

[hidden] {
  display:none!important;
}

button,input,select {
  font:inherit;
}

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

button {
  cursor:pointer;
  border:0;
  border-radius:6px;
  padding:9px 12px;
  font-weight:550;
  background:transparent;
  color:inherit;
  white-space:nowrap;
}

button:disabled {
  opacity:.4;
  cursor:default;
}

button:hover:not(:disabled) {
  filter:brightness(.94);
}

button:focus-visible,a:focus-visible,summary:focus-visible {
  outline:3px solid #86aa4d;
  outline-offset:3px;
}

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

input,select {
  width:100%;
  min-width:0;
  padding:10px 11px;
  border:1px solid #cfd9cf;
  border-radius:5px;
  background:#fff;
  color:var(--ink);
  outline:none;
  font-size:13px;
}

input:focus,select:focus {
  border-color:#658c5f;
  box-shadow:0 0 0 2px #8faa6c28;
}

input::placeholder {
  color:#98a299;
}

label {
  display:block;
  font-size:11px;
  font-weight:650;
  color:#66766c;
  letter-spacing:.02em;
}

label input,label select {
  margin-top:7px;
}

.masthead {
  min-height:75px;
  padding:0 4%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:var(--green);
  color:white;
  gap:20px;
}

.brand {
  display:flex;
  align-items:center;
  gap:12px;
  font-size:13px;
  font-weight:750;
  letter-spacing:.13em;
}

.brand-mark {
  font-size:26px;
  color:var(--lime);
  line-height:1;
}

.tag {
  font-size:9px;
  font-weight:500;
  letter-spacing:.1em;
  border:1px solid #ffffff30;
  border-radius:4px;
  padding:5px 7px;
  margin-left:10px;
  color:#c6d6cb;
}

#session-actions {
  display:flex;
  align-items:center;
  gap:14px;
  font-size:12px;
}

.private-badge {
  font-size:11px;
  color:#d4e2d6;
  margin-right:12px;
}

.private-badge:first-letter {
  color:var(--lime);
}

.subtle {
  font-size:12px;
  color:var(--muted);
  padding:7px 9px;
}

.masthead .subtle {
  color:#e3eee4;
}

.primary {
  background:var(--green);
  color:#fff;
  display:inline-flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  padding:11px 15px;
  font-size:12px;
}

.primary span {
  color:var(--lime);
  font-size:16px;
}

.outline {
  background:#fff;
  border:1px solid var(--line);
  font-size:12px;
}

.eyebrow {
  font-size:10px;
  font-weight:700;
  letter-spacing:.14em;
  color:#69806d;
}

#app {
  max-width:1800px;
  padding:0 4%;
  margin:auto;
}

.intro {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:46px 0 34px;
  gap:25px;
}

.intro h1 {
  font-weight:550;
  font-size:clamp(28px,3vw,42px);
  letter-spacing:-.045em;
  margin:12px 0 9px;
}

.intro h1>span {
  color:#729d45;
}

.intro p {
  margin:0;
  color:var(--muted);
  font-size:13px;
}

.inventory-stats {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  border-left:1px solid var(--line);
  padding-left:40px;
}

.inventory-stats strong {
  font-size:31px;
  font-weight:500;
  letter-spacing:-.04em;
}

.inventory-stats>span {
  font-size:9px;
  color:var(--muted);
  letter-spacing:.12em;
  margin:5px 0;
}

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

.workspace {
  display:grid;
  grid-template-columns:minmax(0,1fr) 285px;
  gap:22px;
  align-items:start;
}

.browser-panel {
  background:var(--white);
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 3px 12px #294b3210;
}

.browser-heading {
  padding:22px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.browser-heading>div {
  min-width:0;
}

#breadcrumbs {
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
  margin-top:8px;
  font-size:13px;
}

#breadcrumbs button {
  padding:3px 5px;
  white-space:normal;
  overflow-wrap:anywhere;
  font-weight:450;
}

#breadcrumbs button:last-child {
  font-weight:700;
}

#breadcrumbs span {
  color:#a4afa5;
}

.search-panel {
  margin:0 22px 18px;
  border:1px solid #d8e2d3;
  border-radius:7px;
  background:#f3f7ee;
  padding:17px 18px;
}

.search-top {
  display:flex;
  justify-content:space-between;
  align-items:start;
  gap:14px;
  margin-bottom:17px;
}

h2 {
  font-size:13px;
  font-weight:650;
  margin:0;
}

.search-top p {
  font-size:11px;
  color:var(--muted);
  margin:6px 0 0;
  line-height:1.5;
}

.view-switch {
  display:flex;
  border:1px solid #cfdcc9;
  border-radius:5px;
  background:#eaf0e5;
  padding:3px;
  flex-shrink:0;
}

.view-switch button {
  font-size:10px;
  padding:6px 9px;
  border-radius:3px;
  color:var(--muted);
}

.view-switch .active {
  background:#fff;
  color:var(--green);
  box-shadow:0 1px 4px #192a2912;
}

.filter-grid {
  display:grid;
  grid-template-columns:minmax(130px,1.4fr) 110px minmax(175px,1fr) minmax(175px,1fr);
  gap:12px;
}

.filter-grid label:nth-last-child(-n+2) {
  max-width:180px;
}

.search-bottom {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:15px;
}

.search-bottom>span {
  font-size:10px;
  color:var(--muted);
  overflow-wrap:anywhere;
}

.search-bottom>div {
  display:flex;
  gap:6px;
  align-items:center;
}

.level-filters {
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:14px 24px;
  background:#fcfdfa;
}

.level-filters summary {
  font-size:12px;
  font-weight:600;
  cursor:pointer;
}

.level-filters summary span {
  font-size:10px;
  font-weight:400;
  color:var(--muted);
  margin-left:10px;
}

.level-filters form {
  margin-top:15px;
}

.level-filters form>button {
  display:block;
  margin:7px 0 -4px auto;
}

.list-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:15px 21px;
  gap:12px;
}

.list-toolbar>div {
  display:flex;
  align-items:center;
  gap:15px;
}

#result-count {
  color:var(--muted);
  font-size:11px;
}

.table-scroll {
  overflow:auto;
}

table {
  border-collapse:collapse;
  table-layout:fixed;
  width:100%;
  min-width:700px;
  font-size:12px;
}

th {
  background:#f8faf5;
  font-size:9px;
  text-align:left;
  letter-spacing:.07em;
  text-transform:uppercase;
  font-weight:650;
  padding:12px 8px;
  color:#748075;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

th:first-child {
  width:40px;
}

th:nth-child(2) {
  width:auto;
}

th:nth-child(3) {
  width:85px;
}

th:nth-child(4),th:nth-child(5) {
  width:132px;
}

th:last-child {
  width:42px;
}

th small {
  display:block;
  font-size:8px;
  font-weight:400;
  text-transform:none;
  letter-spacing:0;
  margin-top:3px;
}

td {
  padding:13px 8px;
  border-bottom:1px solid #eaf0e5;
  vertical-align:middle;
}

tr:hover td {
  background:#f8faf5;
}

.check-col {
  padding-left:22px;
}

td:first-child {
  padding-left:21px;
}

input[type=checkbox] {
  width:14px;
  height:14px;
  padding:0;
  margin:0;
  accent-color:var(--green);
  box-shadow:none;
  cursor:pointer;
}

.name-cell {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:24px;
}

.name-button {
  padding:2px 0;
  border-radius:0;
  font-size:12px;
  white-space:normal;
  overflow-wrap:anywhere;
  text-align:left;
  font-weight:500;
}

.expand {
  width:21px;
  height:24px;
  padding:0;
  color:#778775;
  flex-shrink:0;
  border:1px solid transparent;
}

.expand:hover {
  border-color:var(--line);
}

.expand-spacer {
  width:21px;
  flex-shrink:0;
}

.icon {
  width:19px;
  height:19px;
  flex-shrink:0;
  stroke-width:1.5;
}

.folder-icon {
  color:#6a8f45;
  fill:#eaf1dc;
}

.file-icon {
  color:#9cae9c;
}

.file-text {
  min-width:0;
}

.file-location {
  font-size:10px;
  color:var(--muted);
  padding:3px 0;
  display:block;
  overflow-wrap:anywhere;
  white-space:normal;
  text-align:left;
}

.file-location:hover {
  text-decoration:underline;
}

.size-cell {
  font-variant-numeric:tabular-nums;
  color:#5e7161;
  font-size:11px;
}

.date-cell {
  font-size:10px;
  color:#6f7b70;
  font-variant-numeric:tabular-nums;
  line-height:1.6;
}

.download {
  font-size:17px;
  display:inline-flex;
  width:27px;
  height:27px;
  align-items:center;
  justify-content:center;
  color:#547648;
  border-radius:4px;
}

.download:hover {
  background:#e8efdf;
}

.selection-card,.jobs-card {
  background:#fff;
  border:1px solid var(--line);
  border-radius:9px;
  padding:20px;
}

.selection-card {
  border-top:3px solid var(--green);
}

.side-panel {
  display:flex;
  flex-direction:column;
  gap:18px;
}

.card-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.selection-total {
  display:flex;
  align-items:baseline;
  gap:8px;
  margin:17px 0 4px;
}

.selection-total strong {
  font-size:36px;
  font-weight:450;
  letter-spacing:-.04em;
}

.selection-total span {
  color:var(--muted);
  font-size:11px;
}

#selection-size {
  color:var(--muted);
  font-size:11px;
  line-height:1.6;
  margin:5px 0 14px;
}

.wide {
  width:100%;
}

.selection-card>small {
  display:block;
  font-size:10px;
  line-height:1.7;
  color:var(--muted);
  margin-top:12px;
}

#selection-list {
  padding:0;
  list-style:none;
  max-height:230px;
  overflow:auto;
  margin:0 0 15px;
}

#selection-list li {
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:10px;
  border-top:1px solid #edf0e8;
  padding:7px 0;
  gap:8px;
}

#selection-list li span {
  overflow-wrap:anywhere;
}

#selection-list li button {
  padding:2px 5px;
  color:var(--muted);
}

.muted {
  color:var(--muted);
  font-size:10px;
  line-height:1.7;
}

.count-pill {
  font-size:10px;
  background:#eef3e7;
  padding:4px 7px;
  border-radius:4px;
}

.job {
  border-top:1px solid var(--line);
  padding:15px 0 2px;
  margin-top:12px;
}

.job-head {
  display:flex;
  justify-content:space-between;
  font-size:10px;
  gap:5px;
}

.job-state {
  font-size:9px;
  font-weight:650;
  text-transform:uppercase;
  color:#667b54;
  letter-spacing:.05em;
}

.job p {
  font-size:10px;
  line-height:1.6;
  color:var(--muted);
  margin:7px 0;
}

.job .job-error {
  color:#a14832;
  overflow-wrap:anywhere;
}

.job-actions {
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  align-items:center;
}

.job-actions a,.job-actions button {
  font-size:10px;
  border:1px solid var(--line);
  border-radius:4px;
  padding:6px 9px;
}

.job-actions a {
  background:var(--green);
  color:white;
  border-color:var(--green);
}

progress {
  width:100%;
  height:5px;
  accent-color:#6c9347;
  margin:9px 0 0;
  border:0;
  border-radius:3px;
}

progress::-webkit-progress-bar {
  background:#e9efdf;
  border-radius:3px;
}

progress::-webkit-progress-value {
  background:#7d9f58;
  border-radius:3px;
}

.catalog-foot {
  display:flex;
  justify-content:space-between;
  gap:15px;
  padding:15px 22px;
  font-size:9px;
  color:#889583;
  line-height:1.7;
}

.page-foot {
  display:flex;
  justify-content:space-between;
  padding:24px 0 28px;
  color:#86947e;
  font-size:10px;
}

.page-foot>span:first-child {
  letter-spacing:.15em;
  font-size:9px;
}

.message {
  border:1px solid #c4d7b2;
  background:#eaf2e1;
  padding:13px 16px;
  border-radius:6px;
  margin-bottom:18px;
  font-size:12px;
  white-space:pre-wrap;
}

.message.error {
  background:#fff0e9;
  border-color:#e8c5b6;
  color:#91442d;
}

.empty {
  text-align:center;
  padding:42px;
  color:var(--muted);
}

.empty>span {
  font-size:37px;
  color:#94a27b;
}

.empty h3 {
  font-weight:500;
  font-size:15px;
}

.empty p {
  font-size:12px;
}

.load-more {
  display:block;
  width:calc(100% - 44px);
  margin:15px 22px;
  border:1px solid var(--line);
  font-size:12px;
}

.nested-more td {
  padding:8px 22px;
  color:var(--muted);
}

.nested-more button {
  font-size:11px;
}

.login-wrap {
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:calc(100vh - 75px);
  padding:35px 20px;
}

.login-card {
  width:440px;
  padding:44px;
  background:white;
  border:1px solid var(--line);
  border-top:4px solid var(--green);
  border-radius:9px;
  box-shadow:0 14px 50px #234e400d;
}

.login-card h1 {
  font-size:31px;
  font-weight:500;
  letter-spacing:-.045em;
  margin:18px 0 12px;
}

.login-card>p {
  font-size:13px;
  line-height:1.8;
  color:var(--muted);
}

.login-card form {
  margin-top:28px;
}

.login-card input {
  padding:13px;
}

.login-card form .primary {
  width:100%;
  margin-top:16px;
}

.login-foot {
  font-size:10px;
  color:#8a9784;
  padding-top:22px;
  border-top:1px solid var(--line);
  margin-top:22px;
}

.error {
  color:#a14832;
  font-size:12px;
}

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

.loading {
  opacity:.5;
  pointer-events:none;
}

@media(min-width:1500px) {
  .filter-grid {
    grid-template-columns:minmax(140px,1.4fr) 110px minmax(175px,1fr) minmax(175px,1fr) 90px 90px;
  }
}

@media(max-width:1100px) {
  .workspace {
    grid-template-columns:minmax(0,1fr) 245px;
    gap:15px;
  }
  .filter-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .filter-grid label:nth-last-child(-n+2) {
    max-width:none;
  }
  .search-top {
    flex-direction:column;
  }
  .catalog-foot {
    flex-direction:column;
    gap:5px;
  }
  .level-filters summary span {
    display:block;
    margin:8px 0 0 15px;
    line-height:1.6;
  }
}

@media(max-width:820px) {
  .workspace {
    grid-template-columns:1fr;
  }
  .side-panel {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .masthead {
    padding:16px 5%;
    flex-wrap:wrap;
    gap:12px;
  }
  .brand .tag {
    display:none;
  }
  #session-actions {
    width:100%;
    justify-content:space-between;
    gap:5px;
  }
  .private-badge {
    margin:0;
  }
  .intro {
    padding:30px 0;
  }
  .inventory-stats {
    padding-left:18px;
  }
  .inventory-stats strong {
    font-size:25px;
  }
  .browser-heading {
    padding:20px 16px;
  }
  .search-panel {
    margin:0 14px 16px;
    padding:16px;
  }
  .level-filters {
    padding:14px 16px;
  }
  .search-bottom {
    align-items:start;
    flex-direction:column;
  }
  .search-bottom>div {
    align-self:flex-end;
  }
  .list-toolbar {
    padding:14px;
  }
  .page-foot {
    gap:20px;
    font-size:9px;
  }
}

@media(max-width:500px) {
  .side-panel {
    display:flex;
  }
  .intro {
    align-items:start;
  }
  .intro p {
    font-size:11px;
    max-width:200px;
    line-height:1.7;
  }
  .inventory-stats {
    padding-left:12px;
  }
  .inventory-stats>span {
    font-size:7px;
  }
  .inventory-stats small {
    font-size:9px;
  }
  .intro h1 {
    font-size:29px;
  }
  .browser-heading {
    align-items:start;
  }
  .browser-heading .outline {
    font-size:10px;
    padding:8px;
  }
  .filter-grid {
    gap:10px;
  }
  .list-toolbar>div {
    gap:8px;
  }
  #result-count {
    font-size:9px;
  }
  .list-toolbar button {
    font-size:10px;
  }
  .login-card {
    padding:30px;
  }
  .catalog-foot {
    font-size:8px;
  }
}

/* Keep intrinsic date-input widths from stretching narrow grid tracks. */
.filter-grid label {
  min-width:0;
}

@media(max-width:500px) {
  .filter-grid label:nth-child(3),.filter-grid label:nth-child(4) {
    grid-column:1/-1;
  }
}

.table-scroll {
  position:relative;
  min-width:0;
}
