/* ==========================================================================
   Netti Nail Arts - admin felulet
   ========================================================================== */

:root {
  --wine: #651722;
  --wine-soft: #8a2a39;
  --rose: #e4899f;
  --rose-deep: #d4708a;
  --petal: #fadde2;
  --blush: #fdeef1;
  --cream: #fffafb;
  --gold: #c9a66b;
  --ink: #3d2429;
  --ink-soft: #6b4c53;
  --muted: #96777e;
  --line: #f2dbe0;
  --line-strong: #e8c7cf;
  --ok: #4b8a63;
  --ok-bg: #e8f4ec;
  --warn-bg: #fdeee8;
  --warn: #b0402a;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(101,23,34,.06);
  --shadow-md: 0 8px 24px rgba(101,23,34,.09);
  --shadow-lg: 0 18px 48px rgba(101,23,34,.14);
  --ease: cubic-bezier(.22,.61,.36,1);
}

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

/* A hidden attributum mindig nyerjen a display szabalyok felett */
[hidden] { display: none !important; }


body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--wine);
  margin: 0 0 .4em;
  font-weight: 600;
  line-height: 1.2;
}
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 16px; }

.btn {
  --bg: var(--wine); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border: 0; border-radius: var(--r-pill);
  background: var(--bg); color: var(--fg);
  font: inherit; font-weight: 700; font-size: .92rem;
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn[disabled] { opacity: .45; pointer-events: none; box-shadow: none; }
.btn--rose { --bg: linear-gradient(135deg, var(--rose), var(--rose-deep)); }
.btn--ghost { --bg: #fff; --fg: var(--wine); border: 1.5px solid var(--line-strong); box-shadow: none; }
.btn--ghost:hover { background: var(--blush); }
.btn--danger { --bg: #fff; --fg: #b0402a; border: 1.5px solid #f0cfc3; box-shadow: none; }
.btn--danger:hover { background: var(--warn-bg); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: .84rem; }
.btn--block { width: 100%; }

input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: #fff;
  font: inherit;
  color: var(--ink);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--wine);
  box-shadow: 0 0 0 4px rgba(228,137,159,.18);
}
label.lbl { display: block; font-size: .78rem; font-weight: 800; color: var(--wine); margin-bottom: 5px; letter-spacing: .02em; }
.hint { font-size: .78rem; color: var(--muted); margin-top: 4px; line-height: 1.4; }

/* ------------------------------------------------------------- Belepes */

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(700px 400px at 50% 0%, var(--petal), var(--cream) 70%);
}
.login__card {
  width: 100%; max-width: 380px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
img { max-width: 100%; height: auto; display: block; }
.ico { font-style: normal; margin-right: .35em; }

.login__logo {
  width: 100%; max-width: 230px; margin: 0 auto 18px;
  background: var(--petal); border-radius: var(--r-md); padding: 12px;
}
.login__card form { text-align: left; margin-top: 18px; display: grid; gap: 12px; }

/* --------------------------------------------------------------- Shell */

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,250,251,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
/* Keskeny kepernyon a fulsor oldalra gorgetheto - halvanyulas jelzi, hogy van meg */
@media (max-width: 700px) {
  .topbar { position: sticky; }
  .topbar::after {
    content: '';
    position: absolute; right: 0; bottom: 10px;
    width: 30px; height: 38px;
    background: linear-gradient(90deg, rgba(255,250,251,0), rgba(255,250,251,.96));
    pointer-events: none;
  }
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px;
  max-width: 860px; margin: 0 auto;
}
.topbar__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar__brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.topbar__title { font-family: 'Fraunces', serif; font-weight: 600; color: var(--wine); font-size: 1rem; line-height: 1.1; }
.topbar__sub { font-size: .72rem; color: var(--muted); }

.tabs {
  display: flex; gap: 4px; overflow-x: auto;
  padding: 0 16px 10px;
  max-width: 860px; margin: 0 auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  border: 0; background: transparent;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  font: inherit; font-weight: 700; font-size: .87rem;
  color: var(--muted); cursor: pointer;
  transition: all .18s var(--ease);
  white-space: nowrap;
}
.tab:hover { background: var(--blush); color: var(--wine); }
.tab.is-active { background: var(--wine); color: #fff; box-shadow: var(--shadow-sm); }
.tab__badge {
  display: inline-block; margin-left: 6px;
  background: var(--rose); color: #fff;
  font-size: .68rem; font-weight: 800;
  padding: 1px 7px; border-radius: var(--r-pill);
}
.tab.is-active .tab__badge { background: rgba(255,255,255,.28); }

main { padding: 20px 0 90px; }
.view[hidden] { display: none; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card__head h2, .card__head h3 { margin: 0; }

.grid2 { display: grid; gap: 12px; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* -------------------------------------------------------------- Naptar */

.acal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.acal__month { font-family: 'Fraunces', serif; font-size: 1.1rem; color: var(--wine); text-transform: capitalize; }
.acal__nav { display: flex; gap: 6px; }
.acal__btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; color: var(--wine);
  cursor: pointer; font-size: 1rem;
}
.acal__btn:hover { background: var(--blush); }

.acal__weekdays { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; margin-bottom: 5px; }
.acal__weekdays span { text-align: center; font-size: .68rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }

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

.aday {
  position: relative;
  min-height: 62px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  cursor: pointer;
  padding: 5px 3px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font: inherit;
  transition: all .16s var(--ease);
}
.aday:hover { border-color: var(--rose); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.aday.is-empty { visibility: hidden; pointer-events: none; }
.aday.is-past { opacity: .4; }
.aday.is-today { border-color: var(--gold); }
.aday__num { font-weight: 800; font-size: .92rem; color: var(--ink-soft); }
.aday.is-open { background: var(--blush); border-color: var(--line-strong); }
.aday.is-open .aday__num { color: var(--wine); }
.aday__win { font-size: .6rem; font-weight: 700; color: var(--wine-soft); line-height: 1.25; text-align: center; }
.aday__count {
  position: absolute; top: -5px; right: -5px;
  min-width: 19px; height: 19px; padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--rose-deep); color: #fff;
  font-size: .65rem; font-weight: 800;
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}

/* Nap szerkeszto lap */
.sheet {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: flex-end; justify-content: center;
  background: rgba(48,12,19,.45);
  backdrop-filter: blur(3px);
}
.sheet.is-open { display: flex; }
.sheet__panel {
  width: 100%; max-width: 520px;
  background: var(--cream);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 92vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .3s var(--ease);
}
@media (min-width: 560px) {
  .sheet { align-items: center; }
  .sheet__panel { border-radius: var(--r-lg); }
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet__close { border: 0; background: var(--blush); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1rem; color: var(--wine); flex-shrink: 0; }

.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.preset {
  border: 1.5px solid var(--line-strong); background: #fff;
  border-radius: var(--r-pill); padding: 7px 13px;
  font: inherit; font-size: .82rem; font-weight: 700; color: var(--wine);
  cursor: pointer; transition: all .16s var(--ease);
}
.preset:hover { background: var(--petal); border-color: var(--rose); }

.winrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.winrow input { min-height: 44px; text-align: center; font-weight: 700; }
.winrow span { color: var(--muted); font-weight: 700; flex-shrink: 0; }
.winrow button {
  flex-shrink: 0; width: 40px; height: 44px;
  border: 1.5px solid #f0cfc3; background: #fff; color: #b0402a;
  border-radius: var(--r-sm); cursor: pointer; font-size: 1rem;
}
.winrow button:hover { background: var(--warn-bg); }

.repeat { background: var(--blush); border-radius: var(--r-sm); padding: 12px 14px; margin: 14px 0; }
.repeat__title { font-size: .78rem; font-weight: 800; color: var(--wine); margin-bottom: 8px; }
.repeat label { display: flex; align-items: center; gap: 9px; font-size: .87rem; padding: 4px 0; cursor: pointer; }
.repeat input[type=radio] { width: 19px; height: 19px; min-height: 0; accent-color: var(--wine); margin: 0; flex-shrink: 0; }

.daybookings { margin-top: 14px; }
.daybookings__item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 12px; margin-bottom: 6px; font-size: .85rem;
}
.daybookings__item strong { color: var(--wine); }

/* ---------------------------------------------------------- Foglalasok */

.bk-day {
  font-family: 'Fraunces', serif; font-size: 1rem; color: var(--wine);
  margin: 18px 0 8px;
  display: flex; align-items: center; gap: 10px;
}
/* Magyarban csak a mondatkezdo betu nagy - a "pentek" nem. */
.bk-day::first-letter { text-transform: uppercase; }
.bk-day::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.bk {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--rose);
  border-radius: var(--r-sm); padding: 13px 15px; margin-bottom: 9px;
  box-shadow: var(--shadow-sm);
}
.bk.is-cancelled { opacity: .55; border-left-color: #c9b3b8; }
.bk.is-cancelled .bk__time { text-decoration: line-through; }
.bk.is-done { border-left-color: var(--ok); }

.bk__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bk__time { font-weight: 800; color: var(--wine); font-size: 1rem; }
.bk__svc { font-size: .85rem; color: var(--ink-soft); }
.bk__name { font-weight: 700; margin-top: 5px; }
.bk__contact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bk__contact a {
  font-size: .8rem; font-weight: 700; text-decoration: none;
  background: var(--blush); color: var(--wine);
  padding: 5px 11px; border-radius: var(--r-pill);
}
.bk__contact a:hover { background: var(--petal); }
.bk__note {
  margin-top: 9px; font-size: .83rem; color: var(--ink-soft);
  background: var(--cream); border-radius: var(--r-sm); padding: 8px 11px;
  border-left: 3px solid var(--gold);
}
.bk__actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.bk__badge {
  font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 9px; border-radius: var(--r-pill); background: var(--blush); color: var(--wine-soft);
}
.bk__badge--cancelled { background: #f0e2e4; color: #8a7076; }
.bk__badge--done { background: var(--ok-bg); color: var(--ok); }

/* -------------------------------------------------------- Szolgaltatas */

.srow {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px; margin-bottom: 10px;
}
.srow.is-off { opacity: .6; background: var(--cream); }
.srow__top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.srow__top input { font-weight: 700; }
.srow__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.srow__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.srow__order { display: flex; gap: 4px; }
.iconbtn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong); background: #fff; color: var(--wine);
  cursor: pointer; font-size: .9rem;
}
.iconbtn:hover { background: var(--blush); }
.iconbtn--danger { border-color: #f0cfc3; color: #b0402a; }
.iconbtn--danger:hover { background: var(--warn-bg); }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.switch input { width: 20px; height: 20px; min-height: 0; accent-color: var(--wine); margin: 0; }

/* ---------------------------------------------------------------- Egyeb */

.alert {
  border-radius: var(--r-sm); padding: 11px 14px; font-size: .87rem; font-weight: 600;
  margin-bottom: 12px; display: flex; gap: 9px; align-items: flex-start;
}
.alert--error { background: var(--warn-bg); color: #9c3a24; border: 1px solid #f0cfc3; }
.alert--ok { background: var(--ok-bg); color: #2f6b46; border: 1px solid #c5e2d0; }
.alert--info { background: var(--blush); color: var(--wine-soft); border: 1px solid var(--line-strong); }

.empty-state { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty-state__icon { font-size: 2rem; margin-bottom: 8px; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 120%);
  background: var(--wine); color: #fff;
  padding: 12px 22px; border-radius: var(--r-pill);
  font-weight: 700; font-size: .88rem;
  box-shadow: var(--shadow-lg); z-index: 200;
  transition: transform .3s var(--ease);
  max-width: 90vw; text-align: center;
}
.toast.is-visible { transform: translate(-50%, 0); }
.toast.is-error { background: #9c3a24; }

.savebar {
  position: sticky; bottom: 0;
  background: rgba(255,250,251,.95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
  margin: 16px -16px -90px;
  display: flex; gap: 10px; align-items: center;
}
.savebar .btn { flex: 1; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 10px; text-align: center; }
.stat__num { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 600; color: var(--wine); line-height: 1; }
.stat__label { font-size: .7rem; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; }

.spinner {
  width: 16px; height: 16px;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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