:root {
  --bg: #f2f4f8;
  --panel: #ffffff;
  --text: #121723;
  --muted: #5c667b;
  --accent: #0b6dff;
  --accent-soft: #dbe8ff;
  --error: #a21818;
  --success: #0e6b36;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, #dbe8ff 0%, transparent 45%),
    radial-gradient(circle at bottom left, #ffe7d1 0%, transparent 40%),
    var(--bg);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.hero h1 {
  margin: 0;
  font-size: 2rem;
  width: 100%;
}

.hero p {
  margin: 0;
  color: var(--muted);
  flex: 1;
}

.grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.one {
  grid-template-columns: minmax(280px, 420px);
}

.panel {
  background: var(--panel);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 10px 26px rgba(14, 24, 40, 0.08);
}

.login-panel {
  margin-top: 1rem;
}

h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

form {
  display: grid;
  gap: 0.6rem;
}

.inline-form {
  margin-top: 0.7rem;
}

.progress-wrap {
  margin-top: 0.8rem;
}

.hidden {
  display: none;
}

.progress-bar {
  width: 100%;
  height: 0.7rem;
  border-radius: 999px;
  background: #e6ebf4;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  transition: width 0.25s ease;
  background: linear-gradient(90deg, #0b6dff, #5fa2ff);
}

.progress-text {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.progress-details {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
  max-height: 14rem;
  overflow: auto;
  font-size: 0.82rem;
  color: var(--muted);
}

.logout-form {
  display: block;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  padding: 0.5rem;
  border: 1px solid #cfd8ea;
  border-radius: 8px;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  cursor: pointer;
  background: #e6ebf4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

button.primary {
  background: var(--accent);
  color: #fff;
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.button-spinner {
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: none;
}

button.loading .button-spinner {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

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

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

.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid #e8ebf3;
  padding-bottom: 0.45rem;
}

.delete-form {
  display: inline-block;
  margin: 0;
}

.icon-button {
  width: 1.8rem;
  height: 1.8rem;
  min-width: 1.8rem;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
}

.icon-button.danger {
  background: #ffe6e6;
  color: #a21818;
}

.file-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.file-list span {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: right;
}

.messages {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.message {
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
}

.message.error {
  color: var(--error);
  background: #ffe6e6;
}

.message.success {
  color: var(--success);
  background: #e5f8ed;
}

.message.info {
  color: #0a4f8a;
  background: #e4f1ff;
}

.message.warning {
  color: #8a5b00;
  background: #fff4d8;
}
