/* cloud.gerege.mn — government cloud storage UI */
:root {
  --bg: #f5f4ef;
  --paper: #ffffff;
  --ink: #131720;
  --ink-soft: #4a5160;
  --line: #e4e0d6;
  --line-strong: #c8c3b3;
  --accent: #a4252e;     /* MN gov red */
  --accent-ink: #ffffff;
  --accent-soft: #f7e2e3;
  --gold: #c8a45c;
  --danger: #b53232;
  --shadow: 0 1px 0 rgba(20, 23, 30, 0.04), 0 8px 24px -16px rgba(20, 23, 30, 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.bg {
  font-family: -apple-system, "SF Pro Text", "Inter", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--ink); }

/* topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent) 0%, #6b1a20 100%);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid var(--gold);
  border-radius: 2px;
  border-top: none;
  border-bottom: none;
}
.brand-name { font-size: 15px; }
.user { display: flex; gap: 14px; align-items: center; }
.user-name { color: var(--ink-soft); font-size: 14px; }
.logout { margin: 0; }

/* main */
.main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}
.footer {
  padding: 20px 28px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

/* hero (login) */
.hero {
  display: flex;
  justify-content: center;
  padding-top: 40px;
}
.hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 48px 40px;
  max-width: 520px;
  box-shadow: var(--shadow);
}
.hero-eyebrow {
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero-title {
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 12px;
}
.hero-sub {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0 0 28px;
}
.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}
.hero-bullets li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  position: relative;
  padding-left: 18px;
}
.hero-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 80ms ease, box-shadow 120ms ease, background 120ms ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover { background: #8c1d24; }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; color: var(--danger); border-color: #e9c9c9; }
.btn-danger:hover { background: #fbeeee; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.18);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: "SF Mono", monospace;
  font-size: 12px;
}

.btn input[type=file] { display: none; }

/* dashboard */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.dash-title {
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.dash-sub {
  color: var(--ink-soft);
  margin: 0;
  font-size: 14px;
}
.dash-sub code {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.upload { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.upload-hint { color: var(--ink-soft); font-size: 12px; }

.file-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.files {
  width: 100%;
  border-collapse: collapse;
}
.files thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  padding: 14px 18px;
  background: #faf8f2;
  border-bottom: 1px solid var(--line);
}
.files tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.files tbody tr:last-child td { border-bottom: none; }
.files tbody tr:hover { background: #fdfcf7; }
.files .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.files .actions { width: 200px; text-align: right; }
.files .actions .btn + .btn { margin-left: 6px; }
.icon-dir, .icon-file { margin-right: 8px; }

.empty {
  padding: 64px 24px;
  text-align: center;
  color: var(--ink-soft);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}
.empty p { margin: 4px 0; }
.empty-sub { font-size: 13px; }

.share-url {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}
.share-url input {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #faf8f2;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
}
.btn-xs {
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 6px;
}
.files .actions { width: 320px; }
