/* DikaCode Files — tema gelap premium, aksen mint & lime, font sistem. */

:root {
  --bg: #080b0a;
  --bg-elev: #0d120f;
  --panel: #101611;
  --panel-2: #131b15;
  --surface: #161f19;
  --line: rgba(183, 243, 106, 0.1);
  --line-strong: rgba(183, 243, 106, 0.22);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #eaf3ec;
  --text-dim: #a7b6aa;
  --text-faint: #6f8174;
  --mint: #7ef0c4;
  --lime: #b7f36a;
  --accent-grad: linear-gradient(135deg, var(--mint), var(--lime));
  --danger: #ff7a7a;
  --danger-soft: rgba(255, 122, 122, 0.12);
  --warn: #ffcf6b;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --ring: 0 0 0 3px rgba(126, 240, 196, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sidebar-w: 268px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(126, 240, 196, 0.08), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(183, 243, 106, 0.06), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-weight: 650;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 8px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--lime);
  color: #0a1108;
  border-radius: 10px;
  font-weight: 650;
  text-decoration: none;
  transition: top 0.15s ease;
}

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

/* ------------------------------ Shell ------------------------------ */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 28px 20px 24px;
  border-right: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(13, 18, 15, 0.92), rgba(8, 11, 10, 0.82));
  backdrop-filter: blur(6px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--lime);
  background: linear-gradient(160deg, rgba(126, 240, 196, 0.16), rgba(183, 243, 106, 0.08));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 1.02rem;
}

.brand-text strong {
  font-weight: 750;
}

.brand-text span {
  color: var(--mint);
  font-weight: 600;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 550;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nav-item svg {
  color: var(--text-faint);
  transition: color 0.16s ease;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.nav-item.is-active {
  color: var(--text);
  background: linear-gradient(120deg, rgba(126, 240, 196, 0.12), rgba(183, 243, 106, 0.05));
  border-color: var(--line-strong);
}

.nav-item.is-active svg {
  color: var(--mint);
}

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel);
  font-size: 0.82rem;
  color: var(--text-dim);
  width: fit-content;
}

.status-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  box-shadow: 0 0 0 0 rgba(126, 240, 196, 0.5);
}

.status-chip.is-online .dot {
  background: var(--mint);
  animation: statusPulse 2.4s ease-out infinite;
}

.status-chip.is-offline .dot {
  background: var(--danger);
}

@keyframes statusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(126, 240, 196, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(126, 240, 196, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(126, 240, 196, 0);
  }
}

.fine {
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.5;
}

.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: none;
}

.main {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 56px 40px 24px;
  display: grid;
  gap: 28px;
}

/* ------------------------------ Hero ------------------------------ */

.hero {
  display: grid;
  gap: 16px;
  padding: 8px 4px 4px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
  font-weight: 600;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(126, 240, 196, 0.14);
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  max-width: 18ch;
  background: linear-gradient(120deg, #ffffff 20%, #cde9d5 60%, #a9f3cf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 60ch;
  color: var(--text-dim);
  font-size: 1.02rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
}

.facts strong {
  font-size: 0.98rem;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}

.facts span {
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ------------------------------ Panel ------------------------------ */

.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-elev));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  scroll-margin-top: 88px;
}

.panel-head {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
}

.panel-head h2 {
  font-size: 1.28rem;
}

.panel-head p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

.panel-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.panel-head--split > div:first-child {
  display: grid;
  gap: 6px;
}

/* ------------------------------ Dropzone ------------------------------ */

.dropzone {
  position: relative;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(400px 160px at 50% 0%, rgba(126, 240, 196, 0.06), transparent 70%),
    rgba(11, 16, 13, 0.6);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.dropzone:hover {
  border-color: rgba(126, 240, 196, 0.5);
}

.dropzone:focus-visible {
  box-shadow: var(--ring);
  border-color: var(--mint);
}

.dropzone.is-dragover {
  border-color: var(--mint);
  background: rgba(126, 240, 196, 0.08);
  transform: translateY(-1px);
}

.dropzone-inner {
  display: grid;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: var(--mint);
  background: linear-gradient(160deg, rgba(126, 240, 196, 0.16), rgba(183, 243, 106, 0.07));
  border: 1px solid var(--line-strong);
  margin-bottom: 4px;
}

.drop-title {
  font-weight: 650;
  font-size: 1.05rem;
}

.drop-hint {
  color: var(--text-dim);
  font-size: 0.92rem;
}

.link-like {
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.drop-meta {
  color: var(--text-faint);
  font-size: 0.82rem;
}

/* ------------------------------ Expiry ------------------------------ */

.expiry {
  border: 0;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
}

.expiry legend {
  padding: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
}

.seg {
  position: relative;
  display: block;
}

.seg input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.seg span {
  display: block;
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.seg input:hover + span {
  color: var(--text);
}

.seg input:checked + span {
  color: #07110b;
  background: var(--accent-grad);
  border-color: transparent;
  box-shadow: 0 6px 18px -8px rgba(183, 243, 106, 0.6);
  font-weight: 700;
}

.seg input:focus-visible + span {
  box-shadow: var(--ring);
}

/* ------------------------------ Custom expiry ------------------------------ */

.segmented {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.seg--custom input:checked + span {
  background: linear-gradient(135deg, #9be89a, var(--mint));
}

.custom-expiry {
  display: grid;
  gap: 12px;
  margin-top: 2px;
  padding: 16px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}

.custom-mode {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  width: fit-content;
}

.mode-pill {
  position: relative;
  display: block;
}

.mode-pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.mode-pill span {
  display: block;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.mode-pill input:checked + span {
  color: #07110b;
  background: var(--accent-grad);
}

.mode-pill input:focus-visible + span {
  box-shadow: var(--ring);
}

.custom-field {
  display: grid;
  gap: 6px;
}

.custom-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 600;
}

.custom-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.custom-input {
  width: 140px;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-input:focus {
  border-color: var(--line-strong);
  box-shadow: var(--ring);
}

.custom-input[aria-invalid="true"] {
  border-color: rgba(255, 122, 122, 0.5);
}

.custom-input--datetime {
  width: 240px;
}

.custom-select {
  padding: 10px 34px 10px 12px;
  border-radius: 11px;
  background-color: var(--bg);
  border: 1px solid var(--line-soft);
  color: var(--text);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.custom-select:focus {
  border-color: var(--line-strong);
  box-shadow: var(--ring);
}

.custom-help {
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.5;
  max-width: 62ch;
}

.custom-validity {
  font-size: 0.8rem;
  min-height: 1.2em;
  color: var(--text-dim);
}

.custom-validity.is-error {
  color: var(--danger);
}

.custom-validity.is-ok {
  color: var(--mint);
}

.expiry-summary {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.expiry-summary strong {
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}

.expiry-tz {
  color: var(--text-faint);
  font-size: 0.78rem;
}

/* ------------------------------ Queue ------------------------------ */

.queue {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-head h3 {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 600;
}

.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}

.queue-item.is-error {
  border-color: rgba(255, 122, 122, 0.35);
  background: var(--danger-soft);
}

.queue-item.is-done {
  border-color: rgba(126, 240, 196, 0.22);
}

.queue-name {
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-state {
  font-size: 0.78rem;
  color: var(--text-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.queue-item.is-error .queue-state {
  color: var(--danger);
}

.queue-item.is-done .queue-state {
  color: var(--mint);
}

.queue-expiry {
  grid-column: 1 / -1;
  font-size: 0.74rem;
  color: var(--text-faint);
}

.progress {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent-grad);
  transition: width 0.18s ease;
}

.alert {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  border: 1px solid rgba(255, 122, 122, 0.35);
  color: #ffd9d9;
  font-size: 0.9rem;
}

/* ------------------------------ Stats ------------------------------ */

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

.stat {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}

.stat dt {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  font-weight: 600;
}

.stat dd {
  margin: 4px 0 0;
  font-size: 1.25rem;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------ Capacity card ------------------------------ */

.capacity {
  margin: 0 0 20px;
  padding: 18px;
  border-radius: 16px;
  background:
    radial-gradient(420px 120px at 0% 0%, rgba(126, 240, 196, 0.07), transparent 70%),
    var(--panel-2);
  border: 1px solid var(--line-soft);
  display: grid;
  gap: 12px;
}

.capacity-head h3 {
  font-size: 1rem;
  color: var(--text);
}

.capacity-shared {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.capacity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.capacity-stat {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
}

.capacity-stat dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 600;
}

.capacity-stat dd {
  margin: 3px 0 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.meter {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--line-soft);
}

.meter-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent-grad);
  transition: width 0.35s ease, background 0.35s ease;
}

.meter.is-warn .meter-bar {
  background: linear-gradient(135deg, var(--warn), var(--lime));
}

.meter.is-high .meter-bar {
  background: linear-gradient(135deg, #ffb36b, var(--danger));
}

.capacity-legend {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.capacity-limits {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 3px;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.capacity-limits strong {
  color: var(--text-dim);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  color: var(--text-faint);
  min-width: 210px;
}

.search:focus-within {
  border-color: var(--line-strong);
  box-shadow: var(--ring);
}

.search input {
  border: 0;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.9rem;
  color: var(--text);
}

.files-toolbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.files-count {
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ------------------------------ File list ------------------------------ */

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.file-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-row:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.file-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--mint);
  background: rgba(126, 240, 196, 0.08);
  border: 1px solid var(--line-strong);
}

.file-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.file-name {
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name:hover {
  color: var(--mint);
}

.file-meta {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.file-meta .expiring {
  color: var(--warn);
}

.file-meta .expired {
  color: var(--danger);
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ------------------------------ Buttons ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 7px 11px;
  font-size: 0.8rem;
  border-radius: 9px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  color: #07110b;
  background: var(--accent-grad);
  border-color: transparent;
  box-shadow: 0 12px 28px -14px rgba(183, 243, 106, 0.7);
  font-weight: 700;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-soft {
  background: rgba(126, 240, 196, 0.08);
  border-color: var(--line-strong);
  color: var(--mint);
}

.btn-soft:hover {
  background: rgba(126, 240, 196, 0.14);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-soft);
  color: var(--text-dim);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-danger {
  background: var(--danger-soft);
  border-color: rgba(255, 122, 122, 0.4);
  color: #ffd2d2;
}

/* ------------------------------ Empty ------------------------------ */

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 48px 20px;
  text-align: center;
  border-radius: 16px;
  border: 1px dashed var(--line-soft);
  margin-top: 8px;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  color: var(--text-faint);
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}

.empty h3 {
  font-size: 1.02rem;
}

.empty p {
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 42ch;
}

/* ------------------------------ Info ------------------------------ */

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.info-card {
  padding: 18px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  display: grid;
  gap: 8px;
}

.info-card h3 {
  font-size: 0.98rem;
  color: var(--lime);
}

.info-card p {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.info-card strong {
  color: var(--text);
}

/* ------------------------------ Footer ------------------------------ */

.footer {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 24px 40px 48px;
  display: grid;
  gap: 6px;
  color: var(--text-faint);
  font-size: 0.84rem;
}

/* ------------------------------ Toast ------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 90;
  padding: 12px 18px;
  border-radius: 12px;
  background: #101a13;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(90vw, 420px);
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------ Dialog ------------------------------ */

.confirm {
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  width: min(420px, calc(100vw - 32px));
  box-shadow: var(--shadow);
}

.confirm::backdrop {
  background: rgba(3, 6, 4, 0.7);
  backdrop-filter: blur(3px);
}

.confirm form {
  padding: 24px;
  display: grid;
  gap: 12px;
}

.confirm h2 {
  font-size: 1.15rem;
}

.confirm p {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.confirm-name {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--mint);
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line-soft);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

/* ------------------------------ Share page ------------------------------ */

.share-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.share {
  width: min(520px, 100%);
  display: grid;
  justify-items: center;
  gap: 22px;
}

.brand--share .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.share-card {
  width: 100%;
  background: linear-gradient(180deg, var(--panel), var(--bg-elev));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.share-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--mint);
  animation: spin 0.8s linear infinite;
}

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

.share-error {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.share-error h1 {
  font-size: 1.2rem;
}

.share-error p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.share-content {
  display: grid;
  gap: 18px;
}

.share-filename {
  font-size: 1.4rem;
  overflow-wrap: anywhere;
}

.share-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.share-meta div {
  padding: 12px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}

.share-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 600;
}

.share-meta dd {
  margin: 3px 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.share-warning {
  font-size: 0.8rem;
  color: var(--warn);
  text-align: center;
  background: rgba(255, 207, 107, 0.07);
  border: 1px solid rgba(255, 207, 107, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
}

.share-foot {
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-faint);
  max-width: 46ch;
}

/* ------------------------------ Responsive ------------------------------ */

@media (max-width: 920px) {
  .segmented {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .sidebar {
    display: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(8, 11, 10, 0.86);
    backdrop-filter: blur(10px);
  }

  .topnav {
    display: flex;
    gap: 4px;
  }

  .topnav-link {
    padding: 8px 12px;
    border-radius: 9px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.86rem;
    font-weight: 550;
  }

  .topnav-link.is-active {
    color: var(--text);
    background: rgba(126, 240, 196, 0.1);
  }

  .main {
    padding: 32px 20px 16px;
    gap: 22px;
  }

  .footer {
    padding: 16px 20px 40px;
  }

  .panel {
    padding: 22px;
    border-radius: 20px;
  }

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

  .file-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .file-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .topnav {
    display: none;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .segmented {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .custom-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .custom-input,
  .custom-input--datetime,
  .custom-select {
    width: 100%;
  }

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

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

  .stats .stat:last-child {
    grid-column: 1 / -1;
  }

  .search {
    width: 100%;
    min-width: 0;
  }

  .panel-head--split > div:last-child {
    width: 100%;
  }

  .file-actions .btn {
    flex: 1 1 auto;
  }

  .share-card {
    padding: 24px;
    border-radius: 20px;
  }

  .share-meta {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Atribut hidden harus menang atas display:grid/flex komponen. */
[hidden] {
  display: none !important;
}
