:root{
  --bg:#F4F6F8; --surface:#FFFFFF; --text:#0F1B2A; --accent:#F5A623;
  --accent-dark:#1F3A5F; --neutral:#6B7785; --border:#D6DDE5;
  --success:#2E9E5B; --danger:#C2410C;
  --r:14px; --shadow:0 10px 30px rgba(15,27,42,.08);
  --ease:cubic-bezier(.2,.8,.2,1); --ease-out:cubic-bezier(.4,0,1,1);
}
*{box-sizing:border-box}
[hidden]{display:none !important}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:16px; line-height:1.5; -webkit-font-smoothing:antialiased;
}
img{max-width:100%; display:block}
a{color:var(--accent-dark); text-decoration:none}
button,input,select,textarea{font:inherit; color:inherit}
h1,h2,h3{margin:0; line-height:1.15; letter-spacing:-.01em}
h1{font-size:clamp(30px,5vw,40px); font-weight:700}
h2{font-size:clamp(22px,3.4vw,28px); font-weight:700}
h3{font-size:18px; font-weight:700}
p{margin:0 0 10px}
.muted{color:var(--neutral)}
.mini{font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:var(--neutral); font-weight:600}
.eyebrow{font-size:12px; text-transform:uppercase; letter-spacing:.12em; color:var(--accent-dark); font-weight:700; margin-bottom:8px}
.brand{display:inline-flex; align-items:center; gap:10px; height:44px; font-weight:800; font-size:20px; color:var(--text)}
.logo{width:34px; height:34px}
.logo-lg{width:48px; height:48px}
.ico{width:20px; height:20px; flex:none}

/* header */
.site-header{
  position:sticky; top:0; z-index:20; display:flex; align-items:center; gap:20px;
  padding:12px clamp(16px,4vw,40px); background:rgba(244,246,248,.92);
  border-bottom:1px solid var(--border); backdrop-filter:blur(10px);
}
.site-nav{display:flex; gap:18px; margin-left:auto; flex-wrap:wrap; align-items:center}
.site-header .brand{min-height:44px}
.site-nav a{display:inline-flex; align-items:center; height:44px; color:var(--text); font-weight:600; font-size:14px; padding:6px 2px; border-bottom:2px solid transparent; transition:border-color .16s var(--ease), color .16s var(--ease)}
.site-nav a:hover{border-color:var(--accent); color:var(--accent-dark)}

/* buttons */
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; height:44px; min-height:44px;
  padding:9px 18px; border-radius:10px; border:1px solid transparent; font-weight:600; white-space:nowrap;
  cursor:pointer; transition:transform .16s var(--ease), background .16s var(--ease), box-shadow .2s var(--ease);}
.btn:hover{transform:translateY(-2px)}
.btn:active{transform:translateY(0) scale(.98)}
.btn-primary{background:var(--accent); color:var(--text); box-shadow:0 6px 18px rgba(245,166,35,.28)}
.btn-primary:hover{background:#ffb433}
.btn-secondary{background:var(--accent-dark); color:#fff}
.btn-ghost{background:transparent; border-color:var(--border); color:var(--text)}
.btn-ghost:hover{background:var(--surface)}
.btn-block{width:100%}
.iconbtn{display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; min-height:44px; border-radius:10px; border:1px solid var(--border); background:var(--surface); font-size:22px; cursor:pointer}
.linkbtn{background:none; border:0; padding:4px 0; color:var(--accent-dark); cursor:pointer; text-align:left; font-size:13px}
.linkbtn:hover{text-decoration:underline}

/* hero */
.hero{display:grid; grid-template-columns:1.05fr .95fr; gap:32px; align-items:center;
  padding:clamp(24px,5vw,64px) clamp(16px,4vw,40px) 32px; max-width:1200px; margin:0 auto}
.hero-copy{max-width:560px}
.lead{font-size:18px; color:#33465c; margin:14px 0 20px}
.hero-actions{display:flex; gap:12px; flex-wrap:wrap; margin-bottom:22px}
.hero-facts{list-style:none; margin:0; padding:0; display:flex; gap:18px; flex-wrap:wrap; font-size:13px; color:var(--neutral)}
.hero-facts li{display:inline-flex; align-items:center; gap:6px}
.hero-media{border-radius:22px; overflow:hidden; box-shadow:var(--shadow); background:var(--surface); animation:rise .32s var(--ease) both}
.hero-img{width:100%; aspect-ratio:16/9; object-fit:cover}

/* sections */
.section{max-width:1200px; margin:0 auto; padding:clamp(28px,5vw,56px) clamp(16px,4vw,40px)}
.section-head{max-width:720px; margin-bottom:24px}
.grid-4{display:grid; grid-template-columns:repeat(4,1fr); gap:16px}
.card{background:var(--surface); border:1px solid var(--border); border-radius:var(--r); box-shadow:0 2px 10px rgba(15,27,42,.04)}
.step{padding:20px; position:relative; animation:rise .3s var(--ease) both}
.step:nth-child(2){animation-delay:.06s}.step:nth-child(3){animation-delay:.12s}.step:nth-child(4){animation-delay:.18s}
.step-num{position:absolute; top:16px; right:16px; color:var(--border); font-weight:800; font-size:26px}
.card-ico{width:34px; height:34px; margin-bottom:12px}
.step h3{margin-bottom:6px}
.step p{font-size:14px; color:var(--neutral); margin:0}
.split{display:grid; grid-template-columns:1fr 1fr; gap:32px; align-items:center}
.split.reverse .split-media{order:2}
.section-img{width:100%; border-radius:18px; box-shadow:var(--shadow); aspect-ratio:4/3; object-fit:cover}
.slot-list{display:grid; gap:10px; margin:16px 0 20px}
.slot-item{display:flex; align-items:center; gap:12px; padding:12px 14px; background:var(--surface); border:1px solid var(--border); border-radius:12px}
.slot-item .dock{width:38px; height:38px; border-radius:10px; background:var(--accent-dark); color:#fff; display:grid; place-items:center; font-weight:700}
.slot-item .when{font-weight:700}
.slot-item .free{margin-left:auto; font-size:12px; font-weight:700; color:var(--success)}
.price-list{list-style:none; margin:16px 0 0; padding:0; display:grid; gap:10px}
.price-list li{display:flex; justify-content:space-between; gap:14px; padding:12px 14px; background:var(--surface); border:1px solid var(--border); border-radius:12px}
.price-list .price{font-weight:700; font-variant-numeric:tabular-nums}

/* form */
.form-wrap{display:grid; grid-template-columns:.85fr 1.15fr; gap:28px; align-items:start}
.form-img{width:100%; border-radius:16px; margin-top:18px; aspect-ratio:4/3; object-fit:cover}
.form{padding:22px; display:grid; gap:14px}
.field{display:grid; gap:6px; min-width:0}
.field label{font-size:13px; font-weight:700}
.field input,.field select,.field textarea{width:100%; min-width:0; padding:11px 12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); transition:border-color .16s var(--ease), box-shadow .16s var(--ease)}
.field input:focus,.field select:focus,.field textarea:focus{outline:none; border-color:var(--accent-dark); box-shadow:0 0 0 3px rgba(31,58,95,.14)}
.field-row{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.field-row .field:only-child{grid-column:1/-1}
.err{color:var(--danger); font-size:12px; min-height:0}
.hint{font-size:12px; color:var(--neutral); margin:0}
.check{display:flex; gap:10px; align-items:flex-start; font-size:13px; color:#33465c}
.check input{width:18px; height:18px; margin-top:2px; accent-color:var(--accent-dark)}
.form-status{min-height:20px; font-size:14px; font-weight:600; margin:0}
.form-status.ok{color:var(--success)}
.form-status.bad{color:var(--danger)}

/* footer */
.site-footer{border-top:1px solid var(--border); margin-top:24px; padding:28px clamp(16px,4vw,40px); background:var(--surface)}
.footer-inner{max-width:1200px; margin:0 auto; display:grid; gap:8px}
.footer-inner .muted{max-width:640px}

/* demo banner */
.demo-banner{background:var(--accent); color:var(--text); text-align:center; padding:8px 16px; font-size:13px; font-weight:700}

/* login */
.login-wrap{min-height:calc(100vh - 60px); display:grid; place-items:center; padding:32px 16px}
.login-card{width:min(440px,100%); padding:28px; display:grid; gap:14px}
.login-card h1{font-size:24px}
.demo-creds{border-top:1px solid var(--border); padding-top:12px; display:grid; gap:2px}

/* admin shell */
#admin{min-height:100vh}
#appView{display:grid; grid-template-columns:248px 1fr; min-height:100vh}
.sidebar{background:var(--accent-dark); color:#fff; padding:18px 14px; display:flex; flex-direction:column; gap:16px; position:sticky; top:0; height:100vh; overflow:auto}
.sidebar .brand{color:#fff; padding:4px 8px}
.admin-nav{display:grid; gap:2px}
.admin-nav button{display:flex; align-items:center; gap:10px; padding:10px 12px; border:0; border-radius:9px; background:transparent; color:#e8eef6; font-size:14px; font-weight:600; cursor:pointer; text-align:left; transition:background .16s var(--ease), color .16s var(--ease)}
.admin-nav button .ico{filter:brightness(0) invert(1); opacity:.8}
.admin-nav button:hover{background:rgba(255,255,255,.1)}
.admin-nav button.active{background:var(--accent); color:var(--text)}
.admin-nav button.active .ico{filter:none}
.admin-nav button[hidden]{display:none}
.sidebar-foot{margin-top:auto; display:grid; gap:10px}
.userbox{display:flex; align-items:center; gap:10px; padding:8px; background:rgba(255,255,255,.08); border-radius:10px}
.avatar{width:38px; height:38px; border-radius:50%; background:#fff}
.avatar.sm{width:24px; height:24px; display:inline-block; vertical-align:middle; margin-right:6px}
.userbox strong{display:block; font-size:13px}
.badge{display:inline-block; padding:1px 8px; border-radius:999px; background:rgba(255,255,255,.2); font-size:11px; font-weight:700}
.workarea{min-width:0; padding:22px clamp(14px,3vw,32px) 40px}
.worktop{display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; flex-wrap:wrap}
.worktop h1{font-size:24px}
.worktop-actions{display:flex; align-items:center; gap:10px}
.status-pill{font-size:12px; font-weight:700; padding:5px 10px; border-radius:999px; background:#e7f3ec; color:var(--success)}
.status-pill.off{background:#fbe9e2; color:var(--danger)}
.view-root{display:grid; gap:16px; min-width:0}

/* dashboard */
.stat-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:12px}
.stat{padding:16px; display:grid; gap:4px}
.stat .num{font-size:30px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1}
.stat .lbl{font-size:13px; color:var(--neutral)}
.two-col{display:grid; grid-template-columns:1.4fr 1fr; gap:16px; min-width:0}
.panel{padding:18px; min-width:0}
.panel h3{margin-bottom:12px}
.chart{width:100%; height:auto}
.bar-row{display:grid; grid-template-columns:110px 1fr 38px; gap:8px; align-items:center; font-size:12px; margin-bottom:8px}
.bar-track{height:12px; background:var(--bg); border-radius:999px; overflow:hidden}
.bar-fill{height:100%; background:var(--accent-dark); border-radius:999px; transition:width .24s var(--ease)}
.bar-fill.urgent{background:var(--danger)}
.bar-fill.vip{background:var(--accent)}

/* tables */
.table-wrap{overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid var(--border); border-radius:12px; background:var(--surface)}
table{width:100%; border-collapse:collapse; min-width:640px}
th,td{padding:10px 12px; text-align:left; border-bottom:1px solid var(--border); font-size:13px; vertical-align:middle}
th{font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--neutral); background:#fafbfc}
tr:last-child td{border-bottom:0}
tbody tr:hover{background:#f8fafb}
.toolbar{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.toolbar input,.toolbar select{min-height:44px; padding:8px 11px; border:1px solid var(--border); border-radius:9px; background:var(--surface); min-width:0}
.toolbar input[type=search]{flex:1 1 220px}
.toolbar select{flex:0 1 190px}

/* status badges / progress */
.badge-status{display:inline-block; padding:2px 9px; border-radius:999px; font-size:11px; font-weight:700; white-space:nowrap}
.badge-status.new{background:#fdeceb; color:#a8321b}
.badge-status.in_progress{background:#e8eef7; color:var(--accent-dark)}
.badge-status.booked{background:#fff4dd; color:#8a5b00}
.badge-status.done{background:#e7f3ec; color:#1f7a45}
.badge-status.paid{background:#dff2e6; color:#166a3b}
.badge-status.cancelled{background:#eef0f2; color:#556}
.prio{font-size:11px; font-weight:700; padding:1px 7px; border-radius:6px}
.prio.urgent{background:#fde3d8; color:var(--danger)}
.prio.vip{background:#fff1d6; color:#8a5b00}
.steps{display:flex; gap:3px; min-width:120px}
.steps span{height:6px; flex:1; border-radius:3px; background:var(--border)}
.steps span.on{background:var(--success)}
.steps span.now{background:var(--accent)}

/* kanban */
.kanban{display:grid; grid-template-columns:repeat(6,minmax(160px,1fr)); gap:10px; overflow-x:auto; padding-bottom:6px}
.kcol{background:#eef1f4; border:1px dashed var(--border); border-radius:12px; padding:8px; min-height:120px; min-width:160px}
.kcol h4{margin:0 0 8px; font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--neutral); display:flex; justify-content:space-between}
.kcard{background:var(--surface); border:1px solid var(--border); border-left:4px solid var(--accent-dark); border-radius:9px; padding:9px; margin-bottom:8px; cursor:grab; min-width:0; transition:transform .16s var(--ease), box-shadow .16s var(--ease)}
.kcard:hover{transform:translateY(-1px); box-shadow:0 6px 14px rgba(15,27,42,.1)}
.kcard.urgent{border-left-color:var(--danger)}
.kcard.vip{border-left-color:var(--accent)}
.kcard .num{font-size:11px; font-weight:700; color:var(--neutral)}
.kcard .who{font-weight:700; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.kcard .meta{font-size:11px; color:var(--neutral); display:flex; gap:6px; flex-wrap:wrap}
.kcol.dragover{background:#fff8e8; border-color:var(--accent)}

/* misc */
.empty{display:grid; place-items:center; gap:10px; padding:26px; text-align:center; color:var(--neutral)}
.empty img{width:120px; opacity:.9}
.empty h3{color:var(--text)}
.toast{position:fixed; right:18px; bottom:18px; z-index:60; background:var(--text); color:#fff; padding:12px 16px; border-radius:10px; box-shadow:var(--shadow); font-size:14px; max-width:340px; animation:rise .2s var(--ease) both}
.toast.bad{background:var(--danger)}
.modal{position:fixed; inset:0; z-index:70; background:rgba(15,27,42,.45); display:grid; place-items:center; padding:16px; animation:fade .2s var(--ease) both}
.modal[hidden]{display:none}
.modal-card{background:var(--surface); border-radius:16px; width:min(680px,100%); max-height:88vh; overflow:auto; box-shadow:var(--shadow)}
.modal-head{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:16px 18px; border-bottom:1px solid var(--border); position:sticky; top:0; background:var(--surface)}
.modal-head h2{font-size:20px}
#modalBody{padding:18px; display:grid; gap:12px}
.detail-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:10px}
.detail-grid .k{font-size:11px; text-transform:uppercase; color:var(--neutral); letter-spacing:.05em}
.detail-grid .v{font-weight:600}
.history{list-style:none; margin:0; padding:0; display:grid; gap:6px}
.history li{display:flex; gap:8px; font-size:12px; color:var(--neutral)}
.photos{display:flex; gap:8px; flex-wrap:wrap}
.photos img{width:90px; height:70px; object-fit:cover; border-radius:8px; border:1px solid var(--border)}
.form-inline{display:flex; gap:8px; flex-wrap:wrap; align-items:center}
.form-inline input,.form-inline select{min-height:44px; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface); min-width:0}
.switch{display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--border)}
.switch input{width:44px; height:24px; accent-color:var(--accent-dark)}
.log-row{display:flex; gap:8px; align-items:center; font-size:12px; padding:8px 0; border-bottom:1px solid var(--border); flex-wrap:wrap}
.log-row .ch{font-weight:700; text-transform:uppercase; font-size:10px; padding:2px 6px; border-radius:5px; background:var(--bg)}
.log-row .st{margin-left:auto; font-weight:700}
.log-row .st.queued{color:#8a5b00}.log-row .st.sent{color:var(--success)}.log-row .st.failed{color:var(--danger)}

/* animation */
@keyframes rise{from{opacity:0; transform:translateY(12px)} to{opacity:1; transform:none}}
@keyframes fade{from{opacity:0} to{opacity:1}}
@keyframes shimmer{0%{background-position:-200px 0} 100%{background-position:200px 0}}

/* responsive */
@media (max-width:1024px){
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .hero{grid-template-columns:1fr; gap:22px}
  .hero-copy{max-width:none}
  .split,.form-wrap{grid-template-columns:1fr}
  .split.reverse .split-media{order:0}
  .two-col{grid-template-columns:1fr}
  #appView{grid-template-columns:76px 1fr}
  .sidebar{padding:12px 8px}
  .sidebar .brand span,.admin-nav button span,.userbox div,.sidebar-foot .btn-block{display:none}
  .admin-nav button{justify-content:center; padding:12px 8px}
  .admin-nav button .ico{margin:0}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:768px){
  .site-nav{display:none}
  .site-header{gap:10px; padding:10px 14px}
  .site-header .btn-ghost{font-size:12px; padding:8px 10px}
  .kanban{grid-template-columns:repeat(6,170px)}
  #appView{grid-template-columns:1fr}
  .sidebar{position:static; height:auto; flex-direction:row; flex-wrap:wrap; align-items:center}
  .admin-nav{display:flex; overflow-x:auto; gap:4px; width:100%}
  .admin-nav button span{display:inline}
  .sidebar-foot{width:100%; display:flex; align-items:center; gap:10px; margin-top:0}
  .userbox div,.sidebar-foot .btn-block{display:block}
  .sidebar-foot .btn-block{width:auto}
  .workarea{padding:16px 14px 32px}
}
@media (max-width:480px){
  .grid-4{grid-template-columns:1fr}
  .field-row{grid-template-columns:1fr}
  .stat-grid{grid-template-columns:1fr 1fr}
  .detail-grid{grid-template-columns:1fr}
  .hero-facts{flex-direction:column; gap:8px}
  .hero-actions .btn{width:100%}
  .batch-actions{flex-direction:column}
}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important}
  .hero-media,.step,.toast,.modal{animation:none !important}
  .btn:hover,.kcard:hover{transform:none !important}
  .bar-fill{transition:none !important}
}
