/* ==========================================================================
   PERSONEL TK — Arayüz stilleri (Bootstrap 5 üzerine)
   ========================================================================== */

:root {
    --ptk-primary: #1d4ed8;
    --ptk-primary-rgb: 29, 78, 216;
    --ptk-sidebar-bg: #0f1b2d;
    --ptk-sidebar-hover: #16263d;
    --ptk-sidebar-text: #a9b6c8;
    --ptk-sidebar-active: #ffffff;
    --ptk-body-bg: #f3f5f9;
    --ptk-border: #e4e8ef;
    --ptk-text-muted: #6b7686;
    --ptk-sidebar-width: 260px;
    --ptk-topbar-height: 68px;
    --ptk-radius: .65rem;

    --bs-primary: var(--ptk-primary);
    --bs-primary-rgb: var(--ptk-primary-rgb);
    --bs-link-color: var(--ptk-primary);
    --bs-link-color-rgb: var(--ptk-primary-rgb);
    --bs-body-font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-size: .925rem;
    --bs-body-color: #1f2937;
    --bs-border-color: var(--ptk-border);
}

.btn-primary {
    --bs-btn-bg: var(--ptk-primary);
    --bs-btn-border-color: var(--ptk-primary);
    --bs-btn-hover-bg: #1e40af;
    --bs-btn-hover-border-color: #1e40af;
    --bs-btn-active-bg: #1e3a8a;
    --bs-btn-active-border-color: #1e3a8a;
    --bs-btn-disabled-bg: var(--ptk-primary);
    --bs-btn-disabled-border-color: var(--ptk-primary);
}
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: rgba(var(--ptk-primary-rgb), .5);
    box-shadow: 0 0 0 .2rem rgba(var(--ptk-primary-rgb), .15);
}
.form-check-input:checked { background-color: var(--ptk-primary); border-color: var(--ptk-primary); }
.min-w-0 { min-width: 0; }

/* ---------- Uygulama iskeleti ---------- */
.app-body { background: var(--ptk-body-bg); }
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--ptk-sidebar-width);
    background: var(--ptk-sidebar-bg);
    color: var(--ptk-sidebar-text);
    position: fixed; inset: 0 auto 0 0;
    display: flex; flex-direction: column;
    z-index: 1040;
    transition: transform .25s ease;
}
.sidebar-brand {
    height: var(--ptk-topbar-height);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-mark {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.brand-mark-lg { width: 44px; height: 44px; font-size: 1.4rem; border-radius: 11px; }
.brand-text { color: #fff; font-weight: 600; letter-spacing: .02em; }
.sidebar-close { color: var(--ptk-sidebar-text); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem .75rem 1.5rem; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }

.nav-link-item {
    display: flex; align-items: center; gap: .75rem; width: 100%;
    padding: .6rem .8rem; margin-bottom: 2px;
    color: var(--ptk-sidebar-text); text-decoration: none;
    border: 0; background: transparent; border-radius: .5rem;
    font-size: .9rem; text-align: left;
}
.nav-link-item > .bi:first-child { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.nav-link-item:hover { background: var(--ptk-sidebar-hover); color: #fff; }
.nav-link-item.active { background: var(--ptk-primary); color: var(--ptk-sidebar-active); }
.nav-toggle .chevron { margin-left: auto; font-size: .7rem; transition: transform .2s; }
.nav-toggle.collapsed .chevron { transform: rotate(-90deg); }
.nav-toggle .badge-soon + .chevron { margin-left: .4rem; }
.badge-soon {
    margin-left: auto; font-size: .62rem; padding: .15rem .4rem; border-radius: 1rem;
    background: rgba(255,255,255,.08); color: #8391a7; text-transform: uppercase; letter-spacing: .04em;
}
.nav-group.is-soon > .nav-toggle { opacity: .75; }
.nav-sub-item {
    display: block; padding: .45rem .8rem .45rem 2.75rem; margin-bottom: 1px;
    color: var(--ptk-sidebar-text); text-decoration: none; font-size: .85rem; border-radius: .45rem;
}
.nav-sub-item:hover { color: #fff; background: var(--ptk-sidebar-hover); }
.nav-sub-item.active { color: #fff; background: rgba(var(--ptk-primary-rgb), .35); }
.nav-sub-item.disabled { opacity: .45; cursor: not-allowed; }
.nav-sub-item.disabled:hover { background: transparent; color: var(--ptk-sidebar-text); }

.app-main { flex: 1; margin-left: var(--ptk-sidebar-width); display: flex; flex-direction: column; min-width: 0; }

.app-topbar {
    height: var(--ptk-topbar-height);
    background: #fff; border-bottom: 1px solid var(--ptk-border);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0 1.5rem; position: sticky; top: 0; z-index: 1030;
}
.page-title { font-size: 1.15rem; font-weight: 600; margin: 0; }
.breadcrumb { --bs-breadcrumb-divider-color: #9aa5b5; font-size: .75rem; }
.breadcrumb a { color: var(--ptk-text-muted); text-decoration: none; }
.breadcrumb-item.active, .breadcrumb-item { color: #9aa5b5; }
.topbar-date { color: var(--ptk-text-muted); font-size: .82rem; margin-right: .5rem; }
.btn-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; padding: 0; border: 0; }
.user-menu { display: flex; align-items: center; gap: .6rem; border: 0; padding: .25rem .5rem; border-radius: .6rem; }
.user-menu:hover, .user-menu.show { background: #f1f4f8; }
.user-menu::after { margin-left: .25rem; color: #9aa5b5; }

.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(var(--ptk-primary-rgb), .12); color: var(--ptk-primary);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .85rem; flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar-xl { width: 84px; height: 84px; font-size: 2rem; display: flex; }

.app-content { flex: 1; padding: 1.5rem; }
.app-footer {
    display: flex; justify-content: space-between; padding: .9rem 1.5rem;
    font-size: .78rem; color: var(--ptk-text-muted); border-top: 1px solid var(--ptk-border); background: #fff;
}
.app-backdrop { display: none; }

/* ---------- Kartlar ---------- */
.card { border: 1px solid var(--ptk-border); border-radius: var(--ptk-radius); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--ptk-border); font-weight: 600; padding: .9rem 1.25rem; }
.card-header:first-child { border-radius: var(--ptk-radius) var(--ptk-radius) 0 0; }
.card-footer { background: #fff; border-top: 1px solid var(--ptk-border); padding: .75rem 1.25rem; }

.welcome-card {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 1.4rem 1.6rem; border-radius: var(--ptk-radius); color: #fff;
    background: linear-gradient(120deg, #0f1b2d 0%, #1d3a6e 60%, #1d4ed8 100%);
}

.stat-card {
    display: flex; align-items: center; gap: 1rem; height: 100%;
    background: #fff; border: 1px solid var(--ptk-border); border-radius: var(--ptk-radius); padding: 1.1rem 1.2rem;
}
.stat-card.compact { padding: .85rem 1rem; }
.stat-card.is-pending .stat-value { color: #c3cad5; }
.stat-icon {
    width: 46px; height: 46px; border-radius: .7rem; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.stat-card.compact .stat-icon { width: 38px; height: 38px; font-size: 1.05rem; }
.stat-label { color: var(--ptk-text-muted); font-size: .8rem; }
.stat-value { font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.stat-card.compact .stat-value { font-size: 1.2rem; }
.tone-primary { background: #e8efff; color: #1d4ed8; }
.tone-success { background: #e6f6ee; color: #15803d; }
.tone-info { background: #e5f5fb; color: #0e7490; }
.tone-warning { background: #fff4e0; color: #b45309; }
.tone-danger { background: #fdecec; color: #b91c1c; }
.tone-secondary { background: #eef0f4; color: #4b5563; }

.mini-stat { padding: .75rem .25rem; border-radius: .6rem; background: #f7f9fc; }
.mini-value { font-size: 1.4rem; font-weight: 600; }
.mini-label { font-size: .75rem; color: var(--ptk-text-muted); }

.roadmap li { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-bottom: 1px dashed var(--ptk-border); color: var(--ptk-text-muted); }
.roadmap li:last-child { border-bottom: 0; }
.roadmap li .bi { color: #c3cad5; }
.roadmap li.done { color: #1f2937; font-weight: 500; }
.roadmap li.done .bi { color: #16a34a; }

/* ---------- Tablolar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.toolbar-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; flex: 1; }
.search-box { max-width: 320px; min-width: 200px; flex: 1; }
.data-table thead th {
    background: #f8fafc; color: var(--ptk-text-muted); font-weight: 600; font-size: .75rem;
    text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--ptk-border); white-space: nowrap; padding: .75rem 1rem;
}
.data-table td { padding: .7rem 1rem; border-color: #eef1f5; }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable::after { content: "\F127"; font-family: "bootstrap-icons"; margin-left: .35rem; opacity: .35; font-size: .7rem; }
.data-table th.sort-asc::after { content: "\F235"; opacity: .9; }
.data-table th.sort-desc::after { content: "\F229"; opacity: .9; }
.status-dot { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 500; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pagination { --bs-pagination-active-bg: var(--ptk-primary); --bs-pagination-active-border-color: var(--ptk-primary); --bs-pagination-color: #374151; }

/* ---------- Roller ve yetkiler ---------- */
.role-badge { background: #eef3ff; color: #1e40af; font-weight: 500; border: 1px solid #dbe5ff; }
.role-badge.is-passive { background: #f1f3f6; color: #6b7686; border-color: #e4e8ef; text-decoration: line-through; }
.role-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.role-option {
    display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .75rem; margin: 0;
    border: 1px solid var(--ptk-border); border-radius: .55rem; cursor: pointer; background: #fff;
}
.role-option:has(input:checked) { border-color: rgba(var(--ptk-primary-rgb), .45); background: #f5f8ff; }
.role-option.is-disabled { cursor: not-allowed; opacity: .65; }
.role-option .form-check-input { margin-top: .2rem; flex-shrink: 0; }

.permission-matrix thead th {
    background: #f8fafc; color: var(--ptk-text-muted); font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; padding: .65rem .9rem;
}
.permission-matrix td { padding: .65rem .9rem; border-color: #eef1f5; }
.permission-matrix .form-check-input { width: 1.15em; height: 1.15em; cursor: pointer; }
.permission-matrix .form-check-input:disabled { cursor: not-allowed; }
.permission-matrix tr.matrix-menu td {
    background: #f3f6fb; color: #475467; font-size: .78rem; font-weight: 600; padding: .45rem .9rem;
}

/* ---------- Organizasyon ağacı ---------- */
.org-tree ul { list-style: none; margin: 0; padding-left: 1.4rem; position: relative; }
.org-tree > ul { padding-left: 0; }
.org-tree ul ul::before { content: ""; position: absolute; left: .55rem; top: 0; bottom: .9rem; border-left: 1px dashed #c9d2df; }
.org-tree li { position: relative; }
.org-tree ul ul > li::before { content: ""; position: absolute; left: -.85rem; top: 1.05rem; width: .75rem; border-top: 1px dashed #c9d2df; }
.org-node {
    display: flex; flex-wrap: wrap; align-items: center; padding: .45rem .7rem; margin: .25rem 0;
    border: 1px solid var(--ptk-border); border-radius: .55rem; background: #fff;
}
.org-node:hover { border-color: rgba(var(--ptk-primary-rgb), .35); background: #f8faff; }
.org-node.is-passive { opacity: .6; }
.org-node-actions { margin-left: auto; opacity: .5; }
.org-node:hover .org-node-actions { opacity: 1; }
.org-tree-company { font-weight: 600; color: #475467; margin-bottom: .5rem; }

/* ---------- Personel ---------- */
.avatar-photo { object-fit: cover; padding: 0; background: #eef1f5; }
.photo-box {
    width: 140px; height: 140px; border-radius: 1rem; overflow: hidden; background: #eef3ff; color: #93a4c3;
    display: flex; align-items: center; justify-content: center; font-size: 3.5rem; border: 1px solid var(--ptk-border);
}
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-box-sm { width: 84px; height: 84px; font-size: 1.8rem; font-weight: 600; color: var(--ptk-primary); }
.info-row { display: flex; gap: 1rem; padding: .5rem 0; border-bottom: 1px dashed #eef1f5; }
.info-row:last-child { border-bottom: 0; }
.info-label { width: 38%; flex-shrink: 0; color: var(--ptk-text-muted); font-size: .85rem; }
.info-value { flex: 1; min-width: 0; word-break: break-word; }
.row-link { cursor: pointer; }
.nav-tabs .nav-link { color: var(--ptk-text-muted); white-space: nowrap; }
.nav-tabs .nav-link.active { color: var(--ptk-primary); font-weight: 600; }
.tab-error { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #dc3545; vertical-align: middle; }

/* ---------- Gruplar ---------- */
.color-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: middle; }
.group-icon { width: 48px; height: 48px; border-radius: .8rem; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.35rem; }
.group-badge { display: inline-block; padding: .2rem .6rem; border-radius: 1rem; font-size: .8rem; font-weight: 500; text-decoration: none; }
.add-member-list { max-height: 50vh; overflow-y: auto; }
.swatch-blue { background: #2563eb; } .swatch-blue-soft { background: #e8efff; color: #1e40af; }
.swatch-green { background: #16a34a; } .swatch-green-soft { background: #e6f6ee; color: #166534; }
.swatch-orange { background: #ea580c; } .swatch-orange-soft { background: #fff1e6; color: #9a3412; }
.swatch-purple { background: #7c3aed; } .swatch-purple-soft { background: #f1eafe; color: #5b21b6; }
.swatch-red { background: #dc2626; } .swatch-red-soft { background: #fdecec; color: #991b1b; }
.swatch-teal { background: #0d9488; } .swatch-teal-soft { background: #e2f6f4; color: #115e59; }
.swatch-pink { background: #db2777; } .swatch-pink-soft { background: #fdeaf3; color: #9d174d; }
.swatch-gray { background: #6b7280; } .swatch-gray-soft { background: #eef0f4; color: #374151; }

/* ---------- Giriş / kurulum ---------- */
.guest-body { background: #fff; }
.auth-wrapper { display: flex; min-height: 100vh; }
.auth-side {
    width: 44%; max-width: 560px; flex-direction: column; justify-content: space-between; padding: 3rem;
    background: radial-gradient(circle at 20% 20%, #1d3a6e 0%, #0f1b2d 60%);
}
.auth-features li { display: flex; gap: .6rem; margin-bottom: .6rem; }
.auth-features .bi { color: #60a5fa; }
.auth-form-area { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: #f7f9fc; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--ptk-border); border-radius: 1rem; padding: 2.25rem 2rem; box-shadow: 0 10px 30px rgba(15,27,45,.06); }

.install-wrapper { min-height: 100vh; display: flex; justify-content: center; padding: 2.5rem 1rem; background: #f3f5f9; }
.install-card { width: 100%; max-width: 680px; background: #fff; border: 1px solid var(--ptk-border); border-radius: 1rem; padding: 2rem; align-self: flex-start; }
.section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ptk-text-muted); margin-bottom: .75rem; }
.requirements li { padding: .2rem 0; }

.error-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f3f5f9; padding: 1rem; }
.error-code { font-size: 5rem; font-weight: 700; color: rgba(var(--ptk-primary-rgb), .18); line-height: 1; margin-bottom: .5rem; }

.confirm-icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto; background: #fdecec; color: #dc2626; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.toast-container { z-index: 1090; }

/* ---------- Çalışma sistemleri ---------- */
.color-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 12px; display: inline-block; }
.color-pick { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ptk-border); cursor: pointer; padding: 0; }
.color-pick.active { box-shadow: 0 0 0 2px var(--ptk-primary, #2563eb); }
.week-strip { display: inline-flex; gap: 3px; }
.week-strip .wd { width: 30px; text-align: center; font-size: .68rem; font-weight: 600; padding: .2rem 0; border-radius: .35rem; background: #eef0f4; color: #9aa3b2; }
.week-strip .wd.on { background: #e8efff; color: #1e40af; }
.week-strip .wd.night { background: #1f2a44; color: #fff; }
.type-option { display: block; height: 100%; }
.type-card { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: .8rem .9rem; border: 1px solid var(--ptk-border); border-radius: .7rem; cursor: pointer; transition: border-color .15s, background .15s; }
.type-card i { font-size: 1.2rem; color: var(--ptk-text-muted); }
.type-card small { color: var(--ptk-text-muted); line-height: 1.3; }
.btn-check:checked + .type-card { border-color: var(--ptk-primary, #2563eb); background: rgba(var(--ptk-primary-rgb), .06); }
.btn-check:checked + .type-card i { color: var(--ptk-primary, #2563eb); }
.btn-check:focus-visible + .type-card { box-shadow: 0 0 0 .2rem rgba(var(--ptk-primary-rgb), .25); }
.days-table td, .days-table th { padding: .45rem .5rem; }
.days-table thead th { font-size: .75rem; color: var(--ptk-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.days-table tr.off td:not(:first-child) { opacity: .45; }
.days-table tr.invalid td { background: #fdf2f2; }
.days-table .day-error td { border: 0; }
.days-table input[type=time] { min-width: 105px; }
.days-table input[type=number] { min-width: 70px; }
.schedule-summary { position: sticky; top: 84px; }
.preview-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.pv-day { border: 1px solid var(--ptk-border); border-radius: .55rem; padding: .4rem .45rem; min-height: 72px; font-size: .75rem; background: #fff; }
.pv-day.off { background: #f6f7f9; }
.pv-day.today { border-color: var(--ptk-primary, #2563eb); box-shadow: inset 0 0 0 1px var(--ptk-primary, #2563eb); }
.pv-head { display: flex; justify-content: space-between; color: var(--ptk-text-muted); font-weight: 600; margin-bottom: .25rem; }
.pv-time { font-weight: 600; line-height: 1.2; }
.pv-sub { color: var(--ptk-text-muted); }
.kv dt { font-weight: 500; color: var(--ptk-text-muted); margin-bottom: .4rem; }
.kv dd { margin-bottom: .4rem; }
.nav-sm .nav-link { padding: .3rem .8rem; font-size: .85rem; }
.schedule-now { border-left: 4px solid var(--ptk-primary, #2563eb); padding-left: .75rem; }
@media (max-width: 1199.98px) { .schedule-summary { position: static; } }
@media (max-width: 575.98px) {
    .preview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .days-table thead { display: none; }
    .days-table, .days-table tbody { display: block; }
    .days-table tr[data-day] { display: grid; grid-template-columns: 1fr 1fr 76px; gap: .4rem; padding: .6rem 0; border-bottom: 1px solid var(--ptk-border); }
    .days-table tr[data-day] td { border: 0; padding: 0; }
    .days-table tr[data-day] td:first-child { grid-column: 1 / 3; grid-row: 1; }
    .days-table tr[data-day] td[data-net] { grid-column: 3; grid-row: 1; align-self: center; }
    .days-table tr.day-error { display: block; }
    .days-table input[type=time], .days-table input[type=number] { min-width: 0; }
}

/* ---------- Vardiya ---------- */
.d-contents { display: contents; }
.shift-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 .3rem; border-radius: .35rem; color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .02em; line-height: 1; }
.shift-pill.off { background: #e5e7eb; color: #4b5563; }
.rotation-strip { display: flex; flex-wrap: wrap; gap: 3px; }
.brush { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--ptk-border); background: #fff; border-radius: .5rem; padding: .25rem .55rem; font-size: .85rem; cursor: pointer; }
.brush:hover { border-color: #b8c2d3; }
.brush.active { border-color: var(--ptk-primary); box-shadow: 0 0 0 2px rgba(var(--ptk-primary-rgb), .2); background: rgba(var(--ptk-primary-rgb), .05); }
.rotation-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: .35rem; }
.rot-day { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .35rem 0; border: 1px solid var(--ptk-border); border-radius: .5rem; background: #fff; }
.rot-day.focus { border-color: var(--ptk-primary); box-shadow: 0 0 0 2px rgba(var(--ptk-primary-rgb), .25); }
.rot-idx { font-size: .68rem; color: var(--ptk-text-muted); }
.rot-prev { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: .65rem; color: var(--ptk-text-muted); }

.plan-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; }
.plan-palette { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; padding: .6rem 1rem; background: #fafbfc; }
.plan-alert { padding: .5rem 1rem; background: #fef2f2; border-bottom: 1px solid #fecaca; }
.plan-scroll { overflow: auto; max-height: calc(100vh - 290px); min-height: 280px; }
.plan-grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .8rem; }
.plan-grid th, .plan-grid td { border-bottom: 1px solid var(--ptk-border); border-right: 1px solid #eef0f4; }
.plan-grid thead th { position: sticky; top: 0; z-index: 3; background: #f8f9fb; font-weight: 600; }
.plan-grid .pe-col { position: sticky; left: 0; z-index: 2; background: #fff; min-width: 230px; max-width: 260px; padding: .4rem .6rem; font-weight: 400; text-align: left; }
.plan-grid thead .pe-col { z-index: 4; background: #f8f9fb; font-weight: 600; }
.plan-grid .pd { min-width: 44px; text-align: center; padding: .3rem .1rem; line-height: 1.1; }
.plan-grid .pd span { display: block; font-size: .66rem; color: var(--ptk-text-muted); font-weight: 500; }
.plan-grid .pd.we { background: #f1f3f7; }
.plan-grid .pd.today { background: rgba(var(--ptk-primary-rgb), .1); color: var(--ptk-primary); }
.plan-grid .pt { position: sticky; right: 0; background: #fff; min-width: 78px; text-align: right; padding: .3rem .6rem; font-size: .72rem; line-height: 1.25; }
.plan-grid thead .pt { background: #f8f9fb; z-index: 3; }
.pc { height: 46px; text-align: center; vertical-align: middle; padding: 2px; cursor: pointer; position: relative; user-select: none; }
.pc:hover { background: #f4f7ff; }
.pc.schedule { background: #fcfcfd; }
.pc.needs { background: repeating-linear-gradient(45deg, #fff7ed, #fff7ed 4px, #fff 4px, #fff 8px); }
.pc.out { background: #f3f4f6; cursor: not-allowed; }
.pc.warn::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: #dc2626; }
.pc.has-note::before { content: ""; position: absolute; left: 0; top: 0; border-top: 7px solid #f59e0b; border-right: 7px solid transparent; }
.pc.painted { outline: 2px solid var(--ptk-primary); outline-offset: -2px; }
.pc-time { font-size: .62rem; color: #8a94a6; line-height: 1.15; }
.pc-hint { color: #9aa3b2; font-weight: 600; }
.painting .pc { cursor: crosshair; touch-action: none; }
.legend-box { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: .35rem; border: 1px solid var(--ptk-border); }
.legend-box.planned { background: #2563eb; border-color: #2563eb; }
.legend-box.schedule { background: #fcfcfd; }
.legend-box.needs { background: repeating-linear-gradient(45deg, #fed7aa, #fed7aa 3px, #fff 3px, #fff 6px); }
.legend-box.warn { background: #fff; position: relative; box-shadow: inset -4px 4px 0 -1px #dc2626; }
.legend-box.out { background: #e5e7eb; }
.week-plan { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.week-plan .wp { border: 1px solid var(--ptk-border); border-radius: .45rem; padding: .3rem .2rem; text-align: center; font-size: .7rem; line-height: 1.2; }
.week-plan .wp.today { border-color: var(--ptk-primary); }
.week-plan .wp.warn { border-color: #dc2626; }
.week-plan .wp small { display: block; color: var(--ptk-text-muted); }
@media (max-width: 575.98px) {
    .plan-grid .pe-col { min-width: 150px; max-width: 160px; }
    .plan-grid .pe-col .avatar { display: none; }
    .plan-grid .pt { position: static; }
    .plan-scroll { max-height: none; }
}

/* ---------- Giriş-çıkış ---------- */
.event-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .4rem; border: 1px solid var(--ptk-border); border-radius: .4rem; font-size: .75rem; background: #fff; white-space: nowrap; }
.event-chip.dup { opacity: .45; text-decoration: line-through; }
tr.voided td { color: #9aa3b2; }
tr.voided td:first-child { text-decoration: line-through; }
.emp-suggest { position: absolute; z-index: 10; max-height: 260px; overflow-y: auto; box-shadow: 0 8px 24px rgba(15,27,45,.12); width: calc(100% - 2rem); }
[data-employee-wrap] { position: relative; }
.kpi-filter { cursor: pointer; transition: box-shadow .15s; }
.kpi-filter:hover { box-shadow: 0 0 0 2px rgba(var(--ptk-primary-rgb), .25); }
.att-days .att-day { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px dashed var(--ptk-border); font-size: .85rem; }
.att-days .att-day:last-child { border-bottom: 0; }
.att-days .att-date { width: 64px; flex: 0 0 64px; color: var(--ptk-text-muted); font-size: .75rem; line-height: 1.15; }

/* ---------- Puantaj ---------- */
.ts-code { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 .25rem; border-radius: .35rem; font-size: .7rem; font-weight: 700; }
.ts-code.tone-success { background: #dcfce7; color: #166534; }
.ts-code.tone-warning { background: #fef3c7; color: #92400e; }
.ts-code.tone-danger { background: #fee2e2; color: #991b1b; }
.ts-code.tone-info { background: #cffafe; color: #155e75; }
.ts-code.tone-primary { background: #dbeafe; color: #1e40af; }
.ts-code.tone-secondary { background: #eef0f4; color: #4b5563; }
.ts-code.tone-dark { background: #374151; color: #fff; }
.ts-code.tone-light { background: transparent; color: #9aa3b2; }
.ts-grid .pd { min-width: 34px; }
.ts-grid .pc { height: 38px; }
.ts-grid td.has-ot { box-shadow: inset 0 -3px 0 #16a34a; }
.ts-grid .ts-tot { min-width: 62px; text-align: right; padding: .3rem .5rem; font-size: .75rem; background: #fafbfc; }
.ts-grid thead .ts-tot { position: sticky; top: 0; z-index: 3; background: #f8f9fb; line-height: 1.1; }
.ts-kpis { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: .7rem 1rem; background: #fafbfc; }
.ts-kpi { display: flex; flex-direction: column; font-size: .75rem; color: var(--ptk-text-muted); }
.ts-kpi strong { font-size: 1rem; color: var(--ptk-text, #111827); }

/* ---------- İzin ---------- */
.leave-preview { border: 1px dashed var(--ptk-border); border-radius: .6rem; padding: .6rem .75rem; min-height: 100%; background: #fafbfc; }
.leave-preview .leave-days { font-size: 1.25rem; line-height: 1.2; }
.leave-stats { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.leave-stats div { display: flex; flex-direction: column; font-size: .75rem; color: var(--ptk-text-muted); }
.leave-stats strong { font-size: 1.1rem; color: var(--ptk-text, #111827); }

/* ---------- QR ---------- */
.qr-preview { display: flex; justify-content: center; }
.qr-preview svg { width: 100%; max-width: 280px; height: auto; border-radius: .5rem; box-shadow: 0 0 0 1px var(--ptk-border); }
.qr-preview-sm svg { max-width: 200px; }
.enroll-code { font: 700 1.9rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em; color: #1d4ed8; }

/* Personel telefonu */
.qr-body { background: linear-gradient(180deg, #0f1b2d 0, #0f1b2d 190px, #f3f5f9 190px); min-height: 100vh; }
.qr-mobile { max-width: 440px; margin: 0 auto; padding: 1rem 1rem 2rem; }
.qr-brand { color: #fff; font-weight: 700; letter-spacing: .04em; padding: .5rem .25rem 1rem; }
.qr-brand .bi { color: #60a5fa; }
.qr-card { background: #fff; border-radius: 1rem; box-shadow: 0 10px 30px rgba(15,27,45,.12); padding: 1.25rem; }
.qr-point { display: flex; gap: .75rem; align-items: center; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--ptk-border, #e5e7eb); }
.qr-point-icon { width: 44px; height: 44px; border-radius: .75rem; display: grid; place-items: center; background: #e8efff; color: #1d4ed8; font-size: 1.3rem; flex-shrink: 0; }
.qr-employee { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.qr-avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #1d4ed8; color: #fff; font-weight: 700; flex-shrink: 0; }
.qr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.qr-actions:has(.qr-btn.d-none) { grid-template-columns: 1fr; }
.qr-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 120px; border-radius: 1rem;
    border: 2px solid var(--ptk-border, #e5e7eb); background: #fff; font-size: 1.15rem; font-weight: 600; color: #374151; transition: transform .08s; }
.qr-btn .bi { font-size: 2rem; }
.qr-btn:active { transform: scale(.97); }
.qr-btn[data-dir="in"].is-suggested { background: #16a34a; border-color: #16a34a; color: #fff; }
.qr-btn[data-dir="out"].is-suggested { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.qr-btn.is-busy { opacity: .7; }
.qr-btn:disabled { opacity: .45; }
.qr-result-icon { font-size: 4rem; line-height: 1; margin-bottom: .75rem; }
.qr-clock { font: 700 2.5rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #0f1b2d; }
.qr-code-input { letter-spacing: .15em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.qr-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .75rem .25rem; }

/* Kiosk */
.kiosk-body { background: #0b1422; color: #fff; min-height: 100vh; overflow: hidden; }
.kiosk { min-height: 100vh; display: flex; flex-direction: column; padding: 2vh 3vw; }
.kiosk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; padding-bottom: 2vh; border-bottom: 1px solid rgba(255,255,255,.1); }
.kiosk-company { color: #93c5fd; font-size: clamp(.9rem, 1.6vw, 1.2rem); }
.kiosk-title { font-size: clamp(1.4rem, 3.4vw, 2.6rem); font-weight: 700; margin: 0; }
.kiosk-clock { font: 700 clamp(2rem, 5vw, 3.6rem)/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.kiosk-date { color: rgba(255,255,255,.6); font-size: clamp(.8rem, 1.4vw, 1rem); }
.kiosk-body-grid { flex: 1; display: grid; grid-template-columns: 1fr minmax(220px, 26vw); gap: 3vw; align-items: center; padding-top: 2vh; }
.kiosk-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.kiosk-qr { width: min(62vh, 52vw); aspect-ratio: 1; background: #fff; border-radius: 1.25rem; padding: .75rem; display: grid; place-items: center; }
.kiosk-qr svg { width: 100%; height: 100%; }
.kiosk-progress { width: min(62vh, 52vw); height: 6px; background: rgba(255,255,255,.12); border-radius: 3px; overflow: hidden; }
.kiosk-progress div { height: 100%; background: #60a5fa; transition: width .25s linear; }
.kiosk-hint { max-width: min(62vh, 52vw); text-align: center; color: rgba(255,255,255,.8); font-size: clamp(.9rem, 1.6vw, 1.15rem); }
.kiosk-side { background: rgba(255,255,255,.05); border-radius: 1rem; padding: 1.25rem; align-self: stretch; }
.kiosk-side-title { color: rgba(255,255,255,.6); text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; margin-bottom: .75rem; }
.kiosk-recent { list-style: none; padding: 0; margin: 0; }
.kiosk-recent li { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 1.05rem; }
.kiosk-dir { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.kiosk-dir.in { background: rgba(22,163,74,.25); color: #4ade80; }
.kiosk-dir.out { background: rgba(29,78,216,.3); color: #93c5fd; }
.kiosk-off { color: #374151; text-align: center; padding: 2rem; }
.kiosk-off .bi { font-size: 3rem; display: block; margin-bottom: .5rem; }
.kiosk-error { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: #b91c1c; padding: .5rem 1rem; border-radius: .5rem; }
.kiosk-fs { position: fixed; right: 1rem; bottom: 1rem; background: rgba(255,255,255,.08); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 50%; }
@media (max-width: 767.98px), (orientation: portrait) {
    .kiosk-body { overflow: auto; }
    .kiosk-body-grid { grid-template-columns: 1fr; }
    .kiosk-qr, .kiosk-progress, .kiosk-hint { width: min(86vw, 60vh); max-width: min(86vw, 60vh); }
}

/* Afiş */
.qr-print-body { background: #eef1f6; }
.qr-print-toolbar { display: flex; justify-content: space-between; padding: .75rem 1rem; background: #fff; border-bottom: 1px solid #e5e7eb; }
.qr-poster { width: 190mm; max-width: calc(100% - 2rem); margin: 1.5rem auto; background: #fff; padding: 14mm 16mm; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.qr-poster-company { color: #475569; font-size: 1.1rem; }
.qr-poster-title { font-size: 2.2rem; font-weight: 800; margin: .25rem 0; }
.qr-poster-sub { display: inline-block; background: #0f1b2d; color: #fff; padding: .2rem 1rem; border-radius: 2rem; letter-spacing: .15em; font-weight: 700; }
.qr-poster-code { width: 120mm; max-width: 100%; margin: 8mm auto 6mm; }
.qr-poster-code svg { width: 100%; height: auto; }
.qr-poster-steps { text-align: left; max-width: 140mm; margin: 0 auto; font-size: 1.05rem; line-height: 1.7; }
.qr-poster-foot { margin-top: 8mm; color: #94a3b8; font-size: .85rem; }
.qr-poster-disabled { opacity: .35; }
@media print {
    .no-print { display: none !important; }
    .qr-print-body { background: #fff; }
    .qr-poster { box-shadow: none; margin: 0 auto; width: auto; max-width: none; }
    @page { size: A4; margin: 12mm; }
}

/* ---------- Cihazlar ---------- */
.dev-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; background: #9ca3af; }
.dev-dot.dev-online { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.dev-dot.dev-offline { background: #dc2626; }
.dev-dot.dev-file { background: #0891b2; }
.dev-card { border-left: 4px solid #e5e7eb; }
.dev-card-online { border-left-color: #16a34a; }
.dev-card-offline { border-left-color: #dc2626; }
.dev-card-file { border-left-color: #0891b2; }
.dev-code { background: #0f1b2d; color: #e2e8f0; border-radius: .5rem; padding: .75rem 1rem; font-size: .8rem; white-space: pre-wrap; word-break: break-all; margin: .25rem 0 .5rem; }
.table-danger-subtle > td { background: #fef2f2; }

/* ---------- Dashboard ---------- */
.stat-link { color: inherit; transition: box-shadow .15s, transform .15s; }
.stat-link:hover { box-shadow: 0 6px 18px rgba(15,27,45,.08); transform: translateY(-1px); color: inherit; }
.stat-sub { font-size: .75rem; font-weight: 500; color: var(--ptk-text-muted, #6b7280); }
.stat-compact { gap: .65rem; padding: .85rem .9rem; }
.stat-compact .stat-icon { width: 38px; height: 38px; font-size: 1.05rem; }
.stat-compact .stat-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-compact .stat-value { white-space: nowrap; }
.stat-icon-sm { width: 34px; height: 34px; font-size: 1rem; flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.spin { display: inline-block; animation: ptk-spin .8s linear infinite; }
@keyframes ptk-spin { to { transform: rotate(360deg); } }
.roadmap-compact li { padding: .2rem 0; font-size: .9rem; }

/* Grafik (veri görselleştirme belirteçleri: kategorik sıra sabit) */
.viz-root {
    --surface-1: #ffffff;
    --viz-grid: #eceef1;
    --viz-axis: #6b7280;
    --series-1: #2a78d6;  /* zamanında */
    --series-2: #eb6834;  /* geç */
    --series-3: #1baf7a;  /* izinli */
    --series-4: #eda100;  /* gelmedi */
    --seq-1: #2a78d6;
    position: relative;
}
.viz-legend { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .78rem; color: var(--ptk-text-muted, #52514e); }
.viz-key { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.viz-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-key i.viz-key-line { width: 14px; height: 0; border-top: 2px solid #374151; border-radius: 0; }
.viz-chart { padding: .5rem 0 0 2rem; }
.viz-plot { position: relative; height: 230px; margin-bottom: 1.6rem; }
.viz-grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--viz-grid); }
.viz-grid span { position: absolute; left: -2rem; width: 1.6rem; text-align: right; transform: translateY(-50%); font-size: .72rem; color: var(--viz-axis); font-variant-numeric: tabular-nums; }
.viz-cols { position: absolute; inset: 0; display: flex; }
.viz-col { flex: 1; position: relative; display: flex; justify-content: center; align-items: flex-end; cursor: default; outline: none; transition: opacity .15s; }
.viz-col::before { content: ''; position: absolute; inset: 0 6%; border-radius: 6px; }
.viz-col:hover::before, .viz-col:focus::before { background: rgba(15,27,45,.04); }
.viz-col.is-dim .viz-stack { opacity: .45; }
.viz-stack { position: relative; width: 24px; display: flex; flex-direction: column; gap: 2px; transition: opacity .15s; min-height: 0; }
.viz-seg { min-height: 2px; }
.viz-seg.is-top { border-radius: 4px 4px 0 0; }
.viz-expected { position: absolute; left: calc(50% - 18px); width: 36px; border-top: 2px solid #374151; pointer-events: none; }
.viz-total { position: absolute; bottom: calc(100% + 2px); font-size: .72rem; color: var(--viz-axis); display: none; }
.viz-xlabel { position: absolute; top: calc(100% + .4rem); font-size: .75rem; color: var(--viz-axis); white-space: nowrap; }
.viz-xlabel.is-today { color: var(--ptk-text, #111827); font-weight: 600; }
.viz-tooltip { position: absolute; z-index: 5; min-width: 190px; background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; box-shadow: 0 8px 24px rgba(15,27,45,.12); padding: .55rem .7rem; font-size: .8rem; pointer-events: none; }
.viz-tip-row { display: flex; align-items: center; gap: .45rem; line-height: 1.6; }
.viz-tip-row i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.viz-tip-row i.viz-tip-line { height: 0; border-top: 2px solid #374151; border-radius: 0; width: 10px; }
.viz-tip-row span { flex: 1; }
.viz-tip-row strong { font-variant-numeric: tabular-nums; }
.viz-hbars { display: flex; flex-direction: column; gap: .55rem; }
.viz-hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr; align-items: center; gap: .75rem; font-size: .85rem; }
.viz-hbar-label { color: var(--ptk-text, #111827); }
.viz-hbar-track { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.viz-hbar-fill { display: block; height: 14px; min-width: 2px; background: var(--seq-1); border-radius: 0 4px 4px 0; }
.viz-hbar-value { font-size: .78rem; color: var(--ptk-text-muted, #52514e); font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) {
    .viz-plot { height: 190px; }
    .viz-stack { width: 18px; }
    .viz-xlabel { font-size: .68rem; text-align: center; line-height: 1.2; }
    .viz-xdate { display: block; }
    .viz-plot { margin-bottom: 2.2rem; }
}

/* ---------- Raporlar ---------- */
.report-card { transition: box-shadow .15s, transform .15s; }
.report-card:hover { box-shadow: 0 6px 18px rgba(15,27,45,.08); transform: translateY(-1px); }
.report-group-title { letter-spacing: .04em; scroll-margin-top: 80px; }
.rf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem .75rem; align-items: end; }
.rf-actions { display: flex; align-items: flex-end; }
.rf-actions .btn { width: 100%; }
.rf-columns { min-width: 220px; max-height: 340px; overflow: auto; }
.report-print-head { padding: .9rem 1rem .6rem; border-bottom: 1px solid var(--ptk-border, #e5e7eb); }
.report-totals { display: flex; flex-wrap: wrap; gap: .5rem; }
.report-chip { display: inline-flex; flex-direction: column; padding: .3rem .7rem; border-radius: .5rem; background: #f6f7f9; font-size: .72rem; color: var(--ptk-text-muted, #6b7280); }
.report-chip strong { font-size: .95rem; color: var(--ptk-text, #111827); font-variant-numeric: tabular-nums; }
.report-table-wrap { max-height: 70vh; }
.report-table thead th { position: sticky; top: 0; background: #f8f9fb; z-index: 1; white-space: nowrap; font-size: .75rem; }
.report-table th.sortable:hover { background: #eef1f6; }
.report-table td { font-size: .85rem; white-space: nowrap; }
.report-table tfoot td { position: sticky; bottom: 0; background: #f1f4f8; font-weight: 600; border-top: 2px solid #d9dee6; }
.font-tabular { font-variant-numeric: tabular-nums; }
@media print {
    .app-sidebar, .app-topbar, .app-footer, .app-backdrop, .toast-container { display: none !important; }
    .app-main { margin-left: 0 !important; }
    .app-content { padding: 0 !important; }
    .report-result { border: 0 !important; box-shadow: none !important; }
    .report-table-wrap { max-height: none !important; overflow: visible !important; }
    .report-table thead th, .report-table tfoot td { position: static; }
    .report-table { width: 100% !important; table-layout: auto; }
    .report-table tfoot { display: table-row-group; }
    .report-table td, .report-table th, .report-table thead th { font-size: 7.5pt; white-space: normal !important; padding: 2px 4px !important; word-break: normal; }
    .report-table th .text-muted, .report-table th .bi { display: none; }
    .report-print-head::after { content: 'Süreler saat:dakika olarak gösterilmiştir.'; display: block; font-size: 7.5pt; color: #6b7280; margin-top: .3rem; }
    .report-table a { color: inherit; text-decoration: none; }
    #reportPage { page: report; }
}
@page report { size: A4 landscape; margin: 10mm; }
@media print {
}

/* ---------- Mobil ---------- */
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-main { margin-left: 0; }
    body.sidebar-open .app-sidebar { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.3); }
    body.sidebar-open .app-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,27,45,.45); z-index: 1035; }
    .app-content { padding: 1rem; }
    .app-topbar { padding: 0 1rem; }
    .search-box { max-width: none; }
}
@media (max-width: 575.98px) {
    .auth-card { padding: 1.75rem 1.25rem; }
    .install-card { padding: 1.25rem; }
    .welcome-card { padding: 1.1rem 1.2rem; }
    .stat-card { padding: .85rem; gap: .7rem; }
    .stat-icon { width: 38px; height: 38px; font-size: 1.05rem; }
    .stat-value { font-size: 1.2rem; }
    .data-table td, .data-table thead th { padding: .6rem .55rem; }
    .data-table .text-truncate { white-space: normal; }
}

/* ---------- Log yönetimi (Modül 17) ---------- */
.log-table tbody tr[data-id] { cursor: pointer; }
.log-table tbody tr.log-critical > td:first-child { box-shadow: inset 3px 0 0 var(--bs-danger, #dc3545); }
.log-summary { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-diff th[scope="row"] { width: 32%; color: var(--ptk-text-muted, #6b7280); }
.log-diff tr.log-changed > td:last-child { background: rgba(25, 135, 84, .08); }
.log-diff tr.log-changed > td:nth-child(2) { background: rgba(220, 53, 69, .06); }
.log-value { white-space: pre-wrap; word-break: break-word; }
.log-raw { max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.syslog-list { max-height: 70vh; overflow: auto; }
.syslog-msg { white-space: pre-wrap; word-break: break-word; font-family: var(--bs-font-monospace); font-size: .8rem; }
.syslog-level { min-width: 52px; }

/* ---------- Güvenlik ve bakım (Modül 18) ---------- */
.sec-score { width: 88px; height: 88px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 6px solid currentColor; flex-shrink: 0; }
.sec-score.tone-success { color: var(--bs-success, #198754); }
.sec-score.tone-warning { color: #b58100; }
.sec-score.tone-danger { color: var(--bs-danger, #dc3545); }
.sec-score-value { font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--ptk-text, #111827); }
.sec-score-label { font-size: .7rem; color: var(--ptk-text-muted, #6b7280); }
.sec-item .text-end { max-width: 60%; }

/* Bordro */
.payroll-table td, .payroll-table th { white-space: nowrap; padding-left: .6rem; padding-right: .6rem; }
.payroll-table td:first-child { min-width: 170px; white-space: normal; }
.payroll-table tbody tr { cursor: pointer; }
#payrollPage [data-kpis] .fs-5 { font-size: 1.05rem !important; white-space: nowrap; }
