:root {
  --brand-primary: #004870;
  --brand-primary-2: #285888;
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #0b1f2a;
  --muted: #5f6f7b;
  --border: rgba(11, 31, 42, 0.14);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.14);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 15% 0%, rgba(0, 72, 112, 0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(40, 88, 136, 0.14), transparent 55%),
    var(--bg);
}

a { color: inherit; }

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  color: #fff;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-primary-2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  height: 44px;
  width: auto;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.brand-line {
  font-weight: 600;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-headline {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.header-meta {
  flex: 0 0 auto;
}

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 700;
  font-size: 13px;
}

/* Controls */
.controls {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.search {
  display: grid;
  gap: 8px;
}

.search-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
}

.search input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.search input:focus {
  border-color: rgba(0, 72, 112, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 72, 112, 0.14);
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

/* List */
.list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

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

.file-title {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  margin-top: 6px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12.5px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 72, 112, 0.28);
  background: rgba(0, 72, 112, 0.07);
  color: var(--brand-primary);
  font-weight: 800;
  letter-spacing: 0.4px;
}

.file-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  user-select: none;
}

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

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

.btn-primary {
  background: linear-gradient(180deg, var(--brand-primary), var(--brand-primary-2));
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 72, 112, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(0, 72, 112, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(11, 31, 42, 0.18);
  color: var(--text);
}

.btn-secondary:hover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

/* Empty state */
.empty {
  border: 1px dashed rgba(11, 31, 42, 0.3);
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(255, 255, 255, 0.6);
}

.empty-title {
  font-weight: 900;
  font-size: 16px;
}

.empty-text {
  margin-top: 6px;
  color: var(--muted);
}

/* Footer */
.footer {
  margin-top: 22px;
  padding-bottom: 14px;
}

.footer-inner {
  color: var(--muted);
  font-size: 12.5px;
}

/* Mobile */
@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-logo { height: 40px; }

  .file {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-actions {
    width: 100%;
  }

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