/* Easy Plotting design system — soft teal glassmorphism (front, admin & user panels) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,700;9..144,900&display=swap');

:root {
  --bg-1: #cfe3e3;
  --bg-2: #e3ecee;
  --bg-3: #d4d2ef;           /* lavender wash, top-right */
  --glass: rgba(255, 255, 255, .42);
  --glass-strong: rgba(255, 255, 255, .68);
  --glass-border: rgba(255, 255, 255, .75);
  --glass-shadow: 0 10px 30px -12px rgba(28, 74, 80, .25);

  --ink: #1b2a2e;
  --ink-2: #4a5d61;
  --ink-3: #7f9194;
  --line: rgba(27, 42, 46, .08);

  --teal: #1d7d84;
  --teal-d: #10626a;
  --teal-dd: #0b4a50;
  --teal-l: #48a9ab;
  --teal-50: #e2f1f1;

  --coral: #f2677b;
  --amber: #f5a654;
  --violet: #8f7cf2;
  --pink: #ef6fb4;
  --mint: #6fd3b8;

  --st-available: #20a079;
  --st-reserved: #f0a53a;
  --st-sold: #e5566b;
  --st-blocked: #95a7aa;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fraunces', Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  background:
    radial-gradient(1200px 700px at 100% 0%, var(--bg-3) 0%, transparent 60%),
    radial-gradient(900px 600px at 0% 100%, #c4dfdc 0%, transparent 60%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }

/* ---------- Glass surfaces ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.glass-strong { background: var(--glass-strong); }
.card { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 500; margin: 0; }
.link { color: var(--teal); font-size: 12.5px; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 12px;
  font-weight: 500; font-size: 13.5px; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--teal-l), var(--teal-d));
  box-shadow: 0 8px 20px -8px rgba(16, 98, 106, .7), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { box-shadow: 0 12px 26px -8px rgba(16, 98, 106, .8), inset 0 1px 0 rgba(255,255,255,.25); transform: translateY(-1px); }
.btn-ghost { background: var(--glass-strong); border: 1px solid var(--glass-border); }
.btn-ghost:hover { background: #fff; }
.btn-white { background: #fff; color: var(--teal-dd); box-shadow: 0 8px 20px -10px rgba(0,0,0,.3); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn-icon { width: 38px; padding: 0; }
.btn-danger { color: #fff; background: var(--st-sold); }

/* ---------- Status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  background: var(--teal-50); color: var(--teal-d);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.available { background: #dcf3ea; color: #13805f; }
.badge.reserved  { background: #fdf0db; color: #b06f0f; }
.badge.sold      { background: #fde3e7; color: #c13a50; }
.badge.blocked   { background: #e7edee; color: #5f7275; }
.badge.plain::before { display: none; }

.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot.available { background: var(--st-available); }
.dot.reserved { background: var(--st-reserved); }
.dot.sold { background: var(--st-sold); }
.dot.blocked { background: var(--st-blocked); }

/* ---------- Form controls ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.input, .select {
  height: 40px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,.7);
  outline: none; transition: border-color .2s, box-shadow .2s; width: 100%;
}
.input:focus, .select:focus { border-color: var(--teal-l); box-shadow: 0 0 0 4px rgba(72, 169, 171, .18); }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.search .input { padding-left: 36px; }
.search [data-icon] svg { position: static; transform: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px;
  background: rgba(255,255,255,.55); border: 1px solid var(--glass-border);
  display: inline-flex; align-items: center; gap: 6px; transition: all .2s var(--ease);
}
.chip:hover { background: #fff; }
.chip.on { background: var(--teal); color: #fff; border-color: var(--teal); }

.switch { position: relative; width: 36px; height: 20px; border-radius: 99px; background: #c9d6d8; transition: background .2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--spring); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--teal); }
.switch.on::after { transform: translateX(16px); }

/* ---------- Table ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; }
.table td { padding: 12px 10px; border-top: 1px solid var(--line); }
.table tbody tr { transition: background .15s; cursor: pointer; }
.table tbody tr:hover { background: rgba(255,255,255,.5); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Icon tiles (CoachPro style) ---------- */
.ico-tile { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.ico-tile svg { width: 18px; height: 18px; }
.t-violet { background: linear-gradient(135deg, #a897ff, #7a66ea); }
.t-pink   { background: linear-gradient(135deg, #ff8fc7, #e25aa2); }
.t-amber  { background: linear-gradient(135deg, #ffc27a, #f08f3a); }
.t-teal   { background: linear-gradient(135deg, #5cc0c0, #18737a); }
.t-coral  { background: linear-gradient(135deg, #ff8d9b, #e04f66); }
.t-mint   { background: linear-gradient(135deg, #8de6cc, #2fa985); }

/* ---------- Utilities ---------- */
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo-tag { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); background: rgba(255,255,255,.6); padding: 2px 8px; border-radius: 6px; }

/* ---------- Skeleton ---------- */
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.4) 25%, rgba(255,255,255,.85) 50%, rgba(255,255,255,.4) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--teal-dd); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 13px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); animation: toastIn .4s var(--spring); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* ---------- Map (shared) ---------- */
.plotmap { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; touch-action: none; user-select: none; background: #f6f3ea; }
.plotmap svg { width: 100%; height: 100%; cursor: grab; }
.plotmap svg.dragging { cursor: grabbing; }
.plotmap .plot { stroke: rgba(30, 50, 55, .55); stroke-width: .6; fill-opacity: .42; transition: fill-opacity .2s, stroke-width .2s; cursor: pointer; vector-effect: non-scaling-stroke; }
.plotmap .plot:hover, .plotmap .plot:focus { fill-opacity: .75; stroke-width: 1.6; outline: none; }
.plotmap .plot.available { fill: var(--st-available); }
.plotmap .plot.reserved { fill: var(--st-reserved); }
.plotmap .plot.sold { fill: var(--st-sold); }
.plotmap .plot.blocked { fill: var(--st-blocked); }
.plotmap .plot.dim { fill-opacity: .07; stroke-opacity: .25; }
.plotmap .plot.hl { fill-opacity: .85; stroke: #0b4a50; stroke-width: 2; }
.plotmap .plot.selected { fill-opacity: .9; stroke: #0b4a50; stroke-width: 2.6; }
.plotmap .plot.flash { animation: plotFlash 1.2s ease 2; }
@keyframes plotFlash { 50% { fill-opacity: 1; stroke-width: 3; } }
.plotmap .lbl { font-family: var(--font); font-size: 7px; font-weight: 600; fill: #1b2a2e; pointer-events: none; text-anchor: middle; dominant-baseline: middle; }
.plotmap .dimlbl { font-size: 4.2px; font-weight: 400; fill: #3c4f53; opacity: 0; transition: opacity .25s; }
.plotmap.zoomed .dimlbl { opacity: 1; }
.plotmap.hide-labels .lbl { display: none; }
.plotmap.hide-features .feature { display: none; }
.map-ctrls { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 3; }
.map-ctrls button { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.85); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); }
.map-ctrls button:hover { background: #fff; }
.map-ctrls svg { width: 16px; height: 16px; }
.map-legend { position: absolute; left: 14px; bottom: 14px; z-index: 3; display: flex; gap: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.85); font-size: 11.5px; border: 1px solid var(--glass-border); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-tip { position: absolute; z-index: 4; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: rgba(11, 74, 80, .92); color: #fff; font-size: 12px; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; opacity: 0; transition: opacity .15s; }
.map-tip.show { opacity: 1; }
.map-tip b { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
