:root {
  color-scheme: light;
  --ink: #11100d;
  --muted: #6f6659;
  --line: #d9cfc0;
  --soft: #f4efe5;
  --paper: #fffaf1;
  --field: #fffdf8;
  --forest: #384b38;
  --forest-dark: #263428;
  --gold: #b18442;
  --clay: #986b4a;
  --danger: #9d3f36;
  --shadow: 0 22px 55px rgba(42, 35, 25, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

@media (min-width: 900px) {
  body {
    zoom: 0.8;
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(244, 239, 229, 0.92);
  border-bottom: 1px solid rgba(17, 16, 13, 0.12);
  backdrop-filter: blur(16px);
}

.brand {
  color: inherit;
  text-decoration: none;
}

.brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

nav a {
  min-height: 40px;
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

nav a:hover,
nav a:focus-visible,
.nav-button:hover,
.nav-button:focus-visible {
  background: #e8decc;
}

.nav-button {
  min-height: 40px;
  padding: 10px 13px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
}

main {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

#admin {
  width: min(1720px, calc(100vw - 48px));
  margin-left: 50%;
  transform: translateX(-50%);
}

#dashboard,
#analytics {
  max-width: 1120px;
  margin: 0 auto;
}

#analytics {
  max-width: 900px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(58vh, 560px);
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(17, 16, 13, 0.66), rgba(17, 16, 13, 0.26) 54%, rgba(17, 16, 13, 0.18)),
    url("https://alpinefamilyretreat.com/images/House%20front.jpg") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.language-switcher {
  display: flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(17, 16, 13, 0.16);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.58);
  backdrop-filter: blur(12px);
}

.language-switcher button {
  min-width: 36px;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.language-switcher button.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 22px rgba(17, 16, 13, 0.22);
}

.hero-copy {
  align-self: end;
  max-width: 760px;
  padding: clamp(28px, 7vw, 72px) clamp(20px, 6vw, 64px);
  color: #fff;
}

.intro {
  max-width: 720px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f2d39b;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5.8vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.hero-copy p,
.intro p,
.hint {
  line-height: 1.55;
}

.intro p,
.hint {
  color: var(--muted);
}

.hero-copy p:last-child {
  max-width: 560px;
  margin-bottom: 0;
  font-size: clamp(17px, 2vw, 22px);
}

.panel {
  padding: clamp(16px, 2.6vw, 26px);
  background: rgba(255, 250, 241, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.admin-tile {
  display: grid;
  min-height: 196px;
  align-content: start;
  gap: 10px;
  padding: 14px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 250, 241, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-tile:hover,
.admin-tile:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(177, 132, 66, 0.55);
  box-shadow: 0 26px 64px rgba(42, 35, 25, 0.18);
}

.admin-tile strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.04;
}

.admin-tile small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.analytics-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: clamp(16px, 2.2vw, 22px);
  background: rgba(255, 250, 241, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.analytics-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.analytics-head h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
}

.analytics-head p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.analytics-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.analytics-controls .secondary {
  width: auto;
  margin: 0;
  padding: 12px 14px;
  white-space: nowrap;
}

.analytics-controls .secondary.active {
  color: #fffaf1;
  background: var(--forest);
  border-color: var(--forest);
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.analytics-summary article,
.analytics-grid article {
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.analytics-summary article {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.analytics-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analytics-summary strong {
  color: var(--ink);
  font: 700 28px/1 Georgia, "Times New Roman", serif;
}

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

.analytics-grid article {
  display: grid;
  gap: 12px;
  min-height: 180px;
  padding: 14px;
}

.analytics-grid h3 {
  margin: 0;
  font-size: 15px;
}

.analytics-bars {
  display: flex;
  align-items: end;
  gap: 8px;
  min-height: 120px;
  padding-top: 10px;
}

.analytics-bar-item {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 34px;
  height: 120px;
  flex: 1;
  gap: 7px;
  text-align: center;
}

.analytics-bar-value,
.analytics-bar-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.analytics-bar {
  display: block;
  align-self: end;
  min-height: 12px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #d8bd82, #385138);
}

.analytics-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.analytics-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.analytics-list-row strong,
.analytics-list-row b {
  font-size: 13px;
}

.analytics-list-row div {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.analytics-list-row span {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: #d8bd82;
}

.analytics-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

#analytics .intro {
  max-width: none;
  margin-bottom: 14px;
}

#analytics .intro h1 {
  font-size: clamp(40px, 4.4vw, 60px);
}

#analytics .intro p:last-child {
  max-width: 720px;
}

#analytics .analytics-panel {
  gap: 12px;
  padding: 18px;
}

#analytics .analytics-head {
  align-items: center;
}

#analytics .analytics-head h2 {
  font-size: clamp(30px, 3vw, 40px);
}

#analytics .analytics-controls .secondary {
  padding: 10px 12px;
}

#analytics .analytics-summary {
  gap: 9px;
}

#analytics .analytics-summary article {
  min-height: 70px;
  padding: 14px;
}

#analytics .analytics-summary strong {
  font-size: 28px;
}

#analytics .analytics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#analytics .analytics-grid article {
  min-height: 150px;
  padding: 14px;
}

#analytics .analytics-grid article:nth-child(1),
#analytics .analytics-grid article:nth-child(2) {
  grid-column: span 2;
}

#analytics .analytics-bars {
  min-height: 100px;
}

#analytics .analytics-bar-item {
  height: 100px;
}

.admin-tile-preview {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(217, 207, 192, 0.9);
  border-radius: 8px;
  background: #f2eadc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.tile-website {
  background:
    linear-gradient(180deg, rgba(17, 16, 13, 0.05), rgba(17, 16, 13, 0.08)),
    url("/prijava/welcome-flyer/assets/house-front.jpg") center / cover no-repeat;
}

.tile-website::before,
.tile-website::after {
  content: none;
}

.tile-form {
  background:
    linear-gradient(135deg, rgba(56, 75, 56, 0.94), rgba(38, 52, 40, 0.92)) 0 0 / 100% 30% no-repeat,
    radial-gradient(circle at 82% 20%, rgba(242, 211, 155, 0.48), transparent 23%),
    #fffaf1;
}

.tile-form::before,
.tile-form::after {
  content: "";
  position: absolute;
}

.tile-form::before {
  left: 13px;
  right: 13px;
  top: 45%;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #384b38 0 34%, #d9cfc0 34% 100%);
  box-shadow:
    0 18px 0 #d9cfc0,
    0 36px 0 #d9cfc0;
}

.tile-form::after {
  left: 16px;
  top: 13px;
  width: 62px;
  height: 8px;
  border-radius: 999px;
  background: #f2d39b;
  box-shadow:
    74px 0 0 rgba(255, 250, 241, 0.86),
    0 24px 0 rgba(255, 250, 241, 0.36),
    0 48px 0 rgba(56, 75, 56, 0.2);
}

.tile-book {
  background:
    linear-gradient(#e7dac6 0 29%, transparent 29%),
    repeating-linear-gradient(0deg, transparent 0 21px, rgba(17, 16, 13, 0.1) 22px),
    repeating-linear-gradient(90deg, transparent 0 48px, rgba(17, 16, 13, 0.09) 49px),
    #fffaf1;
}

.tile-book::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 54px;
  height: 10px;
  border-radius: 999px;
  background: #384b38;
  box-shadow:
    74px 0 0 #b18442,
    148px 0 0 #986b4a,
    0 43px 0 -2px rgba(56, 75, 56, 0.9),
    74px 43px 0 -2px rgba(177, 132, 66, 0.86),
    148px 43px 0 -2px rgba(152, 107, 74, 0.82);
}

.tile-book::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d9cfc0 0 42%, transparent 42% 52%, #d9cfc0 52% 100%);
}

.tile-qr {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 42%, transparent 43%),
    linear-gradient(135deg, #fffdf8, #f2eadc);
}

.tile-qr::before {
  content: "";
  width: 74px;
  height: 74px;
  padding: 8px;
  border-radius: 6px;
  background: #fff url("welcome-flyer/assets/checkin-qr.svg") center / 74px 74px no-repeat;
  box-shadow: 0 10px 24px rgba(42, 35, 25, 0.13);
}

.tile-flyer {
  background:
    linear-gradient(90deg, rgba(17, 16, 13, 0.48), rgba(17, 16, 13, 0.08)),
    url("welcome-flyer/welcome-flyer-preview.png") top center / cover no-repeat;
}

.tile-flyer::before,
.tile-flyer::after {
  content: "";
  position: absolute;
}

.tile-flyer::before {
  left: 15px;
  top: 14px;
  width: 92px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.86);
  box-shadow:
    0 18px 0 rgba(242, 211, 155, 0.86),
    0 36px 0 rgba(255, 250, 241, 0.7);
}

.tile-flyer::after {
  right: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  border-radius: 4px;
  background:
    linear-gradient(#11100d 0 0) 0 0 / 12px 12px,
    linear-gradient(#11100d 0 0) 30px 0 / 12px 12px,
    linear-gradient(#11100d 0 0) 0 30px / 12px 12px,
    linear-gradient(#11100d 0 0) 20px 20px / 7px 7px,
    #fffaf1;
  background-repeat: no-repeat;
  box-shadow: 0 8px 18px rgba(17, 16, 13, 0.22);
}

.tile-stats {
  background:
    linear-gradient(180deg, #fffdf8, #f2eadc);
}

.tile-stats::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 72px;
  background:
    linear-gradient(#0e7880 0 0) 0 44px / 18px 28px,
    linear-gradient(#d8a13f 0 0) 29px 30px / 18px 42px,
    linear-gradient(#0e7880 0 0) 58px 12px / 18px 60px,
    linear-gradient(#385138 0 0) 87px 36px / 18px 36px,
    linear-gradient(#d8a13f 0 0) 116px 0 / 18px 72px;
  background-repeat: no-repeat;
}

.tile-stats::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 16px;
  height: 12px;
  border-radius: 999px;
  background: #d9cfc0;
  box-shadow:
    0 23px 0 #d9cfc0,
    0 46px 0 #d9cfc0;
}

.stay-grid,
.guest-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
}

.stay-grid > *,
.guest-card > * {
  min-width: 0;
}

.guest-card {
  position: relative;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  margin-top: 16px;
  padding: 18px;
  background: #f7f0e2;
  border: 1px solid #ddd1be;
  border-radius: 8px;
}

.guest-card-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 92px;
}

.guest-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
}

label {
  display: grid;
  gap: 7px;
  color: #3f372c;
  font-size: 14px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c9bca9;
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--forest);
  outline: 3px solid rgba(56, 75, 56, 0.18);
}

.is-invalid {
  border-color: var(--danger);
  outline: 3px solid rgba(157, 63, 54, 0.14);
}

.form-error {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(157, 63, 54, 0.28);
  border-radius: 8px;
  background: #f6e6df;
  color: var(--danger);
  font-weight: 800;
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

input[readonly] {
  background: #efe6d5;
  color: #4d4335;
  cursor: default;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.info-dot {
  position: relative;
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-left: 5px;
  place-items: center;
  border-radius: 999px;
  background: #e8decc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.info-dot:hover::after,
.info-dot:focus-visible::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 8;
  width: 260px;
  padding: 9px 10px;
  border-radius: 6px;
  background: #11100d;
  color: #fff;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  transform: translateX(-50%);
}

.toolbar,
.admin-tools {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(280px, 1fr) minmax(170px, 180px) minmax(170px, 180px) minmax(130px, 150px) auto auto;
  gap: 12px;
  margin-top: 24px;
}

.toolbar {
  justify-content: space-between;
}

.toolbar .secondary {
  margin-left: auto;
}

.admin-tools {
  margin-top: 0;
  margin-bottom: 16px;
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 170px) minmax(150px, 170px) minmax(125px, 145px) auto;
}

.admin-tools input {
  width: 100%;
}

.admin-tools label {
  min-width: 0;
}

.admin-tools label input,
.admin-tools label select {
  min-height: 42px;
}

.admin-tools input[type="date"] {
  min-width: 170px;
}

.admin-tools button {
  min-width: 126px;
}

.ajpes-export {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(56, 75, 56, 0.35);
  border-radius: 8px;
  background: #edf2e8;
}

.ajpes-export button {
  width: 100%;
  background: var(--forest);
  color: #fff;
  box-shadow: 0 8px 20px rgba(56, 75, 56, 0.18);
}

.ajpes-export button:hover,
.ajpes-export button:focus-visible {
  background: var(--forest-dark);
}

.ajpes-export p {
  margin: 0;
  color: #3f4e3d;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.print-book-button {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 560px);
  background: #d8c5a1;
  color: #2f281f;
  border: 1px solid #c4ad82;
}

.print-book-button:hover,
.print-book-button:focus-visible {
  background: #cbb181;
}

.company-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f0e2;
}

.company-summary div {
  display: grid;
  gap: 3px;
}

.company-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.company-summary strong {
  font-size: 15px;
}

.company-summary small {
  color: var(--muted);
  font-weight: 700;
}

.admin-login {
  display: grid;
  max-width: 520px;
  margin-top: 24px;
  padding: clamp(22px, 4vw, 40px);
}

.login-card {
  display: grid;
  gap: 16px;
}

.login-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1;
}

.login-card .hint {
  margin: 0;
}

.login-card .primary {
  margin-top: 4px;
}

button {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 900;
}

.primary {
  width: 100%;
  margin-top: 18px;
  background: var(--forest);
  color: #fff;
}

.primary:hover,
.primary:focus-visible {
  background: var(--forest-dark);
}

.secondary {
  background: #e8decc;
  color: var(--ink);
}

.add-guest-row {
  width: 100%;
  margin-top: 16px;
  border: 1px dashed #b8a98f;
  background: #f7f0e2;
  color: var(--ink);
}

.add-guest-row:hover,
.add-guest-row:focus-visible {
  background: #ede3d2;
}

.danger {
  background: #f0d8d3;
  color: var(--danger);
}

.icon-button,
.remove-guest {
  min-width: 44px;
  padding: 8px 12px;
}

.remove-guest {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  color: var(--danger);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.consent input {
  width: 20px;
  min-height: 20px;
  margin-top: 2px;
}

.hidden {
  display: none;
}

.table-wrap {
  overflow-x: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
}

th {
  background: #ede3d2;
  color: #3f372c;
  font-size: 12px;
  line-height: 1.2;
}

td {
  font-size: 13px;
  line-height: 1.25;
}

th:nth-child(1),
td:nth-child(1) {
  width: 4%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 4.5%;
}

th:nth-child(3),
td:nth-child(3) {
  width: 10.5%;
}

th:nth-child(4),
td:nth-child(4) {
  width: 7%;
}

th:nth-child(5),
td:nth-child(5) {
  width: 6%;
}

th:nth-child(6),
td:nth-child(6) {
  width: 8%;
}

th:nth-child(7),
td:nth-child(7) {
  width: 9.5%;
}

th:nth-child(8),
td:nth-child(8) {
  width: 8%;
}

th:nth-child(9),
td:nth-child(9) {
  width: 8%;
}

th:nth-child(10),
td:nth-child(10) {
  width: 4%;
}

th:nth-child(11),
td:nth-child(11) {
  width: 8%;
}

th:nth-child(12),
td:nth-child(12) {
  width: 11%;
}

th:nth-child(13),
td:nth-child(13) {
  width: 5%;
}

th:nth-child(14),
td:nth-child(14) {
  width: 6.5%;
}

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

.table-actions button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  justify-self: start;
  min-width: 74px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.status-active {
  border-color: #88b698;
  background: #dcefe2;
  color: #185b34;
}

.status-completed {
  border-color: #cfc2ad;
  background: #eee6d9;
  color: #655a4a;
}

.status-upcoming {
  border-color: #b9c8d7;
  background: #e5edf4;
  color: #36566e;
}

.guestbook-edit-row td {
  background: #fffaf1;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  padding: 10px 0;
}

.edit-grid label {
  font-size: 13px;
}

.qr-panel {
  display: grid;
  justify-items: start;
  gap: 18px;
  max-width: 460px;
}

#qr-image {
  width: 220px;
  height: 220px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  object-fit: contain;
}

dialog {
  width: min(640px, calc(100% - 24px));
  border: 0;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(17, 16, 13, 0.52);
}

.confirm-box {
  padding: 8px;
}

.confirm-box h2 {
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
}

.confirm-box p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.export-period-summary {
  display: grid;
  gap: 5px;
  margin: 18px 0 4px;
  padding: 16px;
  border: 1px solid rgba(56, 75, 56, 0.3);
  border-radius: 8px;
  background: #edf2e8;
}

.export-period-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.export-period-summary strong {
  color: var(--forest-dark);
  font: 700 24px/1.15 Georgia, "Times New Roman", serif;
}

.export-period-summary small {
  color: #536250;
  font-weight: 750;
}

.export-period-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.export-period-fields input {
  background: #fffaf1;
}

.export-dialog-error {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f6e6df;
  color: var(--danger);
  font-weight: 800;
  line-height: 1.35;
}

.confirm-actions .primary,
.confirm-actions .secondary,
.confirm-actions .danger {
  width: auto;
  margin-top: 0;
}

@media (max-width: 900px) {
  #dashboard,
  #analytics {
    width: min(100vw - 20px, 1120px);
    margin-left: auto;
    transform: none;
  }

  #dashboard .intro,
  #analytics .intro {
    align-items: flex-start;
    flex-direction: column;
  }

  #dashboard .intro p:last-child,
  #analytics .intro p:last-child {
    max-width: none;
    text-align: left;
  }

  #admin {
    width: min(100vw - 20px, 1120px);
  }

  .admin-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-head {
    flex-direction: column;
  }

  .analytics-controls {
    justify-content: flex-start;
  }

  .analytics-summary,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  #analytics .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #analytics .analytics-grid article:nth-child(1),
  #analytics .analytics-grid article:nth-child(2) {
    grid-column: span 1;
  }

  .stay-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .guest-card {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .company-summary {
    grid-template-columns: 1fr;
  }

  .admin-tools {
    grid-template-columns: 1fr 1fr;
  }

  .admin-tools .search-field,
  .admin-tools > button,
  .ajpes-export {
    grid-column: 1 / -1;
  }

  .ajpes-export {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    border: 0;
    overflow: visible;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  table {
    table-layout: auto;
  }

  thead {
    display: none;
  }

  tbody tr:not(.guestbook-edit-row) {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffaf1;
  }

  tbody tr:not(.guestbook-edit-row) td {
    display: grid;
    width: 100%;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(217, 207, 192, 0.7);
    font-size: 14px;
  }

  tbody tr:not(.guestbook-edit-row) td:last-child {
    border-bottom: 0;
  }

  tbody tr:not(.guestbook-edit-row) td::before {
    color: var(--muted);
    font-weight: 900;
  }

  tbody tr:not(.guestbook-edit-row) td:nth-child(1)::before { content: "Zap. št."; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(2)::before { content: "Leto"; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(3)::before { content: "Gost"; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(4)::before { content: "Rojstvo"; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(5)::before { content: "Spol"; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(6)::before { content: "Državljanstvo"; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(7)::before { content: "Dokument"; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(8)::before { content: "Oddano"; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(9)::before { content: "Prihod"; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(10)::before { content: "Dni"; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(11)::before { content: "Odhod"; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(12)::before { content: "Taksa"; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(13)::before { content: "Status"; }
  tbody tr:not(.guestbook-edit-row) td:nth-child(14)::before { content: "Uredi"; }

  .guestbook-edit-row td {
    display: block;
    padding: 0;
  }

  .edit-grid {
    grid-template-columns: 1fr;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand strong {
    font-size: 22px;
  }

  nav {
    width: 100%;
  }

  .header-actions {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  main {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .hero {
    min-height: 430px;
  }

  .hero-copy {
    padding: 28px 18px;
  }

  h1 {
    font-size: 46px;
  }

  .stay-grid,
  .guest-card {
    grid-template-columns: 1fr;
  }

  .admin-dashboard {
    grid-template-columns: 1fr;
  }

  #analytics .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-panel {
    padding: 16px;
  }

  .analytics-controls .secondary {
    flex: 1 1 calc(50% - 8px);
  }

  .analytics-summary strong {
    font-size: 30px;
  }

  .analytics-bars {
    overflow-x: auto;
  }

  .analytics-bar-item {
    min-width: 42px;
  }

  .admin-tile {
    min-height: 170px;
    padding: 22px;
  }

  .guest-card-header {
    align-items: stretch;
    flex-direction: column;
    padding-right: 0;
  }

  .panel {
    padding: 16px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar .secondary {
    width: 100%;
    margin-left: 0;
  }

  .admin-tools {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .admin-tools input,
  .admin-tools button {
    width: 100%;
  }

  .confirm-actions {
    flex-direction: column-reverse;
  }

  .confirm-actions .primary,
  .confirm-actions .secondary,
  .confirm-actions .danger {
    width: 100%;
  }

  .export-period-fields {
    grid-template-columns: 1fr;
  }
}
