@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Libre+Baskerville:wght@400;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --accent: #8c2f39;
  --accent-700: #74262f;
  --text: #3b2f2f;
  --highlight: #d4af37;
  --basic: #efece6;
  --surface: #f8f5ef;
  --white: #fffdf9;
  --danger: #b3332e;
  --ok: #2f7d4f;
  --shadow: 0 16px 40px rgba(59, 47, 47, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: 'Lato', sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(212, 175, 55, 0.18), transparent 55%),
    radial-gradient(900px 700px at 100% 0%, rgba(140, 47, 57, 0.14), transparent 62%),
    linear-gradient(180deg, var(--surface) 0%, var(--basic) 100%);
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-700);
}

.page {
  width: min(1120px, 92vw);
  margin: 24px auto 40px;
  animation: fadeIn 500ms ease-out;
}

.card {
  background: color-mix(in srgb, var(--white) 88%, var(--basic) 12%);
  border: 1px solid rgba(140, 47, 57, 0.1);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
}

header.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.brand-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 2.1vw, 2rem);
  letter-spacing: 0.2px;
}

.brand-sub {
  margin: 6px 0 0;
  font-family: 'Libre Baskerville', serif;
  opacity: 0.86;
  font-size: 0.94rem;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.2fr 0.8fr;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

input[type='text'],
input[type='password'],
input[type='url'],
select,
textarea,
input[type='file'] {
  width: 100%;
  border: 1px solid rgba(59, 47, 47, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.97rem;
  background: #fff;
  color: var(--text);
}

textarea {
  min-height: 160px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  line-height: 1.4;
}

.field {
  margin-bottom: 12px;
}

button,
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-700) 100%);
  color: var(--basic);
}

.btn-primary:hover {
  filter: brightness(1.03);
}

.btn-secondary {
  background: rgba(140, 47, 57, 0.1);
  color: var(--accent-700);
}

.btn-danger {
  background: var(--danger);
  color: var(--basic);
}

.inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.alert {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.alert-ok {
  background: rgba(47, 125, 79, 0.13);
  border: 1px solid rgba(47, 125, 79, 0.35);
}

.alert-error {
  background: rgba(179, 51, 46, 0.12);
  border: 1px solid rgba(179, 51, 46, 0.35);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid rgba(59, 47, 47, 0.14);
  text-align: left;
  padding: 10px 8px;
  vertical-align: top;
  font-size: 0.95rem;
}

th {
  font-family: 'Libre Baskerville', serif;
}

.meta {
  opacity: 0.75;
  font-size: 0.9rem;
}

.badge-text {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-family: 'Lato', sans-serif;
  background: #d4af37;
  color: #3b2f2f;
  vertical-align: middle;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.login-shell {
  max-width: 520px;
  margin: 8vh auto;
}

code.preview {
  display: block;
  border-radius: 10px;
  padding: 10px;
  background: #fbf8f1;
  border: 1px solid rgba(59, 47, 47, 0.14);
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
}

@media (max-width: 920px) {
  .grid {
    grid-template-columns: 1fr;
  }

  header.topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
