/* reset de bază */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Layout: booking site for seaside apartments in Mamaia — warm sand ground, brand orange used for actions and selection only */
:root {
  --bg: #FFFFFF;
  --sand: #FFF6EF;
  --sand-2: #FBF5F0;
  --surface: #FFFFFF;
  --fg: #1A1411;
  --muted: #5A4A40;
  --faint: #8C7A6D;
  --line: #EFE6DE;
  --line-2: #E3D6CB;
  --accent: #E0652B;
  --on-accent: #1A1411;
  --range: #FCD9C4;
  --busy-bg: #FDE2E0;
  --busy-fg: #B42318;
  --block-bg: #E7DED6;
  --block-fg: #4A3C33;
  --ok-bg: #DDF2E3;
  --ok-fg: #1F5C34;
  --warn-bg: #FFF0CC;
  --warn-fg: #7A5300;
  --danger: #B42318;
  --footer: #1A1411;
  --footer-fg: #CDBFB4;
  --shadow: 0 18px 50px rgba(60, 30, 10, 0.12), 0 2px 6px rgba(60, 30, 10, 0.06);
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14100D; --sand: #1E1713; --sand-2: #241C17; --surface: #1B1511; --fg: #F5EDE6; --muted: #C7B7AA; --faint: #9A897C;
    --line: #33281F; --line-2: #45372C; --accent: #EC7440; --on-accent: #1A1411; --range: #5A3420;
    --busy-bg: #4A1F1B; --busy-fg: #FFB4AB; --block-bg: #3A3029; --block-fg: #E4D7CC; --ok-bg: #173A24; --ok-fg: #9EE0B2;
    --warn-bg: #3D3010; --warn-fg: #F2CF7A; --danger: #FF8A80; --footer: #0D0A08; --footer-fg: #BBAA9C;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14100D; --sand: #1E1713; --sand-2: #241C17; --surface: #1B1511; --fg: #F5EDE6; --muted: #C7B7AA; --faint: #9A897C;
  --line: #33281F; --line-2: #45372C; --accent: #EC7440; --on-accent: #1A1411; --range: #5A3420;
  --busy-bg: #4A1F1B; --busy-fg: #FFB4AB; --block-bg: #3A3029; --block-fg: #E4D7CC; --ok-bg: #173A24; --ok-fg: #9EE0B2;
  --warn-bg: #3D3010; --warn-fg: #F2CF7A; --danger: #FF8A80; --footer: #0D0A08; --footer-fg: #BBAA9C;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45); color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.brand img, .brand .mark { width: 44px; height: 44px; border-radius: 11px; display: block; }
.brand .mark { background: var(--accent); }
.brand span { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-weight: 500; }
.linkbtn { background: none; border: 0; padding: 8px 0; cursor: pointer; font-weight: 500; text-decoration: none; }
.linkbtn:hover { color: var(--accent); }

/* buttons */
.btn { min-height: 48px; padding: 0 22px; border-radius: 14px; border: 0; font-weight: 600; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary[disabled] { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn-ghost { background: transparent; border: 1.5px solid var(--fg); color: var(--fg); border-radius: 999px; }
.btn-soft { background: var(--sand-2); color: var(--fg); border: 1px solid var(--line-2); }
.btn-danger { background: transparent; border: 1.5px solid var(--danger); color: var(--danger); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.back { background: none; border: 0; padding: 10px 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.icon { width: 18px; height: 18px; flex: none; }
.round { width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 20px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.round[disabled] { opacity: 0.35; cursor: not-allowed; }

/* hero */
.hero { background: var(--sand); }
.hero .wrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-block: 56px 96px; }
.hero-copy { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); }
.hero h1 { margin: 0; font-size: clamp(40px, 6vw, 64px); line-height: 1.02; }
.hero p { margin: 0; font-size: 18px; color: var(--muted); max-width: 46ch; }
.hero-media { flex: 1 1 420px; min-width: 0; position: relative; }
.hero-media img, .hero-media .ph { width: 100%; height: 420px; object-fit: cover; border-radius: 26px; display: block; background: var(--sand-2); }
.hero-tag { position: absolute; left: 16px; bottom: 16px; background: var(--surface); color: var(--fg); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.hero-tag strong { font-family: var(--font-display); font-size: 20px; }
.ph { display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 14px; font-weight: 500; }

/* search */
.search { max-width: 1080px; margin: -56px auto 0; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; position: relative; border: 1px solid var(--line); }
.field { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-radius: 16px; background: var(--sand-2); }
.field input { border: 0; background: transparent; font-size: 17px; font-weight: 500; padding: 2px 0; min-height: 30px; width: 100%; }
.field.guests { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; }
.stepper { display: flex; gap: 8px; }
.search .btn { flex: 0 1 170px; min-height: 64px; border-radius: 16px; font-size: 17px; }
.dates { flex: 2 1 380px; min-width: 0; display: flex; gap: 8px; }
.datebox { flex: 1 1 0; min-width: 0; text-align: left; border: 0; cursor: pointer; font: inherit; color: var(--fg); }
.datebox:hover { box-shadow: inset 0 0 0 1.5px var(--line-2); }
.datebox.active { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface); }
.dval { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dval.empty { color: var(--faint); font-weight: 500; }
.picker { position: absolute; top: calc(100% + 10px); left: 0; width: min(780px, 100%); z-index: 15; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.pk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pk-status { margin: 0; text-align: center; font-size: 15px; color: var(--muted); }
.pk-status b { color: var(--fg); }
.pk-months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.pm { display: flex; flex-direction: column; gap: 10px; }
.pm-title { text-align: center; font-weight: 600; font-size: 16px; }
.picker .day { height: 42px; }
.picker .day.blank { visibility: hidden; display: block; }
.day.preview { background: var(--range); }
.pk-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.search .picker .btn { flex: none; min-height: 40px; font-size: 14px; border-radius: 10px; }
.pk-foot .linkbtn[disabled] { opacity: 0.4; cursor: default; }
@media (max-width: 720px) { .pk-months { grid-template-columns: 1fr; } .picker .m2 { display: none; } .picker { padding: 14px; } }
.search-note { max-width: 1080px; margin: 12px auto 0; min-height: 22px; font-size: 14px; padding: 0 12px; color: var(--muted); }
.search-note .err { color: var(--danger); font-weight: 600; }

/* sections */
.section { padding-block: 64px 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: clamp(30px, 4vw, 40px); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.apt-card { display: flex; flex-direction: column; gap: 12px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.apt-card img, .apt-card .ph { width: 100%; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; display: block; background: var(--sand-2); transition: transform 0.25s ease; }
.apt-card:hover img { transform: scale(1.015); }
.apt-card .row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.apt-card .name { font-weight: 600; font-size: 17px; }
.apt-card .meta { font-size: 14px; color: var(--muted); }
.price { white-space: nowrap; }
.empty { border: 1.5px dashed var(--line-2); border-radius: 20px; padding: 32px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.why div { background: var(--sand); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.why h3 { margin: 0; font-size: 19px; }
.why p { margin: 0; color: var(--muted); }

/* results */
.summary-band { background: var(--sand); border-bottom: 1px solid var(--line); }
.summary-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-block: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 8px 14px; display: flex; flex-direction: column; }
.chip b { font-size: 16px; }
.result { display: flex; flex-wrap: wrap; gap: 22px; padding: 14px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.result img, .result .ph { flex: 1 1 300px; min-width: 0; height: 240px; object-fit: cover; border-radius: 18px; background: var(--sand-2); cursor: pointer; }
.result .body { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: 6px 6px 6px 0; }
.result h2 { margin: 0; font-size: 23px; font-weight: 600; }
.badge { align-self: flex-start; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.badge.ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge.warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge.off { background: var(--busy-bg); color: var(--busy-fg); }
.badge.neutral { background: var(--sand-2); color: var(--muted); border: 1px solid var(--line-2); }
.result .foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }

/* apartment + calendar */
.apt-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; margin-top: 8px; }
.apt-info { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.gallery-main { width: 100%; max-width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 22px; display: block; background: var(--sand-2); }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumb { flex: none; width: 84px; height: 64px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--sand-2); }
.thumb.on { border-color: var(--accent); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.apt-info h1 { margin: 0; font-size: clamp(30px, 4vw, 38px); }
.apt-info p { margin: 0; color: var(--muted); max-width: 62ch; white-space: pre-line; }
.amenities { display: flex; flex-wrap: wrap; gap: 8px; }
.amenities span { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--sand-2); border: 1px solid var(--line-2); }
.panel { flex: 1 1 440px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.panel h2 { margin: 0; font-size: 21px; font-weight: 600; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cal-head span { font-weight: 600; font-size: 17px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding-bottom: 2px; }
.day { height: 46px; border-radius: 11px; border: 0; background: var(--sand-2); font-size: 15px; font-weight: 500; cursor: pointer; padding: 0; font-variant-numeric: tabular-nums; }
.day:hover:not([disabled]) { outline: 2px solid var(--accent); outline-offset: -2px; }
.day.blank { visibility: hidden; }
.day.past { background: transparent; color: var(--faint); cursor: default; }
.day.busy { background: var(--busy-bg); color: var(--busy-fg); text-decoration: line-through; }
.day.busy[disabled] { cursor: not-allowed; }
.day.endok { text-decoration: none; }
.day.blocked { background: var(--block-bg); color: var(--block-fg); background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,0.07) 6px 8px); }
.day.range { background: var(--range); }
.day.sel { background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--line-2); }
.msg { margin: 0; font-size: 14px; font-weight: 600; color: var(--danger); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.box { background: var(--sand-2); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.box b { font-size: 16px; }
.lines { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.line { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.line.total { font-size: 18px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 10px; }

/* checkout */
.checkout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.checkout form { flex: 2 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
legend { font-size: 21px; font-weight: 600; padding: 0; margin-bottom: 12px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; min-width: 0; }
.lbl.full { grid-column: 1 / -1; }
.inp { min-height: 48px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 0 14px; font-size: 16px; background: var(--surface); width: 100%; }
textarea.inp { padding: 12px 14px; min-height: 120px; resize: vertical; line-height: 1.5; }
.inp:focus { border-color: var(--accent); outline: none; }
.pays { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.pay { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; }
.pay.on { border: 2px solid var(--fg); padding: 15.5px; }
.pay input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.pay b { display: block; font-size: 16px; }
.pay small { color: var(--muted); font-size: 13px; }
.paybox { background: var(--sand-2); border-radius: 16px; padding: 18px; }
.paybox p { margin: 0; line-height: 1.55; }
.demo-note { font-size: 13px; color: var(--muted); margin: 0; }
.aside { flex: 1 1 320px; min-width: 0; border: 1px solid var(--line); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); }
.aside img, .aside .ph { width: 100%; height: 180px; object-fit: cover; border-radius: 16px; background: var(--sand-2); }
.done { max-width: 620px; margin: 0 auto; padding-block: 80px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.done h1 { margin: 0; font-size: 40px; }

/* admin */
.admin-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding-block: 28px 8px; }
.admin-top h1 { margin: 0; font-size: 36px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 14px; font-weight: 600; cursor: pointer; color: var(--muted); }
.tab.on { color: var(--fg); border-bottom-color: var(--accent); }
.rows { display: flex; flex-direction: column; gap: 10px; }
.arow { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.arow img, .arow .ph { width: 96px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--sand-2); flex: none; }
.arow .grow { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.arow .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.edit-grid { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.edit-col { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card h2 { margin: 0; font-size: 19px; font-weight: 600; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo { position: relative; border-radius: 14px; overflow: hidden; background: var(--sand-2); aspect-ratio: 4 / 3; max-width: 100%; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .cover { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: var(--accent); color: var(--on-accent); padding: 3px 8px; border-radius: 999px; }
.photo .tools { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.photo .tools button { width: 32px; height: 32px; border-radius: 9px; border: 0; background: rgba(20, 16, 13, 0.75); color: #FFFFFF; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.upload { border: 1.5px dashed var(--line-2); border-radius: 14px; aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; padding: 8px; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 20; max-width: calc(100% - 32px); }
.inline-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }

footer.site-footer { background: var(--footer); color: var(--footer-fg); margin-top: 64px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; padding-block: 44px; }
footer b { color: #FFFFFF; }
footer .brand span { color: #FFFFFF; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* login + diverse */
.login { max-width: 440px; margin: 64px auto; }
.footer-admin { color: var(--footer-fg); font-size: 13px; opacity: 0.8; }
.footer-admin:hover { opacity: 1; }
.sel-text { user-select: all; }
code { font-size: 0.9em; background: var(--sand-2); padding: 1px 6px; border-radius: 6px; }
.err-detail { font-size: 12px; color: var(--faint); font-family: ui-monospace, Menlo, monospace; word-break: break-word; }
