:root {
  --rentsody-blue: #08183a;
  --rentsody-accent: #c14f79;
  --surface: #ffffff;
  --line: #d9e0ea;
  --text: #172033;
  --muted: #5e6a7d;
  --page: #f5f7fb;
  font-family: "72", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
}

.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--rentsody-blue);
  color: #fff;
}

.topbar > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--rentsody-blue);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark.compact {
  width: 34px;
  height: 34px;
  background: var(--rentsody-accent);
}

.workspace {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.page-heading h1,
.table-head h2,
.drop-zone h2,
.login-panel h1 {
  margin: 0;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--rentsody-accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.drop-zone,
.table-card,
.login-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(8, 24, 58, 0.07);
}

.drop-zone {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 34px 20px;
  border-style: dashed;
  text-align: center;
}

.drop-zone.is-dragover {
  border-color: var(--rentsody-accent);
  background: #fff7fa;
}

.drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid currentColor;
  border-radius: 999px;
  color: var(--rentsody-accent);
  width: 40px;
  height: 40px;
  font-size: 0.72rem;
  font-weight: 800;
}

.drop-zone p,
.login-panel p {
  margin: 0 0 8px;
  color: var(--muted);
}

#file-input {
  display: none;
}

.table-card {
  margin-top: 18px;
  overflow: hidden;
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.table-head span {
  color: var(--muted);
  font-size: 0.92rem;
}

.table-scroll {
  overflow-x: auto;
}

#files-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

#files-table th,
#files-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

#files-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.empty-state {
  margin: 0;
  padding: 22px 18px;
  color: var(--muted);
}

.button,
.icon-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button:hover,
.icon-button:hover {
  border-color: var(--rentsody-accent);
}

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

.button-secondary,
.button-ghost {
  background: #fff;
}

.button-ghost {
  border-color: rgba(255, 255, 255, 0.36);
  background: transparent;
  color: #fff;
}

.icon-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.86rem;
}

.icon-button.danger {
  color: #a72828;
}

.field {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.field:focus {
  border-color: var(--rentsody-accent);
  outline: 2px solid rgba(193, 79, 121, 0.18);
}

.message {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #eef6ff;
  color: var(--text);
}

.message-error {
  border-color: #f0b4b4;
  background: #fff1f1;
  color: #8d1b1b;
}

.message-success {
  border-color: #a8d9b7;
  background: #effaf2;
  color: #17612d;
}

.message-info {
  border-color: #b7d5f1;
  background: #eef6ff;
  color: #174f79;
}

.login-page {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--rentsody-blue), #263d68);
}

.login-shell {
  width: min(420px, calc(100vw - 32px));
}

.login-panel {
  display: grid;
  gap: 16px;
  padding: 28px;
}

.login-form {
  display: grid;
  gap: 8px;
}

.login-form label {
  color: var(--muted);
  font-size: 0.9rem;
}

.login-form .button {
  margin-top: 8px;
  justify-self: start;
}

@media (max-width: 640px) {
  .topbar,
  .page-heading,
  .table-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    height: auto;
    padding: 14px 16px;
  }
}
