@font-face {
  font-family: 'DMSans';
  src:
    url('../assets/fonts/DMSans-Regular.woff') format('woff'),
    url('https://ext1.visitlinkoping.se/public/fonts/DMSans-Regular.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'DMSans-Bold';
  src:
    url('../assets/fonts/DMSans-Bold.woff') format('woff'),
    url('https://ext1.visitlinkoping.se/public/fonts/DMSans-Bold.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'Gruffy';
  src:
    url('../assets/fonts/F37GruffySoft-Medium.woff') format('woff'),
    url('https://ext1.visitlinkoping.se/public/fonts/F37GruffySoft-Medium.woff') format('woff');
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --card: #ffffff;
  --card-soft: #fdebe9;
  --accent: #f5c9bf;
  --accent-strong: #df5a3d;
  --accent-deep: #5b211c;
  --ink: #1f1f1f;
  --muted: #6c6c6c;
  --line: #ebdbd6;
  --ok: #0f8b47;
  --warn: #b42318;
  --shadow: 0 12px 24px rgba(80, 35, 27, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  position: relative;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DMSans', sans-serif;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(253, 235, 233, 0.9) 0%, rgba(255, 255, 255, 0.96) 32%, rgba(255, 255, 255, 1) 100%),
    url('../assets/legacy/hero-linkoping.jpg') center top / cover no-repeat;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Gruffy', sans-serif;
}

main {
  width: min(1320px, 100% - 2rem);
  margin: 1rem auto 2rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.topbar-inner {
  width: min(1320px, 100% - 2rem);
  margin: 0 auto;
  padding: 0.75rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #f2ddd8;
  box-shadow: 0 8px 16px rgba(62, 26, 21, 0.1);
}

.brand-title {
  font-size: clamp(1.25rem, 2.8vw, 2rem);
}

.toolbar {
  display: flex;
  gap: 0.6rem;
}

.button,
.button-ghost,
.button-danger,
.button-link {
  border: none;
  border-radius: 25px;
  min-height: 40px;
  padding: 0.5rem 0.95rem;
  font-family: 'DMSans-Bold', sans-serif;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.button {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 8px 16px rgba(95, 35, 28, 0.15);
}

.button:hover {
  background: var(--accent-deep);
  color: #fff;
  transform: translateY(-1px);
}

.button-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 8px 16px rgba(95, 35, 28, 0.06);
}

.button-ghost:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.button-danger {
  background: #fff;
  color: var(--warn);
  border: 1px solid #f0cac5;
}

.button-danger:hover {
  background: #fff0ee;
}

.button-link {
  background: transparent;
  color: var(--accent-strong);
  text-decoration: underline;
  border-radius: 0;
  padding-inline: 0;
}

.card {
  background: var(--card);
  border: 1px solid #f4d8d2;
  border-radius: var(--radius);
  box-shadow: 0 14px 28px rgba(80, 35, 27, 0.1);
}

.field {
  display: grid;
  gap: 0.3rem;
}

label {
  font-size: 0.87rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  font-family: 'DMSans', sans-serif;
  font-size: 0.94rem;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #f7d4cc;
  border-color: #e8a89a;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #fff;
  font-size: 0.79rem;
  line-height: 1;
}

.muted {
  color: var(--muted);
}

.notice {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  font-size: 0.92rem;
}

.notice-success {
  background: #ecfdf3;
  color: var(--ok);
  border: 1px solid #b7ebcd;
}

.notice-error {
  background: #fef0ef;
  color: var(--warn);
  border: 1px solid #f8c8c2;
}

.table-wrap {
  overflow: auto;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hidden {
  display: none !important;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

@media (max-width: 840px) {
  main {
    width: min(1320px, 100% - 1rem);
  }

  .topbar-inner {
    width: min(1320px, 100% - 1rem);
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}
