:root{
  --bg:#0b1220;
  --card:rgba(255,255,255,.04);
  --card2:rgba(255,255,255,.02);
  --border:rgba(255,255,255,.08);
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.65);
  --field-text:#cbcbcb;
  --field-placeholder:rgb(139 143 149);
  --brand:#7c5cff;
  --ok:#22c55e;
  --warn:#f59e0b;
  --bad:#ef4444;
  --info:#38bdf8;
}
*{box-sizing:border-box}
html,body{height:100%;max-width:100%;overflow-x:hidden}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(900px 600px at 10% 0%, rgba(124,92,255,.18), transparent 60%),
              radial-gradient(800px 600px at 90% 10%, rgba(56,189,248,.12), transparent 55%),
              var(--bg);
  color:var(--text);
  overflow-x:hidden;
}
a{color:inherit}
main{max-width:100%}
.container{max-width:1600px;margin:0 auto;padding:16px}
.container,.calendar2-wrap{width:100%;max-width:100%}
.small-muted{color:var(--muted);font-size:.9rem}
.pill{
  display:inline-flex;gap:8px;align-items:center;
  padding:8px 12px;border:1px solid var(--border);border-radius:999px;
  background:rgba(255,255,255,.02);
  font-weight:800;
}
.btnx{
  display:inline-flex;gap:8px;align-items:center;justify-content:center;
  padding:10px 12px;border-radius:12px;border:1px solid var(--border);
  background:rgba(255,255,255,.02);color:var(--text);
  cursor:pointer; font-weight:800; text-decoration:none;
  transition:transform .05s ease, background .15s ease, border-color .15s ease;
}
.btnx:hover{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.12)}
.btnx:active{transform:translateY(1px)}
.btnx.primary{background:rgba(124,92,255,.14);border-color:rgba(124,92,255,.25)}
.btnx.success{background:rgba(34,197,94,.14);border-color:rgba(34,197,94,.22)}
.btnx.danger{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.20)}

.cardx{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
  min-width:0;
}
.cardx-header{
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  margin-bottom:12px;
}
.cardx-title{margin:0;font-size:1rem;font-weight:900}
h3.cardx-title:not(.dash-title-with-icon):not(.mini-title):not(.appointment-detail-title):not(.staff-detail-title):not(.client-detail-title){
  font-size:1.5rem;
  line-height:1.14;
  letter-spacing:.01em;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
h3.cardx-title:not(.dash-title-with-icon):not(.mini-title):not(.appointment-detail-title):not(.staff-detail-title):not(.client-detail-title)::before{
  content:"";
  width:24px;
  height:24px;
  flex:0 0 24px;
  border-radius:8px;
  border:1px solid rgba(196,181,253,.34);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3.6 4.8 6.8v5.1c0 4.4 3 8.5 7.2 9.8 4.2-1.3 7.2-5.4 7.2-9.8V6.8L12 3.6Z' stroke='%23dbe9ff' stroke-width='1.7' stroke-linejoin='round'/%3E%3Cpath d='m9.2 12.1 1.8 1.8 3.8-3.8' stroke='%23dbe9ff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px 14px no-repeat,
    linear-gradient(180deg, rgba(124,92,255,.25), rgba(79,70,229,.18));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16);
}
@media (max-width: 900px){
  h3.cardx-title:not(.dash-title-with-icon):not(.mini-title):not(.appointment-detail-title):not(.staff-detail-title):not(.client-detail-title){
    font-size:1.36rem;
    gap:8px;
  }
  h3.cardx-title:not(.dash-title-with-icon):not(.mini-title):not(.appointment-detail-title):not(.staff-detail-title):not(.client-detail-title)::before{
    width:22px;
    height:22px;
    flex-basis:22px;
    border-radius:7px;
    background-size:13px 13px, auto;
  }
}

.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:12px;min-width:0}
.col-12{grid-column:span 12}
.col-6{grid-column:span 6}
.col-4{grid-column:span 4}
.col-3{grid-column:span 3}
@media (max-width: 900px){
  .col-6,.col-4,.col-3{grid-column:span 12}
}

.tablex{width:100%;border-collapse:separate;border-spacing:0}
.tablex th,.tablex td{
  padding:10px 10px;border-bottom:1px solid rgba(255,255,255,.06);
  text-align:left;vertical-align:top
}
.tablex th{color:rgba(234,240,255,.7);font-size:.85rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.data-row:hover{background:rgba(255,255,255,.03)}
.schedule-scroller{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.tablex{
  min-width:700px;
}

.page-tools{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.page-tools input,
.page-tools select{
  flex:1 1 240px;
  min-width:0;
  max-width:380px;
}
.page-tools .btnx{
  flex:0 0 auto;
}
.admin-pass-input{
  max-width:260px;
}
.admin-gate-tools .badge-soft{
  max-width:100%;
}

.badge-soft{
  display:inline-flex;gap:8px;align-items:center;
  padding:7px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);font-weight:800;font-size:.86rem
}
.dot{width:8px;height:8px;border-radius:999px;background:rgba(255,255,255,.35)}
.dot.ok{background:var(--ok)}
.dot.warn{background:var(--warn)}
.dot.bad{background:var(--bad)}
.dot.info{background:var(--info)}

/* Header */
.headerx{
  position:sticky;top:0;z-index:90;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,.82);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.headerx-inner{
  max-width:1600px;
  margin:0 auto;
  padding:12px 16px;
}
.headerx-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.headerx-brand-row{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.headerx-brand{display:flex;align-items:center;gap:10px;min-width:0}
.headerx-brand-title{
  font-weight:900;
  line-height:1.15;
}
.headerx-logo{
  width:36px;height:36px;border-radius:12px;display:grid;place-items:center;
  background:rgba(124,92,255,.16);border:1px solid rgba(124,92,255,.25);
}
.mobile-menu-btn{
  display:none;
  width:38px;
  height:38px;
  padding:0;
  border-radius:11px;
}
.mobile-menu-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.mobile-menu-icon svg{
  width:21px;
  height:21px;
  color:#eaf0ff;
}
.headerx-nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:10px;
}
.headerx-nav .nav-item-btn,
.mobile-nav-links .nav-item-btn{
  gap:9px;
}
.headerx-nav .nav-item-icon,
.mobile-nav-links .nav-item-icon{
  width:16px;
  height:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 16px;
  color:rgba(234,240,255,.78);
  transition:color .15s ease, transform .15s ease;
}
.headerx-nav .nav-item-icon svg,
.mobile-nav-links .nav-item-icon svg{
  width:16px;
  height:16px;
}
.headerx-nav .nav-item-label,
.mobile-nav-links .nav-item-label{
  line-height:1;
}
.headerx-nav .btnx:hover .nav-item-icon,
.mobile-nav-links .btnx:hover .nav-item-icon{
  color:#d6e7ff;
}
.headerx-nav .btnx.active,
.mobile-nav-links .btnx.active{
  color:#f8f7ff;
  background:linear-gradient(180deg, rgba(124,92,255,.28), rgba(124,92,255,.16));
  border-color:rgba(124,92,255,.46);
  box-shadow:0 10px 24px rgba(124,92,255,.18), inset 0 1px 0 rgba(255,255,255,.12);
}
.headerx-nav .btnx.active .nav-item-icon,
.mobile-nav-links .btnx.active .nav-item-icon{
  color:#ece7ff;
  transform:translateY(-1px);
}
.headerx-nav .btnx.active:hover,
.mobile-nav-links .btnx.active:hover{
  background:linear-gradient(180deg, rgba(124,92,255,.34), rgba(124,92,255,.20));
  border-color:rgba(124,92,255,.58);
}
.headerx-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;min-width:0}
.theme-toggle-btn{
  --theme-index:2;
  position:relative;
  width:118px;
  height:54px;
  padding:4px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow:0 14px 26px rgba(15,23,42,.18), inset 0 1px 0 rgba(255,255,255,.06);
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:4px;
  flex:0 0 auto;
}
.theme-toggle-btn.is-loading{
  opacity:.72;
  cursor:wait;
  pointer-events:none;
}
.theme-toggle-track{
  position:relative;
  position:absolute;
  inset:4px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  display:block;
  overflow:hidden;
}
.theme-toggle-option{
  position:relative;
  z-index:1;
  width:100%;
  height:100%;
  padding:0;
  border:none;
  border-radius:14px;
  background:transparent;
  color:rgba(234,240,255,.68);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:color .18s ease, transform .18s ease;
}
.theme-toggle-option:hover{
  color:#f8fbff;
}
.theme-toggle-option.is-active{
  color:#f8fbff;
}
.theme-toggle-sun,
.theme-toggle-graphite,
.theme-toggle-moon{
  position:static;
  width:18px;
  height:18px;
  color:rgba(234,240,255,.7);
  transition:color .18s ease;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.theme-toggle-sun{color:#fcd34d}
.theme-toggle-graphite{color:#94a3b8}
.theme-toggle-moon{color:#c4b5fd}
.theme-toggle-sun svg,
.theme-toggle-graphite svg,
.theme-toggle-moon svg{
  width:18px;
  height:18px;
}
.theme-toggle-thumb{
  position:absolute;
  top:4px;
  left:4px;
  width:calc((100% - 8px) / 3);
  height:calc(100% - 8px);
  border-radius:12px;
  background:linear-gradient(180deg, rgba(124,92,255,.98), rgba(91,66,214,.92));
  box-shadow:0 8px 18px rgba(15,23,42,.28);
  transition:transform .2s ease, background .2s ease, box-shadow .2s ease;
  transform:translateX(calc(var(--theme-index, 2) * 100%));
}
body[data-theme="graphite"] .theme-toggle-btn{
  border-color:rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(39,42,47,.88), rgba(32,34,38,.82));
}
body[data-theme="graphite"] .theme-toggle-thumb{
  background:linear-gradient(180deg, rgba(74,85,104,.98), rgba(39,42,47,.96));
  box-shadow:0 8px 18px rgba(15,23,42,.34);
}
body[data-theme="graphite"] .theme-toggle-option-graphite,
body[data-theme="graphite"] .theme-toggle-option-graphite .theme-toggle-graphite{
  color:#e2e8f0;
}
body[data-theme="dark"] .theme-toggle-btn{
  border-color:rgba(255,255,255,.12);
}
body[data-theme="dark"] .theme-toggle-option-dark,
body[data-theme="dark"] .theme-toggle-option-dark .theme-toggle-moon{
  color:#f5f3ff;
}
body[data-theme="dark"] .theme-toggle-graphite{
  color:#64748b;
}
body[data-theme="light"] .theme-toggle-track{
  border-color:rgba(148,163,184,.26);
  background:rgba(148,163,184,.12);
}
body[data-theme="light"] .theme-toggle-btn{
  border-color:rgba(148,163,184,.24);
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,245,249,.92));
  box-shadow:0 12px 24px rgba(14,116,144,.12), inset 0 1px 0 rgba(255,255,255,.94);
}
body[data-theme="light"] .theme-toggle-thumb{
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(226,232,240,.96));
  box-shadow:0 8px 18px rgba(14,116,144,.18);
}
body[data-theme="light"] .theme-toggle-option-light,
body[data-theme="light"] .theme-toggle-option-light .theme-toggle-sun{
  color:#f59e0b;
}
body[data-theme="light"] .theme-toggle-graphite{
  color:#64748b;
}
body[data-theme="light"] .theme-toggle-option-dark,
body[data-theme="light"] .theme-toggle-moon{
  color:#475569;
}
body[data-theme="dark"] .fullscreen-btn,
body[data-theme="graphite"] .fullscreen-btn{
  color:#cbd5e1;
}
body[data-theme="light"] .fullscreen-btn{
  color:#2563eb;
}
.notif-wrap{position:relative}
.fullscreen-btn{
  width:52px;
  height:52px;
  padding:0;
  border-radius:14px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:rgba(234,240,255,.8);
  transition:color .18s ease, transform .18s ease;
}
.fullscreen-btn:hover{
  color:#f8fbff;
}
.fullscreen-btn-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}
.fullscreen-btn-icon svg{
  width:22px;
  height:22px;
}
.fullscreen-btn-icon-exit{
  display:none;
}
.fullscreen-btn.is-fullscreen .fullscreen-btn-icon-enter{
  display:none;
}
.fullscreen-btn.is-fullscreen .fullscreen-btn-icon-exit{
  display:inline-flex;
}
.bell-btn{
  position:relative;
  width:52px;
  height:52px;
  padding:0;
  border-radius:14px;
  font-size:1.5rem;
  line-height:1;
}
.bell-btn-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}
.bell-btn-icon svg{
  width:24px;
  height:24px;
}
.user-wrap{position:relative;display:inline-flex}
.user-btn{
  width:52px;
  height:52px;
  padding:0;
  border-radius:14px;
}
.user-avatar{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}
.user-avatar svg{
  width:24px;
  height:24px;
}
.user-panel{
  position:absolute;top:calc(100% + 8px);right:0;z-index:95;
  width:min(240px, 88vw);
  background:rgba(11,18,32,.98);
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;
  padding:10px;
}
.user-panel-name{
  font-weight:900;
  line-height:1.25;
  word-break:break-word;
}
.user-panel-role{
  color:var(--muted);
  font-size:.82rem;
  margin-top:3px;
}
.user-panel-links{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}
.user-panel-link{
  width:100%;
  justify-content:flex-start;
  font-size:.88rem;
  border-radius:11px;
  padding:8px 10px;
}
.user-panel-link .user-panel-link-icon{
  width:16px;
  height:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#9bb7f6;
}
.user-panel-link .user-panel-link-icon svg{
  width:16px;
  height:16px;
}
.user-panel-link.finance .user-panel-link-icon{
  color:#8ceec0;
}
.user-logout-btn{
  width:100%;
  margin-top:10px;
}
.mobile-nav-backdrop{
  position:fixed;
  inset:0;
  z-index:1400;
  display:flex;
  align-items:stretch;
  justify-content:flex-start;
  background:rgba(5,9,18,.56);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}
.mobile-nav-backdrop[hidden]{
  display:none !important;
}
.mobile-nav-panel{
  width:min(300px, 86vw);
  max-width:100%;
  background:rgba(11,18,32,.98);
  border-right:1px solid rgba(255,255,255,.14);
  padding:12px;
  overflow:auto;
}
.mobile-nav-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:12px;
}
.mobile-nav-title{
  font-weight:900;
  letter-spacing:.02em;
}
.mobile-nav-theme{
  display:none;
}
.mobile-nav-theme-label{
  font-size:.78rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:rgba(234,240,255,.58);
}
.mobile-nav-theme-toggle{
  width:100%;
  max-width:none;
}
.mobile-nav-close{
  width:34px;
  height:34px;
  padding:0;
}
.mobile-nav-links{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.mobile-nav-links .btnx{
  width:100%;
  justify-content:flex-start;
}
.notif-badge{
  position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--bad);color:#fff;font-size:.72rem;font-weight:900;border:2px solid var(--bg);
}
.notif-panel{
  position:absolute;top:calc(100% + 8px);right:0;z-index:90;
  width:min(420px, 92vw);
  max-height:360px;overflow:auto;
  background:rgba(32,34,38,.98);
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  padding:10px;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.notif-head-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.notif-head{
  font-size:.85rem;
  font-weight:900;
  letter-spacing:.04em;
  color:#ffffff;
  margin:0;
}
.notif-head-settings{
  width:30px;
  height:30px;
  padding:0;
  border-radius:10px;
  color:#ffffff;
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);
}
.notif-head-settings svg{
  width:15px;
  height:15px;
}
.notif-head-settings:hover{
  color:#ffffff;
  border-color:rgba(255,255,255,.32);
  background:rgba(255,255,255,.15);
}
.notif-head-readall{
  margin-left:auto;
  height:30px;
  padding:0 10px;
  border-radius:10px;
  font-size:.74rem;
  font-weight:800;
  white-space:nowrap;
  color:#ffffff;
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);
}
.notif-head-readall:hover{
  color:#ffffff;
  border-color:rgba(255,255,255,.32);
  background:rgba(255,255,255,.15);
}
/* .btnx display:inline-flex tanimladigi icin hidden ozniteligi tek basina gizlemez. */
.notif-head-readall[hidden]{
  display:none;
}
.notif-list{display:flex;flex-direction:column;gap:8px}
.notif-item{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
  border-radius:12px;
  padding:8px;
}
.notif-item-upcoming{
  border-color:rgba(56,189,248,.24);
  background:linear-gradient(140deg, rgba(56,189,248,.12), rgba(14,116,144,.04));
}
.notif-item-finance{
  border-color:rgba(34,197,94,.28);
  background:linear-gradient(140deg, rgba(34,197,94,.12), rgba(16,185,129,.04));
}
.notif-item-finance.is-reading{
  animation:notifReadBlink .55s ease-in-out 2;
}
.notif-item-expense{
  border-color:rgba(239,68,68,.28);
  background:linear-gradient(140deg, rgba(239,68,68,.12), rgba(220,38,38,.04));
}
.notif-item-expense.is-reading{
  animation:notifReadBlinkExpense .55s ease-in-out 2;
}
.notif-item-expense .notif-read-btn{
  color:#ffffff;
  border-color:rgba(239,68,68,.34);
  background:rgba(239,68,68,.10);
}
.notif-item-expense .notif-read-btn:hover{
  color:#ffffff;
  border-color:rgba(239,68,68,.56);
  background:rgba(239,68,68,.20);
}
.notif-item-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.notif-read-btn{
  width:28px;
  height:28px;
  padding:0;
  border-radius:9px;
  color:#ffffff;
  border-color:rgba(34,197,94,.34);
  background:rgba(34,197,94,.10);
  flex:0 0 auto;
}
.notif-read-btn svg{
  width:14px;
  height:14px;
}
.notif-read-btn:hover{
  color:#ffffff;
  border-color:rgba(34,197,94,.56);
  background:rgba(34,197,94,.20);
}
.notif-read-btn:active{
  transform:translateY(1px);
}
.notif-title{font-weight:900;font-size:.88rem;color:#ffffff}
.notif-meta{color:rgb(255 255 255 / 72%);font-size:.8rem;margin-top:2px}
@keyframes notifReadBlink{
  0%,100%{
    box-shadow:none;
    filter:none;
  }
  50%{
    box-shadow:0 0 0 1px rgba(34,197,94,.44), 0 0 0 5px rgba(34,197,94,.16);
    filter:brightness(1.08);
  }
}
@keyframes notifReadBlinkExpense{
  0%,100%{
    box-shadow:none;
    filter:none;
  }
  50%{
    box-shadow:0 0 0 1px rgba(239,68,68,.44), 0 0 0 5px rgba(239,68,68,.16);
    filter:brightness(1.08);
  }
}

/* Forms */
.form-row{display:grid;grid-template-columns:repeat(12,1fr);gap:12px}
.field{grid-column:span 6}
.field.full{grid-column:span 12}
.field.pair{grid-column:span 6}
.field.third{grid-column:span 4}

.appointment-form-grid .pay-box .field.pay-half{grid-column:span 6}
.field-title-row{display:flex;align-items:center;justify-content:flex-start;gap:8px;margin-bottom:8px}

/* Alan etiketinin yanindaki bilgi isareti. Masaustunde uzerine gelince,
   dokunmatikte tiklayinca acilir (JS .is-open sinifini ekler). */
.field-info{
  position:relative;
  display:inline-flex;
  flex:0 0 auto;
}
.field-info-btn{
  width:16px;
  height:16px;
  padding:0;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.34);
  background:rgba(71,85,105,.5);
  color:#f8fbff;
  font-size:.66rem;
  font-weight:900;
  line-height:1;
  display:grid;
  place-items:center;
  cursor:pointer;
}
.field-info-btn:hover{ background:rgba(71,85,105,.75); }
.field-info-tip{
  position:absolute;
  bottom:calc(100% + 7px);
  left:0;
  z-index:30;
  width:max-content;
  max-width:min(72vw, 280px);
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(148,163,184,.3);
  background:rgba(15,23,42,.98);
  color:#e8eefc;
  font-size:.78rem;
  font-weight:600;
  line-height:1.4;
  box-shadow:0 10px 24px rgba(2,8,24,.44);
  display:none;
  white-space:normal;
}
.field-info:hover .field-info-tip,
.field-info:focus-within .field-info-tip,
.field-info.is-open .field-info-tip{ display:block; }
.field-info-tip:empty{ display:none !important; }

/* Randevu detayindaki "Kalan" kutusu: borc varsa dikkat cekmeli. */
.payment-summary-value-debt{ color:#fca5a5; }

/* Randevu tutari karti: kosedeki kalem ile satir ici duzenlenir. */
.payment-total-tile{ position:relative; }
.payment-total-tile [data-total-display]{ cursor:pointer; }
.payment-total-edit{
  position:absolute;
  top:8px;
  right:8px;
  width:26px;
  height:26px;
  padding:0;
  display:grid;
  place-items:center;
  border-radius:9px;
  border:1px solid rgba(148,163,184,.28);
  background:rgba(255,255,255,.05);
  color:#dbe9ff;
  cursor:pointer;
  opacity:.65;
  transition:opacity .15s ease, background .15s ease;
}
.payment-total-tile:hover .payment-total-edit,
.payment-total-edit:focus-visible{ opacity:1; }
.payment-total-edit:hover{ background:rgba(255,255,255,.1); }
.payment-total-edit svg{ width:14px; height:14px; }
.payment-total-input{
  width:100%;
  margin-top:6px;
  font-size:1.1rem;
  font-weight:900;
}
.payment-total-input[hidden]{ display:none; }
body[data-theme="light"] .payment-total-edit{
  border-color:rgba(148,163,184,.34);
  background:rgba(15,23,42,.05);
  color:#334155;
}
body[data-theme="light"] .payment-summary-value-debt{ color:#b91c1c; }
body[data-theme="light"] .field-info-tip{
  background:#ffffff;
  color:#1e293b;
  border-color:rgba(148,163,184,.36);
}
.field-title-row label{margin:0}
.btnx.tiny{padding:6px 10px;border-radius:10px;font-size:.82rem}
.btnx.plus-icon{
  width:20px;
  height:20px;
  padding:0;
  border-radius:10px;
  background:linear-gradient(180deg, rgba(34,197,94,.30), rgba(22,163,74,.16));
  border-color:rgba(74,222,128,.48);
  color:#bbf7d0;
  box-shadow:0 6px 14px rgba(34,197,94,.16), inset 0 1px 0 rgba(255,255,255,.16);
}
.btnx.plus-icon:hover{
  background:linear-gradient(180deg, rgba(34,197,94,.42), rgba(22,163,74,.22));
  border-color:rgba(134,239,172,.62);
  color:#dcfce7;
}
.btnx.plus-icon span{
  display:inline-block;
  font-size:1.02rem;
  font-weight:900;
  line-height:1;
  padding-top:0;
}
.plus-icon-spacer{
  display:inline-block;
  width:20px;
  height:20px;
  flex:0 0 20px;
  pointer-events:none;
}
.inline-search-select{
  position:relative;
}
.inline-search-select-native{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
  user-select:none;
}
.inline-search-select-trigger{
  width:100%;
  min-width:0;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  background:rgba(255,255,255,.02);
  color:#cbcbcb;
  text-align:left;
  font:inherit;
  cursor:pointer;
  outline:none;
}
.inline-search-select-trigger.is-placeholder{
  color:#6d6d6d;
}
.inline-search-select-trigger svg{
  width:18px;
  height:18px;
  flex:0 0 auto;
  opacity:.8;
  transition:transform .18s ease;
}
.inline-search-select.is-open .inline-search-select-trigger{
  border-color:rgba(124,92,255,.35);
  box-shadow:0 0 0 3px rgba(124,92,255,.12);
}
.inline-search-select.is-open .inline-search-select-trigger svg{
  transform:rotate(180deg);
}
.inline-search-select-panel{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  right:0;
  z-index:26;
  border:1px solid rgba(124,92,255,.3);
  border-radius:14px;
  background:rgba(11,18,32,.98);
  box-shadow:0 16px 36px rgba(2,8,24,.46), inset 0 1px 0 rgba(255,255,255,.04);
  overflow:hidden;
}
.inline-search-select-search-wrap{
  padding:8px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
}
.inline-search-select-search-wrap input{
  border-radius:10px;
  padding:9px 10px;
}
.inline-search-select-options{
  max-height:230px;
  overflow:auto;
  padding:6px;
  display:grid;
  gap:6px;
}
.inline-search-select-options::-webkit-scrollbar{
  width:6px;
}
.inline-search-select-options::-webkit-scrollbar-thumb{
  border-radius:999px;
  background:rgba(124,92,255,.34);
}
.inline-search-select-option{
  width:100%;
  border:1px solid transparent;
  border-radius:10px;
  background:rgba(255,255,255,.02);
  color:#cbcbcb;
  text-align:left;
  padding:8px 10px;
  display:grid;
  gap:2px;
  cursor:pointer;
  font:inherit;
}
.inline-search-select-option:hover{
  border-color:rgba(124,92,255,.34);
  background:rgba(124,92,255,.12);
}
.inline-search-select-option.is-selected{
  border-color:rgba(56,189,248,.34);
  background:rgba(56,189,248,.14);
  color:#def4ff;
}
/* Arama sonuclarinda eslesen bolumu isaretler (uyari tonunun acigi). */
.search-hit{
  background:rgba(245,158,11,.26);
  color:inherit;
  border-radius:4px;
  padding:0 2px;
  font-weight:inherit;
}
body[data-theme="light"] .search-hit{
  background:rgba(245,158,11,.34);
  color:#1f2937;
}

.inline-search-select-option-main{
  font-weight:800;
  line-height:1.2;
}
.inline-search-select-option-meta{
  color:rgba(234,240,255,.62);
  font-size:.78rem;
  line-height:1.2;
}
.inline-search-select-empty{
  padding:10px;
  text-align:center;
  color:rgba(223,221,221,.72);
  font-size:.82rem;
}
#na-client-selectbox .inline-search-select-trigger,
[data-client-selectbox] .inline-search-select-trigger{
  font-size:.92rem;
  font-weight:400;
  line-height:1.2;
  letter-spacing:0;
}
#na-client-trigger-text,
[data-client-trigger-text]{
  font:inherit;
  line-height:inherit;
  /* Uzun musteri adi butonu tasirmasin; sigmayan kisim ... ile kisalir. */
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#na-client-selectbox .inline-search-select-options,
[data-client-selectbox] .inline-search-select-options{
  padding:4px;
  gap:3px;
}
#na-client-selectbox .inline-search-select-option,
[data-client-selectbox] .inline-search-select-option{
  padding:6px 10px;
  gap:1px;
  line-height:1.16;
}
#na-client-selectbox .inline-search-select-option-main,
[data-client-selectbox] .inline-search-select-option-main{
  font-size:.92rem;
  font-weight:400;
  line-height:1.16;
  letter-spacing:0;
}
.pay-box{
  border:1px dashed rgba(255,255,255,.2);
  border-radius:14px;
  padding:10px;
  background:rgba(255,255,255,.01);
}
.pay-box-modern{
  border-style:solid;
  border-color:rgba(56,189,248,.26);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(56,189,248,.14), transparent 58%),
    radial-gradient(120% 120% at 100% 100%, rgba(34,197,94,.10), transparent 64%),
    linear-gradient(165deg, rgba(13,25,48,.9), rgba(12,30,58,.8));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06), 0 10px 26px rgba(2,8,24,.24);
}
.pay-box.warn{
  border-color:rgba(245,158,11,.55);
  border-style:dashed;
  background:
    linear-gradient(180deg, rgba(250,204,21,.08), rgba(34,197,94,.05)),
    repeating-linear-gradient(
      -45deg,
      rgba(250,204,21,.08),
      rgba(250,204,21,.08) 12px,
      rgba(255,255,255,.02) 12px,
      rgba(255,255,255,.02) 24px
    );
}
.pay-box.payment-soft{
  border-style:solid;
  border-color:rgba(45,212,191,.22);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(45,212,191,.10), transparent 56%),
    radial-gradient(120% 120% at 100% 100%, rgba(56,189,248,.08), transparent 62%),
    linear-gradient(165deg, rgba(16,24,44,.88), rgba(12,27,48,.8));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.pay-toggle-label{
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  border:1px dashed rgba(245,158,11,.45);
  background:rgba(245,158,11,.09);
  border-radius:12px;
  padding:10px 12px;
}
.pay-toggle-label.payment-soft{
  border-style:solid;
  border-color:rgba(45,212,191,.22);
  background:
    linear-gradient(180deg, rgba(45,212,191,.08), rgba(12,27,48,.18)),
    rgba(255,255,255,.01);
}
.appointment-payment-toggle input[type="checkbox"],
.pay-toggle-label input[type="checkbox"],
.pay-toggle-label-modern input[type="checkbox"]{
  appearance:none;
  -webkit-appearance:none;
  width:22px !important;
  height:22px !important;
  min-width:22px;
  flex:0 0 22px;
  margin:0;
  padding:0;
  border-radius:7px;
  border:1.5px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.06);
  display:inline-block;
  vertical-align:middle;
  background-position:center;
  background-repeat:no-repeat;
  background-size:12px 12px;
  cursor:pointer;
  outline:none;
  transition:border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.appointment-payment-toggle input[type="checkbox"]:hover,
.pay-toggle-label input[type="checkbox"]:hover,
.pay-toggle-label-modern input[type="checkbox"]:hover{
  border-color:rgba(96,165,250,.52);
  box-shadow:0 0 0 4px rgba(96,165,250,.08);
}
.appointment-payment-toggle input[type="checkbox"]:focus-visible,
.pay-toggle-label input[type="checkbox"]:focus-visible,
.pay-toggle-label-modern input[type="checkbox"]:focus-visible{
  border-color:rgba(96,165,250,.62);
  box-shadow:0 0 0 4px rgba(96,165,250,.14);
}
.appointment-payment-toggle input[type="checkbox"]:checked,
.pay-toggle-label input[type="checkbox"]:checked,
.pay-toggle-label-modern input[type="checkbox"]:checked{
  border-color:#22c55e;
  background-color:#22c55e;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2 6.4 11l6.1-6.2' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.appointment-payment-toggle input[type="checkbox"]:checked:hover,
.pay-toggle-label input[type="checkbox"]:checked:hover,
.pay-toggle-label-modern input[type="checkbox"]:checked:hover{
  background-color:#16a34a;
  border-color:#16a34a;
}
.pay-toggle-label-modern{
  border-width:1px;
  border-style:solid;
  border-color:rgba(56,189,248,.22);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(56,189,248,.16), transparent 56%),
    linear-gradient(165deg, rgba(18,30,57,.82), rgba(16,28,52,.74));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}
.pay-toggle-label-modern input[type="checkbox"]{
  accent-color:#22c55e;
  transform:none;
  filter:none;
}
.pay-toggle-label-modern .badge-soft{
  margin-left:auto;
  border-color:rgba(56,189,248,.32);
  background:rgba(56,189,248,.16);
  color:#d9f2ff;
}
.calendar-payment-overflow-indicator{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(96,165,250,.22);
  background:rgba(96,165,250,.08);
  color:#e0f2fe;
  width:max-content;
}
.calendar-payment-overflow-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
}
.calendar-payment-overflow-icon svg{
  width:12px;
  height:12px;
  display:block;
}
.calendar-payment-overflow-count{
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.02em;
  line-height:1;
}
.calendar-payment-pagination{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:4px;
}
.calendar-payment-page{
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
  color:#eef4ff;
  font-size:.76rem;
  font-weight:800;
  cursor:pointer;
  transition:border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}
.calendar-payment-page:hover{
  border-color:rgba(96,165,250,.26);
  background:rgba(96,165,250,.1);
}
.calendar-payment-page.is-active{
  border-color:rgba(96,165,250,.42);
  background:rgba(96,165,250,.22);
}
.pay-toggle-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding-left:0;
}
.pay-toggle-copy strong{
  font-size:1.02rem;
  line-height:1.15;
  color:inherit;
  letter-spacing:normal;
  text-shadow:none;
}
.pay-toggle-copy small{
  color:rgba(234,240,255,.6);
  font-size:.82rem;
  font-weight:700;
}
.modal-focus-scope{position:relative}
.modal-focus-layer{
  position:absolute;inset:0;z-index:30;
  display:flex;align-items:center;justify-content:center;
  padding:12px;
  background:rgba(11,18,32,.38);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.modalx-backdrop.inline-service-open .modalx-header,
.modalx-backdrop.inline-service-open .modalx-actions{
  filter:blur(3px);
  opacity:.45;
  pointer-events:none;
  user-select:none;
}
.modal-focus-card{
  width:min(620px, 100%);
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  background:rgba(11,18,32,.96);
  padding:12px;
}
.modal-service-manager{
  width:min(900px, 100%);
}
.modal-client-quick{
  width:min(620px, 100%);
}
.inline-service-head{
  align-items:center;
}
.inline-service-head-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}
.btnx.inline-service-close{
  width:34px;
  height:34px;
  padding:0;
  border-radius:10px;
  border-color:rgba(239,68,68,.42);
  background:rgba(239,68,68,.14);
  color:#ff8e8e;
  font-size:1.05rem;
  line-height:1;
}
.btnx.inline-service-close:hover{
  border-color:rgba(248,113,113,.58);
  background:rgba(239,68,68,.22);
  color:#ffc2c2;
}
.inline-service-form{
  display:grid;
  grid-template-columns:minmax(220px,2fr) minmax(120px,.9fr) auto;
  gap:10px;
  align-items:end;
}
.inline-service-form .field{
  grid-column:auto;
}
.inline-service-form .field label{
  margin-bottom:6px;
}
.inline-service-actions{
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  gap:8px;
  padding-bottom:1px;
}
.btnx.inline-service-save{
  min-width:126px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.btnx.inline-service-save svg{
  width:16px;
  height:16px;
}
.inline-service-table-wrap{
  margin-top:12px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  overflow:auto;
  max-height:260px;
  background:rgba(255,255,255,.015);
}
.inline-service-table{
  width:100%;
  min-width:560px;
  border-collapse:separate;
  border-spacing:0;
}
.inline-service-table th,
.inline-service-table td{
  padding:8px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  text-align:left;
  vertical-align:middle;
}
.inline-service-table th{
  background:rgba(255,255,255,.02);
  color:rgba(223,221,221,.85);
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.03em;
}
.inline-service-table td{
  color:#cbcbcb;
  font-size:.88rem;
}
.inline-service-table th.right,
.inline-service-table td.right{
  text-align:right;
}
.inline-service-row-actions{
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
}
.btnx.tiny.icon-only{
  width:30px;
  height:30px;
  padding:0;
  border-radius:9px;
}
.btnx.tiny.icon-only svg{
  width:14px;
  height:14px;
}
.inline-service-table tr.is-editing td{
  background:rgba(59,130,246,.12);
}
.inline-service-empty{
  text-align:center;
  color:rgba(223,221,221,.7) !important;
  padding:14px 10px;
}
.inline-client-form{
  display:grid;
  grid-template-columns:repeat(12, minmax(0, 1fr));
  gap:10px;
}
.inline-client-form .field{
  grid-column:span 12;
}
.inline-client-form .field.inline-client-half{
  grid-column:span 6;
}
.inline-client-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  margin-top:12px;
}
.btnx.inline-client-save{
  min-width:126px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.btnx.inline-client-save svg{
  width:16px;
  height:16px;
}
@media (max-width: 900px){
  .field{grid-column:span 12}
  .field.pair{grid-column:span 12}
  .field.third{grid-column:span 12}
  .appointment-form-grid .field.keep-half{grid-column:span 6}
  .appointment-form-grid .pay-box .field.pay-half{grid-column:span 6}
  .inline-service-form{grid-template-columns:1fr 1fr}
  .inline-service-actions{grid-column:1 / -1}
  .inline-service-head-tools{gap:6px}
}
/* Telefonda modal, yanlardaki bosluklardan kazanip icerige daha fazla yer
   birakir; randevu formundaki alanlar da tek sutuna iner. Tablet genisliginde
   (640-900px) iki sutunlu duzen korunur. */
@media (max-width: 640px){
  .modalx-backdrop{
    padding:6px;
  }
  .modalx{
    border-radius:16px;
  }
  .modalx-header{
    padding:11px 12px;
  }
  .modalx-body{
    padding:12px 10px;
  }
  .modalx-actions{
    padding:10px;
  }
  .appointment-form-grid .field.keep-half,
  .appointment-form-grid .pay-box .field.pay-half{
    grid-column:span 12;
  }
}

@media (max-width: 640px){
  .pay-toggle-label-modern{
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .pay-toggle-label-modern .badge-soft{
    margin-left:0;
  }
  .inline-service-form{grid-template-columns:minmax(0,1fr) 110px}
  .inline-service-actions{
    grid-column:1 / -1;
    justify-content:flex-end;
  }
  .inline-service-table-wrap{overflow-x:hidden}
  .inline-service-table{
    min-width:100%;
    table-layout:fixed;
  }
  .inline-service-table th,
  .inline-service-table td{
    padding:7px 6px;
  }
  .inline-service-table th.right,
  .inline-service-table td.right{
    width:84px;
  }
  .inline-service-table td:first-child{
    white-space:normal;
    word-break:break-word;
  }
  .inline-service-row-actions{
    gap:4px;
  }
  .btnx.tiny.icon-only{
    width:28px;
    height:28px;
  }
  .btnx.inline-service-close{
    width:32px;
    height:32px;
  }
  .btnx.inline-service-save{
    min-width:118px;
  }
  .inline-client-form .field.inline-client-half{
    grid-column:span 12;
  }
  .btnx.inline-client-save{
    min-width:118px;
  }
}
label{display:block;font-weight:900;margin-bottom:8px;color:#dfdddded;font-size:13px}
.req{color:var(--bad);font-weight:900;margin-left:2px}
input,select,textarea{
  width:100%;
  background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  color:var(--field-text);
  padding:12px 12px;
  outline:none;
}
input::placeholder,textarea::placeholder{
  color:var(--field-placeholder);
  opacity:1;
}
select option[value=""]{
  color:var(--field-placeholder);
}
select.is-placeholder{
  color:var(--field-placeholder);
}
input[type="date"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit{
  color:var(--field-text);
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator{
  opacity:.85;
  filter:invert(86%) sepia(0%) saturate(0%) hue-rotate(152deg) brightness(90%) contrast(84%);
}
input:focus,select:focus,textarea:focus{
  border-color: rgba(124,92,255,.35);
  box-shadow: 0 0 0 3px rgba(124,92,255,.12);
}
textarea{min-height:110px;resize:vertical;max-width:100%}
.help{color:rgba(234,240,255,.55);font-size:.82rem;margin-top:6px}

/* Modal */
.modalx-backdrop{
  position:fixed;inset:0;display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.45);padding:18px;z-index:100;
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
  overflow-y:auto;
  overscroll-behavior:contain;
}
.modalx{
  width:min(760px, 100%);
  max-height:calc(100dvh - 36px);
  background:rgba(11,18,32,.98);
  border:1px solid rgba(255,255,255,.10);
  border-radius:20px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  margin:auto 0;
}
.modalx-header{
  display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid rgba(255,255,255,.08);
  flex:0 0 auto;
}
.modalx-title{font-weight:900}
.modalx-body{
  padding:14px;
  max-width:100%;
  overflow-x:hidden;
  overflow-y:auto;
  position:relative;
  flex:1 1 auto;
  min-height:0;
  -webkit-overflow-scrolling:touch;
}
.modalx-actions{
  display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;padding:12px 14px;border-top:1px solid rgba(255,255,255,.08);
  flex:0 0 auto;
}
body.modal-open{
  overflow:hidden;
}
body.mobile-nav-open{
  overflow:hidden;
}
body.swal-open{
  overflow:hidden;
}
body > :not(.toast-wrap){
  transition:filter .18s ease, opacity .18s ease;
}
body.modal-open > :not(#modal-backdrop):not(#swalx-backdrop):not(#drawerx):not(.toast-wrap){
  filter:blur(2px);
}
body.bell-panel-open > :not(.headerx):not(#modal-backdrop):not(#swalx-backdrop):not(#drawerx):not(.toast-wrap){
  filter:blur(1.5px);
}

/* Swal-style Confirm */
.swalx-backdrop{
  position:fixed;
  inset:0;
  z-index:1800;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  background:rgba(5,9,18,.62);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.swalx-dialog{
  width:min(430px, 100%);
  border:1px solid rgba(255,255,255,.14);
  border-radius:16px;
  padding:14px;
  background:rgba(11,18,32,.98);
  box-shadow:0 24px 60px rgba(0,0,0,.42);
}
.swalx-icon{
  width:34px;
  height:34px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(239,68,68,.18);
  border:1px solid rgba(248,113,113,.42);
  color:#ffb1b1;
  font-weight:900;
  margin-bottom:10px;
}
.swalx-title{
  font-size:1.02rem;
  font-weight:900;
  color:#eaf0ff;
}
.swalx-text{
  margin-top:8px;
  color:rgba(234,240,255,.78);
  line-height:1.45;
  font-size:.92rem;
}
.swalx-label{
  margin-top:12px;
  margin-bottom:8px;
}
.swalx-input.invalid{
  border-color:rgba(239,68,68,.6);
  box-shadow:0 0 0 3px rgba(239,68,68,.18);
}
.swalx-hint{
  margin-top:6px;
  color:rgba(234,240,255,.52);
  font-size:.82rem;
}
.swalx-error{
  margin-top:6px;
  color:#fca5a5;
  font-size:.82rem;
  font-weight:700;
}
.swalx-actions{
  margin-top:12px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
}

/* Toast */
.toast-wrap{position:fixed;right:16px;bottom:16px;display:flex;flex-direction:column;gap:10px;z-index:200}
.toast{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  border-left:4px solid rgba(255,255,255,.22);
  border-radius:14px;
  padding:10px 12px;
  min-width: 240px;
}
.toast.success{border-left-color: var(--ok)}
.toast.warning{border-left-color: var(--warn)}
.toast.error{border-left-color: var(--bad)}
.toast.info{border-left-color: var(--info)}


@media (max-width: 980px){
  .headerx-inner{padding:10px 12px;}
  .mobile-menu-btn{
    display:inline-flex;
    width:44px;
    height:44px;
    border-radius:13px;
  }
  .mobile-menu-icon svg{
    width:25px;
    height:25px;
  }
  .headerx-nav{display:none;}
  .headerx-tools{
    width:auto;
    margin-left:auto;
    justify-content:flex-end;
    flex-wrap:nowrap;
    gap:8px;
  }
  .headerx-tools > .theme-toggle-btn{
    display:none !important;
  }
  .mobile-nav-theme{
    display:grid;
    gap:10px;
    margin-bottom:12px;
  }
  .mobile-nav-theme .theme-toggle-btn{
    width:100%;
    height:54px;
  }
  .mobile-nav-theme .theme-toggle-thumb{
    border-radius:11px;
  }
  .fullscreen-btn{
    display:none !important;
  }
  .bell-btn{
    width:56px;
    height:56px;
  }
  .bell-btn-icon{
    font-size:1.7rem;
  }
  .headerx-brand-title{
    font-size:.96rem;
  }
  .headerx-brand .small-muted{
    font-size:.78rem;
  }
}

@media (max-width: 760px){
  .cardx{
    padding:10px 5px 10px 5px;
  }
  .notif-panel{
    position:fixed;
    top:var(--notif-panel-top, 76px);
    left:12px;
    right:12px;
    width:auto;
    max-width:none;
    max-height:calc(100dvh - var(--notif-panel-top, 76px) - 12px);
    z-index:1300;
  }
  .user-panel{
    right:0;
    left:auto;
    width:min(240px, 94vw);
  }
  .modalx-backdrop{
    padding:10px;
    align-items:flex-start;
  }
  .modalx{
    width:100%;
    max-height:calc(100dvh - 20px);
  }
  .modalx-body{
    padding:12px;
    max-height:none;
    overflow-y:auto;
  }
  .modalx-actions{
    padding:10px 12px;
    justify-content:stretch;
  }
  .modalx-actions .btnx{
    flex:1 1 auto;
  }
  input,select,textarea{
    font-size:16px;
  }
  .swalx-actions{
    justify-content:stretch;
  }
  .swalx-actions .btnx{
    flex:1 1 auto;
  }
}

@media (max-width: 640px){
  .headerx-inner{padding:10px 12px;}
  .container{padding:12px;}
  .cardx{
    padding:10px 5px 10px 5px;
    border-radius:16px;
  }
  .cardx-header{
    gap:10px;
    margin-bottom:10px;
  }
  .headerx-logo{
    width:32px;
    height:32px;
    border-radius:10px;
  }
  .headerx-brand{
    min-width:0;
  }
  .headerx-brand .small-muted{
    font-size:.8rem;
  }
  .btnx{
    padding:9px 10px;
    font-size:.88rem;
  }
  .page-tools{
    width:100%;
    gap:8px;
  }
  .page-tools input,
  .page-tools select,
  .admin-pass-input{
    flex:1 1 100%;
    max-width:none;
  }
  .page-tools .btnx{
    flex:1 1 auto;
    min-width:0;
  }
  .admin-gate-tools .badge-soft{
    flex:1 1 100%;
  }
  .badge-soft{
    font-size:.8rem;
    padding:6px 9px;
  }
  .tablex{
    min-width:640px;
  }
}

@media (max-width: 520px){
  .btnx{
    padding:8px 9px;
  }
  .page-tools .btnx{
    flex:1 1 100%;
  }
  .tablex{
    min-width:600px;
  }
}

/* ── Silme nedeni diyalogu ─────────────────────────────── */
.swalx-textarea{
  width:100%;
  min-height:82px;
  resize:vertical;
  line-height:1.45;
}

/* Yikici islem kaydet dugmesinden uzakta dursun; yanlislikla
   tiklanmasini zorlastirir. */
.modalx-actions .modal-danger-action{ margin-right:auto; }

@media (max-width: 760px){
  /* Dar ekranda butonlar esit genislige yayildigi icin silme
     dugmesini alt satira, tek basina aliyoruz. */
  .modalx-actions .modal-danger-action{
    flex:1 1 100%;
    margin-right:0;
    order:3;
  }
}

/* Uc secenekli onay penceresi: butonlar yan yana sigmaz, alt alta dizilir. */
.swalx-actions-stack{
  flex-direction:column;
  align-items:stretch;
}
.swalx-actions-stack .btnx{
  justify-content:center;
  text-align:center;
}

/* ── Sagdan acilan cekmece ───────────────────────────────── */
/* Modalin ustunde durur; altta doldurulmus form kapanmaz. */
.drawerx-backdrop{
  position:fixed;
  inset:0;
  z-index:1500;
  display:flex;
  justify-content:flex-end;
  background:rgba(2,8,24,0);
  transition:background .18s ease;
}
.drawerx-backdrop.is-open{ background:rgba(2,8,24,.52); }
.drawerx{
  width:min(680px, 92vw);
  height:100%;
  display:flex;
  flex-direction:column;
  border-left:1px solid rgba(255,255,255,.12);
  background:rgba(11,18,32,.99);
  box-shadow:-24px 0 60px rgba(2,8,24,.5);
  transform:translateX(100%);
  transition:transform .22s ease;
}
.drawerx-backdrop.is-open .drawerx{ transform:translateX(0); }
.drawerx-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.08);
  flex:0 0 auto;
}
.drawerx-title{
  margin:0;
  font-size:1rem;
  font-weight:900;
  color:#eaf0ff;
  line-height:1.3;
  word-break:break-word;
}
.drawerx-close{
  flex:0 0 auto;
  width:36px;
  height:36px;
  padding:0;
  display:grid;
  place-items:center;
  font-size:1.25rem;
  line-height:1;
}
.drawerx-body{
  flex:1 1 auto;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding:14px 16px 18px;
}
body.drawer-open{ overflow:hidden; }

/* Randevu modalindaki "Randevular" baglantisi */
.client-history-link{
  display:none;
  position:relative;
  align-items:center;
  gap:4px;
  margin-left:8px;
  padding:0;
  border:0;
  background:none;
  color:#fca5a5;
  font:inherit;
  font-size:.78rem;
  font-weight:800;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:2px;
}
.client-history-link.is-visible{ display:inline-flex; }
.client-history-link:hover{ color:#ffc5c5; }

/* Uzerine gelince kisa gecikmeyle acilan ipucu; tarayicinin yavas
   title balonunu beklemeye gerek kalmaz. */
.client-history-link::after{
  content:attr(data-tip);
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  z-index:40;
  width:max-content;
  max-width:240px;
  padding:6px 9px;
  border-radius:10px;
  border:1px solid rgba(148,163,184,.30);
  background:rgba(15,23,42,.97);
  color:#e8eefc;
  font-size:.76rem;
  font-weight:600;
  line-height:1.35;
  text-decoration:none;
  white-space:normal;
  box-shadow:0 10px 24px rgba(2,8,24,.42);
  opacity:0;
  pointer-events:none;
  transition:opacity .12s ease .05s;
}
.client-history-link:hover::after,
.client-history-link:focus-visible::after{ opacity:1; }

body[data-theme="light"] .client-history-link::after{
  background:#ffffff;
  color:#1e293b;
  border-color:rgba(148,163,184,.34);
}


body[data-theme="light"] .drawerx{
  background:#ffffff;
  border-left-color:rgba(148,163,184,.28);
}
body[data-theme="light"] .drawerx-title{ color:#0f172a; }
body[data-theme="light"] .client-history-link{ color:#b91c1c; }

@media (max-width: 760px){
  /* Dar ekranda yarim cekmece okunmaz; tamamini kaplar. */
  .drawerx{ width:100vw; border-left:0; }
}

/* ── Musteri randevu gecmisi (cekmece + musteri sayfasi) ──────
   Stiller global; hem sagdan acilan cekmece hem Musteriler
   sayfasindaki pencere ayni gorunumu kullanir. Kart duzeni dar
   ekranda da sikismaz, tabloda gereken yatay kaydirma yoktur. */
.appt-history{ display:grid; gap:12px; }
.appt-history-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.appt-history-total{
  font-size:.8rem;
  font-weight:800;
  letter-spacing:.02em;
  color:rgba(234,240,255,.62);
}
.appt-history-pager{ display:flex; gap:6px; flex-wrap:wrap; }
.appt-history-page{
  min-width:32px;
  padding:5px 9px;
  border-radius:9px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  color:var(--text);
  font-size:.82rem;
  font-weight:800;
  cursor:pointer;
}
.appt-history-page:hover{ background:rgba(255,255,255,.07); }
.appt-history-page.is-active{
  border-color:rgba(124,92,255,.45);
  background:linear-gradient(180deg, rgba(124,92,255,.30), rgba(124,92,255,.14));
  color:#f8f7ff;
}

.appt-history-list{ display:grid; gap:10px; }
.appt-history-card{
  position:relative;
  overflow:hidden;
  padding:12px 14px 12px 16px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
}
/* Sol seritte randevu durumunun rengi. */
.appt-history-card::before{
  content:"";
  position:absolute;
  left:0; top:0;
  width:4px; height:100%;
  background:var(--appt-color, #38bdf8);
}
.appt-history-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.appt-history-date{
  font-size:.98rem;
  font-weight:900;
  color:#f1f6ff;
  line-height:1.2;
  font-variant-numeric:tabular-nums;
}
.appt-history-time{
  margin-top:2px;
  font-size:.8rem;
  color:rgba(234,240,255,.55);
  font-variant-numeric:tabular-nums;
}
.appt-history-status{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  padding:3px 11px;
  border-radius:999px;
  border:1px solid color-mix(in srgb, var(--appt-color, #38bdf8) 34%, transparent);
  background:color-mix(in srgb, var(--appt-color, #38bdf8) 15%, transparent);
  color:var(--appt-color, #38bdf8);
  font-size:.74rem;
  font-weight:800;
  white-space:nowrap;
}

/* Alanlar sigdigi kadar yan yana; daraldikca kendiliginden alt alta iner. */
.appt-history-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(148px, 1fr));
  gap:10px 16px;
  margin:0;
}
.appt-history-grid > div{ min-width:0; }
.appt-history-grid dt{
  font-size:.66rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:rgba(234,240,255,.40);
}
.appt-history-grid dd{
  margin:3px 0 0;
  font-size:.88rem;
  font-weight:700;
  color:rgba(234,240,255,.88);
  line-height:1.35;
  word-break:break-word;
}
.appt-history-meta{
  display:block;
  margin-top:2px;
  font-size:.76rem;
  font-weight:500;
  color:rgba(234,240,255,.5);
}
/* Tahsil edilen ve kalan; ikisi de kendi rozetinde alt alta durur. */
/* Tutar / Alindi / Kalan rozetleri.
   Kap inline-grid oldugu icin uc rozet de en genisi kadar; icerideki
   etiket sutunu sabit genislikte. Boylece hem yazilar hem rakamlar
   rozetler arasinda dikeyde tam hizali durur. */
.appt-history-chips{
  display:inline-grid;
  justify-items:stretch;
  gap:4px;
  margin-top:3px;
}
.appt-history-money{
  display:grid;
  grid-template-columns:48px 1fr;
  align-items:baseline;
  gap:8px;
  padding:3px 11px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  font-size:.78rem;
  white-space:nowrap;
}
.appt-history-money-label{
  font-weight:700;
  opacity:.82;
}
.appt-history-money-value{
  text-align:right;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}

/* Randevu tutari: birincil renk, beyaz yazi. */
.appt-history-money.is-total{
  border-color:rgba(124,92,255,.46);
  background:linear-gradient(180deg, rgba(124,92,255,.42), rgba(124,92,255,.24));
  color:#ffffff;
}
/* Tahsilat varsa olumlu ton, yoksa notr. */
.appt-history-money.is-paid{
  border-color:rgba(34,197,94,.30);
  background:rgba(34,197,94,.13);
  color:#86efac;
}
.appt-history-money.is-idle{ color:rgba(234,240,255,.55); }
.appt-history-money.is-debt{
  border-color:rgba(239,68,68,.32);
  background:rgba(239,68,68,.14);
  color:#fca5a5;
}

.appt-history-note{
  margin:10px 0 0;
  padding-top:9px;
  border-top:1px dashed rgba(255,255,255,.10);
  font-size:.82rem;
  font-weight:400;
  color:rgba(234,240,255,.62);
  line-height:1.4;
  word-break:break-word;
}
.appt-history-note-label{
  display:inline-block;
  margin-right:7px;
  padding:0 7px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  font-size:.62rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:rgba(234,240,255,.55);
}

.client-appointments-loading,
.client-appointments-empty{
  padding:22px 4px;
  text-align:center;
  font-size:.88rem;
  color:rgba(234,240,255,.6);
}

body[data-theme="light"] .appt-history-total{ color:rgba(30,41,59,.6); }
body[data-theme="light"] .appt-history-page{
  border-color:rgba(148,163,184,.28);
  background:#ffffff;
  color:#1e293b;
}
body[data-theme="light"] .appt-history-card{
  background:#ffffff;
  border-color:rgba(148,163,184,.24);
}
body[data-theme="light"] .appt-history-date{ color:#0f172a; }
body[data-theme="light"] .appt-history-time{ color:rgba(30,41,59,.58); }
body[data-theme="light"] .appt-history-grid dt{ color:rgba(30,41,59,.5); }
body[data-theme="light"] .appt-history-grid dd{ color:#1e293b; }
body[data-theme="light"] .appt-history-meta{ color:rgba(30,41,59,.55); }
body[data-theme="light"] .appt-history-note{
  color:rgba(30,41,59,.66);
  border-top-color:rgba(148,163,184,.28);
}
body[data-theme="light"] .appt-history-note-label{
  border-color:rgba(148,163,184,.3);
  color:rgba(30,41,59,.6);
}
body[data-theme="light"] .appt-history-money{
  border-color:rgba(148,163,184,.3);
  background:rgba(148,163,184,.12);
}
body[data-theme="light"] .appt-history-money.is-total{
  border-color:rgba(109,74,255,.42);
  background:linear-gradient(180deg, #7c5cff, #6d4aff);
  color:#ffffff;
}
body[data-theme="light"] .appt-history-money.is-paid{
  border-color:rgba(21,128,61,.28);
  background:rgba(34,197,94,.12);
  color:#15803d;
}
body[data-theme="light"] .appt-history-money.is-idle{ color:rgba(30,41,59,.62); }
body[data-theme="light"] .appt-history-money.is-debt{
  border-color:rgba(185,28,28,.28);
  background:rgba(239,68,68,.10);
  color:#b91c1c;
}
body[data-theme="light"] .client-appointments-loading,
body[data-theme="light"] .client-appointments-empty{ color:rgba(30,41,59,.62); }

@media (max-width: 560px){
  .appt-history-card{ padding:11px 12px 11px 14px; }
  /* Cok dar ekranda iki sutun bile sikisir; tek sutuna iner. */
  .appt-history-grid{ grid-template-columns:1fr; gap:8px; }
  .appt-history-date{ font-size:.92rem; }
}
