*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

:root {
  --navy: #1b2a4a;
  --navy-light: #243660;
  --navy-dark: #111d35;
  --sand: #f5f0e8;
  --sand-light: #faf7f2;
  --sand-dark: #e8e0d0;
  --sea: #2e8b8b;
  --sea-light: #3aa5a5;
  --sea-dark: #1f6e6e;
  --copper: #c17f4e;
  --copper-light: #d4975f;
  --copper-dark: #a06838;
  --rope: #8b7355;
  --rope-light: #a08a6c;
  --white: #ffffff;
  --off-white: #fdfcfa;
  --text: #1b2a4a;
  --text2: #3d4f6f;
  --text3: #6b7a96;
  --text4: #9aa5b8;
  --border: rgba(27, 42, 74, 0.1);
  --border2: rgba(27, 42, 74, 0.06);
  --radius: 10px;
  --shadow: 0 2px 8px rgba(27, 42, 74, 0.06);
  --shadow-lg: 0 12px 40px rgba(27, 42, 74, 0.1);
}

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--sand);
  min-height: 100vh;
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0.01em
}

::selection {
  background: var(--sea);
  color: var(--white)
}

/* ======= ANIMATIONS ======= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-16px)
  }

  to {
    opacity: 1;
    transform: translateX(0)
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0
  }

  100% {
    background-position: 200% 0
  }
}

.fade-up {
  animation: fadeUp 0.5s cubic-bezier(0.23, 1, 0.32, 1) both
}

.fade-in {
  animation: fadeIn 0.4s ease both
}

.slide-in {
  animation: slideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1) both
}

.scale-in {
  animation: scaleIn 0.35s cubic-bezier(0.23, 1, 0.32, 1) both
}

.stagger-1 {
  animation-delay: 0.05s
}

.stagger-2 {
  animation-delay: 0.1s
}

.stagger-3 {
  animation-delay: 0.15s
}

.stagger-4 {
  animation-delay: 0.2s
}

.stagger-5 {
  animation-delay: 0.25s
}

.stagger-6 {
  animation-delay: 0.3s
}

/* ======= LAYOUT ======= */
.shell {
  display: flex;
  min-height: 100vh
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  position: fixed;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02))
}

.sidebar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.15), transparent);
  pointer-events: none
}

.logo-area {
  padding: 1.75rem 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06)
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem
}

.logo .sail {
  font-size: 1.6rem;
  line-height: 1
}

.logo-sub {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.25rem
}

.sidebar nav {
  flex: 1;
  padding: 1rem 0
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  position: relative
}

.sidebar nav a:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04)
}

.sidebar nav a.active {
  color: var(--white);
  border-left-color: var(--copper);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600
}

.sidebar nav a.active::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--copper);
  border-radius: 2px 0 0 2px
}

.sidebar nav a .icon {
  font-size: 1.05rem;
  width: 24px;
  text-align: center;
  opacity: 0.7
}

.sidebar nav a.active .icon {
  opacity: 1
}

.admin-sep {
  margin: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06)
}

.admin-sep-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.2);
  padding: 0 1.5rem;
  margin-bottom: 0.35rem
}

.user-box {
  padding: 1rem 1.5rem;
  margin-top: auto;
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.05)
}

.user-box .uname {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white)
}

.user-box .urole {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.1rem
}

.user-box .logout-link {
  font-size: 0.75rem;
  color: var(--copper-light);
  cursor: pointer;
  margin-top: 0.4rem;
  display: inline-block;
  transition: color 0.15s
}

.user-box .logout-link:hover {
  color: var(--copper);
  text-decoration: underline
}

/* MAIN */
.main {
  margin-left: 260px;
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: 1800px
}

.page {
  display: none
}

.page.active {
  display: block
}

.page-header {
  margin-bottom: 2rem
}

.page-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sea);
  margin-bottom: 0.3rem
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.2
}

.page-sub {
  font-size: 0.92rem;
  color: var(--text3);
  margin-top: 0.35rem;
  font-weight: 400
}

/* ======= LOGIN ======= */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.6s, visibility 0.6s
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none
}

.login-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")
}

.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: scaleIn 0.5s cubic-bezier(0.23, 1, 0.32, 1)
}

.login-card .sail-big {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block
}

.login-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em
}

.login-card .sub {
  font-size: 0.88rem;
  color: var(--text3);
  margin-bottom: 2rem;
  font-weight: 400
}

.field {
  margin-bottom: 0.85rem;
  text-align: left
}

.field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  margin-bottom: 0.35rem
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.92rem;
  padding: 0.65rem 0.9rem;
  background: var(--sand-light);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  transition: all 0.2s
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(46, 139, 139, 0.08);
  background: var(--white)
}

.field textarea {
  resize: vertical;
  min-height: 70px
}

.field select option {
  background: var(--white);
  color: var(--text)
}

.btn-primary {
  width: 100%;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.72rem;
  border: none;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden
}

.btn-primary:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(27, 42, 74, 0.2)
}

.btn-primary:active {
  transform: translateY(0)
}

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none
}

.login-error {
  font-size: 0.8rem;
  color: #c0392b;
  margin-top: 0.65rem;
  min-height: 1.1rem;
  font-weight: 500
}

.login-hint {
  font-size: 0.72rem;
  color: var(--text4);
  margin-top: 1.5rem;
  line-height: 1.6;
  padding: 0.75rem;
  background: var(--sand-light);
  border-radius: 8px;
  border: 1px solid var(--sand-dark)
}

.login-hint b {
  color: var(--text2)
}

/* ======= COMPONENTS ======= */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s
}

.card:hover {
  box-shadow: var(--shadow-lg)
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy)
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem
}

.data-table th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text4);
  padding: 0.7rem 0.85rem;
  border-bottom: 2px solid var(--sand-dark)
}

.data-table td {
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid var(--border2);
  color: var(--text2);
  vertical-align: middle;
  transition: background 0.1s
}

.data-table tr:hover td {
  background: var(--sand-light)
}

.btn {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text3);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem
}

.btn:hover {
  background: var(--sand-light);
  color: var(--text2);
  border-color: var(--sand-dark)
}

.btn-sm {
  font-size: 0.72rem;
  padding: 0.32rem 0.65rem
}

.btn-accent {
  border-color: rgba(46, 139, 139, 0.25);
  color: var(--sea)
}

.btn-accent:hover {
  background: rgba(46, 139, 139, 0.06);
  border-color: var(--sea)
}

.btn-danger {
  border-color: rgba(192, 57, 43, 0.2);
  color: #c0392b
}

.btn-danger:hover {
  background: rgba(192, 57, 43, 0.04)
}

.btn-copper {
  border-color: rgba(193, 127, 78, 0.3);
  color: var(--copper-dark);
  background: rgba(193, 127, 78, 0.06)
}

.btn-copper:hover {
  background: rgba(193, 127, 78, 0.12);
  border-color: var(--copper)
}

.btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem
}

/* ======= CALENDAR TABLE ======= */
.booking-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
  border-radius: 12px
}

.booking-wrap::-webkit-scrollbar {
  height: 6px
}

.booking-wrap::-webkit-scrollbar-track {
  background: var(--sand-dark);
  border-radius: 3px
}

.booking-wrap::-webkit-scrollbar-thumb {
  background: var(--rope-light);
  border-radius: 3px
}

table.booking {
  border-collapse: separate;
  border-spacing: 2px;
  min-width: 100%;
  width: 100%
}

table.booking th,
table.booking td {
  text-align: center;
  height: 52px;
  min-width: 44px;
  padding: 0;
  position: relative;
  vertical-align: middle
}

table.booking thead th {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text4);
  background: var(--sand-dark);
  border-radius: 5px;
  font-family: 'Source Sans 3', sans-serif
}

table.booking thead th:first-child {
  text-align: left;
  padding-left: 14px;
  min-width: 120px
}

table.booking thead th.my-week {
  font-weight: 700;
  background: rgba(46, 139, 139, 0.1)
}

.row-label {
  text-align: left !important;
  padding-left: 14px !important;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 8px 0 0 8px;
  font-family: 'Source Sans 3', sans-serif
}

.row-label-s {
  background: rgba(46, 139, 139, 0.08);
  color: var(--sea-dark);
  border-left: 3px solid var(--sea)
}

.row-label-i {
  background: rgba(192, 57, 43, 0.06);
  color: #c0392b;
  border-left: 3px solid #c0392b
}

.row-label-v {
  background: rgba(139, 115, 85, 0.08);
  color: var(--rope);
  border-left: 3px solid var(--rope-light)
}

td.cell {
  border-radius: 5px;
  transition: background 0.15s, box-shadow 0.2s
}

td.cell-s {
  background: rgba(46, 139, 139, 0.07);
  box-shadow: inset 0 0 0 1px rgba(46, 139, 139, 0.08)
}

td.cell-i {
  background: rgba(192, 57, 43, 0.05);
  box-shadow: inset 0 0 0 1px rgba(192, 57, 43, 0.06)
}

td.cell-v {
  background: rgba(139, 115, 85, 0.07);
  box-shadow: inset 0 0 0 1px rgba(139, 115, 85, 0.08)
}

td.cell.drag-over {
  background: rgba(193, 127, 78, 0.12) !important;
  box-shadow: inset 0 0 0 2px var(--copper);
  border-radius: 6px
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border-radius: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
  vertical-align: middle;
  margin: 1px
}

.chip.mine {
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08)
}

.chip.mine:active {
  cursor: grabbing
}

.chip.mine:hover {
  transform: scale(1.18) rotate(-2deg);
  z-index: 10;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15)
}

.chip.other {
  opacity: 0.38;
  cursor: default
}

.chip.dragging {
  opacity: 0.25;
  transform: scale(0.85)
}

.chip-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border-radius: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.22;
  pointer-events: none;
  margin: 1px;
  border: 1.5px dashed;
  background: transparent;
}

.totals {
  display: flex;
  gap: 1.75rem;
  margin-top: 1rem;
  font-size: 0.84rem;
  flex-wrap: wrap;
  color: var(--text3)
}

.ti {
  display: flex;
  align-items: center;
  gap: 0.45rem
}

.td-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex-shrink: 0
}

.tc {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--navy)
}

.hint-bar {
  font-size: 0.86rem;
  color: var(--text2);
  margin-bottom: 1.25rem;
  line-height: 1.6;
  padding: 0.85rem 1.15rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-left: 3px solid var(--copper);
  box-shadow: var(--shadow)
}

.hint-bar strong {
  color: var(--sea)
}

.hint-bar .yw {
  color: var(--navy);
  font-weight: 700
}

/* DISPOSITION */
.disp {
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow)
}

.disp-title {
  text-align: center;
  padding: 0.75rem;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--sand-light);
  border-bottom: 1px solid var(--border2)
}

.disp-grid {
  display: grid;
  gap: 1px;
  background: var(--sand-dark);
  font-size: 0.78rem
}

.disp-grid>div {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px
}

.dh {
  font-weight: 600;
  color: var(--text4);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em
}

.dh-month {
  background: var(--sand-light) !important;
  font-weight: 700;
  color: var(--text3);
  font-size: 0.78rem
}

.dy {
  font-weight: 700;
  padding-left: 12px;
  justify-content: flex-start !important;
  color: var(--text2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem
}

.dy.active {
  color: var(--sea);
  background: rgba(46, 139, 139, 0.1) !important;
  font-size: 0.82rem;
  border-left: 3px solid var(--sea)
}

.dc {
  color: var(--text4);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem
}

.dc.active {
  color: var(--text);
  font-weight: 700;
  border-radius: 4px
}

/* ======= CONTACTS ======= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.15rem
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  transition: all 0.25s;
  position: relative;
  overflow: hidden
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sea), var(--copper));
  opacity: 0;
  transition: opacity 0.25s
}

.contact-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px)
}

.contact-card:hover::before {
  opacity: 1
}

.contact-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem
}

.contact-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem
}

.contact-detail {
  font-size: 0.84rem;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.3rem
}

.contact-detail .cd-icon {
  font-size: 0.75rem;
  width: 18px;
  text-align: center;
  opacity: 0.6
}

/* ======= DOCUMENTS ======= */
.doc-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.doc-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--sea);
  margin-bottom: 0.25rem;
}

.doc-row {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border2);
  transition: background 0.15s
}

.doc-row:last-child {
  border-bottom: none
}

.doc-row:hover {
  background: var(--sand-light);
  margin: 0 -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  border-radius: 8px
}

.doc-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  border: 1px solid var(--border)
}

.doc-icon-pdf {
  background: rgba(192, 57, 43, 0.06);
  border-color: rgba(192, 57, 43, 0.15)
}

.doc-icon-doc {
  background: rgba(49, 130, 206, 0.06);
  border-color: rgba(49, 130, 206, 0.15)
}

.doc-icon-xls {
  background: rgba(56, 161, 105, 0.06);
  border-color: rgba(56, 161, 105, 0.15)
}

.doc-icon-default {
  background: var(--sand-light)
}

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

.doc-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: block;
}

a.doc-title:hover {
  color: var(--sea);
}

a.doc-icon {
  text-decoration: none;
  color: inherit;
}

.doc-desc {
  font-size: 0.8rem;
  color: var(--text3);
  margin-top: 0.15rem
}

.doc-meta {
  font-size: 0.72rem;
  color: var(--text4);
  margin-top: 0.2rem;
  font-family: 'JetBrains Mono', monospace
}

/* ======= MODAL ======= */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(27, 42, 74, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000
}

.modal-bg.open {
  display: flex
}

.modal {
  background: var(--white);
  border-radius: 18px;
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 32px 80px rgba(27, 42, 74, 0.2);
  animation: scaleIn 0.3s cubic-bezier(0.23, 1, 0.32, 1)
}

.modal h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.15rem;
  color: var(--navy)
}

.modal .btn-row {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.5rem
}

/* ======= DOCUMENT TABS ======= */
.doc-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 2px solid var(--sand-dark);
  overflow-x: auto;
  position: relative
}

.doc-tab {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border: none;
  background: none;
  color: var(--text3);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  position: relative
}

.doc-tab:hover {
  color: var(--text2);
  background: var(--sand-light)
}

.doc-tab.active {
  color: var(--sea);
  border-bottom-color: var(--sea)
}

.doc-tab .tab-count {
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--sand-dark);
  color: var(--text3);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  margin-left: 0.4rem;
  vertical-align: middle
}

.doc-tab.active .tab-count {
  background: rgba(46, 139, 139, 0.12);
  color: var(--sea)
}

.doc-tab .tab-actions {
  display: none;
  margin-left: 0.35rem;
  gap: 0.15rem
}

.doc-tab:hover .tab-actions {
  display: inline-flex
}

.doc-tab .tab-act {
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
  padding: 0;
  line-height: 1
}

.doc-tab .tab-act:hover {
  background: rgba(0, 0, 0, 0.12);
  color: var(--text)
}

.doc-tab .tab-act.danger:hover {
  background: rgba(192, 57, 43, 0.1);
  color: #c0392b
}

/* ======= EMPTY STATES ======= */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text4)
}

.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.5
}

.empty-state p {
  font-size: 0.92rem
}

/* ======= RESPONSIVE ======= */

/* Medium screens */
@media(max-width:1400px) {
  .main {
    padding: 2rem 1.5rem;
    max-width: none
  }

  table.booking th,
  table.booking td {
    min-width: 36px;
    height: 44px
  }

  table.booking thead th:first-child {
    min-width: 90px;
    padding-left: 8px
  }

  .row-label {
    padding-left: 8px !important;
    font-size: 0.75rem
  }

  .chip {
    width: 30px;
    height: 26px;
    font-size: 0.65rem;
    border-radius: 5px
  }

  .chip-ghost {
    width: 30px;
    height: 26px;
    font-size: 0.6rem;
    border-radius: 5px
  }

  table.booking thead th {
    font-size: 0.68rem
  }
}

/* Tablets */
@media(max-width:1024px) {
  .sidebar {
    width: 200px
  }

  .main {
    margin-left: 200px;
    padding: 1.5rem 1rem
  }

  table.booking th,
  table.booking td {
    min-width: 30px;
    height: 40px
  }

  .chip {
    width: 26px;
    height: 22px;
    font-size: 0.58rem;
    border-radius: 4px
  }

  table.booking thead th {
    font-size: 0.6rem;
    letter-spacing: 0
  }

  table.booking thead th:first-child {
    min-width: 70px
  }
}

/* Mobile */
@media(max-width:768px) {
  .sidebar {
    display: none
  }

  .main {
    margin-left: 0;
    padding: 1.25rem 0.75rem;
    max-width: none
  }

  .page-title {
    font-size: 1.5rem
  }

  .booking-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch
  }

  table.booking {
    min-width: 700px
  }

  table.booking th,
  table.booking td {
    min-width: 28px;
    height: 36px
  }

  table.booking thead th {
    font-size: 0.56rem
  }

  table.booking thead th:first-child {
    min-width: 60px;
    padding-left: 6px
  }

  .row-label {
    padding-left: 6px !important;
    font-size: 0.68rem
  }

  .chip {
    width: 24px;
    height: 20px;
    font-size: 0.52rem;
    border-radius: 4px;
    margin: 0
  }

  .chip-ghost {
    width: 24px;
    height: 20px;
    font-size: 0.5rem;
    border-radius: 4px;
    margin: 0
  }

  .totals {
    flex-wrap: wrap
  }

  .btn-group {
    flex-wrap: wrap
  }

  .disp-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch
  }

  .contact-grid {
    grid-template-columns: 1fr !important
  }

  .doc-row {
    flex-wrap: wrap;
    gap: 0.5rem
  }
}