:root {
  --white: #ffffff;
  --beige: #f5efe6;
  --beige-2: #ede4d3;
  --beige-3: #d9cdb4;
  --black: #1a1a1a;
  --black-soft: #2a2a2a;
  --muted: #6b6b6b;
  --border: #e4dcca;
  --danger: #a63d2a;
  --dark-red: #7a1e1e;
  --dark-red-soft: #f2dcd7;
  --success: #3a6b3a;
  --warning: #a67a2a;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--black);
  background: var(--beige);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--black); }
a:hover { opacity: 0.75; }

.layout { display: flex; min-height: 100vh; position: relative; }

/* Mobile topbar + hamburger toggle (hidden on desktop) */
.nav-toggle { display: none; }
.topbar { display: none; }
.nav-backdrop { display: none; }
.hamburger { display: none; }

.sidebar {
  width: 240px;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}
.sidebar .brand {
  padding: 4px 4px 16px 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  text-align: center;
}
.sidebar .brand img {
  max-width: 160px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  /* logo ships as white-on-transparent — invert to render as brand black */
  filter: invert(1);
}
.sidebar .brand small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 2px;
  font-size: 10px;
  margin-top: 4px;
  text-transform: uppercase;
}
.sidebar a.nav {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--black-soft);
  font-weight: 500;
}
.sidebar a.nav:hover { background: var(--beige); opacity: 1; }
.sidebar a.nav.active { background: var(--black); color: var(--white); }
.sidebar .spacer { flex: 1; }
.sidebar .who {
  padding: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.sidebar .who strong { color: var(--black); display: block; font-size: 13px; }
.sidebar form button.logout {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 12px; padding: 6px 0; text-align: left;
}

.main { flex: 1; padding: 32px 40px; max-width: calc(100vw - 240px); }
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title { font-size: 24px; font-weight: 700; margin: 0; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card h2 { margin: 0 0 12px 0; font-size: 16px; }
.card h3 { margin: 16px 0 8px 0; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.stat .value { font-size: 22px; font-weight: 700; margin-top: 4px; }

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: top; }
.table th { font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); background: var(--beige); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #faf7f0; }
.table a { text-decoration: none; font-weight: 500; }

.btn {
  display: inline-block;
  padding: 9px 18px;
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { opacity: 0.85; }
.btn.ghost { background: var(--white); color: var(--black); }
.btn.ghost:hover { background: var(--beige); opacity: 1; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--white); }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.link-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12px; padding: 0; font-family: inherit; text-decoration: underline; }
.link-btn:hover { color: var(--danger); }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=search],
select, textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px; /* 14px avoids iOS zoom on focus */
  background: var(--white);
  color: var(--black);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
/* iOS Safari renders date/time inputs with extra intrinsic width — force them to match text inputs */
input[type=date], input[type=time], input[type=datetime-local] {
  display: block;
  line-height: normal;
  min-height: 42px; /* match text input height */
}
/* Restore dropdown arrow on select since we disabled native appearance */
select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%231a1a1a' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  padding-right: 32px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--black); outline-offset: -1px; }
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--black-soft); }
.field { margin-bottom: 14px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.field-row > .field { flex: 1 1 140px; margin-bottom: 0; }
.field-row + .field-row { margin-top: 0; }
form > .field:last-child,
form > .field-row:last-of-type { margin-bottom: 8px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge.paid { background: #eaf2ea; color: var(--success); }
.badge.unpaid { background: #f5e6e3; color: var(--danger); }
.badge.followup { background: #f5ecd8; color: var(--warning); }
.badge.partial { background: #e8e4f2; color: #5a4a9a; }
.badge.service { background: var(--beige-2); color: var(--black); font-weight: 500; }
.badge.svc-villa     { background: #f5e5d3; color: #8a4a24; }
.badge.svc-vip_table { background: #1f1a1e; color: #c9a96e; }
.badge.svc-car       { background: #e6e6e8; color: #2a323b; }
.badge.svc-yacht     { background: #dce7ec; color: #1e4050; }
.badge.svc-extra     { background: #ebe8d8; color: #4a5030; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs a {
  padding: 10px 16px; text-decoration: none; color: var(--muted);
  border-bottom: 2px solid transparent; font-weight: 500; font-size: 13px;
}
.tabs a.active { color: var(--black); border-bottom-color: var(--black); }
.tabs a:hover { color: var(--black); opacity: 1; }

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
  border: 1px solid transparent;
}
.flash.success { background: #eaf2ea; border-color: #c4dcc4; color: var(--success); }
.flash.error { background: #f5e6e3; border-color: #e2beb4; color: var(--danger); }
.flash.info { background: var(--beige-2); border-color: var(--beige-3); color: var(--black); }

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--beige);
  padding: 16px;
}
.login-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 380px; max-width: 100%;
  box-shadow: var(--shadow);
}
.login-box .logo {
  text-align: center;
  margin-bottom: 4px;
}
.login-box .logo img {
  max-width: 200px;
  width: 80%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: invert(1);
}
.login-box .sub {
  text-align: center; color: var(--muted); font-size: 11px;
  letter-spacing: 3px; margin: 8px 0 28px 0;
  text-transform: uppercase;
}

/* Calendar */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.cal-dow {
  background: var(--beige); padding: 8px 12px; font-size: 11px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.cal-cell {
  min-height: 110px;
  padding: 8px;
  border-right: 1px solid var(--border);
  border-top: 1px solid var(--border);
  background: var(--white);
  font-size: 12px;
  position: relative;
  text-decoration: none;
  color: var(--black);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.other { background: #faf7f0; color: var(--muted); }
.cal-cell.today .daynum { background: var(--black); color: var(--white); }
.cal-cell .daynum {
  font-weight: 600; padding: 2px 8px; border-radius: 999px; align-self: flex-start;
  margin-bottom: 2px; font-size: 12px;
}
.cal-cell:hover { background: var(--beige); opacity: 1; }
.cal-event {
  display: block;
  padding: 2px 6px;
  background: var(--beige-2);
  border-radius: 4px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-event.villa { background: #f5e5d3; color: #6a3c1f; }
.cal-event.vip_table { background: #1f1a1e; color: #c9a96e; }
.cal-event.car { background: #e6e6e8; color: #2a323b; }
.cal-event.yacht { background: #dce7ec; color: #1e4050; }
.cal-event.extra { background: #ebe8d8; color: #4a5030; }

/* Calendar day view per-customer event rows */
.day-events { display: flex; flex-direction: column; gap: 8px; }
.day-event {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--beige-3);
  border-radius: var(--radius);
  background: var(--beige);
}
.day-event.day-villa { border-left-color: #b06d3f; }
.day-event.day-vip_table { border-left-color: #c9a96e; }
.day-event.day-car { border-left-color: #3d4650; }
.day-event.day-yacht { border-left-color: #2d6577; }
.day-event.day-extra { border-left-color: #6d7649; }
.day-event-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.day-event-main .meta { color: var(--muted); font-size: 12px; margin-left: auto; }

.empty { color: var(--muted); font-size: 13px; padding: 20px; text-align: center; }

.file-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--beige);
  gap: 12px;
  flex-wrap: wrap;
}
.file-item + .file-item { margin-top: 8px; }
.file-item .meta { font-size: 12px; color: var(--muted); }

.section-title { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 12px; }
.section-title h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }

details.service-add { background: var(--beige); border: 1px dashed var(--border); padding: 12px; border-radius: var(--radius); margin-top: 12px; }
details.service-add summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--black); }
details.service-add[open] { background: var(--white); border-style: solid; }
details.service-add form { margin-top: 12px; }

/* Per-category section tinting — Mediterranean luxury palette */
/* Villa — terracotta / warm clay (sun-drenched Mediterranean villas) */
.card.cat-villa     { background: #f5e5d3; border-left: 4px solid #b06d3f; }
/* VIP Table — midnight burgundy with gold (nightclub lounge) */
.card.cat-vip_table { background: #1f1a1e; color: #f0e6d5; border-left: 4px solid #c9a96e; }
/* Car — cool graphite / slate (sleek sports car) */
.card.cat-car       { background: #e6e6e8; border-left: 4px solid #3d4650; }
/* Yacht — ocean blue (Mediterranean sea) */
.card.cat-yacht     { background: #dce7ec; border-left: 4px solid #2d6577; }
/* Extra — sage olive (herb garden / soft complement) */
.card.cat-extra     { background: #ebe8d8; border-left: 4px solid #6d7649; }

/* VIP Table dark-mode overrides */
.card.cat-vip_table h2,
.card.cat-vip_table .page-sub { color: #f0e6d5; }
.card.cat-vip_table .empty { color: #bfa77a; }
.card.cat-vip_table label { color: #d9cdb4; }
.card.cat-vip_table details.service-add { background: #15111a; border-color: #3a2f35; }
.card.cat-vip_table details.service-add summary { color: #f0e6d5; }
.card.cat-vip_table details.service-add[open] { background: #1a161c; }
.card.cat-vip_table .booking { background: #2a2228; border-color: #4a3d42; color: #f0e6d5; }
.card.cat-vip_table .booking-meta { color: #c9b89a; }
.card.cat-vip_table .booking-extra { background: #120f15; color: #d9cdb4; }

/* Booking items (edit-in-place) */
.booking {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--white);
}
.booking-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.booking-head > div:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.booking-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.booking-extra { color: var(--black-soft); font-size: 12px; margin-top: 6px; background: var(--beige); padding: 6px 8px; border-radius: 4px; }
details.booking-edit { margin-top: 10px; }
details.booking-edit summary { display: inline-block; list-style: none; cursor: pointer; }
details.booking-edit summary::-webkit-details-marker { display: none; }
details.booking-edit[open] { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
details.booking-edit[open] summary { margin-bottom: 12px; }

/* Customer profile top — Passport/ID, Profile, Reminders+Notes */
.profile-top {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "ids ids"
    "profile side";
}
.profile-top > .top-ids     { grid-area: ids; margin: 0; }
.profile-top > .top-profile { grid-area: profile; margin: 0; }
.profile-top > .top-side    { grid-area: side; display: flex; flex-direction: column; gap: 16px; }
.profile-top > .top-side .card { margin: 0; }

/* On mobile: Profile first, then Passport/ID, then side column */
@media (max-width: 800px) {
  .profile-top {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "ids"
      "side";
  }
}

/* Reminders — dark red emphasis */
.reminders-card { border: 1px solid var(--dark-red); border-left: 4px solid var(--dark-red); }
.reminders-card h2 { color: var(--dark-red); }
.reminder-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--dark-red-soft);
  background: #fcf2ef;
  border-radius: var(--radius);
  border-left: 4px solid var(--dark-red);
  flex-wrap: wrap;
}
.reminder-item + .reminder-item { margin-top: 8px; }
.reminder-item strong { color: var(--dark-red); }
.reminder-item .meta { font-size: 12px; color: var(--black-soft); }

/* Dashboard reminder list uses same style */
.reminder-item.on-dash { background: #fcf2ef; }

/* Notes log */
.note-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--beige);
  border-radius: var(--radius);
}
.note-item + .note-item { margin-top: 8px; }
.note-text { white-space: pre-wrap; word-wrap: break-word; }
.note-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 6px; gap: 8px; }

/* Filter form (search + status) — wraps on narrow viewports */
.filter-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filter-form .field { flex: 1 1 200px; margin: 0; }
.filter-form .filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Customer cards (mobile list) */
.mob-only { display: none !important; }
.desk-only { display: block; }
.customer-cards { flex-direction: column; gap: 10px; }

/* Contact action buttons (WhatsApp, call, email) */
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--black);
  text-decoration: none;
  transition: transform 0.08s ease;
}
.action-btn:hover { opacity: 1; transform: scale(1.05); }
.action-btn.wa { background: #25D366; color: #fff; border-color: #1fb355; }
.action-btn.call { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.action-btn.mail { background: var(--beige-2); color: var(--black); border-color: var(--beige-3); }
.mobile-actions {
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}

.delete-customer-mobile { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.customer-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--black);
}
.customer-card-link { display: block; text-decoration: none; color: var(--black); }
.customer-card-link:hover { opacity: 1; }
.customer-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.customer-card-top strong { font-size: 15px; }
.customer-card-contact {
  display: flex; flex-direction: column; gap: 2px;
  color: var(--muted); font-size: 12px; margin-top: 6px;
}
.customer-card-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 13px;
}
.customer-card-bottom .meta { color: var(--muted); font-size: 11px; }

/* Calendar toggle button group */
.cal-toggle { display: flex; gap: 4px; }
.cal-toggle .btn { padding: 7px 14px; font-size: 12px; }

/* Calendar list event — full clickable row with contact on new line */
.day-event { text-decoration: none; color: var(--black); display: block; }
.day-event:hover { background: var(--beige-2); opacity: 1; }
.day-event-contact { color: var(--muted); font-size: 11px; margin-top: 4px; margin-left: 4px; }

/* ==========================
   Mobile responsive
   ========================== */
@media (max-width: 1024px) {
  .grid.cols-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .desk-only { display: none !important; }
  .mob-only { display: block !important; }
  .customer-cards { display: flex; }
  .filter-form { flex-direction: column; align-items: stretch; }
  .filter-form .field { flex: 1 1 100%; }
  .cal-head { flex-direction: column; align-items: stretch; }
  .cal-toggle { justify-content: center; }
  .day-event-main { flex-wrap: wrap; }
  .day-event-main .meta { margin-left: 0; }
  .topbar {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 50;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    width: 100%;
  }
  .topbar-title { flex: 1; text-align: center; }
  .topbar-title img { height: 32px; width: auto; filter: invert(1); vertical-align: middle; }
  .hamburger {
    display: flex; flex-direction: column; justify-content: space-between;
    width: 24px; height: 18px; cursor: pointer;
  }
  .hamburger span {
    display: block; height: 2px; background: var(--black); border-radius: 2px;
  }
  .layout { flex-direction: column; }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 100;
    box-shadow: 0 0 24px rgba(0,0,0,0.2);
  }
  .nav-toggle:checked ~ .sidebar { transform: translateX(0); }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 90;
  }
  .nav-toggle:checked ~ .nav-backdrop { opacity: 1; pointer-events: auto; }
  .main {
    padding: 16px 14px;
    max-width: 100%;
  }
  .page-title { font-size: 20px; }
  .page-header { margin-bottom: 16px; }
  .card { padding: 14px; }
  .card + .card { margin-top: 12px; }
  .card h2 { font-size: 15px; margin-bottom: 10px; }
  .cal-cell { min-height: 72px; padding: 6px 4px; font-size: 11px; }
  .cal-cell .daynum { padding: 2px 6px; font-size: 11px; }
  .cal-cell .cal-event { font-size: 10px; padding: 1px 4px; }
  .table th, .table td { padding: 8px 10px; font-size: 12px; }

  /* tighter vertical rhythm so forms don't feel empty */
  .field { margin-bottom: 10px; }
  .field-row { flex-direction: column; gap: 10px; margin-bottom: 10px; }
  /* critical: reset flex-basis in column mode — it becomes a HEIGHT */
  .field-row > .field,
  .filter-form > .field { flex: 0 0 auto; }
  label { margin-bottom: 4px; font-size: 11px; }
  input[type=text], input[type=email], input[type=password], input[type=number],
  input[type=date], input[type=time], input[type=datetime-local], input[type=search],
  select { padding: 10px 12px; }
  textarea { padding: 10px 12px; min-height: 70px; }

  /* bookings inside service cards */
  .booking { padding: 10px 12px; margin-bottom: 8px; }
  .booking-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .booking-meta { margin-top: 2px; }
  .booking-extra { margin-top: 4px; }

  details.booking-edit[open] { padding-top: 10px; margin-top: 10px; }
  details.service-add { padding: 10px; }
  details.service-add[open] form { margin-top: 10px; }

  /* files and reminders tiles fit phone width */
  .file-item { padding: 10px; gap: 8px; }
  .reminder-item { padding: 10px; gap: 8px; }

  /* profile-top area spacing */
  .profile-top { gap: 12px; }
  .profile-top > .top-side { gap: 12px; }
}
@media (max-width: 480px) {
  .page-header { flex-direction: column; align-items: stretch; }
  .cal-cell { min-height: 56px; }
  .cal-dow { padding: 6px 4px; font-size: 10px; }
}
