:root {
    --brand: #841B27;
    --brand-2: #a8202f;
    --brand-dark: #5e1019;
    --brand-light: #c14b58;
    --brand-soft: #f7ebed;
    --brand-glow: rgba(132, 27, 39, .35);

    --sidebar-w: 228px;
    --topbar-h: 68px;

    --bg: #f3f1f4;
    --surface: #ffffff;
    --text: #20242c;
    --muted: #8b909c;
    --border: #ebe9ee;
    --ring: rgba(132, 27, 39, .14);

    --radius: 16px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(20, 20, 40, .04), 0 1px 3px rgba(20, 20, 40, .03);
    --shadow: 0 6px 24px rgba(28, 20, 30, .07);
    --shadow-lg: 0 18px 48px rgba(28, 20, 30, .14);
    --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    background:
        radial-gradient(1200px 600px at 100% -10%, #fbe9ec 0%, transparent 55%),
        radial-gradient(900px 500px at -10% 110%, #eef0ff 0%, transparent 50%),
        var(--bg);
    color: var(--text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -.01em;
}
a { text-decoration: none; color: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d8d4dc; border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #c2bdc8; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Layout ---------- */
.app-wrapper { display: flex; min-height: 100vh; }
.app-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left .22s cubic-bezier(.4,0,.2,1);
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background:
        radial-gradient(600px 200px at 0% 0%, rgba(255,255,255,.12), transparent 60%),
        linear-gradient(165deg, var(--brand-dark) 0%, var(--brand) 48%, var(--brand-2) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    box-shadow: 4px 0 30px var(--brand-glow);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.sidebar::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 22px 22px; opacity: .5;
}
.sidebar-brand { padding: 22px 22px 18px; position: relative; z-index: 1; }
.sidebar-brand a { display: flex; align-items: center; gap: 13px; color: #fff; }
.brand-logo {
    width: 44px; height: 44px; border-radius: 13px;
    background: linear-gradient(145deg, #ffffff, var(--brand-soft));
    color: var(--brand);
    display: grid; place-items: center; font-weight: 800; font-size: 18px;
    box-shadow: 0 8px 18px rgba(0,0,0,.22), inset 0 -2px 4px color-mix(in srgb, var(--brand) 12%, transparent);
}
.brand-logo-img { width: 44px; height: 44px; border-radius: 13px; object-fit: contain; background: #fff; padding: 4px; box-shadow: 0 8px 18px rgba(0,0,0,.22); flex-shrink: 0; }
.brand-text { font-size: 20px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.brand-text small { display: block; font-size: 10px; font-weight: 600; opacity: .72; letter-spacing: 3px; margin-top: 3px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 12px; position: relative; z-index: 1; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); background-clip: content-box; }
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar-nav li { margin-bottom: 3px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 13px;
    padding: 11px 14px; border-radius: 12px;
    color: rgba(255,255,255,.80); font-weight: 600; font-size: 13.5px;
    position: relative; transition: all .18s cubic-bezier(.4,0,.2,1);
}
.sidebar-nav a i { font-size: 18px; width: 22px; text-align: center; transition: transform .18s; }
.sidebar-nav a:hover { background: rgba(255,255,255,.10); color: #fff; transform: translateX(2px); }
.sidebar-nav a:hover i { transform: scale(1.1); }
.sidebar-nav a.active {
    background: linear-gradient(145deg, #ffffff, var(--brand-soft));
    color: var(--brand);
    box-shadow: 0 8px 20px rgba(0,0,0,.22);
}
.sidebar-nav a.active::before {
    content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
    width: 4px; height: 22px; border-radius: 4px;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.sidebar-footer { padding: 12px 18px 16px; font-size: 11.5px; border-top: 1px solid rgba(255,255,255,.12); position: relative; z-index: 1; text-align: center; }
.sidebar-footer .sf-clock {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; width: 100%;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px; padding: 10px 12px 11px;
    color: rgba(255,255,255,.88); text-align: center;
}
.sidebar-footer .sf-date-row {
    display: flex; align-items: center; justify-content: center;
    gap: 7px; width: 100%;
    line-height: 1.3; font-size: 14px; font-weight: 600;
}
.sidebar-footer .sf-date-row i { opacity: .75; flex-shrink: 0; font-size: 13px; line-height: 1; }
.sidebar-footer .sf-date-row span { text-align: center; }
.sidebar-footer .sf-time {
    display: block; width: 100%; text-align: center;
    font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums;
    letter-spacing: .6px; line-height: 1.2;
    color: #fff; background: rgba(255,255,255,.12);
    padding: 5px 12px; border-radius: 8px;
}
.sidebar-backdrop { display: none; }
.sidebar-nav a span, .brand-text { white-space: nowrap; }

.sidebar-group-btn {
    width: 100%; border: 0; background: transparent;
    display: flex; align-items: center; gap: 13px;
    padding: 11px 14px; border-radius: 12px;
    color: rgba(255,255,255,.80); font-weight: 600; font-size: 13.5px;
    cursor: pointer; text-align: left; transition: all .18s cubic-bezier(.4,0,.2,1);
}
.sidebar-group-btn:hover { background: rgba(255,255,255,.10); color: #fff; }
.sidebar-group-btn i:first-child { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }
.sidebar-group-caret {
    margin-left: auto; font-size: 11px; opacity: .7;
    transition: transform .18s;
}
.sidebar-group.open .sidebar-group-caret { transform: rotate(180deg); }
.sidebar-sub {
    list-style: none; margin: 0; padding: 0 0 4px 0;
    max-height: 0; overflow: hidden;
    transition: max-height .22s ease;
}
.sidebar-group.open .sidebar-sub { max-height: 320px; }
.sidebar-sub a {
    display: flex; align-items: center;
    padding: 8px 12px 8px 20px;
    border-radius: 10px; margin: 2px 6px 2px 4px;
    color: rgba(255,255,255,.72); font-weight: 600; font-size: 12.5px;
    transition: all .15s;
}
.sidebar-sub a::before {
    content: "›"; margin-right: 5px; opacity: .55; font-weight: 800; flex-shrink: 0;
}
.sidebar-sub a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-sub a.active {
    background: linear-gradient(145deg, #ffffff, var(--brand-soft));
    color: var(--brand);
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.sidebar-sub a.active::before { color: var(--brand-2); opacity: 1; }

/* ---------- Sidebar kapatma (masaüstü) ---------- */
@media (min-width: 992px) {
    html.sidebar-collapsed .sidebar { transform: translateX(-100%); }
    html.sidebar-collapsed .app-main { margin-left: 0; }
}
.topbar-icon-btn {
    border: 0; background: transparent; color: rgba(255,255,255,.92);
    width: 40px; height: 40px; border-radius: 11px; transition: background .15s, color .15s;
    display: inline-flex; align-items: center; justify-content: center;
}
.topbar-icon-btn:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- Topbar ---------- */
.topbar {
    height: var(--topbar-h);
    background:
        radial-gradient(480px 120px at 0% 0%, rgba(255,255,255,.14), transparent 65%),
        linear-gradient(90deg, var(--brand-dark) 0%, var(--brand) 48%, var(--brand-2) 100%);
    border-bottom: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 4px 24px var(--brand-glow);
    display: flex; align-items: center; gap: 16px;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 1020;
}
.customer-search { flex: 1 1 auto; min-width: 0; max-width: none; width: 100%; }
.customer-search .form-control {
    width: 100%;
    padding-left: 42px; height: 44px; border-radius: 24px;
    background: #f1eff3; border-color: transparent; font-weight: 500;
    transition: all .2s;
}
.customer-search .form-control::placeholder { color: #a9a6b1; }
.customer-search .form-control:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-results {
    display: none; position: absolute; top: 116%; left: 0; right: 0;
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    max-height: 380px; overflow-y: auto; z-index: 1050; box-shadow: var(--shadow-lg); padding: 6px;
}
.search-results.show { display: block; animation: pop .16s ease; }
.search-results .item {
    padding: 11px 14px; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; gap: 10px;
}
.search-results .item:hover { background: var(--brand-soft); }
.search-results .item.item-passive { background: #fff7ed; }
.search-results .item.item-passive:hover { background: #ffedd5; }
.search-cust-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.search-results .item .name { font-weight: 700; flex-shrink: 0; }
.search-results .item .phone { color: #1a1520; font-size: 13px; font-weight: 500; white-space: nowrap; }
.search-cust-badge {
    margin-left: auto; color: #ea580c; font-size: 11px; font-weight: 700;
    white-space: nowrap; flex-shrink: 0;
}
.search-results .empty { padding: 16px; text-align: center; color: var(--muted); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-plus-btn {
    width: 40px; height: 40px; border-radius: 11px; border: 0;
    background: #fff; color: var(--brand);
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0; box-shadow: 0 4px 14px rgba(0,0,0,.18);
    transition: background .15s, transform .12s, box-shadow .15s;
}
.topbar-plus-btn i { color: var(--brand); font-size: 1.1rem; line-height: 1; }
.topbar-plus-btn:hover,
.topbar-plus-btn:focus,
.topbar-plus-btn:active,
.topbar-plus-btn.show,
.topbar-plus-btn:focus-visible {
    background: #fff !important;
    color: var(--brand) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.22);
}
.topbar-plus-btn:hover i,
.topbar-plus-btn:focus i,
.topbar-plus-btn:active i,
.topbar-plus-btn.show i { color: var(--brand-dark) !important; }
.topbar-plus-btn::after { display: none; }
.topbar-quick-dropdown { min-width: 240px; border-radius: 12px; padding: 6px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.topbar-quick-dropdown .dropdown-item {
    border-radius: 8px; font-weight: 600; font-size: 13px; padding: 9px 12px;
}
.topbar-quick-dropdown .dropdown-item:hover { background: var(--brand-soft); color: var(--brand); }
.topbar-quick-dropdown .dropdown-item i { color: var(--brand); opacity: .9; }
.user-menu {
    display: flex; align-items: center; gap: 9px;
    border: 1px solid rgba(255,255,255,.35); border-radius: 24px;
    padding: 5px 12px 5px 6px; background: #fff; font-weight: 600;
    color: #1a1520; box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.user-menu:hover,
.user-menu:focus,
.user-menu:active,
.user-menu.show,
.user-menu:focus-visible {
    background: #fff !important;
    color: #1a1520 !important;
    border-color: rgba(255,255,255,.55) !important;
    box-shadow: 0 4px 14px rgba(0,0,0,.16);
}
.user-menu::after { color: #1a1520; opacity: .75; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(145deg, var(--brand-2), var(--brand-dark)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; box-shadow: 0 4px 10px var(--brand-glow); flex-shrink: 0; }

/* ---------- Content ---------- */
.content { padding: 26px; flex: 1; animation: fadeUp .35s ease both; }
.content-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.page-heading { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-title { font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.page-date-line {
    display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px;
    margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3;
    color: #000; letter-spacing: -.01em;
}
.page-date-line i { opacity: .75; font-size: 13px; line-height: 1; flex-shrink: 0; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--surface); overflow: hidden; }
.card-header { background: #fff; border-bottom: 1px solid var(--border); font-weight: 700; padding: 15px 18px; }

/* ---------- Stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; display: flex; align-items: center; gap: 16px;
    box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden;
}
.stat-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--brand-soft); opacity: .5; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-card .ic {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 23px;
    background: linear-gradient(145deg, var(--brand), var(--brand-2)); color: #fff;
    box-shadow: 0 8px 18px var(--brand-glow); position: relative; z-index: 1; flex-shrink: 0;
}
.stat-card .val { font-size: 25px; font-weight: 800; line-height: 1; letter-spacing: -.02em; position: relative; z-index: 1; }
.stat-card .lbl { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 4px; position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: 11px; transition: all .18s; }
.btn:active { transform: translateY(1px); }
.btn-brand { background: linear-gradient(145deg, var(--brand), var(--brand-2)); border: none; color: #fff; box-shadow: 0 6px 16px var(--brand-glow); }
.btn-brand:hover { filter: brightness(1.06); color: #fff; box-shadow: 0 8px 22px var(--brand-glow); }
.btn-brand-soft { background: var(--brand-soft); border: none; color: var(--brand); }
.btn-brand-soft:hover { background: #f0d8dc; color: var(--brand-dark); }
.btn-outline-brand { border: 1.5px solid var(--brand); color: var(--brand); background: #fff; }
.btn-outline-brand:hover, .btn-outline-brand.active { background: var(--brand); color: #fff; }
.btn-sm { border-radius: 9px; }
.text-brand { color: var(--brand) !important; }
.bg-brand { background: var(--brand) !important; }
.badge { font-weight: 600; border-radius: 7px; padding: .4em .6em; }

a.text-decoration-none { color: var(--brand); }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: 13px 16px; }
.table thead th { background: #faf9fb; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--border); }
.table tbody td { border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-hover tbody tr { transition: background .14s; }
.table-hover tbody tr:hover { background: var(--brand-soft); }

/* ---------- Forms ---------- */
.form-control, .form-select { border-radius: 11px; border-color: var(--border); padding: .55rem .85rem; transition: all .18s; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.form-label { font-weight: 700; font-size: 12.5px; margin-bottom: .3rem; color: #4a4f5a; }
.input-group-text { border-radius: 11px; background: #f6f5f8; border-color: var(--border); }

.nav-pills .nav-link { color: var(--text); font-weight: 600; border-radius: 11px; }
.nav-pills .nav-link.active { background: linear-gradient(145deg, var(--brand), var(--brand-2)); box-shadow: 0 6px 16px var(--brand-glow); }
.nav-tabs { border-bottom: 1px solid var(--border); }
.nav-tabs .nav-link { color: var(--muted); font-weight: 600; border: none; border-bottom: 2.5px solid transparent; }
.nav-tabs .nav-link:hover { color: var(--brand); border-color: transparent; }
.nav-tabs .nav-link.active { color: var(--brand); background: transparent; border-bottom-color: var(--brand); }

.list-group-item { border-color: var(--border); }
.list-group-item-action:hover { background: var(--brand-soft); }
.list-group-item.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.list-group-item.active small, .list-group-item.active .text-muted { color: rgba(255,255,255,.85) !important; }
.nav-pills.nav-sm .nav-link { font-size: 12.5px; color: var(--text); }
.nav-pills.nav-sm .nav-link.active { color: #fff; }
.theme-dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border), 0 2px 6px rgba(0,0,0,.12); cursor: pointer; transition: transform .12s; }
.theme-dot:hover { transform: scale(1.12); }
.wd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 13px; user-select: none; }
.wd-chip:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 700; }

/* ---------- Modal ---------- */
.modal-content { border: none; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-header { border-bottom: 1px solid var(--border); padding: 18px 22px; }
.modal-title { font-weight: 800; letter-spacing: -.02em; }
.modal-body { padding: 22px; }
.modal-footer { border-top: 1px solid var(--border); padding: 14px 22px; }

/* ---------- Alerts ---------- */
.alert { border: none; border-radius: 12px; font-weight: 500; }
.alert-success { background: #e7f6ec; color: #14663a; }
.alert-danger { background: #fdeaec; color: #9b1c2a; }
.alert-info { background: #eaf2fd; color: #1b4f8a; }
.alert-warning { background: #fdf4e3; color: #8a5d12; }

/* ---------- Login ---------- */
.login-page { display: grid; place-items: center; min-height: 100vh; position: relative; overflow: hidden;
    background: radial-gradient(1000px 600px at 20% 10%, var(--brand-2) 0%, transparent 60%), linear-gradient(135deg, var(--brand-dark), var(--brand)); }
.login-page::before { content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%); top: -160px; right: -120px; }
.login-page::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%); bottom: -140px; left: -100px; }
.login-card { background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-radius: 24px; padding: 42px; width: 100%; max-width: 410px; box-shadow: 0 30px 70px rgba(0,0,0,.35); position: relative; z-index: 1; animation: pop .3s ease; }
.login-card .logo { width: 66px; height: 66px; border-radius: 18px; background: linear-gradient(145deg, var(--brand), var(--brand-2)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 26px; margin: 0 auto 18px; box-shadow: 0 12px 26px var(--brand-glow); }

/* ---------- Appointment calendar ---------- */
.appt-toolbar {
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: nowrap;
}
.appt-toolbar-date {
    margin: 0;
    flex-shrink: 0;
    white-space: nowrap;
}
.appt-toolbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.appt-toolbar-nav,
.appt-toolbar-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.appt-toolbar-icon-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.appt-toolbar-nav .appt-tool-btn,
.appt-nav-btn { min-width: 34px; padding-left: 0; padding-right: 0; }
.appt-date-input { width: 150px; height: 34px; }
.appt-icon-only-btn { min-width: 34px; padding-left: 0; padding-right: 0; }
.appt-legend-mobile { display: none; }
.appt-legend-desktop { display: flex; }
.appt-leg-leave {
    background: repeating-linear-gradient(45deg,#f1f1f1,#f1f1f1 6px,#e6e6e6 6px,#e6e6e6 12px);
    padding: 2px 8px;
    border-radius: 4px;
}
.appt-grid-shell { position: relative; display: flex; flex-direction: column; min-height: 0; }
#btnRefresh.is-refreshing i { animation: appt-spin .7s linear; }
@keyframes appt-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
#btnWeekView.active, #btnDayView.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); font-weight: 700; }
#btnNotes.active, #btnSearch.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); font-weight: 700; }
.appt-notes-btn { position: relative; }
.appt-notes-btn i { margin-right: 4px; }
.appt-notes-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
    border-radius: 999px; background: #e03131; color: #fff;
    font-size: 10px; font-weight: 800; line-height: 1;
}
.appt-view-switch .appt-tool-btn { min-width: 52px; }
.appt-tool-btn {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.appt-toolbar-mobile-head {
    display: contents;
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: inherit;
}
.appt-toolbar-chevron { display: none; }
.appt-toolbar-actions-inner { display: contents; }

/* Sol panel: Notlar / Ara */
.appt-page { display: flex; align-items: stretch; gap: 0; width: 100%; }
.appt-page-main { flex: 1; min-width: 0; }
.appt-side-panel {
    width: 0;
    overflow: hidden;
    flex-shrink: 0;
    transition: width .22s cubic-bezier(.4,0,.2,1), margin .22s cubic-bezier(.4,0,.2,1);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-right: 0;
    max-height: calc(100vh - 168px);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.appt-side-panel.open { width: 300px; margin-right: 12px; }
.appt-panel-view { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.appt-panel-head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-bottom: 1px solid var(--border);
    background: #faf9fb; flex-shrink: 0;
}
.appt-panel-title { font-weight: 800; font-size: 13px; letter-spacing: .04em; color: var(--text); }
.appt-panel-count { font-size: 10px; }
.appt-panel-add { color: #228be6; padding: 0; line-height: 1; }
.appt-panel-add i { font-size: 22px; }
.appt-panel-close { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 12px; }
.appt-panel-body { flex: 1; overflow-y: auto; padding: 10px; min-height: 0; }
.appt-panel-foot {
    padding: 10px 12px; border-top: 1px solid var(--border);
    background: #faf9fb; flex-shrink: 0;
}
.appt-panel-foot .form-check-label { font-size: 12px; font-weight: 600; color: var(--text); }

.appt-notes-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 24px 8px; }
.appt-note-card {
    border: 1px solid var(--border); border-radius: 10px;
    background: #fff; margin-bottom: 8px; overflow: hidden;
}
.appt-note-body {
    padding: 10px 12px; font-size: 12px; font-weight: 700; line-height: 1.35;
    color: var(--text); cursor: pointer; word-break: break-word;
}
.appt-note-body:hover { background: var(--brand-soft); }
.appt-note-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 6px 10px 8px; border-top: 1px solid #f1eff3;
}
.appt-note-meta { font-size: 10px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-note-actions { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.appt-note-actions .btn-link { color: #228be6; line-height: 1; }
.appt-note-actions .text-danger { color: #e03131 !important; }
.appt-note-popup-body { white-space: pre-wrap; font-size: 14px; line-height: 1.5; font-weight: 600; }

.appt-grid-wrap { margin-bottom: 0; }
.appt-grid-scroll {
    max-height: calc(100vh - 168px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
.appt-grid-scroll.table-responsive { overflow: auto; }
.appt-grid-scroll.week-scroll { overflow: auto; }
.appt-legend { margin-top: 10px !important; margin-bottom: 0 !important; line-height: 1.25; }
.appt-legend-row { row-gap: 6px !important; }
.appt-legend-sep { color: #ccc; font-weight: 300; user-select: none; }
.appt-legend + .appt-legend { margin-top: 6px !important; }

.appt-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; table-layout: fixed; }
.appt-table th, .appt-table td { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); vertical-align: top; }
.appt-table thead th {
    background: linear-gradient(145deg, var(--brand), var(--brand-2));
    color: #fff;
    padding: 5px 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    position: relative;
    top: auto;
    z-index: 2;
    line-height: 1.2;
}
.appt-table thead {
    position: relative;
    z-index: 2;
}
.appt-table thead.appt-thead-spacer {
    display: none;
}
.appt-head-scroll {
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(145deg, var(--brand), var(--brand-2));
    scrollbar-width: none;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.appt-head-scroll::-webkit-scrollbar { display: none; }
.appt-head-scroll .appt-table { margin: 0; }
.appt-head-scroll .appt-table .time-col,
.appt-grid-scroll .appt-table tbody .time-col {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 6;
    background: #f3f4f6;
    box-shadow: 2px 0 6px rgba(15, 23, 42, .08);
}
.appt-head-scroll .appt-table thead th.time-col {
    z-index: 8;
    background: linear-gradient(145deg, var(--brand-dark), var(--brand));
    color: #fff;
    box-shadow: 2px 0 6px rgba(15, 23, 42, .14);
}
.appt-table thead th.appt-staff-head { cursor: pointer; transition: background .15s, filter .12s; }
.appt-table thead th.appt-staff-head:hover { filter: brightness(1.08); }
.appt-table .time-col {
    width: 44px; min-width: 44px; max-width: 44px;
    background: #f8f7fa; text-align: center;
    font-size: 10.5px; color: #6b7280; font-weight: 600;
    padding: 1px 2px; vertical-align: middle;
    line-height: 1.1; letter-spacing: 0;
    white-space: nowrap; overflow: hidden;
}
.appt-cell { height: 20px; min-height: 20px; padding: 1px; position: relative; cursor: pointer; transition: background .12s; }
.appt-table tbody tr:hover .time-col,
.appt-table tbody tr.appt-row-hover .time-col {
    background: var(--brand-soft) !important;
    color: var(--text);
}
.appt-table tbody tr:hover td.appt-cell,
.appt-table tbody tr.appt-row-hover td.appt-cell,
.appt-table td.appt-cell.appt-cell-span-hl {
    background: var(--brand-soft) !important;
}
.appt-cell.leave { background: repeating-linear-gradient(45deg,#f4f3f5,#f4f3f5 7px,#e9e7ec 7px,#e9e7ec 14px); cursor: pointer; }
.appt-cell.weekly-off { background: repeating-linear-gradient(45deg,#eef0f6,#eef0f6 8px,#e2e5ef 8px,#e2e5ef 16px); position: relative; vertical-align: middle; text-align: center; }
.appt-cell.weekly-off .woff-label { color: #5b6172; font-weight: 700; font-size: 11px; writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; letter-spacing: 1px; }
.appt-chip {
    position: relative; font-size: 11px; border-radius: 6px;
    padding: 4px 16px 4px 8px; color: #333;
    overflow: hidden; line-height: 1.3; letter-spacing: .01em;
    box-shadow: none;
    border: 1.5px solid transparent;
    -webkit-font-smoothing: antialiased;
}
.appt-chip.block { position: absolute; top: 1px; right: 1px; bottom: 1px; left: 1px; height: auto; display: flex; flex-direction: column; justify-content: flex-start; gap: 1px; }
.appt-chip.block:not(.inline) {
    font-size: 12px;
    padding: 5px 18px 5px 8px;
    line-height: 1.3;
}
.appt-chip.block:not(.inline) strong { font-size: 12.5px; font-weight: 700; }
.appt-chip.block:not(.inline) .appt-time,
.appt-chip.block:not(.inline) .appt-phone,
.appt-chip.block:not(.inline) .appt-service { font-size: 11.5px; }
.appt-chip.block:not(.inline) .appt-svc-tag { font-size: 10.5px; padding: 2px 6px; }
.appt-chip.block.inline {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 2px 16px 2px 6px;
}
.appt-chip.block.inline .appt-inline-body {
    display: block;
    min-width: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10.5px;
    line-height: 1.3;
    font-weight: 500;
}
.appt-chip.block.inline .appt-inline-body strong { font-size: 11px; font-weight: 700; }
.appt-chip.block.inline .appt-inline-body .appt-time { font-weight: 700; }
.appt-chip .appt-time { font-size: 10.5px; font-weight: 700; margin-top: 0; line-height: 1.2; opacity: 1; }
.appt-chip .appt-service { font-size: 10.5px; font-weight: 600; line-height: 1.2; }
.appt-services-multi { display: inline-flex; flex-wrap: wrap; gap: 2px 4px; align-items: center; max-width: 100%; }
.appt-svc-tag {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.2;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255,255,255,.22);
    white-space: nowrap;
}
.appt-chip.beklemede .appt-svc-tag { background: rgba(0,0,0,.08); color: #1a1a1a; }
.appt-chip.geldi .appt-svc-tag,
.appt-chip.gelmedi .appt-svc-tag,
.appt-chip.iptal .appt-svc-tag { background: rgba(255,255,255,.18); color: inherit; }
.appt-chip.block.inline .appt-sep {
    opacity: .7;
    padding: 0 3px;
    font-weight: 700;
}
.appt-chip.block.inline .appt-confirmed { font-size: 9px; }
.appt-chip strong { font-weight: 700; font-size: 11px; line-height: 1.25; }
.appt-chip .appt-phone { font-size: 10.5px; font-weight: 600; line-height: 1.25; opacity: 1; }
.appt-chip .appt-phone i { font-size: 9.5px; margin-right: 2px; }
.appt-chip .appt-confirmed { font-weight: 700; letter-spacing: .01em; white-space: nowrap; font-size: 9.5px; }
.appt-chip .appt-note { font-size: 10px; font-style: italic; opacity: .95; display: block; line-height: 1.2; font-weight: 500; }
.appt-chip .appt-staff { font-size: 10px; font-weight: 600; line-height: 1.2; opacity: 1; }
.appt-chip.block:not(.inline) .appt-services-multi { flex-wrap: wrap; gap: 2px 3px; margin-top: 1px; }
.appt-chip .appt-staff i { font-size: 8px; margin-right: 2px; }
.appt-table th.appt-day-head { min-width: 100px; font-size: 10px; line-height: 1.15; }
.appt-table th.appt-day-head.today { box-shadow: inset 0 -3px 0 rgba(255,255,255,.85); background: linear-gradient(145deg, var(--brand-light), var(--brand)); }

/* Haftalık görünüm: personel × 7 gün */
.appt-table.week-mode tbody tr { height: 24px; }
.appt-table.week-mode .appt-cell { height: 24px; min-height: 24px; }
.appt-table.week-mode thead th { position: relative; z-index: 3; }
.appt-table.week-mode thead tr:first-child th { top: auto; }
.appt-table.week-mode thead th.appt-staff-group {
    border-left: 2px solid rgba(255,255,255,.28);
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 6px 8px;
}
.appt-table.week-mode thead th.appt-staff-group:first-of-type { border-left: none; }
.appt-table.week-mode thead th.appt-staff-group { cursor: pointer; }
.appt-table.week-mode thead th.appt-staff-group:hover { filter: brightness(1.06); }
.appt-table.week-mode thead tr:nth-child(2) th.appt-day-mini {
    top: auto;
    background: var(--brand-dark, #5e1019);
    font-size: 9px;
    font-weight: 800;
    padding: 4px 2px;
    min-width: 42px;
    width: 42px;
    letter-spacing: .02em;
}
.appt-table.week-mode thead th.appt-day-mini.today {
    background: #fff;
    color: var(--brand);
    box-shadow: inset 0 -2px 0 var(--brand);
}
.appt-table.week-mode .appt-week-mini {
    min-width: 42px;
    width: 42px;
    max-width: 42px;
    padding: 1px;
}
.appt-table.week-mode .time-col {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 5;
    background: #f8f7fa;
    box-shadow: 1px 0 0 var(--border);
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    white-space: nowrap;
}
.appt-table.week-mode thead .time-col { z-index: 6; top: 0; }
.appt-table.week-mode thead tr:nth-child(2) .time-col { top: 0; }
.appt-grid-body {
    position: relative;
    display: block;
}
.appt-now-line {
    position: absolute;
    left: 0;
    height: 2px;
    background: #e53935;
    z-index: 25;
    pointer-events: none;
}
.appt-now-line-dot {
    position: absolute;
    left: 40px;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e53935;
}
.woff-label-mini {
    color: #6b7280;
    font-weight: 700;
    font-size: 8px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    display: inline-block;
    letter-spacing: .5px;
}
.appt-chip.week.compact {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1px 14px 1px 4px;
    border-radius: 4px;
    line-height: 1.15;
    overflow: hidden;
    white-space: nowrap;
    gap: 0;
}
.appt-chip.week.compact .appt-inline-mini {
    display: block;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 7.5px;
    line-height: 1.15;
}
.appt-chip.week.compact .appt-inline-mini strong,
.appt-chip.week.compact .appt-inline-mini .appt-phone,
.appt-chip.week.compact .appt-inline-mini .appt-time {
    display: inline;
    font-size: inherit;
    font-weight: 700;
}
.appt-chip.week.compact .appt-inline-mini strong { font-weight: 800; }
.appt-chip.week.compact .appt-sep { opacity: .75; padding: 0 2px; }
.appt-chip.week.compact strong {
    font-size: inherit;
    line-height: inherit;
    white-space: nowrap;
}
.appt-chip.week.compact .appt-phone {
    display: inline;
    font-size: inherit;
    line-height: inherit;
    white-space: nowrap;
}
.appt-chip.week.compact .appt-time {
    display: inline;
    font-size: inherit;
    font-weight: 800;
    margin-bottom: 0;
}
.appt-chip.week.compact .confirm-bar { width: 10px; left: auto; right: 0; }
.appt-chip.week.compact .src-badge { width: 12px; height: 12px; font-size: 7px; top: 1px; right: 1px; }

.appt-week-cell { vertical-align: top; }
.appt-week-stack { display: flex; flex-direction: column; gap: 2px; min-height: 100%; }
.appt-chip.week {
    position: relative;
    flex-shrink: 0;
    padding: 2px 5px 2px 20px;
    cursor: pointer;
}
.appt-chip.week:hover { filter: none; opacity: .96; }
.appt-hist { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: #fafafb; }
.appt-hist .hist-item { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #ececf0; }
.appt-hist .hist-item:last-child { border-bottom: 0; }
.appt-hist .hist-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 5px; flex-shrink: 0; }
.appt-hist .hist-act { font-weight: 700; font-size: 12.5px; }
.appt-hist .hist-meta { font-size: 11.5px; color: #555; }
/* Randevu durum renkleri — örnek görünüme yakın, mat */
.appt-chip.beklemede {
    background: #f5c26b;
    color: #2a2a2a;
    border-color: #e0a84a;
    box-shadow: none;
}
.appt-chip.beklemede strong,
.appt-chip.beklemede .appt-time,
.appt-chip.beklemede .appt-phone,
.appt-chip.beklemede .appt-service,
.appt-chip.beklemede .appt-staff,
.appt-chip.beklemede .appt-note,
.appt-chip.beklemede .appt-fit-name,
.appt-chip.beklemede .appt-fit-meta,
.appt-chip.beklemede .appt-inline-body,
.appt-chip.beklemede .appt-inline-mini,
.appt-chip.beklemede .appt-confirmed { color: #2a2a2a; }
.appt-chip.beklemede .appt-svc-tag { background: rgba(0,0,0,.08); color: #2a2a2a; }
.appt-chip.beklemede:has(.confirm-bar.c-onaylandi) {
    border-color: #4a8b5f;
}

.appt-chip.geldi {
    background: #5b9a6a;
    color: #fff;
    border-color: #4a8b5f;
    box-shadow: none;
}
.appt-chip.geldi strong,
.appt-chip.geldi .appt-phone,
.appt-chip.geldi .appt-service,
.appt-chip.geldi .appt-time,
.appt-chip.geldi .appt-staff,
.appt-chip.geldi .appt-note,
.appt-chip.geldi .appt-fit-name,
.appt-chip.geldi .appt-fit-meta,
.appt-chip.geldi .appt-inline-body,
.appt-chip.geldi .appt-inline-mini,
.appt-chip.geldi .appt-confirmed { color: #fff; }
.appt-chip.geldi .appt-svc-tag { background: rgba(255,255,255,.18); color: #fff; }

.appt-chip.gelmedi {
    background: #e8b8b8;
    color: #5c2a2a;
    border-color: #d49a9a;
    box-shadow: none;
}
.appt-chip.gelmedi strong,
.appt-chip.gelmedi .appt-phone,
.appt-chip.gelmedi .appt-service,
.appt-chip.gelmedi .appt-time,
.appt-chip.gelmedi .appt-staff,
.appt-chip.gelmedi .appt-note,
.appt-chip.gelmedi .appt-fit-name,
.appt-chip.gelmedi .appt-fit-meta,
.appt-chip.gelmedi .appt-inline-body,
.appt-chip.gelmedi .appt-inline-mini,
.appt-chip.gelmedi .appt-confirmed { color: #5c2a2a; }

.appt-chip.iptal {
    background: #e8e8ea;
    color: #5a5f69;
    border-color: #d5d6da;
    text-decoration: line-through;
    opacity: .85;
    box-shadow: none;
}
/* Teyit şeridi: sağ kenar (örnekteki gibi) */
.appt-chip.online { box-shadow: inset 0 0 0 1px #5b9e96; }
.appt-chip .src-badge {
    position: absolute; top: 2px; right: 16px; width: 14px; height: 14px; border-radius: 50%;
    background: #5b9e96; color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 8px; box-shadow: none;
}
.appt-chip .confirm-bar {
    position: absolute;
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    width: 12px;
    box-shadow: none;
}
.confirm-bar.c-beklemede { background: transparent; width: 0; }
.confirm-bar.c-onaylandi { background: #3f7a52; width: 12px; }
.confirm-bar.c-iptal { background: #c47a7a; width: 12px; }
.appt-chip.geldi .confirm-bar.c-onaylandi,
.appt-chip.geldi .confirm-bar.c-beklemede { background: #3f7a52; width: 12px; }
.appt-chip .sale-bar {
    position: absolute;
    left: 0;
    right: 12px;
    bottom: 0;
    height: 3px;
    z-index: 2;
    opacity: .7;
}
.sale-bar.sale-bekliyor { background: #c9a04a; }
.sale-bar.sale-acik { background: #5b7fad; }
.sale-bar.sale-kapali { background: #5a9a6e; }

/* Randevu detay sayfası */
.appt-detail-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 0 24px;
}
.appt-detail-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}
.appt-detail-page .appt-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.appt-detail-page .adi-name { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.appt-detail-page .adi-row { font-size: 15px; margin-bottom: 6px; }
.appt-detail-page .adi-row i { width: 22px; color: var(--brand); }
.sale-badge.sale-bekliyor { background: #fef3c7; color: #92400e; }
.sale-badge.sale-acik { background: #dbeafe; color: #1d4ed8; }
.sale-badge.sale-kapali { background: #dcfce7; color: #166534; }

/* Randevu satış oluştur */
.appt-sale-page.card {
    overflow: visible;
}
.appt-sale-page .card-body {
    overflow: visible;
}
.appt-sale-page .table-responsive {
    overflow: visible;
}
.appt-sale-page tbody tr {
    position: relative;
}
.appt-sale-page td:first-child {
    overflow: visible;
    position: relative;
    z-index: 1;
}
.appt-sale-page tbody tr:focus-within td:first-child {
    z-index: 60;
}
.appt-sale-page .appt-sale-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.appt-sale-page .appt-sale-head-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 15px;
}
.appt-sale-page .appt-sale-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.appt-sale-page .line-svc-wrap { min-width: 200px; overflow: visible; }
.appt-sale-page .line-svc-pick { z-index: 1050; }
.appt-leg { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 3px; }

/* Randevu Detayı bilgi bloğu */
.appt-detail-info { background: var(--brand-soft); border: 1px solid #f0dde1; border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; }
.appt-detail-info .adi-name { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -.02em; margin-bottom: 8px; }
.appt-detail-info .adi-row { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; color: #3f3a3c; padding: 3px 0; }
.appt-detail-info .adi-row i { color: var(--brand); font-size: 16px; width: 18px; text-align: center; }
.appt-detail-modal .form-label { font-weight: 700; font-size: 13px; color: var(--text); }

/* ---------- Bildirim & Onay Modalleri (tamamı modal) ---------- */
.nt-overlay { position: fixed; inset: 0; z-index: 20000; display: grid; place-items: center; padding: 20px;
    background: rgba(26, 16, 22, .52); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .18s ease; }
.nt-overlay.show { opacity: 1; }
.nt-dialog { width: 100%; max-width: 384px; transform: translateY(14px) scale(.96);
    transition: transform .22s cubic-bezier(.2,.8,.3,1.25); }
.nt-overlay.show .nt-dialog { transform: none; }
.nt-modal { background: #fff; border-radius: 22px; padding: 28px 26px 22px; text-align: center;
    box-shadow: 0 26px 64px rgba(20,15,25,.32); }
.nt-modal .nt-ic { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
    margin: 0 auto 16px; font-size: 31px; }
.nt-success .nt-ic { background: #e7f7ee; color: #1fa463; }
.nt-danger .nt-ic { background: #fdeaec; color: #e0485a; }
.nt-warning .nt-ic { background: #fff5e0; color: #d99204; }
.nt-info .nt-ic { background: #e9f0fd; color: #3f6cb0; }
.nt-ic-danger { background: #fdeaec !important; color: #e0485a !important; }
.nt-ic-brand { background: var(--brand-soft) !important; color: var(--brand) !important; }
.nt-modal .nt-ttl { font-size: 18px; font-weight: 800; margin-bottom: 6px; color: var(--text); letter-spacing: -.02em; }
.nt-modal .nt-msg { font-size: 14px; color: var(--muted); line-height: 1.55; margin-bottom: 22px; white-space: pre-line; }
.nt-modal .nt-act { display: flex; gap: 10px; justify-content: center; }
.nt-modal .nt-act .btn { min-width: 116px; border-radius: 13px; font-weight: 700; padding: 11px 18px; }
.nt-modal .nt-act .btn-brand,
.nt-modal .nt-act .btn-brand:hover,
.nt-modal .nt-act .btn-brand:focus,
.nt-modal .nt-act .btn-brand:active {
    color: #fff !important;
}
@media (max-width: 420px) { .nt-modal .nt-act { flex-direction: column-reverse; } .nt-modal .nt-act .btn { width: 100%; } }

/* ---------- Pagination ---------- */
.pagination { gap: 4px; margin: 0; }
.page-link { border: none; border-radius: 9px !important; color: var(--text); font-weight: 600; min-width: 36px; text-align: center; }
.page-link:hover { background: var(--brand-soft); color: var(--brand); }
.page-item.active .page-link { background: var(--brand); color: #fff; }
.page-item.disabled .page-link { color: #c3c0c9; }

/* ---------- Helpers ---------- */
.cursor-pointer { cursor: pointer; }
.empty-state { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-state i { font-size: 50px; opacity: .35; display: block; margin-bottom: 8px; }
.soft-chip { background: var(--brand-soft); color: var(--brand); border-radius: 8px; padding: 3px 10px; font-weight: 700; font-size: 12px; }

/* Randevular tam ekran */
body.appt-fullscreen { overflow: hidden; }
body.appt-fullscreen .sidebar,
body.appt-fullscreen .topbar,
body.appt-fullscreen .appt-legend { display: none !important; }
body.appt-fullscreen .app-main { margin-left: 0 !important; width: 100% !important; }
body.appt-fullscreen .content { padding: 10px 12px; height: 100vh; display: flex; flex-direction: column; }
body.appt-fullscreen .content > .content-header.appt-toolbar { margin-bottom: 10px; flex-shrink: 0; }
body.appt-fullscreen .appt-grid-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.appt-fullscreen .appt-grid-scroll { max-height: none !important; flex: 1; min-height: 0; overflow: auto; }

@media (max-width: 767.98px) {
    .content:has(.appt-page) {
        padding: 4px 2px 0;
        display: flex;
        flex-direction: column;
        height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-bottom, 0px));
        min-height: 0;
        overflow: hidden;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
    }

    .content:has(.appt-page) .appt-page {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .content-header.appt-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-bottom: 6px;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        flex-shrink: 0;
    }
    .appt-toolbar-mobile-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        min-height: 40px;
        padding: 8px 10px;
        margin: 0;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: #fff;
        box-shadow: var(--shadow-sm);
        color: inherit;
        font: inherit;
        text-align: left;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        appearance: none;
        transition: background .15s ease, border-color .15s ease;
    }
    .appt-toolbar-mobile-head:active {
        background: #faf9fb;
    }
    .appt-toolbar.toolbar-open .appt-toolbar-mobile-head {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-bottom-color: transparent;
        box-shadow: none;
    }
    .appt-toolbar-date {
        flex: 1;
        min-width: 0;
        width: auto;
        justify-content: flex-start;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
        font-weight: 800;
        margin: 0;
        padding: 0;
        line-height: 1.3;
        pointer-events: none;
    }
    .appt-toolbar-chevron {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 28px;
        height: 28px;
        border-radius: 8px;
        background: #f3f4f6;
        color: var(--muted);
        transition: background .15s ease, color .15s ease, transform .25s ease;
    }
    .appt-toolbar-chevron i {
        font-size: 14px;
        line-height: 1;
        transition: transform .25s ease;
    }
    .appt-toolbar.toolbar-open .appt-toolbar-chevron {
        background: var(--brand-soft);
        color: var(--brand);
    }
    .appt-toolbar.toolbar-open .appt-toolbar-chevron i {
        transform: rotate(180deg);
    }
    .appt-toolbar-actions {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height .28s ease, opacity .2s ease;
    }
    .appt-toolbar-actions.is-open {
        max-height: 180px;
        opacity: 1;
        pointer-events: auto;
    }
    .appt-toolbar-actions-inner {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 8px 10px 10px;
        margin: 0;
        background: #fff;
        border: 1px solid var(--border);
        border-top: none;
        border-radius: 0 0 12px 12px;
        box-shadow: var(--shadow-sm);
        opacity: 1;
        transform: none;
    }
    .appt-toolbar-nav {
        display: grid;
        grid-template-columns: 34px 1fr 34px auto;
        gap: 5px;
        align-items: center;
    }
    .appt-date-input {
        width: 100%;
        height: 34px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 9px;
    }
    .appt-nav-btn {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }
    .appt-today-btn {
        height: 34px;
        padding: 0 10px;
        border-radius: 9px;
        font-weight: 700;
        font-size: 12px;
    }
    .appt-toolbar-row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 6px;
        width: 100%;
    }
    .appt-view-switch {
        flex: 1 1 auto;
        min-width: 0;
    }
    .appt-view-switch .appt-tool-btn {
        flex: 1;
        height: 32px;
        font-weight: 700;
        font-size: 12px;
    }
    .appt-notes-btn {
        flex: 0 0 auto;
        width: 32px;
        min-width: 32px;
        height: 32px;
        padding: 0;
        border-radius: 10px;
        position: relative;
    }
    .appt-notes-btn .appt-tool-label { display: none; }
    .appt-notes-btn i { font-size: 15px; margin: 0 !important; }
    .appt-notes-btn .appt-notes-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        margin-left: 0;
        min-width: 16px;
        height: 16px;
        font-size: 9px;
    }
    .appt-toolbar-icon-group {
        flex: 0 0 auto;
        gap: 6px;
        margin-left: 0;
    }
    .appt-toolbar-icon-group .appt-tool-btn {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }
    .appt-tool-label { display: inline; }

    .appt-page {
        flex: 1;
        flex-direction: column;
        position: relative;
        min-height: 0;
        overflow: hidden;
    }
    .appt-page-main {
        width: 100%;
        min-width: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    .appt-grid-wrap {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        min-height: 0;
        border: 1px solid var(--border);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }
    .appt-grid-shell {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        min-height: 0;
        height: 100%;
        position: relative;
        overflow: hidden;
    }
    .appt-head-scroll { display: none !important; }
    .appt-grid-scroll {
        flex: 1 1 0;
        min-height: 0;
        height: 100%;
        max-height: 100%;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-x pan-y;
        position: relative;
        padding-bottom: 8px;
    }
    .appt-grid-scroll .appt-table thead.appt-thead-spacer {
        display: table-header-group !important;
    }
    .appt-table {
        width: max-content;
        min-width: 100%;
        table-layout: fixed;
        border-collapse: separate;
        border-spacing: 0;
    }
    .appt-table thead {
        position: relative;
        z-index: 5;
    }
    .appt-table thead th {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 5;
        padding: 8px 4px;
        font-size: 10px;
        line-height: 1.15;
        background: linear-gradient(145deg, var(--brand), var(--brand-2));
        color: #fff;
        box-shadow: 0 1px 0 rgba(0,0,0,.08);
    }
    .appt-table thead th:not(.time-col):not(.appt-day-mini) {
        min-width: 100px;
        width: 100px;
        white-space: normal;
        overflow: hidden;
        word-break: break-word;
        font-size: 10px;
        line-height: 1.15;
        padding: 8px 4px;
    }
    .appt-table .time-col,
    .appt-table tbody td.time-col {
        position: -webkit-sticky;
        position: sticky;
        left: 0;
        z-index: 4;
        width: 40px;
        min-width: 40px;
        max-width: 40px;
        font-size: 9px;
        font-weight: 700;
        padding: 2px 1px;
        background: #f3f4f6 !important;
        box-shadow: 2px 0 6px rgba(15, 23, 42, .1);
    }
    .appt-table thead th.time-col {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        left: 0;
        z-index: 9;
        background: linear-gradient(145deg, var(--brand-dark), var(--brand)) !important;
        color: #fff;
        box-shadow: 2px 0 6px rgba(15, 23, 42, .14), 0 1px 0 rgba(0,0,0,.08);
    }
    .appt-table tbody tr { min-height: 24px; height: auto; }
    .appt-cell {
        min-width: 100px;
        width: 100px;
        min-height: 24px;
        height: auto;
        padding: 1px;
        vertical-align: top;
        background: #fff;
    }

    .appt-chip.block.mobile.fit {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        width: 100%;
        min-height: 22px;
        height: 100%;
        padding: 2px 12px 2px 4px;
        overflow: visible;
        border-radius: 4px;
        font-size: 10px;
        line-height: 1.2;
    }
    .appt-chip.block.mobile.fit .confirm-bar { left: auto; right: 0; }
    .appt-chip.block.mobile.fit .appt-fit-body {
        min-width: 0;
        max-width: 100%;
        overflow: visible;
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .appt-chip.block.mobile.fit .appt-fit-name {
        display: block;
        font-size: 10px;
        font-weight: 800;
        line-height: 1.2;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-break: break-word;
        max-width: 100%;
    }
    .appt-chip.block.mobile.fit .appt-fit-meta {
        display: block;
        font-size: 9px;
        font-weight: 600;
        line-height: 1.2;
        opacity: .95;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-break: break-word;
        max-width: 100%;
    }
    .appt-chip.block.mobile.fit .appt-fit-svc,
    .appt-chip.block.mobile.fit .appt-fit-note {
        font-weight: 700;
        white-space: normal;
        word-break: break-word;
        overflow: visible;
    }
    .appt-chip.block.mobile.fit.size-xs .appt-fit-name { font-size: 9.5px; }
    .appt-chip.block.mobile.fit.size-sm .appt-fit-name { font-size: 10px; }
    .appt-chip.block.mobile.fit.size-md .appt-fit-name { font-size: 10px; }
    .appt-chip.block.mobile.fit .src-badge {
        width: 11px;
        height: 11px;
        font-size: 6px;
        top: 1px;
        right: 1px;
    }
    .appt-chip.block.mobile.fit .appt-confirmed {
        white-space: normal;
        font-size: 8px;
    }

    .appt-table.week-mode tbody tr { min-height: 22px; height: auto; }
    .appt-table.week-mode .appt-cell { min-height: 22px; height: auto; min-width: 44px; width: 44px; }
    .appt-table.week-mode thead tr:first-child th {
        top: 0;
        z-index: 6;
    }
    .appt-table.week-mode thead tr:nth-child(2) th {
        top: 30px;
        z-index: 5;
    }
    .appt-table.week-mode thead th.time-col {
        top: 0;
        left: 0;
        z-index: 10;
    }
    .appt-table.week-mode thead th.appt-staff-group {
        font-size: 9px;
        padding: 6px 2px;
        white-space: normal;
        overflow: hidden;
        word-break: break-word;
        max-width: 0;
        background: linear-gradient(145deg, var(--brand), var(--brand-2));
    }
    .appt-table.week-mode thead th.appt-day-mini {
        font-size: 9px;
        min-width: 44px;
        width: 44px;
        padding: 4px 1px;
        z-index: 5;
        background: var(--brand-dark, #5e1019);
    }
    .appt-table.week-mode .time-col { width: 40px; min-width: 40px; max-width: 40px; }
    .appt-chip.week.compact.mobile {
        position: relative;
        inset: auto;
        width: 100%;
        min-height: 20px;
        height: 100%;
        padding: 2px 10px 2px 3px;
        overflow: visible;
    }
    .appt-chip.week.compact.mobile .appt-inline-mini {
        font-size: 9px;
        line-height: 1.2;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-break: break-word;
        display: block;
    }
    .appt-chip.week.compact.mobile strong { font-size: 9px; display: inline; font-weight: 800; }
    .appt-chip.week.compact.mobile .appt-time { font-weight: 800; }

    .appt-legend-desktop { display: none !important; }
    .appt-legend-mobile {
        display: block;
        margin-top: 6px;
        margin-bottom: 4px;
        flex-shrink: 0;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 14px;
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }
    .appt-legend-mobile summary {
        list-style: none;
        cursor: pointer;
        padding: 12px 14px;
        font-size: 13px;
        font-weight: 700;
        color: var(--text);
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .appt-legend-mobile summary::-webkit-details-marker { display: none; }
    .appt-legend-mobile[open] summary { border-bottom: 1px solid var(--border); background: #faf9fb; }
    .appt-legend-mobile .appt-legend { margin: 0 !important; padding: 12px 14px 14px; }

    .appt-panel-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1055;
        background: rgba(20, 15, 25, .45);
        border: 0;
        padding: 0;
        margin: 0;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .appt-panel-backdrop.is-open {
        display: block;
    }
    .appt-side-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 0 !important;
        max-width: none;
        max-height: none;
        margin: 0 !important;
        z-index: 1060;
        border-radius: 0;
        box-shadow: -8px 0 32px rgba(0,0,0,.18);
        overflow: hidden;
        background: #fff;
        pointer-events: auto;
    }
    .appt-side-panel.open {
        width: min(100%, 340px) !important;
        margin: 0 !important;
    }
    body.appt-panel-open { overflow: hidden; }

    body.appt-fullscreen .content:has(.appt-page) {
        padding: 6px 2px;
        padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
        height: calc(100dvh - env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - env(safe-area-inset-bottom, 0px));
        min-height: 0;
        overflow: hidden;
        box-sizing: border-box;
    }
    body.appt-fullscreen .appt-grid-scroll {
        flex: 1 1 0 !important;
        min-height: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
        overflow: auto !important;
    }
    body.appt-fullscreen .appt-legend-mobile { display: none; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .appt-toolbar { flex-wrap: wrap; }
    .appt-toolbar-actions { flex-wrap: wrap; }
    .appt-grid-scroll {
        max-height: calc(100vh - 200px);
        -webkit-overflow-scrolling: touch;
    }
    .appt-table thead th:not(.time-col) { min-width: 108px; }
    .appt-table .time-col { min-width: 52px; }
    .appt-chip.block:not(.inline) strong { font-size: 11px; }
    .appt-chip.block:not(.inline) .appt-time,
    .appt-chip.block:not(.inline) .appt-phone,
    .appt-chip.block:not(.inline) .appt-service { font-size: 10px; }
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Anasayfa ---------- */
.home-dashboard { display: flex; flex-direction: column; gap: 18px; }
.home-section-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px 0; gap: 12px;
}
.home-section-title { margin: 0; font-size: 18px; font-weight: 800; color: var(--text); }
.home-open-sales { overflow: hidden; }
.home-search-wrap { position: relative; padding: 12px 18px 0; }
.home-search-wrap i {
    position: absolute; left: 32px; top: 50%; transform: translateY(-20%);
    color: var(--muted); pointer-events: none;
}
.home-search-wrap .form-control {
    padding-left: 40px; height: 44px; border-radius: 10px;
    background: #f8f7fa; border-color: var(--border);
}
.home-open-body { padding: 14px 18px; min-height: 60px; }
.home-open-empty { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; padding: 8px 12px 4px; }
.home-open-list { display: flex; flex-direction: column; gap: 8px; }
.home-open-item {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
    background: #fff; transition: background .15s, border-color .15s;
}
.home-open-item:hover { background: var(--brand-soft); border-color: #e8d5d9; }
.home-open-item-rich { text-decoration: none; color: inherit; }
.home-open-item-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.home-open-chevron { color: var(--muted); font-size: 18px; }
.home-open-name { font-weight: 700; flex: none; min-width: 0; }
.home-open-meta { font-size: 12px; color: var(--muted); }
.home-open-total { font-weight: 800; color: var(--brand); }
.home-open-links {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px; padding: 0 18px 16px;
    border-top: 1px solid var(--border); margin-top: 4px; padding-top: 12px;
}
.home-link { font-size: 12.5px; font-weight: 600; color: var(--brand); text-decoration: none; }
.home-link:hover { text-decoration: underline; color: var(--brand-dark); }
.home-link-center { margin: 0 auto; text-align: center; }
.home-open-banner { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
.open-sales-item-link {
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}
.open-sales-item-link:hover {
    background: var(--brand-soft);
    color: inherit;
}
.open-sales-item-link .home-open-chevron { flex-shrink: 0; }
.open-sales-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 0 24px;
}
.open-sales-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.open-sales-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}
.open-sales-back {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
}
.open-sales-back:hover { color: var(--brand); }
.open-sales-card {
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.open-sales-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: #f3f4f6;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    font-weight: 600;
    color: #4b5563;
}
.open-sales-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}
.open-sales-filter .form-select {
    min-width: 110px;
    border-radius: 8px;
    background: #fff;
}
.open-sales-search {
    position: relative;
    padding: 12px 18px 0;
}
.open-sales-search i {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-10%);
    color: var(--muted);
    pointer-events: none;
}
.open-sales-search .form-control {
    padding-left: 40px;
    height: 44px;
    border-radius: 10px;
    background: #f8f7fa;
    border-color: var(--border);
}
.open-sales-body { padding: 14px 18px 18px; min-height: 80px; }
.open-sales-empty {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    padding: 12px 8px;
}
.open-sales-list { display: flex; flex-direction: column; }
.open-sales-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 4px;
    border-bottom: 1px solid var(--border);
}
.open-sales-item:last-child { border-bottom: none; }
.open-sales-item-main { flex: 1; min-width: 180px; }
.open-sales-item-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 4px;
}
.open-sales-item-meta { font-size: 12.5px; color: var(--muted); }
.open-sales-item-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.open-sales-action {
    border: none;
    background: none;
    padding: 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--brand);
    cursor: pointer;
}
.open-sales-action:hover { text-decoration: underline; }
.open-sales-action-danger { color: #dc3545; }
.open-sales-action-danger:hover { color: #b02a37; }
.open-sales-more {
    border: none;
    background: none;
    padding: 4px 6px;
    color: var(--muted);
    line-height: 1;
}
.open-sales-more:hover { color: var(--text); }
.open-sales-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 18px 16px;
    border-top: 1px solid var(--border);
    background: #fafafa;
}
.open-sales-foot-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
}
.open-sales-foot-link:hover { text-decoration: underline; color: var(--brand-dark); }
.open-sales-detail {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.open-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.open-detail-totals {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px 24px;
    margin-bottom: 16px;
    font-size: 14px;
}
.open-detail-grand { font-size: 1.1rem; color: var(--brand); }
.open-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
.open-detail-disc { width: min(240px, 100%); }
.open-pay-summary {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafafa;
}
.open-pay-entered-line {
    font-size: 13px;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #444;
}
.open-pay-entered-line.is-partial { background: #fff8e6; color: #8a6d00; }
.open-pay-entered-line.is-full { background: #ecfdf3; color: #166534; }
.open-pay-entered-line.is-over { background: #fef2f2; color: #b91c1c; }

.home-stat-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.home-stat-card {
    position: relative; display: flex; flex-direction: column; justify-content: space-between;
    min-height: 118px; padding: 14px 16px 12px; border-radius: 12px;
    border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-sm);
    text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s;
}
.home-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.home-stat-badge {
    align-self: flex-end; font-size: 10px; font-weight: 800; letter-spacing: .02em;
    background: var(--brand); color: #fff; padding: 4px 10px; border-radius: 6px;
}
.home-stat-val {
    font-size: 22px; font-weight: 800; line-height: 1.2; margin-top: 8px;
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
}
.home-stat-val small { font-size: 12px; font-weight: 600; color: var(--muted); }
.home-stat-link { font-size: 12px; font-weight: 700; color: var(--brand); margin-top: 10px; align-self: flex-end; }

.home-chart-card { overflow: hidden; }
.home-chart-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; border-bottom: 1px solid var(--border); background: #faf9fb;
}
.home-chart-title { margin: 0; font-size: 15px; font-weight: 800; }
.home-period-select { width: 120px; border-radius: 8px; }
.home-chart-card .card-body { height: 260px; padding: 14px 16px 8px; }

/* ---------- Müşteriler sayfası ---------- */
.cust-page-toolbar-wrap {
    max-width: 880px;
    margin: 0 auto 16px;
}
.cust-page-toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
}
.cust-page-toolbar-right { flex-shrink: 0; }
.cust-page-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}
.cust-page-status { width: 120px; flex-shrink: 0; }
.cust-page-birthday { width: 230px; flex-shrink: 0; }
.cust-page-search-row { margin-top: 10px; }
.cust-page-search-row .form-control { width: 100%; }
.cust-page-table-wrap {
    max-width: 880px;
    margin: 0 auto;
}
.cust-row-clickable { cursor: pointer; }
.cust-row-clickable:hover { background: var(--brand-soft) !important; }
.cust-detail-actions .btn { min-width: 96px; }

.cust-form-page {
    max-width: 880px;
    margin: 0 auto;
    height: calc(100vh - var(--topbar-h) - 52px);
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.cust-form-page form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.cust-form-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.cust-form-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}
.cust-form-section { margin-bottom: 12px; }
.cust-form-section:last-child { margin-bottom: 0; }
.cust-form-stack { display: flex; flex-direction: column; gap: 14px; }
.cust-form-collapsible.cust-form-section { display: none !important; }
.cust-form-collapsible.cust-form-section.is-open { display: flex !important; flex-direction: column; }
.cust-form-toggles {
    flex-shrink: 0;
    margin-top: 12px;
    padding-top: 4px;
}

.svc-page {
    max-width: 880px;
    margin: 0 auto;
}
.svc-page-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.svc-page-search {
    width: min(280px, 100%);
    min-width: 160px;
}
.svc-page-table-wrap { margin-bottom: 0; }
.modal-svc-wide { max-width: min(960px, 94vw); width: 100%; }
.modal-appt-form { max-width: min(760px, 94vw); width: 100%; margin: 0.5rem auto; }
.modal-appt-form .modal-content {
    max-height: min(90vh, calc(100dvh - 1rem));
    display: flex;
    flex-direction: column;
}
.modal-appt-form .modal-header,
.modal-appt-form .modal-footer { flex-shrink: 0; }
.modal-appt-form .appt-form-modal {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: visible;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}
#appModal .modal-dialog.modal-appt-form.modal-fullscreen {
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
}
#appModal .modal-dialog.modal-appt-form.modal-fullscreen .modal-content {
    height: 100%;
    max-height: 100%;
    border: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}
#appModal .modal-dialog.modal-appt-form.modal-fullscreen .appt-form-modal {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: visible;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#appModal .modal-dialog.modal-appt-form.modal-fullscreen .modal-footer {
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}
.modal-appt-add-cust { max-width: min(640px, 94vw); width: 100%; }
.appt-cust-row .appt-cust-add-btn {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    padding-left: 12px;
    padding-right: 12px;
}
.svc-edit-modal { max-height: 72vh; overflow-y: auto; }
.svc-edit-block {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    background: #fff;
}
.svc-edit-block-title {
    font-weight: 800;
    font-size: 14px;
    color: var(--brand);
    margin-bottom: 12px;
}
.appt-form-section {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: visible;
    background: #fff;
    position: relative;
}
.appt-form-section:focus-within { z-index: 5; }
.appt-form-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--brand-soft);
    font-weight: 700;
    font-size: 14px;
    border-radius: 12px 12px 0 0;
}
.appt-form-section-body { padding: 14px; overflow: visible; }
.appt-form-section-body .position-relative { overflow: visible; }
#appModal .appt-form-modal .search-results { z-index: 1065; }
.appt-form-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.appt-svc-list { display: flex; flex-direction: column; gap: 8px; }
.appt-svc-added {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafafa;
}
.appt-svc-pick-list { max-height: 220px; overflow-y: auto; }
.appt-svc-pick-item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: #fff;
    padding: 10px 12px;
    text-align: left;
}
.appt-svc-pick-item:hover { background: var(--brand-soft); }
.appt-svc-pick-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.appt-svc-pick-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.appt-svc-pick-dur {
    color: var(--muted);
    font-weight: 600;
}
.appt-svc-pick-sep {
    color: #ccc;
    font-weight: 400;
}
.appt-svc-pick-price {
    color: var(--brand);
    font-weight: 800;
}
.appt-svc-pick-item small { color: var(--muted); white-space: nowrap; }

.svc-form-page {
    max-width: 720px;
    margin: 0 auto;
}
.svc-form-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.svc-form-stack { display: flex; flex-direction: column; gap: 16px; }
.svc-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 12px;
}
.svc-staff-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    margin: 0;
    font-weight: 600;
    font-size: 14px;
}
.svc-staff-item:hover { background: var(--brand-soft); border-color: #e8d5d9; }
.svc-staff-item .form-check-input { margin: 0; flex-shrink: 0; }
.nt-phone-intl .nt-phone-cc-picker { flex: 0 0 auto; }
.nt-phone-intl .nt-phone-cc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    min-height: 38px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.nt-phone-intl .nt-phone-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}
.nt-phone-cc-menu { max-height: 240px; overflow-y: auto; min-width: 220px; }
.nt-phone-cc-opt {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nt-phone-cc-opt .nt-phone-flag { margin-right: 2px; }

@media (max-width: 991px) {
    .cust-page-toolbar { grid-template-columns: 1fr; }
    .cust-page-filters { flex-wrap: wrap; justify-content: flex-start; }
    .cust-page-status, .cust-page-birthday { flex: 1 1 calc(50% - 5px); width: auto; }
}

@media (max-width: 1199px) {
    .home-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .home-stat-grid { grid-template-columns: 1fr; }
    .home-open-links { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .app-main { margin-left: 0; }
    .sidebar { transform: translateX(-100%); transition: transform .25s cubic-bezier(.4,0,.2,1); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(2px); z-index: 1039; }
    .content { padding: 18px; }
    .topbar { padding: 0 16px; }
    .appt-toolbar { flex-wrap: wrap; }
    .appt-toolbar-actions { flex-wrap: wrap; width: 100%; justify-content: flex-start; margin-left: 0; }
}

/* ---------- Adisyon Satışı (POS) ---------- */
.pos-sale-page {
    position: relative;
    min-height: calc(100vh - 140px);
    margin: -8px -4px 0;
}
.pos-edit-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.pos-view { min-height: calc(100vh - 140px); }
.pos-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
}
.pos-back-link {
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 600;
}
.pos-sale-page--edit .pos-topbar { gap: 10px; }
.pos-sale-page--edit #btnPickCustomer {
    flex-shrink: 0;
    max-width: min(220px, 32vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pos-customer-locked.btn-brand:disabled,
.pos-customer-locked.btn-brand[disabled] {
    opacity: 1;
    color: #fff !important;
    background: var(--brand);
    border-color: var(--brand);
    cursor: default;
    pointer-events: none;
}
.pos-customer-locked.btn-brand:disabled i,
.pos-customer-locked.btn-brand[disabled] i { color: #fff !important; }
.pos-search-wrap { flex: 1 1 auto; min-width: 0; max-width: none; margin-left: 0; }
.pos-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: flex-start;
    padding-bottom: 96px;
}
.pos-tiles.is-disabled { opacity: .55; pointer-events: none; }
.pos-col-qty { width: 130px; min-width: 130px; }
.pos-col-price { width: 170px; min-width: 170px; }
.pos-cart-body .cart-qty,
.pos-cart-body .cart-price { min-width: 110px; }
.pos-empty-hint {
    width: 100%;
    text-align: center;
    color: var(--text-muted, #6c757d);
    padding: 48px 16px;
    font-size: 15px;
}
.pos-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 168px;
    min-height: 88px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
    text-align: center;
}
.pos-tile:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    transform: translateY(-1px);
}
.pos-tile-name { font-weight: 700; color: var(--text, #212529); font-size: 15px; }
.pos-tile-sep { color: var(--text-muted, #6c757d); font-weight: 500; }
.pos-tile-price { font-weight: 600; color: var(--brand); font-size: 14px; }
.pos-cart-fab {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border: none;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 8px 24px rgba(132,27,39,.35);
    font-weight: 700;
}
.pos-cart-fab:disabled {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
}
.pos-cart-fab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.2);
    font-size: 13px;
}
.pos-cart-fab-total { font-size: 14px; font-weight: 600; }
.pos-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.pos-cart-body {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
}
.pos-cart-summary {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 8px 4px 16px;
    font-size: 18px;
}
.pos-cart-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.pos-cart-footer-left,
.pos-cart-footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .pos-topbar { flex-wrap: wrap; }
    .pos-sale-page--edit #btnPickCustomer { max-width: 100%; }
    .pos-search-wrap { max-width: none; margin-left: 0; flex: 1 1 100%; }
    .pos-tile { min-width: calc(50% - 6px); flex: 1 1 calc(50% - 6px); }
    .pos-cart-fab {
        right: 16px;
        bottom: 16px;
        padding: 10px 14px;
    }
    .pos-cart-fab-label { display: none; }
    .pos-cart-footer-right { width: 100%; justify-content: flex-end; }
}

/* ---------- Kasa dashboard (referans düzen) ---------- */
.kasa-page { animation: fadeUp .35s ease both; }
.kasa-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.kasa-toolbar-dates {
    display: flex;
    align-items: center;
    gap: 8px;
}
.kasa-toolbar-dates .form-control { width: 148px; }

.kasa-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 14px;
    align-items: start;
}
.kasa-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.kasa-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    min-width: 0;
}
.kasa-panel-sales { min-height: 520px; display: flex; flex-direction: column; }
.kasa-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: linear-gradient(180deg, #f8f9fb 0%, #f1f3f6 100%);
    border-bottom: 1px solid var(--border);
}
.kasa-panel-head-sm { padding: 10px 14px; }
.kasa-panel-title {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #3d4654;
    text-transform: uppercase;
}
.kasa-panel-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kasa-filter-select { width: auto; min-width: 118px; font-size: 12px; }
.kasa-panel-body { padding: 0; }
.kasa-panel-summary .kasa-panel-body { padding: 6px 0 8px; min-height: 120px; }
.kasa-sales-scroll { flex: 1; overflow: auto; max-height: calc(100vh - 220px); }

.kasa-sales-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}
.kasa-sales-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 10px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
    text-align: center;
    width: 16.666%;
}
.kasa-sales-table tbody tr:nth-child(even) { background: #fafbfc; }
.kasa-sales-table tbody tr:hover { background: var(--brand-soft); }
.kasa-sales-table td {
    padding: 11px 8px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
    text-align: center;
    width: 16.666%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kasa-sales-table .col-act { overflow: visible; white-space: normal; }
.kasa-time { font-weight: 700; color: #444; font-variant-numeric: tabular-nums; }
.kasa-cust { font-weight: 600; color: #222; }
.kasa-amt { font-weight: 800; color: #222; font-variant-numeric: tabular-nums; }
.kasa-pay-lbl { display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; font-weight: 600; color: #555; }
.kasa-pay-ic { font-size: 14px; opacity: .75; }
.kasa-balance-hint { font-size: 11px; color: #c0392b; font-weight: 600; margin-top: 2px; }
.kasa-view-btn, .kasa-more-btn {
    border: none;
    background: transparent;
    color: #666;
    padding: 2px 6px;
    line-height: 1;
    border-radius: 6px;
    cursor: pointer;
}
.kasa-view-btn:hover, .kasa-more-btn:hover { background: #eef1f5; color: var(--brand); }
.kasa-staff-cell { min-width: 160px; }
.kasa-staff-cell .form-select { font-size: 12px; }
.kasa-view-stats { font-size: 13px; }
.kasa-empty-row, .kasa-empty-panel { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; }

.kasa-sum-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.kasa-sum-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #f0f2f5;
    color: #444;
}
.kasa-sum-table td:first-child { font-weight: 600; }
.kasa-sum-table td:last-child {
    text-align: right;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.kasa-sum-table tr.kasa-sum-highlight td { color: #2563eb; font-size: 13px; }

.kasa-panel-gider .kasa-panel-body { padding: 8px 12px 12px; }
.kasa-panel-gider .kasa-sum-table td { padding-left: 0; padding-right: 0; }

.kasa-exp-list { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.kasa-exp-list-head {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 8px;
}
.kasa-exp-cards { display: flex; flex-direction: column; gap: 6px; }
.kasa-exp-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    background: #f8f9fb;
    border: 1px solid #ececf0;
    border-radius: 10px;
    min-width: 0;
}
.kasa-exp-card-main { min-width: 0; flex: 1; }
.kasa-exp-card-amt { font-size: 14px; font-weight: 800; color: #222; line-height: 1.2; margin-bottom: 2px; }
.kasa-exp-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.3;
}
.kasa-exp-card-cat { font-weight: 600; color: #444; }
.kasa-exp-card-sep { opacity: .5; }
.kasa-exp-card-desc {
    font-size: 11.5px;
    color: #888;
    margin-top: 3px;
    line-height: 1.3;
    word-break: break-word;
}
.kasa-exp-card-side {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.kasa-exp-card-date { font-size: 11px; color: #9ca3af; white-space: nowrap; }
.kasa-exp-actions { display: inline-flex; gap: 4px; }
.kasa-exp-actions .btn-link { color: #6b7280; text-decoration: none; line-height: 1; }
.kasa-exp-actions .btn-link:hover { color: var(--brand); }
.kasa-exp-actions .text-danger:hover { color: #dc3545 !important; }

.modal-kasa-balance { max-width: min(960px, 96vw); width: 100%; }
.modal-kasa-balance .kasa-balance-table { font-size: 13px; }
.modal-kasa-balance .kasa-bal-cust { max-width: 220px; word-break: break-word; }
.modal-kasa-balance .kasa-bal-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}
.modal-kasa-balance .kasa-bal-actions .btn { white-space: nowrap; }

.kasa-bottom-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.kasa-bottom-row .kasa-panel-gider:only-child { grid-column: 1 / -1; }
.kasa-panel-actions { grid-column: auto; }
.kasa-actions-list { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.kasa-action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    background: linear-gradient(145deg, #3d5166, #2f4054);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    transition: filter .18s, transform .18s;
}
.kasa-action-btn:hover { filter: brightness(1.08); color: #fff; transform: translateY(-1px); }
.kasa-action-btn i { opacity: .85; font-size: 14px; }

@media (max-width: 1199px) {
    .kasa-dashboard { grid-template-columns: 1fr; }
    .kasa-sales-scroll { max-height: 420px; }
}
@media (max-width: 767px) {
    .kasa-side { grid-template-columns: 1fr; }
    .kasa-bottom-row { grid-template-columns: 1fr; }
    .kasa-toolbar-dates .form-control { width: 128px; }
    .kasa-sales-table .col-desc { display: none; }
}

/* ---------- Kasa rapor sayfası ---------- */
.kasa-report-page { animation: fadeUp .35s ease both; }
.kasa-report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}
.kasa-report-filters, .kasa-report-export { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kasa-report-filters .form-control, .kasa-report-filters .form-select { width: auto; min-width: 130px; }
.kasa-report-filters .kasa-report-pay-filter { min-width: 168px; }
.kasa-report-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.kasa-report-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}
.kasa-report-stat .lbl { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.kasa-report-stat .val { display: block; font-size: 18px; font-weight: 800; color: #222; }
.kasa-report-section { margin-bottom: 16px; }
.kasa-report-table th, .kasa-report-table td { font-size: 13px; vertical-align: middle; }
.kasa-report-print-head { display: none; margin-bottom: 20px; }
.kasa-report-print-head h1 { font-size: 20px; font-weight: 800; margin: 0 0 4px; }

@media print {
    .sidebar, .topbar, .kasa-report-toolbar, .no-print, .flash-wrap, footer { display: none !important; }
    .content { padding: 0 !important; margin: 0 !important; }
    .kasa-report-print-head { display: block !important; }
    .kasa-report-section { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
    .card-header { background: #f5f5f5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Raporlar hub ---------- */
.reports-hub {
    max-width: 640px;
    margin: 0 auto;
    padding: 4px 0 32px;
}
.reports-hub-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.reports-hub-title {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}
.reports-hub-back {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
}
.reports-hub-back:hover { color: var(--text); }
.reports-hub-search {
    position: relative;
    margin-bottom: 16px;
}
.reports-hub-search .bi-search {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}
.reports-hub-search .form-control {
    border: none;
    border-radius: 999px;
    padding: 12px 16px 12px 44px;
    box-shadow: var(--shadow-sm);
}
.reports-hub-search .form-control:focus {
    box-shadow: 0 0 0 4px var(--ring), var(--shadow-sm);
}
.reports-hub-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.reports-hub-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: background .15s ease, box-shadow .15s ease;
}
.reports-hub-item:hover {
    background: #fafbfc;
    box-shadow: var(--shadow-md);
    color: inherit;
}
.reports-hub-item-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}
.reports-hub-item-desc {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}
.reports-hub-item-body { flex: 1; min-width: 0; }
.reports-hub-item-chevron {
    flex-shrink: 0;
    font-size: 18px;
    color: #c4c4c4;
}

/* Alt rapor sayfaları */
.report-sub-page { animation: fadeUp .35s ease both; }
.report-sub-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 18px;
}
.report-sub-back {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
}
.report-sub-back:hover { color: var(--text); }
.report-sub-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    flex: 1 1 auto;
}
.report-sub-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}
.report-sub-filters .form-control { width: auto; min-width: 130px; }
.report-sub-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.report-stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}
.report-stat-card .lbl {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.report-stat-card .val {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}
.report-sub-tabs .nav-link {
    font-weight: 700;
    font-size: 13px;
    color: var(--muted);
}
.report-sub-tabs .nav-link.active {
    color: var(--brand);
}

/* Satış raporu */
.report-sales-page {
    animation: fadeUp .35s ease both;
    max-width: 1200px;
    margin: 0 auto;
}
.report-sales-toolbar {
    margin-bottom: 20px;
}
.report-sales-toolbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.report-sales-toolbar-main {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}
.report-sales-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.02em;
}
.report-sales-period {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}
.report-sales-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.report-sales-filters .form-control { width: auto; min-width: 140px; }
.report-sales-filter-sep { color: var(--muted); font-weight: 600; }
.report-sales-print-head {
    display: none;
    margin-bottom: 20px;
}
.report-sales-print-head h1 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 4px;
}
.report-sales-kpi {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.report-sales-kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform .15s, box-shadow .15s;
}
.report-sales-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.report-sales-kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 20px;
    flex-shrink: 0;
    background: linear-gradient(145deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 6px 14px var(--brand-glow);
}
.report-sales-kpi-card--in .report-sales-kpi-icon {
    background: linear-gradient(145deg, #16a34a, #22c55e);
    box-shadow: 0 6px 14px rgba(22, 163, 74, .25);
}
.report-sales-kpi-card--out .report-sales-kpi-icon {
    background: linear-gradient(145deg, #dc2626, #ef4444);
    box-shadow: 0 6px 14px rgba(220, 38, 38, .22);
}
.report-sales-kpi-card--net {
    background: linear-gradient(135deg, var(--brand-soft) 0%, #fff 100%);
    border-color: color-mix(in srgb, var(--brand) 18%, var(--border));
}
.report-sales-kpi-card--net .report-sales-kpi-icon {
    background: linear-gradient(145deg, var(--brand-dark), var(--brand));
}
.report-sales-kpi-card--net .report-sales-kpi-val {
    color: var(--brand);
}
.report-sales-kpi-val {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--text);
}
.report-sales-kpi-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-top: 3px;
}
.report-sales-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
}
.report-sales-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%);
    border-bottom: 1px solid var(--border);
}
.report-sales-panel-head i {
    color: var(--brand);
}
.report-sales-panel-body {
    padding: 16px 18px 18px;
}
.report-sales-chart-wrap {
    min-height: 220px;
    position: relative;
}
.report-sales-donut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}
.report-sales-chart-empty {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    padding: 48px 16px;
}
.report-sales-table thead th {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    background: #fafbfc;
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
}
.report-sales-table tbody td {
    padding: 11px 14px;
    font-size: 13px;
    vertical-align: middle;
}
.report-sales-table tbody tr:hover {
    background: var(--brand-soft);
}
.report-sales-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: var(--brand-soft);
    color: var(--brand);
}
.report-sales-charts {
    margin-bottom: 16px;
}

@media print {
    .report-sales-toolbar.no-print { display: none !important; }
    .report-sales-print-head { display: block !important; }
    .report-sales-page { max-width: none; }
    .report-sales-panel { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}

@media (max-width: 767px) {
    .report-sales-toolbar-main { flex-direction: column; align-items: stretch; }
    .report-sales-filters .form-control { flex: 1; min-width: 0; }
    .report-sales-kpi { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .report-sales-kpi { grid-template-columns: 1fr; }
}
