/* Salon paneli */

body.panel-body { overscroll-behavior-y: none; }

/* ---------- İskelet ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.rail { display: none; }
.main { min-width: 0; padding-bottom: calc(76px + var(--safe-b)); }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--safe-t)) 16px 10px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topbar h1 { flex: 1; font-size: 1.4rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; gap: 8px; }
.page { padding: 4px 16px 24px; max-width: 1100px; }
.hide-s { display: none; }
@media (min-width: 560px) { .hide-s { display: inline; } }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 8px; font-size: .7rem; font-weight: 600; color: var(--ink-3); text-decoration: none; }
.tabbar a.on { color: var(--accent-text); }
.tabbar a.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: .68rem; font-style: normal; font-weight: 700; display: inline-grid; place-items: center; }
.tabbar .badge { position: absolute; top: 4px; left: calc(50% + 6px); }

.adminbar { position: sticky; top: 0; z-index: 70; background: var(--henna-soft); color: #6B3C06; padding: 8px 16px; font-weight: 600; font-size: .88rem; text-align: center; }

@media (min-width: 900px) {
    .shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); }
    .tabbar { display: none; }
    .main { padding-bottom: 40px; }
    .topbar { padding: 22px 32px 12px; }
    .topbar h1 { font-size: 1.75rem; }
    .page { padding: 4px 32px 32px; }
    .rail { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px; background: var(--grad-deep); color: #EBDDFB; }
    .rail-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; font-family: var(--f-display); font-size: 1.1rem; }
    .rail-brand .mark { width: 22px; height: 26px; flex: none; background: linear-gradient(90deg, #F4511E 0 25%, #D81B60 25% 50%, #8E24AA 50% 75%, #039BE5 75%); border-radius: 11px 11px 3px 3px; }
    .rail-nav { display: flex; flex-direction: column; gap: 2px; }
    .rail a, .rail button { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: inherit; font-weight: 550; text-decoration: none; text-align: left; }
    .rail a:hover, .rail button:hover { background: rgba(255, 255, 255, .07); }
    .rail-nav a.on { background: rgba(255, 255, 255, .1); color: #fff; }
    .rail-nav a.on::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: color-mix(in srgb, var(--accent) 65%, white); }
    .rail .badge { margin-left: auto; }
    .rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .9rem; color: #C6B5E0; }
}

/* ---------- Giriş ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: 190px 1fr; }
.login-art { position: relative; overflow: hidden; background: var(--grad-deep); padding: 24px; display: flex; align-items: flex-end; }
.login-brand { position: relative; z-index: 1; font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; color: #fff; }
.fan { position: absolute; left: 24px; right: 24px; top: 24px; bottom: 0; display: flex; align-items: flex-end; gap: 7px; }
.fan i { flex: 1; background: var(--c); border-radius: 999px 999px 0 0; transform-origin: bottom; animation: grow .9s cubic-bezier(.2, .8, .2, 1) backwards; }
.fan i:nth-child(2) { animation-delay: .05s; } .fan i:nth-child(3) { animation-delay: .1s; } .fan i:nth-child(4) { animation-delay: .15s; } .fan i:nth-child(5) { animation-delay: .2s; }
.fan i:nth-child(6) { animation-delay: .25s; } .fan i:nth-child(7) { animation-delay: .3s; } .fan i:nth-child(8) { animation-delay: .35s; } .fan i:nth-child(9) { animation-delay: .4s; } .fan i:nth-child(10) { animation-delay: .45s; }
@keyframes grow { from { transform: scaleY(.15); opacity: 0; } }
.login-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(42, 18, 69, .86), rgba(42, 18, 69, 0) 70%); }
.login-form { width: 100%; max-width: 440px; margin: 0 auto; padding: 30px 22px 40px; align-self: center; }
@media (min-width: 860px) {
    .login { grid-template-columns: minmax(380px, 1.05fr) 1fr; grid-template-rows: 1fr; }
    .login-art { padding: 48px; }
    .fan { left: 48px; right: 48px; top: 48px; }
    .login-brand { font-size: 2.1rem; }
    .login-form { padding: 40px; }
}

/* ---------- Özet ---------- */
.datehead { color: var(--ink-2); margin: 0 0 14px; }
.block { margin-top: 26px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.block-head h2 { font-size: 1.1rem; }

.figures { display: grid; grid-template-columns: repeat(2, 1fr); background: var(--surface); border-radius: 16px; overflow: hidden; }
.figures > div { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.figures > div:nth-child(odd) { border-right: 1px solid var(--line-2); }
.figures > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
.figures .n { color: var(--accent-text); font-family: var(--f-display); font-size: 2rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.figures span { color: var(--ink-2); font-size: .86rem; line-height: 1.3; }
.figures em { font-style: normal; color: var(--ink-3); }
.figures .warn .n { color: var(--henna); }
@media (min-width: 820px) {
    .figures { grid-template-columns: repeat(4, 1fr); }
    .figures > div { border: 0 !important; border-left: 1px solid var(--line-2) !important; }
    .figures > div:first-child { border-left: 0 !important; }
    .figures .n { font-size: 2.3rem; }
}
.figures.mini { margin: 16px 0 6px; grid-template-columns: repeat(3, 1fr); background: var(--paper); }
.figures.mini > div { border: 0 !important; border-left: 1px solid var(--line) !important; padding: 12px 14px; }
.figures.mini > div:first-child { border-left: 0 !important; }
.figures.mini .n { font-size: 1.15rem; }

.setup { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 16px; padding: 18px; margin: 0 0 20px; }
.setup h2 { margin-bottom: 8px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; min-height: 28px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--f-display); font-weight: 700; display: grid; place-items: center; }

.rows { background: var(--surface); border-radius: 14px; overflow: hidden; }
.rows > * + * { border-top: 1px solid var(--line-2); }
.arow { display: grid; grid-template-columns: 6px 50px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; transition: background .1s; }
.arow:hover { background: #FCF8FD; }
.arow .dye { background: var(--c); min-height: 40px; }
.arow .atime { display: flex; flex-direction: column; line-height: 1.2; }
.arow .atime b { font-family: var(--f-display); font-size: 1.05rem; font-weight: 650; }
.arow .atime small { color: var(--ink-3); font-size: .78rem; }
.arow .ainfo { display: flex; flex-direction: column; min-width: 0; }
.arow .ainfo small { color: var(--ink-2); }
.arow .ameta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; max-width: 120px; }
.arow .ameta small { color: var(--ink-3); max-width: 100%; }
.arow-actions { grid-column: 2 / -1; display: flex; gap: 8px; margin-top: 10px; }
.arow.iptal, .arow.gelmedi { opacity: .6; }
.arow.iptal .ainfo b { text-decoration: line-through; }
.arow.tamamlandi .dye { opacity: .45; }
.tag { font-style: normal; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); vertical-align: 2px; }
.nextflag { margin: 0; padding: 10px 14px 0; font-size: .78rem; font-weight: 700; color: var(--accent-text); }
.nextflag + .arow { padding-top: 6px; }
@media (max-width: 400px) { .arow .ameta { max-width: 92px; } }

.sharebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); border-radius: 14px; padding: 14px 16px; margin-top: 26px; }
.sharebar.top { margin-top: 0; }

.insights { display: grid; gap: 22px; }
@media (min-width: 760px) { .insights { grid-template-columns: 1fr 1fr; } }
.insights h2 { margin-bottom: 8px; font-size: 1.05rem; }
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: minmax(80px, 1.3fr) 2fr auto; gap: 12px; align-items: center; padding: 7px 0; font-size: .92rem; }
.bars i { position: relative; height: 8px; border-radius: 4px; background: var(--line-2); }
.bars i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 4px; background: var(--c, var(--accent)); }
.bars b { font-weight: 650; }

/* ---------- Liste araç çubuğu ---------- */
.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 10px; }
.toolbar-row .searchbox { flex: 1 1 220px; }
.toolbar-row .select { flex: 1 1 150px; }
.seg.scroll { display: flex; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg.scroll::-webkit-scrollbar { display: none; }
.seg a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 9px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(42, 18, 69, .14); }
.seg.tabs { margin-bottom: 18px; }
.searchbox { position: relative; display: block; }
.searchbox .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; z-index: 1; }
.searchbox .input { padding-left: 38px; }
.dayblock { margin-top: 18px; }
.dayhead { display: flex; align-items: baseline; gap: 6px; font-size: 1rem; margin-bottom: 8px; }
.dayhead em { margin-left: auto; font-style: normal; font-family: var(--f-ui); font-weight: 500; font-size: .82rem; color: var(--ink-3); }
.count { margin: 0 0 8px; }
.center { text-align: center; }

.crow, .srow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: transparent; text-align: left; }
.crow:hover, .srow:hover { background: #FCF8FD; }
.crow .grow, .srow .grow { display: flex; flex-direction: column; min-width: 0; }
.crow .cmeta { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.crow .cmeta small { color: var(--ink-3); font-size: .75rem; }
.srow .dye { background: var(--c); min-height: 38px; }
.srow.off { opacity: .6; }
.avatar.sm { width: 30px; height: 30px; font-size: .78rem; }
.avatar.big { width: 52px; height: 52px; font-size: 1.1rem; }
.big { font-family: var(--f-display); font-size: 1.15rem; font-weight: 650; }

/* ---------- Ayrıntı / form ---------- */
.detail .contact { margin: 12px 0 4px; flex-wrap: wrap; }
.facts { margin: 8px 0 0; }
.facts > div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--ink-3); font-size: .86rem; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.svcline { display: flex; justify-content: space-between; gap: 12px; }
.dye.inline { display: inline-block; width: 10px; height: 10px; min-height: 0; border-radius: 50%; background: var(--c); align-self: auto; margin-right: 4px; }
.notebox { margin: 14px 0 0; padding: 12px 14px; background: var(--paper); border-radius: var(--r-m); }
.notebox p { white-space: pre-wrap; }
.contact { margin-top: 12px; flex-wrap: wrap; }

.svcgroup { margin-bottom: 6px; }
.svcgroup small { display: block; margin: 8px 0 6px; }
.chip small { font-size: .78rem; }
.chips.tight { gap: 6px; margin-top: 6px; }
.chips.tight .chip { min-height: 34px; padding: 0 12px; font-variant-numeric: tabular-nums; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; }
.slotline { display: flex; flex-direction: column; gap: 2px; min-height: 8px; }
.custpick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
.pickres { display: flex; flex-direction: column; margin-top: 6px; border: 1px solid var(--line-2); border-radius: var(--r-m); overflow: hidden; }
.pickres:empty { display: none; }
.pickrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: var(--surface); text-align: left; min-height: 46px; }
.pickrow + .pickrow { border-top: 1px solid var(--line-2); }
.pickrow:hover { background: var(--accent-soft); }
.pickrow.add { color: var(--accent-text); font-weight: 600; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 38px; height: 38px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.swatch input:checked + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.swatch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.hours { display: flex; flex-direction: column; }
.hday { display: grid; grid-template-columns: 148px 1fr; gap: 8px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.hday .dname { font-weight: 600; }
.hrange { display: none; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.hday.on .hrange { display: flex; }
.hday.on .closed { display: none; }
.hr { display: inline-flex; align-items: center; gap: 6px; }
.hr .input { width: 106px; min-height: 38px; padding: 4px 8px; }
@media (max-width: 560px) { .hday { grid-template-columns: 1fr; } }

.memb { display: flex; flex-wrap: wrap; gap: 14px 36px; align-items: center; background: var(--surface); border-radius: 14px; padding: 16px 18px; }
.memb > div { display: flex; flex-direction: column; gap: 2px; }
.memb b { font-family: var(--f-display); font-size: 1.15rem; }
.warnText { color: var(--henna); font-weight: 600; font-size: .86rem; }

/* ---------- Takvim ---------- */
.cal { max-width: none; }
.calbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; }
.datebtn { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 140px; padding: 2px 6px; background: none; border: 0; text-align: left; }
.datebtn b { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.15; }
.datebtn small { color: var(--ink-3); }
.datebtn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.calbar .chips { max-width: 100%; }

.daystrip { display: flex; align-items: center; gap: 6px; margin: 14px 0 12px; }
.dchip { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 10px 0 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); line-height: 1.15; }
.dchip b { font-family: var(--f-display); font-size: 1.1rem; }
.dchip small { font-size: .7rem; color: var(--ink-3); }
.dchip small:first-child { display: none; }
.dchip.today b { color: var(--accent-text); }
.dchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.dchip.on b { color: #fff; }
.dchip.on small { color: #CFC6D6; }
.dchip i { position: absolute; top: -7px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-style: normal; font-size: .64rem; font-weight: 700; display: grid; place-items: center; }
@media (min-width: 700px) { .dchip small:first-child { display: block; } }

.cal-scroll { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: auto; max-height: calc(100vh - 360px); max-height: calc(100dvh - 380px); min-height: 380px; overscroll-behavior: contain; }
.cal-head, .cal-body { display: grid; grid-template-columns: 52px repeat(var(--n), minmax(148px, 1fr)); min-width: calc(52px + var(--n) * 148px); }
.cal-head { position: sticky; top: 0; z-index: 6; background: var(--surface); border-bottom: 1px solid var(--line); }
.cal-body { position: relative; }
.gutter { position: sticky; left: 0; z-index: 4; background: var(--surface); border-right: 1px solid var(--line-2); }
.cal-head .gutter { z-index: 7; }
.gutter span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .74rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.gutter span:first-child { transform: translateY(2px); }
.chead { display: flex; flex-direction: column; padding: 9px 12px 8px; border-left: 1px solid var(--line-2); border-top: 5px solid var(--c); min-width: 0; line-height: 1.25; }
.chead i { display: none; }
.chead b { font-family: var(--f-display); font-weight: 650; }
.chead small { color: var(--ink-3); min-height: 1.25em; }
.col { position: relative; border-left: 1px solid var(--line-2); cursor: cell;
    background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line-2) 1px, transparent 1px);
    background-size: 100% var(--hour), 100% calc(var(--hour) / 2); }
.off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(42, 18, 69, .035) 0 7px, rgba(42, 18, 69, .075) 7px 8px); z-index: 1; }
.off.break { background: rgba(42, 18, 69, .07); display: grid; place-items: center; font-size: .75rem; color: var(--ink-3); }
.off.full { inset: 0; display: grid; place-items: start center; padding-top: 14px; color: var(--ink-3); font-weight: 600; font-size: .84rem; }
.off.full span { background: var(--surface); padding: 3px 10px; border-radius: 999px; }
.ev { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 1px; padding: 4px 8px 4px 11px; text-align: left; border: 0; border-radius: 8px; overflow: hidden;
    background: color-mix(in srgb, var(--c) 18%, white); color: var(--ink); box-shadow: inset 4px 0 0 var(--c), 0 1px 2px rgba(42, 18, 69, .12); font-size: .8rem; line-height: 1.25; cursor: pointer; }
.ev:hover { filter: brightness(.97); z-index: 3; }
.ev b { font-weight: 650; }
.ev small { color: var(--ink-2); }
.ev.bekliyor { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 9%, white) 0 6px, color-mix(in srgb, var(--c) 20%, white) 6px 12px); outline: 1.5px dashed var(--c); outline-offset: -2px; }
.ev.tamamlandi { background: color-mix(in srgb, var(--c) 8%, white); color: var(--ink-2); }
.ev.tamamlandi b::before { content: "✓ "; color: var(--teal); }
.ev.iptal, .ev.gelmedi { opacity: .5; text-decoration: line-through; }
.nowline { position: absolute; left: 52px; right: 0; height: 0; border-top: 2px solid var(--accent); z-index: 5; pointer-events: none; }
.nowline::before { content: ""; position: absolute; left: -6px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.calfoot { margin-top: 12px; }
