:root {
  --paper: #ffffff;
  --ink: #111111;
  --border: #444444;
  --brand-teal: #174d44;
  --brand-teal-dark: #0f352e;
  --star: #e59866;
  --link: #0052cc;
  --bg-page: #edf1f0;
  --text-muted: #555555;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.wrap {
  padding: 24px 16px 48px;
}

/* Action buttons at top (screen only) */
.actions, .top-nav {
  max-width: 800px;
  margin: 0 auto 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.actions-left, .top-nav-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.actions-right, .top-nav-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* 2x2 Action Buttons from Image */
.btn-grid-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  max-width: 480px;
  margin: 0 auto 20px;
}

.btn-teal {
  background-color: #24524c;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.btn-teal:hover {
  background-color: #173833;
}

.btn-beige {
  background-color: #eeebe3;
  color: #111111;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.btn-beige:hover {
  background-color: #e2ded5;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--brand-teal);
  background: var(--brand-teal);
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.btn:hover {
  background: var(--brand-teal-dark);
  border-color: var(--brand-teal-dark);
}

.btn.ghost {
  background: #ffffff;
  color: var(--brand-teal);
}

.btn.ghost:hover {
  background: #f0f6f5;
}

.btn.sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn.danger {
  background: #b3261e;
  border-color: #b3261e;
}

.notice {
  max-width: 800px;
  margin: 0 auto 16px;
  padding: 12px 18px;
  border-left: 4px solid var(--star);
  background: #fff8ef;
  font-weight: 500;
  border-radius: 2px;
}

.notice.ok {
  border-color: var(--brand-teal);
  background: #eef7f5;
  color: #143733;
}

/* ============================================================
   A4 SHEET DOCUMENT CONTAINER
   ============================================================ */
.sheet-container {
  max-width: 780px;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.09);
  border: 1.5px solid var(--border);
  padding: 34px 38px 38px;
  position: relative;
  overflow: hidden;
}

/* Background Watermark moved slightly down to match reference */
.watermark {
  position: absolute;
  top: 57%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 440px;
  height: 440px;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.08;
  mix-blend-mode: multiply;
}

.watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Document Header: Appartment Reservation & The Vera Luxury Stay */
.doc-header {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 22px;
}

.doc-title-appartment {
  margin: 0 0 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--brand-teal);
}

.doc-subtitle-brand {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--brand-teal);
}

/* Table layout */
.doc-table {
  position: relative;
  z-index: 2;
  width: 100%;
  border-collapse: collapse;
  border: 1.5px solid var(--border);
  background: transparent;
}

.doc-table td, .doc-table th {
  border: 1px solid var(--border);
  padding: 8px 14px;
  vertical-align: middle;
  font-size: 13.5px;
  color: var(--ink);
}

/* Column Labels */
.col-lbl {
  width: 38%;
  font-weight: 500;
  color: var(--ink);
}

.col-val {
  width: 62%;
  color: var(--ink);
  position: relative;
}

/* 3-column row headers and cells */
.col-c1 {
  width: 38% !important;
}

.col-c2 {
  width: 34% !important;
}

.col-c3 {
  width: 28% !important;
  white-space: nowrap !important;
}

.row-three-head td {
  font-weight: 500;
  padding-top: 8px;
  padding-bottom: 8px;
  white-space: nowrap;
}

.row-three-body td {
  padding-top: 6px;
  padding-bottom: 6px;
}

/* Solid Dark Teal Band */
.row-teal-band td {
  height: 8px;
  background-color: var(--brand-teal) !important;
  padding: 0 !important;
  border-top: 1px solid var(--brand-teal) !important;
  border-bottom: 1px solid var(--brand-teal) !important;
}

/* Signature row - exact match to Image: NO vertical divider line, signature & stamp inside box */
.row-sig td {
  height: 90px;
  vertical-align: top;
  padding: 8px 14px;
  position: relative;
}

.row-sig td.col-lbl {
  border-right: none !important;
}

.row-sig td.col-val {
  border-left: none !important;
  position: relative;
}

.sig-lbl {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  display: block;
}

.guest-canvas-seamless {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: transparent;
  cursor: crosshair;
  border: none !important;
  outline: none !important;
}

/* Stamp and signature moved UP inside the box */
.box-sig-container {
  position: absolute;
  right: 14px;
  bottom: 2px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
  z-index: 3;
}

.box-stamp-img {
  width: 76px;
  height: 76px;
  transform: rotate(-9deg);
  mix-blend-mode: multiply;
  opacity: 0.85;
  display: block;
}

.box-signature-img {
  width: 130px;
  height: auto;
  display: block;
}

.bottom-signatures-row {
  display: none;
}

/* Inputs when inside table cells */
.table-input-cell {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  padding: 2px 0;
}

.table-input-cell:focus {
  background: #fdfaf2;
  box-shadow: 0 0 0 1px var(--star);
  border-radius: 2px;
}

.table-select-cell {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  padding: 2px 0;
  appearance: auto;
}

.table-select-cell:focus {
  background: #fdfaf2;
}

/* Meal options */
.meal-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.meal-options label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  cursor: pointer;
}

.meal-options input[type="checkbox"] {
  accent-color: var(--brand-teal);
}

/* Brand links */
.brand-link {
  color: var(--ink);
  text-decoration: underline;
  font-weight: 400;
}

/* Badge brand */
.badge-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--brand-teal);
  color: var(--brand-teal);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 16px;
}

.badge-brand img {
  width: 16px;
  height: 16px;
}

/* Admin Styles */
.adm {
  max-width: 1060px;
  margin: 0 auto;
}

.nav {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 2px solid var(--brand-teal);
  margin-bottom: 20px;
}

.nav img {
  width: 44px;
  height: 44px;
}

.nav a {
  color: var(--brand-teal);
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
}

.nav .sp {
  flex: 1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  background: #ffffff;
  border: 1.5px solid var(--brand-teal);
  padding: 14px 18px;
  border-radius: 4px;
}

.stat b {
  display: block;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 32px;
  color: var(--brand-teal);
  line-height: 1.1;
  margin-bottom: 4px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filters input, .filters select {
  padding: 8px 12px;
  border: 1.5px solid var(--brand-teal);
  border-radius: 4px;
  font-size: 13.5px;
}

.tw {
  background: #ffffff;
  border: 1.5px solid var(--brand-teal);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th, .admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 13px;
  text-align: left;
}

.admin-table th {
  background: var(--brand-teal);
  color: #ffffff;
  font-weight: 600;
}

.card {
  background: #ffffff;
  border: 1.5px solid var(--brand-teal);
  padding: 18px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.login {
  max-width: 380px;
  margin: 10vh auto;
  background: #ffffff;
  border: 2px solid var(--brand-teal);
  padding: 32px 24px;
  text-align: center;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.login img {
  width: 110px;
  margin-bottom: 12px;
}

.login input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1.5px solid var(--brand-teal);
  border-radius: 4px;
}

/* ============================================================
   RESPONSIVE & PRINT MEDIA
   ============================================================ */
@media (max-width: 700px) {
  .wrap {
    padding: 12px 8px;
  }
  .sheet-container {
    padding: 20px 14px 26px;
  }
  .doc-title-appartment {
    font-size: 26px;
  }
  .doc-subtitle-brand {
    font-size: 17px;
  }
  .doc-table td, .doc-table th {
    padding: 6px 8px;
    font-size: 12.5px;
  }
  .for-vera-img {
    width: 110px;
  }
}

@media print {
  .noprint, .top-nav, .actions {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .wrap {
    padding: 0 !important;
  }
  .sheet-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 24px 28px !important;
    box-shadow: none !important;
    border: 1.5px solid #000000 !important;
    page-break-inside: avoid;
  }
  .watermark {
    opacity: 0.08 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .row-teal-band td {
    background-color: #174d44 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .table-input-cell, .table-select-cell {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    -webkit-appearance: none;
    appearance: none;
    font-size: 13.5px !important;
    color: #000000 !important;
  }
  .guest-canvas-seamless {
    border: none !important;
  }
  @page {
    size: A4 portrait;
    margin: 10mm;
  }
}
