:root {
  --brand: #d71920;
  --brand-dark: #a80f18;
  --brand-soft: #fde8ea;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #17191f;
  --muted: #6d7280;
  --line: #e7e9ef;
  --green: #15834a;
  --amber: #9a6400;
  --red: #b91522;
  --shadow: 0 10px 28px rgba(23, 25, 31, .09);
  --radius: 14px;
  --nav-h: 116px;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  background: #e5e7eb;
  color: var(--text);
  font-family: Poppins, Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.app {
  width: 100%;
  max-width: 820px;
  min-height: 100svh;
  margin: 0 auto;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 10px);
  background: var(--bg);
  box-shadow: 0 0 40px rgba(15, 23, 42, .16);
}

.app.welcome {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(215, 25, 32, .16), transparent 32%),
    var(--bg);
}

.desktop-marketing {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 2px 14px rgba(0, 0, 0, .18);
}

.menu {
  width: 34px;
  height: 34px;
  display: grid;
  gap: 4px;
  align-content: center;
  border: 0;
  background: transparent;
}

.menu span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 20px;
  background: #fff;
}

.brand {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-right: 34px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  font-weight: 900;
}

.brand-text {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
}

.main {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.section {
  padding: 12px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.muted,
.mini-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.truncate {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.welcome-card {
  width: 100%;
  display: grid;
  gap: 18px;
  padding: 24px 18px;
  text-align: center;
}

.welcome-logo {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(215, 25, 32, .24);
}

.welcome-card h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

.welcome-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.welcome-actions {
  display: grid;
  gap: 10px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 18px;
  font-weight: 900;
}

.user-info {
  min-width: 0;
  flex: 1;
}

.user-info h1 {
  margin: 0 0 2px;
  font-size: 17px;
  line-height: 1.15;
}

.library-select,
.field {
  display: grid;
  gap: 6px;
}

.library-select label,
.field label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.library-select select,
.field input,
.field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 11px;
  background: #fff;
  color: var(--text);
}

.status-card {
  padding: 12px;
}

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

.status-head h2 {
  margin: 0 0 3px;
  font-size: 16px;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
}

.status-pill.green {
  background: #e9f7ef;
  color: var(--green);
}

.status-pill.amber {
  background: #fff3d8;
  color: var(--amber);
}

.status-pill.red {
  background: #fde8ea;
  color: var(--red);
}

.status-main {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.status-main b {
  display: block;
  margin-top: 3px;
  font-size: 24px;
  line-height: 1;
}

.status-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.status-meta div,
.right-card,
.rule-chips div,
.detail-line {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}

.status-meta div {
  padding: 8px 6px;
}

.status-meta span,
.right-card span,
.rule-chips span,
.detail-line span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.status-meta b,
.right-card b,
.rule-chips b,
.detail-line b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.primary-btn,
.secondary-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 13px;
  padding: 0 14px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.secondary-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.primary-btn:disabled {
  opacity: .45;
}

.home-cta {
  min-height: 50px;
  font-size: 15px;
}

.center-action {
  display: grid;
  place-items: center;
  padding: 8px 0 4px;
}

.rights-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.right-card {
  padding: 9px 6px;
}

.right-card b {
  font-size: 14px;
}

.occupancy-card {
  padding: 12px;
}

.occupancy-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.occupancy-percent {
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.progress {
  display: block;
  height: 7px;
  overflow: hidden;
  margin: 10px 0 7px;
  border-radius: 999px;
  background: #eceef3;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
}

.occupancy-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.rule-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.rule-chips div {
  padding: 8px 6px;
  text-align: center;
}

.empty-compact {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px dashed #d6d9e2;
  border-radius: 13px;
  background: #fff;
  text-align: center;
}

.empty-compact b {
  font-size: 14px;
}

.empty-compact span {
  color: var(--muted);
  font-size: 12px;
}

.system-announcement {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(154, 100, 0, .22);
  border-radius: var(--radius);
  padding: 11px;
  background: #fff7e5;
  box-shadow: var(--shadow);
}

.system-announcement.closed {
  border-color: rgba(215, 25, 32, .20);
  background: #fff4f5;
}

.system-announcement-title {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.system-announcement-message {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.system-announcement-close {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, .82);
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
}

.staff-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.staff-modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.staff-modal {
  width: min(100%, 360px);
  border-radius: 22px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  text-align: center;
  transform: translateY(10px) scale(.98);
  transition: transform .22s ease;
}

.staff-modal-overlay.is-visible .staff-modal {
  transform: translateY(0) scale(1);
}

.staff-modal-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: #fff3d8;
  color: var(--amber);
  font-size: 24px;
  font-weight: 900;
}

.staff-modal-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.staff-modal-message {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.55;
}

.staff-modal-meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.staff-modal-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.staff-modal.warning .staff-modal-icon {
  background: #fff3d8;
  color: var(--amber);
}

.staff-modal.danger .staff-modal-icon {
  background: #fde8ea;
  color: var(--red);
}

.staff-modal.info .staff-modal-icon {
  background: #e8f1ff;
  color: #2563eb;
}

.form-grid {
  display: grid;
  gap: 9px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-message,
.note {
  margin: 0;
  padding: 9px;
  border: 1px solid #f1c2c8;
  border-radius: 12px;
  background: #fff5f6;
  color: var(--red);
  font-size: 11px;
  line-height: 1.35;
}

.form-message.success {
  border-color: #bce2ca;
  background: #eef9f2;
  color: var(--green);
}

.res-list,
.profile-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.res-list li,
.profile-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}

.res-list span,
.profile-list span {
  min-width: 0;
}

.res-list b,
.profile-list b {
  display: block;
  font-size: 12px;
}

.res-list small,
.profile-list small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.res-list em {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.detail-list {
  display: grid;
  gap: 7px;
}

.detail-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px;
}

.qr-page {
  display: grid;
  gap: 12px;
  padding: 14px;
  text-align: center;
}

.qr-box {
  width: min(270px, 78vw);
  height: min(270px, 78vw);
  display: grid;
  place-items: center;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.qr-box canvas {
  width: min(236px, 66vw);
  height: min(236px, 66vw);
  display: block;
}

.qr-countdown {
  --qr-progress: 100%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--brand) var(--qr-progress), #eceef3 0);
}

.qr-countdown span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: 100%;
  max-width: 820px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: 72px auto;
  align-items: end;
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, .12);
}

.nav-item {
  min-width: 0;
  min-height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #777d88;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
}

.nav-icon {
  font-size: 19px;
  line-height: 1;
}

.nav-item.active {
  color: var(--brand);
}

.nav-main {
  min-height: 78px;
  transform: translateY(-16px);
}

.nav-main .nav-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 5px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(215, 25, 32, .36);
}

.footer-company {
  grid-column: 1 / -1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  padding: 5px 8px 7px;
  border-top: 1px solid rgba(109, 114, 128, .14);
  color: var(--muted);
  font-size: clamp(7px, 1.9vw, 9px);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  opacity: .78;
}

.footer-company span {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-company span:not(:last-child)::after {
  content: "•";
  margin-left: 4px;
  opacity: .72;
}

.hidden {
  display: none !important;
}

@media (max-width: 374px) {
  .main {
    gap: 8px;
    padding: 8px;
  }

  .rights-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .status-meta,
  .rule-chips,
  .form-row {
    grid-template-columns: 1fr;
  }

  .status-main b {
    font-size: 21px;
  }
}

@media (min-width: 769px) {
  .main {
    gap: 14px;
    padding: 18px;
  }
}

@media (max-width: 768px) {
  body {
    display: block;
    background: var(--bg);
  }

  .app {
    max-width: none;
    box-shadow: none;
  }

  .bottom-nav {
    max-width: none;
  }
}

@media (min-width: 1024px) {
  body {
    min-height: 100vh;
    align-items: center;
    gap: clamp(32px, 5vw, 76px);
    padding: 32px;
    background:
      radial-gradient(circle at 18% 12%, rgba(215, 25, 32, .12), transparent 30%),
      linear-gradient(135deg, #eef1f5, #dde2ea);
  }

  .desktop-marketing {
    width: min(48vw, 620px);
    display: grid;
    gap: 22px;
    color: var(--text);
  }

  .desktop-eyebrow {
    width: max-content;
    max-width: 100%;
    border: 1px solid rgba(215, 25, 32, .16);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, .68);
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
  }

  .desktop-marketing h1 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(36px, 4.6vw, 58px);
    line-height: 1.02;
    letter-spacing: 0;
  }

  .desktop-marketing p {
    max-width: 560px;
    margin: 0;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.65;
  }

  .desktop-marketing small {
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
  }

  .desktop-slider {
    position: relative;
    width: min(100%, 520px);
    min-height: 154px;
  }

  .desktop-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .12);
    opacity: 0;
    transform: translateY(10px);
    animation: desktopSlide 16s infinite;
  }

  .desktop-slide:nth-child(2) {
    animation-delay: 4s;
  }

  .desktop-slide:nth-child(3) {
    animation-delay: 8s;
  }

  .desktop-slide:nth-child(4) {
    animation-delay: 12s;
  }

  .desktop-slide b {
    font-size: 20px;
  }

  .desktop-slide span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
  }

  .app {
    position: relative;
    max-width: 460px;
    height: min(860px, calc(100vh - 64px));
    min-height: 720px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 30px;
    outline: 1px solid rgba(21, 131, 74, .18);
    padding-bottom: 0;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .24);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  }

  .app:hover {
    border-color: rgba(21, 131, 74, .28);
    box-shadow: 0 34px 88px rgba(15, 23, 42, .28);
    transform: translateY(-2px);
  }

  .app::before {
    content: "● Etkileşimli Demo";
    position: absolute;
    top: -34px;
    right: 18px;
    border: 1px solid rgba(21, 131, 74, .18);
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(255, 255, 255, .86);
    color: #15834a;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .10);
  }

  .app::after {
    content: "Canlı Demo Ekranı\A Menüleri kullanarak rezervasyon, QR ve mola akışını test edebilirsiniz.";
    position: absolute;
    top: -74px;
    left: 18px;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
    white-space: pre;
  }

  .menu {
    display: none;
  }

  .brand {
    padding-right: 0;
  }

  .topbar {
    position: relative;
    flex: 0 0 auto;
  }

  .main {
    flex: 1 1 auto;
    overflow-y: auto;
    gap: 12px;
    padding: 14px;
  }

  .bottom-nav {
    position: relative;
    left: auto;
    bottom: auto;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    transform: none;
    box-shadow: 0 -8px 18px rgba(15, 23, 42, .10);
  }

  .nav-main {
    transform: translateY(-14px);
  }

  .staff-modal-overlay {
    position: absolute;
    inset: 0;
    border-radius: 30px;
  }

  .staff-modal {
    width: min(100% - 36px, 360px);
  }
}

@keyframes desktopSlide {
  0%,
  20% {
    opacity: 1;
    transform: translateY(0);
  }

  25%,
  100% {
    opacity: 0;
    transform: translateY(10px);
  }
}
