/* =========================================================
   DOSYA: /public/assets/css/app.css
   RANDEVUMASTER - MODERN (RADIUS AZ • CLEAN • POPÜLER)
   NOT: GRID ÖLÇÜLERİNE DOKUNMAZ (genişlik/yükseklik aynı)
========================================================= */

/* =========================
   0) TOKENS
========================= */
:root{
  /* surfaces */
  --bg:#f6f7fb;
  --bg2:#eef2f7;
  --surface:#ffffff;
  --surface2:#f8fafc;

  /* text */
  --text:#0f172a;      /* slate-900 */
  --muted:#475569;     /* slate-600 */
  --muted2:#64748b;    /* slate-500 */

  /* borders + shadows (modern, soft) */
  --border: rgba(15,23,42,.10);
  --border2: rgba(15,23,42,.07);

  --shadow: 0 18px 50px rgba(15,23,42,.10);
  --shadow-sm: 0 10px 24px rgba(15,23,42,.08);

  /* radius (AZ) */
  --r-xl: 12px;
  --r-lg: 10px;
  --r-md: 8px;
  --r-sm: 6px;

  /* accent */
  --accent:#2563eb;
  --accent2:#1d4ed8;
  --ring: 0 0 0 3px rgba(37, 99, 235, .18);

  /* states */
  --danger:#e11d48;
  --danger-weak: rgba(225, 29, 72, .10);
  --success:#16a34a;
  --success-weak: rgba(22, 163, 74, .10);
  --warn:#f59e0b;
  --warn-weak: rgba(245, 158, 11, .11);

  /* appointment bar */
  --appt-bar:#93c5fd;
  --appt-bar-border: rgba(37,99,235,.35);
  --appt-bar-text:#0b2a52;

  /* layout */
  --page-pad: 14px;
  --bn-h: 60px;

  /* GRID: dokunma (asıl değer) */
  --slot-h: 28px;

  /* ✅ FIX: yanlışlıkla boş kalırsa root değerini temel alsın */
  --slot-h-base: var(--slot-h);
}

/* =========================
   1) BASE
========================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(900px 520px at 15% 10%, rgba(37,99,235,.06), transparent 58%),
    radial-gradient(800px 480px at 85% 20%, rgba(16,185,129,.04), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  overflow-x:hidden;
}

a{ color: inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
::selection{ background: rgba(37,99,235,.16); }

h1,h2,h3{ letter-spacing:-.2px; }
h1{ margin:0; font-size:17px; font-weight:900; line-height:1.15; }
h2{ margin:0; font-size:16px; font-weight:900; }
h3{ margin:0; font-size:13.5px; font-weight:900; }

p{ margin:0; color: var(--muted); font-size: 12.8px; line-height:1.55; }
.muted{ color: var(--muted); }

@media (max-width: 640px){
  :root{ --page-pad: 8px; } /* grid slot-h dokunma */
  h1{ font-size: 15.5px; }
  h2{ font-size: 15px; }
  h3{ font-size: 13px; }
  p{ font-size: 12px; }
}

/* =========================
   2) FORMS (yükseklikler eşit)
========================= */
label{
  display:block;
  margin: 8px 2px 5px;
  font-size: 11.6px;
  color: var(--muted2);
  font-weight: 800;
}

input, select, textarea{
  width:100%;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  outline:none;
  font-size: 13.2px;
}

textarea{
  height:auto;
  min-height: 90px;
  padding: 10px 12px;
  resize: vertical;
}

input:hover, select:hover, textarea:hover{
  border-color: rgba(15,23,42,.16);
  background:#fff;
}

input:focus, select:focus, textarea:focus{
  border-color: rgba(37,99,235,.38);
  box-shadow: var(--ring);
  background:#fff;
}

input[type="checkbox"]{
  width:18px;
  height:18px;
  padding:0;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface2);
}

/* =========================
   3) ALERT
========================= */
.alert{
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
  font-size: 12px;
  line-height:1.35;
  color: var(--text);
}
.alert.danger{ border-color: rgba(225,29,72,.22); background: var(--danger-weak); }
.alert.success{ border-color: rgba(22,163,74,.22); background: var(--success-weak); }
.alert.warn{ border-color: rgba(245,158,11,.22); background: var(--warn-weak); }

/* =========================
   4) BUTTONS (yükseklik eşit)
========================= */
button{
  font-family: inherit;
  cursor:pointer;
  border:none;
  background:transparent;
  color:inherit;
}

.btn, button.btn, a.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(15,23,42,.14);

  background: rgba(255,255,255,.96);
  color: rgba(31,41,55,.92);

  font-size: 12px;
  font-weight: 900;
  line-height: 1;

  user-select:none;
  -webkit-tap-highlight-color: transparent;

  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}

.btn:hover, button.btn:hover, a.btn:hover{
  background: rgba(15,23,42,.03);
  border-color: rgba(15,23,42,.18);
  box-shadow: 0 12px 26px rgba(15,23,42,.08);
}

.btn:active, button.btn:active, a.btn:active{
  transform: translateY(1px);
  background: rgba(15,23,42,.05);
}

.btn.is-active, button.btn.is-active, a.btn.is-active{
  background: var(--accent);
  border-color: rgba(37,99,235,.42);
  color:#fff;
  box-shadow: 0 14px 30px rgba(37,99,235,.18);
}

.btn.is-danger, button.btn.is-danger, a.btn.is-danger{
  border-color: rgba(225,29,72,.24);
  background: var(--danger-weak);
  color: rgba(127, 16, 41, .95);
}

.btn-row{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

button[type="submit"].btn{
  width:100%;
  margin-top: 12px;
}

/* =========================
   5) AUTH
========================= */
.auth{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 20px;
}

.auth-card{
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 16px;
}

.auth-links a{
  color: #64748b;
  border-bottom: 1px dashed #94a3b8;
  padding-bottom: 1px;
}

/* =========================
   6) LAYOUT
========================= */
.layout{ min-height:100vh; display:flex; flex-direction:column; }
.layout-body{ display:flex; flex:1; min-height:0; }

.content{
  flex:1;
  min-width:0;
  padding: var(--page-pad);
}

/* =========================
   7) TOPBAR
========================= */
.topbar{
  display:none;
  align-items:center;
  gap:10px;
  padding: 8px 10px;
  min-height: 52px;

  position:sticky;
  top:0;
  z-index:90;

  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.topbar-title{
  flex:1;
  text-align:center;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn{
  flex: 0 0 36px;
  width:36px;
  height:36px;
  border-radius: var(--r-md);
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
  font-size: 18px;
  display:flex;
  align-items:center;
  justify-content:center;
}

#btnSidebar{ display:none; }
@media (max-width: 980px){
  .topbar{ display:flex; }
  #btnSidebar{ display:inline-flex; align-items:center; justify-content:center; }
}

/* topbar menu */
.topbar-menu{ position: relative; }
.topbar-panel{
  position:absolute;
  right:0;
  top: 44px;
  width: 220px;
  display:none;

  border-radius: var(--r-lg);
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.98);
  box-shadow: 0 20px 60px rgba(15,23,42,.18);
  padding: 10px;
  z-index: 1200;
}
.topbar-panel.is-open{ display:block; }
.topbar-panel-head{ padding: 6px 6px 10px; border-bottom: 1px solid rgba(15,23,42,.08); }
.topbar-user{ font-weight: 900; font-size: 12.8px; line-height:1.2; }
.topbar-role{ margin-top: 3px; font-size: 11.2px; color: var(--muted); }
.topbar-panel-actions{ padding: 10px 6px 6px; }
.topbar-panel-actions .btn{ width:100%; }

/* =========================
   8) SIDEBAR + BACKDROP
========================= */
#sidebar,
.sidebar.sidebar-left{
  width:260px;
  flex:0 0 260px;
  height:100vh;
  position:sticky;
  top:0;
  padding: 12px;
  background: rgba(255,255,255,.90);
  border-right: 1px solid var(--border);
  z-index: 100;
}

#sidebarBackdrop{
  display:none;
  position:fixed;
  inset:0;
  background: rgba(15,23,42,.22);
  z-index:95;
}

@media (max-width: 980px){
  #sidebar,
  .sidebar.sidebar-left{
    position:fixed;
    top:0;
    left:0;
    height:100dvh;
    width:280px;
    z-index:1000;
    transform: translateX(-110%);
    transition: transform .22s ease;
    box-shadow: 20px 0 60px rgba(15,23,42,.22);
  }

  body.sidebar-open #sidebar,
  body.sidebar-open .sidebar.sidebar-left{ transform: translateX(0); }

  body.sidebar-open #sidebarBackdrop{ display:block; }
}

/* brand + nav */
.brand{
  padding: 11px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-sm);
}
.brand-title{ font-weight: 900; font-size: 12.8px; }
.brand-sub{ margin-top: 6px; font-size: 11.8px; color: var(--muted); }

.nav{ display:flex; flex-direction:column; gap:6px; margin-top:10px; }

.nav-item{
  display:flex;
  align-items:center;
  gap:8px;
  height: 36px;
  padding: 0 10px;

  border-radius: var(--r-md);
  font-size: 12.6px;

  border: 1px solid transparent;
  position:relative;
  color: rgba(31,41,55,.88);
}

.nav-item:hover{
  background: rgba(15,23,42,.04);
  border-color: rgba(15,23,42,.06);
}

.nav-item.active{
  background: rgba(37,99,235,.08);
  border-color: rgba(37,99,235,.16);
}

.nav-item.active::before{
  content:"";
  position:absolute;
  left:6px;
  top:8px;
  bottom:8px;
  width:3px;
  border-radius: 999px;
  background: rgba(37,99,235,.55);
}

.nav-item.danger{
  background: var(--danger-weak);
  border-color: rgba(225,29,72,.18);
  color:#6f4a4a;
}

.nav-sep{ height:1px; background: rgba(15,23,42,.08); margin:10px 2px; }

/* =========================
   9) CONTENT HEADER
========================= */
.content-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.content-header p{ margin-top:5px; }

/* =========================
   10) CARDS / TABLE
========================= */
.card, .card-appointment{
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  padding: 12px;
}

@media (max-width: 640px){
  .card-appointment{ padding: 6px !important; }
}

.table-wrap{ width:100%; overflow:visible; }
table{ width:100%; border-collapse:collapse; font-size: 12.6px; }
th, td{
  padding: 6px 10px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  text-align:left;
  vertical-align:middle;
  white-space:nowrap;
}
th{ font-size: 11.8px; color: var(--muted2); font-weight: 900; }
td.actions{ display:flex; gap:8px; align-items:center; flex-wrap:nowrap; }

@media (max-width: 980px){
  .table-wrap{
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--r-xl);
    padding-right: 16px;
    margin-right: -16px;
  }
  table{ font-size: 12px; }
  th, td{ padding: 6px 8px; }
}

/* =========================
   11) MODAL
========================= */
.modal-overlay{
  display:none;
  position:fixed;
  inset:0;
  background: rgba(15,23,42,.45);
  z-index:9999;
  padding:16px;
  align-items:center;
  justify-content:center;
}
.modal-overlay.modal-open,
.modal-overlay.is-open{ display:flex; }

.modal{
  width: min(520px, 100%);
  max-height: 90vh;
  overflow:auto;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.98);
  box-shadow: var(--shadow);
}
.modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 10px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  background: rgba(15,23,42,.03);
}
.modal-title{ font-weight: 900; font-size: 12.8px; }
.modal-close{
  width:36px;
  height:36px;
  border-radius: var(--r-md);
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
  font-size: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.modal-body{ padding:10px; }
.modal-body form{ display:grid; gap:7px !important; }

/* =========================
   12) TABS
========================= */
.tabs{
  display:flex;
  gap:10px;
  align-items:center;
  margin: 5px 0 5px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-sm);
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}
.tabs .btn{ white-space: nowrap; flex: 0 0 auto; }

/* =========================
   13) DPBAR (yükseklik eşit)
========================= */
.dpbar{ display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.dp-mid{ display:flex; align-items:center; gap:3px; }

.dp-input{
  width:130px !important;
  height: 36px !important;
  padding: 0 12px !important;
  font-size: 12.5px !important;
  border-radius: var(--r-md) !important;
}

.dp-nav{
  width:36px;
  height:36px;
  border-radius: var(--r-md);
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.96);
  font-size:24px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
  padding-bottom:6px;
  font-weight:900;
}

span.dp-dayname{
  width:86px;
  height:36px;
  border-radius: var(--r-md);
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.96);
  font-size:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}

/* =========================
   14) APPOINTMENT GRID
   (ÖLÇÜLER AYNI - SADECE GÖRÜNÜM)
========================= */

/* ✅ FIX: slot-h asla boş kalmasın */
#apptGridRoot{
  --slot-h: var(--slot-h-base, var(--slot-h, 34px));
}

#apptGridRoot .appt-wrap{
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-sm);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
  contain: content;
}

#apptGridRoot .appt-grid{
  position: relative;
  min-width: max-content;
}

#apptGridRoot .appt-header,
#apptGridRoot .appt-body{
  display:grid;
  align-items: stretch;
}

#apptGridRoot .appt-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid rgba(15,23,42,.10);
}

#apptGridRoot .appt-time-head,
#apptGridRoot .appt-time{
  font-size: 10px;
  font-weight: 900;
  color: rgba(15,23,42,.70);
  padding: 0 6px;
  display:flex;
  align-items:center;
}

#apptGridRoot .appt-time-head{ padding: 8px 6px; }

#apptGridRoot .appt-staff-head{
  padding: 8px 4px;
  text-align:center;
  border-left: 1px solid rgba(15,23,42,.07);
  color: rgba(15,23,42,.82);
  display:flex;
  flex-direction: column;
  justify-content:center;
  align-items:center;
  height:100%;
  line-height: 1.15;
}

.appt-staff-hname{
  font-size:12px;
  font-weight:600
}

.appt-staff-hsurname{
  font-size:10px;
  font-weight:400
}




/* ✅ FIX: satırlar auto üretiliyorsa 0px olmasın */
#apptGridRoot .appt-body{
  grid-auto-rows: var(--slot-h);
}

#apptGridRoot .appt-body .appt-time,
#apptGridRoot .appt-body .appt-cell{
  height: var(--slot-h);
  min-height: var(--slot-h);
  border-top: 1px solid rgba(15,23,42,.08);
}

#apptGridRoot .appt-body .appt-time{
  position: sticky;
  left: 0;
  z-index: 200;
  background: rgba(255,255,255,.98);
  border-right: 1px solid rgba(15,23,42,.10);
}

#apptGridRoot .appt-time-head{
  position: sticky;
  top: 0;
  left: 0;
  z-index: 9999;
  background: rgba(255,255,255,1);
  border-right: 1px solid rgba(15,23,42,.10);
  border-bottom: 1px solid rgba(15,23,42,.10);
}

#apptGridRoot .appt-body .appt-time{ position: relative; padding: 0 10px; }
/* ✅ FIX: span eski davranış (position absolute) */
#apptGridRoot .appt-body .appt-time span{ position: absolute; top: 0px; left: 5px; }

#apptGridRoot .appt-cell{
  border-left: 1px solid rgba(15,23,42,.07);
  cursor:pointer;
}
#apptGridRoot .appt-cell:hover{
  outline: 2px solid rgba(37,99,235,.12);
  outline-offset: -2px;
}

/* layer */
#apptGridRoot .appt-layer{
  position:absolute;
  top:0;
  bottom:0;
  z-index: 1;
  pointer-events:none;
}

/* bar (radius az + modern shadow) */
#apptGridRoot .appt-bar{
  position:absolute;
  left:2px;
  right:2px;

  border-radius: var(--r-sm);
  padding: 6px 6px;

  background: var(--appt-bar);
  border: 1px solid var(--appt-bar-border);
  color: var(--appt-bar-text);

  overflow:hidden;
  cursor: grab;
  user-select: none;
  pointer-events:auto;
  box-sizing:border-box;

  z-index: 2;
  touch-action: none;
  -webkit-user-select: none;

  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}

#apptGridRoot .appt-bar:active{ cursor: grabbing; }
#apptGridRoot .appt-bar.is-dragging{ opacity: .92; box-shadow: 0 6px 14px rgba(15,23,42,.14); }
#apptGridRoot .appt-ghost{ opacity: .45; }

/* resize handles */
#apptGridRoot .appt-bar-handle{
  position:absolute;
  left:0;
  right:0;
  height:10px;
  cursor: ns-resize;
}
#apptGridRoot .appt-bar-handle.top{ top:0; }
#apptGridRoot .appt-bar-handle.bottom{ bottom:0; }

/* bar texts */
#apptGridRoot .appt-bar-title{ font-size: 11px; font-weight: 800; line-height: 1.05; }
#apptGridRoot .appt-bar-phone{
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  opacity:.85;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
#apptGridRoot .appt-bar-sub,
#apptGridRoot .appt-bar-note{
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  opacity:.88;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
#apptGridRoot .appt-bar-sub.muted{
  margin-top: 3px;
  font-size: 9px;
  font-weight: 600;
  opacity:.72;
  white-space: nowrap;
  overflow: hidden;
  border-top: dotted 1px rgba(15,23,42,.35);
  padding-top:2px;
}

/* preloader */
#apptGridRoot .appt-preloader{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.78);
  z-index: 9999;
  border-radius: var(--r-xl);
}
#apptGridRoot .appt-preloader-box{
  padding: 12px 14px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.98);
  box-shadow: 0 20px 60px rgba(15,23,42,.14);
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}
#apptGridRoot .appt-spinner{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(15,23,42,.18);
  border-top-color: rgba(15,23,42,.72);
}

/* =========================
   15) CUSTOMER SEARCH
========================= */
.cust-results{
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(255,255,255,.96);
  max-height: 220px;
  overflow: auto;
  padding: 6px;
}

.cust-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 10px 10px;
  border-radius: var(--r-md);
  cursor:pointer;
  border: 1px solid transparent;
}

.cust-item:hover{
  background: rgba(15,23,42,.04);
  border-color: rgba(15,23,42,.06);
}

.cust-item .cust-name{
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  font-size: 13px;
}

.cust-item .cust-phone{
  font-size: 11.5px;
  opacity: .7;
  white-space: nowrap;
}

.cust-empty{
  padding: 14px;
  text-align:center;
  font-size: 12px;
  opacity: .6;
}

/* =========================
   16) SERVICE ITEM
========================= */
.svc-item{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,.92);
  cursor:pointer;
  user-select:none;
}
.svc-item:hover{ background:#fff; border-color: rgba(15,23,42,.14); }

.svc-item input{ width:18px; height:18px; margin-top:1px; }
.svc-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; }
.svc-name{ font-weight:900; font-size:12.8px; }
.svc-meta{ font-size:11.5px; color: var(--muted); white-space:nowrap; }

/* =========================
   17) INCOMING WIDGET
========================= */
.incoming-widget{
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9999;
  width: 360px;
  max-width: calc(100vw - 32px);
  font-family: inherit;
}

.incoming-toggle{
  width: 100%;
  display:flex;
  align-items:center;
  gap:10px;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--r-xl);
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15,23,42,.15);
  box-shadow: 0 18px 50px rgba(15,23,42,.14);
  cursor:pointer;
  user-select:none;
}

.incoming-dot{ width:10px; height:10px; border-radius:999px; background: rgba(15,23,42,.35); }
.incoming-title{ font-weight: 900; }

.incoming-count{
  margin-left:auto;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15,23,42,.08);
  border: 1px solid rgba(15,23,42,.10);
  text-align:center;
  font-weight: 900;
  color:#0f172a;
}

.incoming-arrow{ width: 18px; text-align:center; opacity:.85; }

.incoming-panel{
  margin-top: 10px;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15,23,42,.15);
  box-shadow: 0 20px 70px rgba(15,23,42,.18);
}

.incoming-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(15,23,42,.10);
}

.incoming-head-title{ font-weight: 900; }
.incoming-head-sub{ font-size: 12px; color: rgba(15,23,42,.65); margin-top:2px; }

.incoming-close{
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(15,23,42,.06);
  color: #0f172a;
  border-radius: var(--r-md);
  height: 34px;
  padding: 0 10px;
  cursor:pointer;
}

.incoming-list{ max-height: 380px; overflow:auto; }

.incoming-row{
  display:flex;
  gap:10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15,23,42,.08);
}
.incoming-row:last-child{ border-bottom: none; }

.incoming-main{ flex:1; min-width:0; }
.incoming-phone{ font-size:13px; font-weight: 900; color:#0f172a; }
.incoming-meta{
  font-size: 11.5px;
  color: rgba(15,23,42,.70);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.incoming-del{
  flex:0 0 auto;
  border: 1px solid rgba(220,38,38,.25);
  background: rgba(220,38,38,.10);
  color: #991b1b;
  border-radius: var(--r-md);
  height: 36px;
  padding: 0 10px;
  cursor:pointer;
}

/* =========================
   18) ADISYON
========================= */
.adisyon-date-form{ display:flex; gap:8px; align-items:center; }
.adisyon-date-input{ width:auto; }

.adisyon-svc-list{
  display:grid;
  gap:10px;
  max-height:52vh;
  overflow:auto;
  padding-right:6px;
}

.adisyon-item{ display:flex; gap:10px; align-items:center; margin:0; }
.adisyon-item-check{ width:18px; height:18px; }

.adisyon-item-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  width:100%;
}

.adisyon-item-name{ font-size:12.5px; font-weight: 900; color: var(--muted2); }
.adisyon-item-price{ font-weight:900; font-size:12px; white-space:nowrap; }

.adisyon-total-row{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.adisyon-total-label{ font-weight:900; color: var(--muted); font-size:12px; }
.adisyon-total-value{ font-weight:900; font-size:16px; }

.adisyon-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:14px;
  margin-top:12px;
}

.adisyon-card{
  border-radius: var(--r-xl);
  padding:14px 14px 12px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:110px;
  position:relative;
  box-shadow:0 14px 30px rgba(15,23,42,.10);
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.94);
}

.adisyon-card.unpaid{
  background: var(--danger-weak);
  border-color: rgba(225,29,72,.18);
}

.adisyon-pill{
  padding:4px 10px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.3px;
  text-transform:uppercase;
}
.pill-paid{ background: rgba(22,163,74,.16); color:#14532d; border:1px solid rgba(22,163,74,.22); }
.pill-unpaid{ background: rgba(225,29,72,.14); color:#7f1029; border:1px solid rgba(225,29,72,.22); }

@media(max-width:640px){
  .adisyon-grid{ grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); }
  .adisyon-card{ min-height:96px; padding:12px; }
}

/* status */
.status-dot{ width:10px; height:10px; border-radius:999px; display:inline-block; background: rgba(15,23,42,.25); }
.status-dot.is-unpaid{ background:#ef4444; }
.status-dot.is-paid{ background:#22c55e; }
.status-dot.is-none{ background: rgba(15,23,42,.20); }
.status-text{ font-size: 12px; color: var(--muted); font-weight: 900; }

/* =========================
   19) TOAST
========================= */
.toast{
  position: fixed;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 20000;

  display:none;
  align-items:center;
  justify-content:space-between;
  gap:10px;

  height: 44px;
  padding: 0 12px;
  border-radius: var(--r-xl);
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.98);
  box-shadow: 0 20px 70px rgba(15,23,42,.18);

  font-size: 12.5px;
  font-weight: 900;
  color: var(--text);
}
.toast.is-open{ display:flex; }
.toast.success{ border-color: rgba(22,163,74,.22); background: rgba(22,163,74,.10); }
.toast.danger{ border-color: rgba(225,29,72,.22); background: rgba(225,29,72,.10); }

.toast .toast-close{
  width:36px;
  height:36px;
  border-radius: var(--r-md);
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.96);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 14px;
  cursor:pointer;
}

/* =========================
   20) FOOTER
========================= */
.footer{
  padding: 14px;
  text-align:center;
  color: var(--muted2);
  font-size: 12px;
}
@media (max-width: 980px){
  .footer.footer-desktop{ display:none; }
}

/* =========================
   21) BOTTOM NAV
========================= */
.bottom-nav{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bn-h);
  padding-bottom: env(safe-area-inset-bottom);

  display: grid;
  grid-template-columns: repeat(5, 1fr);

  border-top: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);
  z-index: 9999;
  backdrop-filter: blur(8px);
}

.bn-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  color: rgba(15,23,42,.58);
  font-size: 11.8px;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
  padding:8px 0;
}

.bn-active{ color: rgba(15,23,42,.88); font-weight: 900; }

@media (min-width: 992px){
  body{ padding-bottom: 0 !important; }
  .bottom-nav{ display:none !important; }
}

/* =========================
   MOBİL: Tabs şerit + DPBAR Bugün gizle (sadece görünüm)
========================= */
@media (max-width: 980px){
  .tabs{
    margin: 0 !important;
    border-radius: 0 !important;
    border-left: 0;
    border-right: 0;
    background: rgba(255,255,255,.92);
    box-shadow: none !important;
    border-bottom: 1px solid rgba(15,23,42,.10);
  }

  .content{
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
  }

  .dp-today,
  [data-dp-today]{ display:none !important; }
}

/* küçük */
#btnCustClear{ margin-top:20px; }
