:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #667085;
  --border: #dce3ec;
  --primary: #0f6cbd;
  --primary-hover: #0b5cab;
  --danger: #c50f1f;
  --danger-hover: #a80d1a;
  --shadow: 0 8px 24px rgba(28, 36, 48, 0.06);
  --radius: 10px;
  --font: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, #e8f1fb 0, transparent 40%),
    linear-gradient(180deg, #eef2f7 0%, var(--bg) 100%);
  min-height: 100vh;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.header h1 {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 650;
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

.field input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
}

.field input:focus {
  outline: 2px solid #cfe3f8;
  border-color: var(--primary);
}

.btn-block {
  width: 100%;
  margin-top: 20px;
}

.upload-zone {
  margin-top: 24px;
  padding: 28px 20px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-zone.dragover {
  border-color: var(--primary);
  background: #f5faff;
}

.upload-title {
  margin: 0 0 12px;
  font-weight: 600;
}

.upload-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: #f5f8fb;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid #f3c6cb;
  padding: 6px 10px;
  font-size: 0.875rem;
}

.btn-danger:hover:not(:disabled) {
  background: #fff5f6;
  border-color: var(--danger);
}

.progress {
  margin: 16px auto 0;
  width: min(360px, 100%);
  height: 8px;
  background: #e8edf3;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.2s ease;
}

.status {
  min-height: 1.25rem;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status.error {
  color: var(--danger);
}

.status.ok {
  color: #0e7a3c;
}

.list-section {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.list-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: #f8fafc;
}

td {
  font-size: 0.95rem;
}

td.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 14px;
}

.name-cell {
  font-weight: 600;
  word-break: break-all;
}

.url-cell a {
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}

.url-cell a:hover {
  text-decoration: underline;
}

.url-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.copy-btn {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--muted);
}

.copy-btn:hover {
  background: #e8eef5;
  color: var(--text);
}

.size-cell,
.date-cell {
  white-space: nowrap;
  color: var(--muted);
}

.actions-cell {
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .page {
    padding: 20px 12px 36px;
  }

  th:nth-child(2),
  td:nth-child(2) {
    min-width: 180px;
  }
}
