/* ==========================================================================
   Personel & Bordro — Arayüz
   ========================================================================== */

:root {
    --bg: #f6f5f3;
    --surface: #ffffff;
    --surface-2: #faf9f7;
    --surface-3: #f0eeeb;
    --row-odd: #ffffff;
    --row-even: #eef5fb; /* hafif mavi — arka plandan ayrışır */
    --row-hover: #e3eef8;
    --border: #ebe8e4;
    --border-strong: #ddd8d1;
    --text: #1c1917;
    --text-2: #44403c;
    --muted: #78716c;
    --muted-2: #a8a29e;

    --brand: #ea580c;
    --brand-600: #c2410c;
    --brand-soft: #fff7ed;
    --brand-ring: rgba(234, 88, 12, .20);

    --success: #16a34a;
    --success-soft: #f0fdf4;
    --warn: #d97706;
    --warn-soft: #fffbeb;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --info: #0284c7;
    --info-soft: #f0f9ff;

    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;

    --shadow-xs: 0 1px 2px rgba(28, 25, 23, .04);
    --shadow-sm: 0 1px 2px rgba(28, 25, 23, .04), 0 6px 16px rgba(28, 25, 23, .05);
    --shadow-md: 0 12px 36px rgba(28, 25, 23, .12);

    --sidebar-w: 240px;
    --bottom-nav-h: 64px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }
button { font-family: inherit; }
.ic { flex: none; display: block; }
svg.ic { stroke-width: 1.8; }

/* ==========================================================================
   Yerleşim
   ========================================================================== */

.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: none;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 20px 20px 18px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 55%, #c2410c 100%);
    box-shadow: 0 6px 16px rgba(234, 88, 12, .28);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15.5px; letter-spacing: -.2px; }
.brand-text small { color: var(--muted); font-size: 11.5px; letter-spacing: .2px; }

.nav { flex: 1; overflow-y: auto; padding: 4px 12px 8px; }

.nav-group { margin-bottom: 14px; }

.nav-title {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted-2);
    padding: 8px 10px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    color: var(--text-2);
    font-weight: 500;
    font-size: 13.5px;
    margin-bottom: 2px;
    transition: background .14s, color .14s;
}
.nav-link .ic { color: var(--muted); transition: color .14s; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { background: var(--brand-soft); color: var(--brand-600); font-weight: 600; }
.nav-link.is-active .ic { color: var(--brand); }

.sidebar-foot {
    border-top: 1px solid var(--border);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-chip { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.user-meta strong { font-size: 12.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: var(--muted); font-size: 11px; }

.avatar {
    width: 34px; height: 34px; flex: none;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--surface-3);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
}

.logout-form { margin: 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 28px;
    background: rgba(246, 245, 243, .88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 19px; font-weight: 700; letter-spacing: -.35px; }
.topbar-title p { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.nav-toggle { display: none; }

.content { padding: 24px 28px 12px; flex: 1; }
.content.is-wide { max-width: none; }

.page-foot {
    display: flex;
    justify-content: space-between;
    padding: 14px 28px 20px;
    color: var(--muted-2);
    font-size: 11.5px;
}

/* ==========================================================================
   Kartlar
   ========================================================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.card + .card { margin-top: 18px; }

.card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
}
.card-head h2 { font-size: 14.5px; font-weight: 650; letter-spacing: -.2px; }
.card-head p { color: var(--muted); font-size: 12px; margin-top: 1px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-1 { grid-template-columns: minmax(0, 1fr); }
.grid-side { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }

/* İstatistik kartları */
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
}
.stat-ico {
    width: 38px; height: 38px; flex: none;
    border-radius: 11px;
    display: grid; place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
}
.stat-ico.green { background: var(--success-soft); color: var(--success); }
.stat-ico.amber { background: var(--warn-soft); color: var(--warn); }
.stat-ico.red { background: var(--danger-soft); color: var(--danger); }
.stat-ico.blue { background: var(--info-soft); color: var(--info); }

.stat-body { min-width: 0; }
.stat-label { color: var(--muted); font-size: 11.8px; font-weight: 550; }
.stat-value {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.5px;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-value small { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat-sub { color: var(--muted-2); font-size: 11.5px; margin-top: 3px; }

/* ==========================================================================
   Panel — dönem şeridi, ilerleme, hızlı kutular, mini grafik
   ========================================================================== */

.hero {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 22px;
    padding: 22px 24px;
    margin-bottom: 16px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 150% at 100% 0%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(135deg, #ea580c 0%, #f97316 50%, #fb923c 100%);
    color: #fff;
    box-shadow: 0 12px 30px -12px rgba(234, 88, 12, .55);
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    right: -70px; top: -90px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    pointer-events: none;
}
.hero-main { flex: 1 1 auto; min-width: 0; }
.hero-eyebrow {
    display: inline-block;
    font-size: 10.8px;
    font-weight: 650;
    letter-spacing: .09em;
    text-transform: uppercase;
    opacity: .82;
}
.hero-amount {
    display: flex;
    align-items: baseline;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 4px;
    font-size: 33px;
    font-weight: 750;
    letter-spacing: -1.2px;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.hero-amount small {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0;
    opacity: .8;
    text-transform: uppercase;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: 11.8px;
    font-weight: 550;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}
.hero-side {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding-left: 22px;
    border-left: 1px solid rgba(255, 255, 255, .18);
    min-width: 0;
}
.hero-progress-head,
.hero-progress-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11.6px;
    opacity: .9;
}
.hero-progress-head strong { font-size: 12.5px; font-weight: 700; }
.progress {
    height: 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .22);
    overflow: hidden;
    margin: 7px 0 6px;
}
.progress > span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, .6);
    transition: width .4s ease;
}
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-actions .btn {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .28);
    color: #fff;
}
.hero-actions .btn:hover { background: rgba(255, 255, 255, .26); }
.hero-actions .btn-primary {
    background: #fff;
    border-color: #fff;
    color: var(--brand-600);
    font-weight: 650;
}
.hero-actions .btn-primary:hover { background: #fff7ed; }

/* Hızlı işlem kutuları */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}
.quick-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: border-color .15s, box-shadow .15s, transform .15s;
    min-width: 0;
}
.quick-tile:hover {
    border-color: var(--brand-ring);
    box-shadow: 0 4px 14px -6px rgba(234, 88, 12, .3);
    transform: translateY(-1px);
}
.quick-ico {
    width: 34px; height: 34px; flex: none;
    border-radius: 10px;
    display: grid; place-items: center;
    background: var(--surface-3);
    color: var(--text-2);
}
.quick-ico.brand { background: var(--brand-soft); color: var(--brand); }
.quick-ico.green { background: var(--success-soft); color: var(--success); }
.quick-ico.amber { background: var(--warn-soft); color: var(--warn); }
.quick-ico.blue { background: var(--info-soft); color: var(--info); }
.quick-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.quick-text strong { font-size: 12.8px; font-weight: 650; }
.quick-text small { font-size: 11px; color: var(--muted-2); }

/* Küçük liste */
.mini-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.4px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
}
.mini-head a { font-size: 11.4px; text-transform: none; letter-spacing: 0; }
.mini-list { display: flex; flex-direction: column; }
.mini-list .mini-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    margin: 0 -10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    min-width: 0;
    background: var(--row-odd);
    border-radius: 0;
}
.mini-list .mini-row:nth-child(even) { background: var(--row-even); }
.mini-list .mini-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.mini-list a.mini-row:hover .mini-text strong { color: var(--brand); }
.card-body.tight .mini-list { padding: 4px 16px 12px; }
.card-body.tight .mini-list .mini-row:first-child { padding-top: 12px; }
.mini-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.28; }
.mini-text strong {
    font-size: 12.8px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-text small { font-size: 11px; color: var(--muted-2); }
.mini-amount {
    font-size: 12.8px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.avatar.sm { width: 28px; height: 28px; font-size: 10.5px; }

/* Mini çubuk grafik */
.bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 132px;
}
.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    height: 100%;
    min-width: 0;
    color: var(--muted);
    text-decoration: none;
}
.bar-value {
    font-size: 10.4px;
    font-weight: 650;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.bar {
    width: 100%;
    max-width: 34px;
    min-height: 2px;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, #fdba74 0%, #fb923c 100%);
    transition: background .15s, transform .15s;
}
.bar-col:hover .bar { background: linear-gradient(180deg, #f97316 0%, #ea580c 100%); transform: scaleY(1.02); }
.bar-col.is-current .bar { background: linear-gradient(180deg, #f97316 0%, #ea580c 100%); }
.bar-col.is-current .bar-value { color: var(--brand); font-weight: 750; }
.bar-label { font-size: 10px; color: var(--muted-2); white-space: nowrap; }

@media (max-width: 1100px) {
    .hero { flex-direction: column; gap: 18px; }
    .hero-side { flex: 1 1 auto; padding-left: 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 16px; }
}
@media (max-width: 640px) {
    .hero { padding: 18px; }
    .hero-amount { font-size: 27px; }
    .quick-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Butonlar
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border-radius: 9px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .14s, border-color .14s, box-shadow .14s, color .14s, transform .06s;
    text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: #c7d0e0; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 1px 2px rgba(234, 88, 12, .35);
}
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.btn-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-600); }
.btn-soft:hover { background: #ffedd5; border-color: #fdba74; color: var(--brand-600); }

.btn-danger { background: var(--danger-soft); border-color: #fecaca; color: var(--danger); }
.btn-danger:hover { background: #fee2e2; border-color: #fca5a5; }

.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #047857; border-color: #047857; color: #fff; }

.btn-sm { height: 30px; padding: 0 10px; font-size: 12.2px; border-radius: 8px; }
.btn-xs { height: 27px; padding: 0 9px; font-size: 11.8px; border-radius: 7px; gap: 5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.icon-btn {
    width: 34px; height: 34px;
    display: inline-grid; place-items: center;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background .14s, color .14s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }

.btn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   Formlar
   ========================================================================== */

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--muted); }

.input, .select, textarea.input {
    width: 100%;
    height: 36px;
    padding: 0 11px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    transition: border-color .14s, box-shadow .14s, background .14s;
    appearance: none;
}
textarea.input { height: auto; padding: 9px 11px; resize: vertical; min-height: 72px; line-height: 1.45; }

.input:focus, .select:focus, textarea.input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
}
.input::placeholder { color: var(--muted-2); }

.select {
    padding-right: 32px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 9px 0 0 9px; }
.input-group .btn { border-radius: 0 9px 9px 0; height: 36px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .col-span-2 { grid-column: span 2; }
.form-section-title {
    grid-column: span 2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted-2);
    padding-top: 4px;
    margin-bottom: -4px;
}

.input-affix { position: relative; }
.input-affix .input { padding-right: 34px; }
.input-affix .affix {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
    font-size: 12px;
    pointer-events: none;
}

/* Arama kutusu */
.search-box { position: relative; }
.search-box .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.search-box .input { padding-left: 34px; }

/* Segmented kontrol */
.segmented {
    display: inline-flex;
    padding: 3px;
    background: var(--surface-3);
    border-radius: 10px;
    gap: 2px;
}
.segmented a, .segmented button {
    border: 0;
    background: transparent;
    padding: 6px 11px;
    border-radius: 8px;
    font-size: 12.4px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
}
.segmented a.is-active, .segmented button.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}
.emp-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* Toplu ücret çubuğu */
.emp-bulk-bar {
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    background: var(--surface-2);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.emp-bulk-ops {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.emp-bulk-wage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.emp-bulk-wage .select,
.emp-bulk-wage .input {
    height: 30px;
    font-size: 12.5px;
    width: auto;
}
.emp-bulk-wage .input[name="wage_amount"] { width: 100px; }
.emp-bulk-wage .input[name="raise_percent"] { width: 80px; }
.emp-bulk-wage .select { padding: 0 8px; }

/* Mobil personel listesi — varsayılan gizli */
.emp-m-list { display: none; }

/* ==========================================================================
   Tablolar
   ========================================================================== */

.table-wrap { width: 100%; overflow-x: auto; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th {
    text-align: left;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .045em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-2);
}
/* Zebra: tek satır beyaz, çift satır hafif gri */
.table tbody tr:nth-child(odd) td { background: var(--row-odd); }
.table tbody tr:nth-child(even) td { background: var(--row-even); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--row-hover); }
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.strong { font-weight: 650; color: var(--text); }
.table .row-actions { display: flex; gap: 2px; justify-content: flex-end; }

.table tfoot td {
    background: var(--surface-2);
    font-weight: 700;
    color: var(--text);
    border-top: 1px solid var(--border);
    border-bottom: 0;
}

.cell-title { display: flex; flex-direction: column; gap: 1px; }
.cell-title strong { font-weight: 600; color: var(--text); font-size: 13.2px; }
.cell-title small { color: var(--muted); font-size: 11.5px; }

.person { display: flex; align-items: center; gap: 10px; }
.person .avatar { width: 32px; height: 32px; font-size: 11px; background: var(--brand-soft); color: var(--brand-600); }

/* ==========================================================================
   Rozetler
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2.5px 8px;
    border-radius: 999px;
    font-size: 11.2px;
    font-weight: 650;
    line-height: 1.5;
    white-space: nowrap;
    background: var(--surface-3);
    color: var(--muted);
}
.badge-brand { background: var(--brand-soft); color: var(--brand-600); }
.badge-green { background: var(--success-soft); color: var(--success); }
.badge-amber { background: var(--warn-soft); color: var(--warn); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-blue { background: var(--info-soft); color: var(--info); }

.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ==========================================================================
   Bordro tablosu
   ========================================================================== */

.pay-table { min-width: 1340px; font-size: 12.8px; }
.pay-table th, .pay-table td { padding: 8px 9px; }
.pay-table th { vertical-align: bottom; }
.pay-table th .th-sub { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted-2); font-size: 10.5px; }

.pay-table .col-check { width: 38px; position: sticky; left: 0; background: var(--surface-2); z-index: 4; }
.pay-table .col-name { position: sticky; left: 38px; background: var(--surface-2); z-index: 3; min-width: 190px; }
.pay-table tbody tr:nth-child(odd) .col-check,
.pay-table tbody tr:nth-child(odd) .col-name { background: var(--row-odd); }
.pay-table tbody tr:nth-child(even) .col-check,
.pay-table tbody tr:nth-child(even) .col-name { background: var(--row-even); }
.pay-table tbody tr:hover .col-check,
.pay-table tbody tr:hover .col-name { background: var(--row-hover); }
.pay-table .col-name { box-shadow: 1px 0 0 var(--border); }

.pay-table td.col-check { text-align: center; }

.cell-input {
    width: 100%;
    min-width: 62px;
    height: 30px;
    padding: 0 7px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: var(--surface-2);
    text-align: right;
    font-size: 12.6px;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    transition: border-color .12s, background .12s, box-shadow .12s;
}
.cell-input:hover { background: #f1f5f9; }
.cell-input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 2.5px var(--brand-ring);
}
.cell-input:disabled { background: transparent; color: var(--muted); border-color: transparent; cursor: default; }
.cell-input.w-70 { min-width: 70px; }
.cell-input.w-80 { min-width: 80px; }
.cell-input.w-adj { min-width: 58px; width: 58px; }

/* Bordro — ekle / çıkar çift kutu */
.pay-adj-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 128px;
}
.pay-adj-cell .cell-input.is-add {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}
.pay-adj-cell .cell-input.is-add:focus {
    border-color: var(--success);
    box-shadow: 0 0 0 2.5px rgba(22, 163, 74, .18);
}
.pay-adj-cell .cell-input.is-sub {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #991b1b;
}
.pay-adj-cell .cell-input.is-sub:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 2.5px rgba(220, 38, 38, .16);
}
.pay-adj-cell .cell-input.is-absent {
    border-color: #fdba74;
    background: #fff7ed;
    color: #9a3412;
}
.pay-adj-cell .cell-input.is-absent:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2.5px var(--brand-ring);
}
.pay-adj-cell .cell-input.is-late {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1e40af;
}
.pay-adj-cell .cell-input.is-late:focus {
    border-color: var(--info);
    box-shadow: 0 0 0 2.5px rgba(2, 132, 199, .18);
}
.pay-adj-cell .cell-input:disabled {
    opacity: .65;
}

.pay-table .money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-carry-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    line-height: 1.25;
}
.pay-carry-cell .js-carry { font-weight: 650; font-variant-numeric: tabular-nums; }
.pay-carry-cell .js-next-carry {
    font-size: 10.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.pay-table .net-cell { font-weight: 700; color: var(--text); font-size: 13.2px; }
.pay-table tr.is-paid:nth-child(odd) td,
.pay-table tr.is-paid:nth-child(odd) .col-check,
.pay-table tr.is-paid:nth-child(odd) .col-name { background: #f7fbf8; }
.pay-table tr.is-paid:nth-child(even) td,
.pay-table tr.is-paid:nth-child(even) .col-check,
.pay-table tr.is-paid:nth-child(even) .col-name { background: #eef6f0; }
.pay-table tr.is-dirty .col-name { box-shadow: inset 3px 0 0 #f59e0b, 1px 0 0 var(--border); }

.pay-table tfoot td { position: sticky; bottom: 0; }
.pay-table .pay-hint { font-size: 10.8px; color: var(--muted-2); }

.pay-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    margin-bottom: 14px;
}

/* Dönem bilgisi (mesai / puantaj) */
.period-note {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.period-note.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1080px) {
    .period-note.is-3 { grid-template-columns: minmax(0, 1fr); }
}
.pn-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    border-radius: var(--radius);
    padding: 11px 14px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.pn-item:nth-child(2) { border-left-color: var(--warn); }
.pn-label {
    font-size: 10.8px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted-2);
}
.pn-item strong { font-size: 13.5px; font-weight: 650; }
.pn-item small { color: var(--muted); font-size: 11.5px; }

.summary-grid { margin-bottom: 14px; }

@media (max-width: 760px) {
    .period-note { grid-template-columns: minmax(0, 1fr); }
}

.bulk-fill {
    display: none;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: var(--brand-soft);
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
    margin-bottom: 14px;
}
.bulk-fill.is-open { display: flex; }
.bulk-fill .field > label { color: var(--brand-600); }
.bulk-fill .input { height: 32px; width: 104px; background: #fff; }

.chk {
    width: 16px; height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
    vertical-align: middle;
}

/* ==========================================================================
   Boş durum
   ========================================================================== */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 44px 20px;
    text-align: center;
    color: var(--muted);
}
.empty .empty-ico {
    width: 46px; height: 46px;
    border-radius: 14px;
    display: grid; place-items: center;
    background: var(--surface-3);
    color: var(--muted);
}
.empty strong { color: var(--text); font-size: 14px; font-weight: 650; }
.empty p { font-size: 12.5px; max-width: 380px; }

/* ==========================================================================
   Flash & toast
   ========================================================================== */

.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 16px;
    font-size: 13px;
    box-shadow: var(--shadow-xs);
    animation: slideDown .25s ease;
}
.flash-success { background: var(--success-soft); border-color: #a7f3d0; color: #065f46; }
.flash-error { background: var(--danger-soft); border-color: #fecaca; color: #991b1b; }
.flash-warn { background: var(--warn-soft); border-color: #fde68a; color: #92400e; }
.flash-info { background: var(--info-soft); border-color: #bae6fd; color: #075985; }
.flash-x { margin-left: auto; background: transparent; border: 0; color: inherit; opacity: .55; cursor: pointer; padding: 2px; display: grid; place-items: center; }
.flash-x:hover { opacity: 1; }

.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 200;
    max-width: min(360px, calc(100vw - 40px));
}
.toast {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    border-radius: 11px;
    background: #0f172a;
    color: #fff;
    font-size: 13px;
    box-shadow: var(--shadow-md);
    animation: toastIn .22s ease;
}
.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
.toast.out { animation: toastOut .2s ease forwards; }

@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Overlay / modal
   ========================================================================== */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .42);
    /* blur yok — mobil menü açılınca sidebar üstte net kalsın */
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 45;
}
.overlay.is-open { opacity: 1; pointer-events: auto; }

.modal {
    position: fixed;
    z-index: 50;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%);
    width: min(460px, calc(100vw - 32px));
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s, transform .18s;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.modal.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal-head { padding: 18px 20px 0; }
.modal-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.modal-head p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-foot { padding: 0 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }

/* Mesai — günlük hafta onayı */
.ot-week-modal { z-index: 80; max-width: 420px; }
.ot-week-preview {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--brand-soft);
    border: 1px solid #fdba74;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ot-week-preview strong {
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -.3px;
    color: var(--brand-600);
}
.ot-week-preview small { color: var(--muted); font-size: 12.5px; }
body.ot-week-locked .ot-table .ot-input,
body.ot-week-locked #otSaveAll,
body.ot-week-locked [data-go="payroll"] {
    pointer-events: none;
    opacity: .55;
}
.overlay.is-locked { pointer-events: auto; }

/* Personel listesi — mesai gibi dar / kompakt */
.emp-table {
    table-layout: fixed;
    width: 100%;
    font-size: 12.8px;
}
.emp-table th, .emp-table td {
    padding: 6px 8px;
    overflow: hidden;
}
.emp-table .emp-col-chk { width: 36px; }
.emp-table .emp-col-name { width: 22%; }
.emp-table .emp-col-pos { width: 12%; }
.emp-table .emp-col-type { width: 9%; }
.emp-table .emp-col-num { width: 9%; }
.emp-table .emp-col-wage { width: 10%; }
.emp-table .emp-col-adv { width: 11%; }
.emp-table .emp-col-status { width: 8%; }
.emp-table .emp-col-act { width: 96px; }
.emp-table .col-name { min-width: 0; padding-left: 10px; }
.emp-table .person-sm { gap: 8px; min-width: 0; }
.emp-table .person-sm .avatar {
    width: 28px;
    height: 28px;
    font-size: 10px;
}
.emp-table .person-sm .cell-title {
    min-width: 0;
    flex: 1;
}
.emp-table .person-sm .cell-title strong {
    display: block;
    font-size: 12.6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.emp-table .badge { padding: 2px 7px; font-size: 10.8px; }

/* Personel listesi — hızlı avans */
.emp-adv-cell { min-width: 0; }
.emp-adv-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    width: 100%;
    max-width: 110px;
    margin-left: auto;
    padding: 4px 6px;
    border: 1.5px dashed #b6c2d1;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: right;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.emp-adv-btn strong {
    font-size: 12.2px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.emp-adv-btn span {
    font-size: 9.5px;
    color: var(--muted);
    font-weight: 500;
}
.emp-adv-btn:hover {
    border-color: var(--brand);
    border-style: solid;
    background: #fff;
    box-shadow: 0 0 0 3px var(--brand-ring);
}
.emp-adv-btn.has-bal {
    border-color: #f59e0b;
    border-style: solid;
    background: #fffbeb;
}
.emp-adv-btn.has-bal strong { color: #b45309; }
.table th .th-sub {
    display: block;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--muted-2);
    font-size: 10.5px;
}

/* ==========================================================================
   Giriş / kurulum
   ========================================================================== */

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
    background:
        radial-gradient(900px 500px at 8% -10%, #ffedd5 0%, transparent 60%),
        radial-gradient(800px 480px at 100% 100%, #fed7aa 0%, transparent 55%),
        var(--bg);
}

.auth-card {
    width: min(420px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 26px;
}

.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.auth-brand .brand-mark { width: 42px; height: 42px; border-radius: 13px; }
.auth-brand strong { font-size: 16px; }
.auth-brand small { color: var(--muted); font-size: 12px; display: block; }

.auth-title { font-size: 20px; font-weight: 700; letter-spacing: -.4px; }
.auth-sub { color: var(--muted); font-size: 13px; margin: 3px 0 20px; }

.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-form .input { height: 42px; }
.auth-form .btn { height: 42px; }

.auth-foot { margin-top: 18px; text-align: center; color: var(--muted-2); font-size: 11.5px; }

.auth-card .alert {
    background: var(--danger-soft);
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 12.5px;
    margin-bottom: 14px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.auth-card .alert.ok { background: var(--success-soft); border-color: #a7f3d0; color: #065f46; }

/* Kurulum sihirbazı */
.setup-card { width: min(560px, 100%); }
.setup-steps { display: flex; align-items: center; gap: 6px; margin-bottom: 20px; }
.step-pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 600; color: var(--muted);
}
.step-pill span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 10.5px; }
.step-pill.is-active { color: var(--brand-600); }
.step-pill.is-active span { background: var(--brand); color: #fff; }
.setup-sep { flex: 1; height: 1px; background: var(--border); }

/* ==========================================================================
   Yardımcılar
   ========================================================================== */

.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: 12px; }
.tiny { font-size: 11.3px; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warn { color: var(--warn) !important; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 18px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.hidden { display: none !important; }

.divider { height: 1px; background: var(--border); margin: 16px 0; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; }
.kv + .kv { border-top: 1px dashed var(--border); }
.kv span { color: var(--muted); }
.kv strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.kv.total { border-top: 1px solid var(--border-strong); margin-top: 4px; padding-top: 11px; font-size: 14px; }
.kv.total strong { font-size: 16px; font-weight: 700; }

/* ==========================================================================
   Alt menü (mobil uygulama)
   ========================================================================== */

.bottom-nav {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 42;
    height: calc(var(--bottom-nav-h) + var(--safe-bottom));
    padding: 6px 8px var(--safe-bottom);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(28, 25, 23, .06);
}
.bottom-nav-inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 100%;
    max-width: 560px;
    margin: 0 auto;
}
.bn-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    border-radius: 12px;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}
.bn-link .ic { width: 22px; height: 22px; }
.bn-link.is-active { color: var(--brand); background: var(--brand-soft); }
.bn-link:active { transform: scale(.96); }

.show-m { display: none !important; }

/* ==========================================================================
   Duyarlı — mobil uygulama hissi
   ========================================================================== */

@media (max-width: 1180px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-side { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: 0; top: 0;
        width: min(288px, 86vw);
        height: 100%;
        height: 100dvh;
        z-index: 60; /* overlay (45) üstünde — bulanık olmasın */
        background: #fff;
        box-shadow: 8px 0 28px rgba(28, 25, 23, .14);
        transition: transform .22s ease;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform: translate3d(-102%, 0, 0);
    }
    .sidebar.is-open {
        transform: translate3d(0, 0, 0);
    }
    .nav-toggle { display: inline-grid; }
    .bottom-nav { display: block; }
    .topbar {
        padding: 10px 14px;
        padding-top: max(10px, env(safe-area-inset-top));
    }
    .topbar-title h1 { font-size: 17px; letter-spacing: -.3px; }
    .topbar-title p { display: none; }
    .content {
        padding: 12px 12px calc(var(--bottom-nav-h) + var(--safe-bottom) + 16px);
    }
    .page-foot { display: none; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: minmax(0, 1fr); }

    .card { border-radius: 16px; box-shadow: var(--shadow-sm); }
    .card-head { padding: 12px 14px; flex-wrap: wrap; }
    .card-body { padding: 14px; }

    .hero { padding: 16px; border-radius: 18px; margin-bottom: 12px; }
    .hero-amount { font-size: 28px; }
    .hero-meta { gap: 6px; }
    .hero-chip { font-size: 11px; padding: 4px 8px; }
    .hero-side { width: 100%; }

    .stat { padding: 12px 14px; border-radius: 14px; }
    .pay-toolbar { padding: 10px; border-radius: 14px; gap: 8px; }
    .emp-filters { gap: 8px; }
    .emp-filters .search-box { min-width: 0 !important; flex: 1 1 100%; }
    .emp-filters .segmented { width: 100%; }
    .emp-filters .segmented button { flex: 1; text-align: center; padding: 8px 6px; }

    /* Personel: masaüstü tablo gizle, mobil liste göster */
    .emp-desk-wrap { display: none !important; }
    .emp-m-list {
        display: flex;
        flex-direction: column;
    }
    .emp-m-row {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 14px;
        border-bottom: 1px solid var(--border);
        background: var(--surface);
    }
    .emp-m-row:last-child { border-bottom: 0; }
    .emp-m-chk {
        flex: none;
        display: grid;
        place-items: center;
        padding: 4px 2px;
    }
    .emp-m-main {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        color: inherit;
        text-decoration: none;
    }
    .emp-m-main .avatar {
        width: 40px;
        height: 40px;
        font-size: 13px;
        background: var(--brand-soft);
        color: var(--brand-600);
    }
    .emp-m-text {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    .emp-m-text strong {
        font-size: 14.5px;
        font-weight: 650;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .emp-m-text small {
        font-size: 12px;
        color: var(--muted);
    }
    .emp-m-wage {
        flex: none;
        font-size: 13.5px;
        font-weight: 700;
        font-variant-numeric: tabular-nums;
        color: var(--text);
        white-space: nowrap;
    }
    .emp-m-adv {
        flex: none;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 1px;
        min-width: 64px;
        padding: 6px 8px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--surface-2);
        font: inherit;
        cursor: pointer;
        color: var(--muted);
    }
    .emp-m-adv span { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
    .emp-m-adv strong {
        font-size: 12.5px;
        font-weight: 700;
        color: var(--text);
        font-variant-numeric: tabular-nums;
    }
    .emp-m-adv.has-bal {
        border-color: #f59e0b;
        background: #fffbeb;
    }
    .emp-m-adv.has-bal strong { color: #b45309; }

    .emp-bulk-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 12px;
        gap: 8px;
    }
    .emp-bulk-wage {
        margin-left: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .emp-bulk-wage .select,
    .emp-bulk-wage .input,
    .emp-bulk-wage .btn {
        width: 100%;
        height: 40px;
        min-height: 40px;
    }
    .emp-bulk-wage .btn-primary { grid-column: 1 / -1; }
    .emp-bulk-wage .btn-soft { grid-column: 1 / -1; }

    .card:has(.emp-m-list) .card-head .badge { display: none; }
    .card:has(.emp-m-list) .card-head p { font-size: 12px; }

    /* Diğer tablolar: yatay kaydır + ilk sütun yapışkan */
    .table-wrap:not(.emp-desk-wrap) {
        margin: 0 -14px;
        padding: 0;
        border-radius: 0;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
    .table { font-size: 12.5px; min-width: 640px; }
    .table th, .table td { padding: 10px 10px; }
    .pay-table .col-name,
    .ot-table .col-name,
    .crew-table .col-name {
        position: sticky;
        left: 0;
        z-index: 2;
        background: var(--surface);
        box-shadow: 4px 0 10px -6px rgba(28, 25, 23, .18);
    }
    .hide-m { display: none !important; }
    .show-m { display: block !important; }

    .btn, .btn-sm { min-height: 40px; }
    .btn-sm { padding: 0 12px; }
    .cell-input { min-height: 36px; font-size: 15px; }
    .modal { width: calc(100vw - 24px); max-height: 85vh; border-radius: 18px; }
}

@media (max-width: 620px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-grid .col-span-2, .form-section-title { grid-column: span 1; }
    .stat-value { font-size: 18px; }
    .stat-label { font-size: 11px; }
    .stat-sub { display: none; }
    .topbar-actions {
        width: auto;
        flex: none;
    }
    .topbar-actions .btn span,
    .topbar-actions .btn:not(.icon-btn) {
        font-size: 12.5px;
    }
    .auth-card { padding: 22px; border-radius: 18px; }
    .period-note { display: none; }
    .summary-grid .stat:nth-child(n+3) { }
    .row-actions .btn-xs { min-height: 32px; padding: 0 8px; }
    .badge { font-size: 10.5px; }
}

/* --- Mesai (günlük saat) ekranı --------------------------------------- */
.ot-table { font-size: 12.8px; }
.ot-table th, .ot-table td { padding: 7px 8px; vertical-align: middle; }
.ot-table th { vertical-align: bottom; white-space: nowrap; }
.ot-table th .th-sub { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted-2); font-size: 10.5px; }
.ot-table .col-name { min-width: 210px; position: sticky; left: 0; background: var(--surface-2); z-index: 3; }
.ot-table tbody tr:nth-child(odd) td.col-name { background: var(--row-odd); }
.ot-table tbody tr:nth-child(even) td.col-name { background: var(--row-even); }
.ot-table tbody tr:hover td.col-name { background: var(--row-hover); }
.ot-table tfoot td { background: var(--surface-2); font-weight: 700; border-top: 1.5px solid var(--line-strong, #cbd5e1); }
/* Dar ekranlarda bile 7 gün + toplam sütunları tek ekrana sığsın */
.ot-table { table-layout: fixed; min-width: 640px; }
.ot-table .col-name-col { width: 20%; }
.ot-table .col-day-col { width: 6.4%; }
.ot-table .col-sum-col { width: 7%; }
.ot-table .col-amount-col { width: 12%; }
.ot-table th, .ot-table td { padding: 6px 4px; overflow: hidden; }
.ot-table .cell-input,
.ot-table .cell-input.w-60,
.ot-table .cell-input.w-70 { min-width: 0; width: 100%; padding: 0 3px; height: 28px; font-size: 12.5px; }
.ot-table .ot-total-col { padding: 6px 5px; font-size: 12px; }
.ot-table .ot-total-col .th-sub { font-size: 9.5px; }
.ot-table .col-name { min-width: 0; padding-left: 10px; }
.ot-table thead th.ot-day { font-size: 10.5px; letter-spacing: 0; }
/* Tüm günler aynı görünür — cumartesi/pazar ayrı renklenmez */
.ot-table .ot-total-col { background: rgba(148, 163, 184, .10); }
.ot-table .ot-day { text-align: center; }
.cell-input.w-60 { min-width: 60px; }
.ot-input { text-align: center; font-variant-numeric: tabular-nums; }
/* Mesai hücresi her zaman yazılabilir bir kutu gibi görünsün */
.ot-table .ot-input {
    background: #fff;
    border: 1.5px solid #b6c2d1;
    color: var(--text);
    cursor: text;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .07);
}
/* Boş hücre: kesikli çerçeve + gri zemin → yazılabilir olduğu apaçık */
.ot-table .ot-input:placeholder-shown {
    background: #eef2f7;
    border-style: dashed;
    border-color: #94a3b8;
    color: #94a3b8;
}
.ot-table .ot-input::placeholder { color: #94a3b8; font-weight: 700; }
.ot-table .ot-input:hover { border-color: #64748b; background: #fff; }
.ot-table .ot-input:focus {
    border: 1.5px solid var(--brand);
    border-style: solid;
    background: #fff;
    box-shadow: 0 0 0 3px var(--brand-ring);
}
.ot-row.is-locked .ot-input,
.ot-row.is-locked .ot-input:placeholder-shown {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-style: solid;
    cursor: not-allowed;
    box-shadow: none;
}
.ot-input.is-saving { opacity: .55; }
.ot-input.is-saved {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 0 0 2.5px rgba(22, 163, 74, .14);
}
.ot-input.is-error {
    border-color: #dc2626;
    background: #fef2f2;
    box-shadow: 0 0 0 2.5px rgba(220, 38, 38, .14);
}
.cell-input.is-auto,
.cell-input.is-auto:disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    border-style: dashed;
    color: var(--muted);
    cursor: not-allowed;
}

.ot-row.is-locked .ot-input,
.ot-row.is-locked .ot-input:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: var(--muted);
    cursor: not-allowed;
}
.ot-row.is-locked .avatar { opacity: .65; }

/* --- Gündelik (günübirlik işçi) ekranı -------------------------------- */
.crew-table { font-size: 12.8px; table-layout: fixed; min-width: 720px; }
.crew-table th, .crew-table td { padding: 6px 4px; vertical-align: middle; overflow: hidden; }
.crew-table th { vertical-align: bottom; white-space: nowrap; }
.crew-table th .th-sub,
.crew-table tfoot .th-sub {
    display: block;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--muted-2);
    font-size: 10.5px;
}
.crew-table .crew-col-name { width: 21%; }
.crew-table .crew-col-day { width: 6.6%; }
.crew-table .crew-col-sum { width: 7.5%; }
.crew-table .crew-col-amount { width: 11%; }
.crew-table .crew-col-status { width: 9.5%; }
.crew-table .crew-col-act { width: 8%; }
.crew-table .col-name { padding-left: 10px; }
.crew-table .crew-day { text-align: center; }
.crew-table .crew-sum-col,
.crew-table .crew-amount-col { background: rgba(148, 163, 184, .10); }
.crew-table .crew-status-col { text-align: center; font-size: 11.5px; }
.crew-table .crew-status-col small { display: block; font-size: 10px; }
.crew-table .crew-act-col { text-align: center; }
.crew-table .crew-act-col form { display: inline-block; }
.crew-table tfoot td { background: var(--surface-2); font-weight: 700; border-top: 1.5px solid var(--line-strong, #cbd5e1); }
.crew-table .cell-input,
.crew-table .cell-input.w-60 { min-width: 0; width: 100%; padding: 0 3px; height: 28px; font-size: 12.5px; }
.crew-table tbody tr.is-locked:nth-child(odd) td { background: #f8fafc; }
.crew-table tbody tr.is-locked:nth-child(even) td { background: #f1f5f9; }
.crew-table tbody tr.is-locked .avatar { opacity: .65; }

/* Gündelik hücresi: yazılabilir olduğu apaçık görünsün */
.crew-table .crew-input { text-align: center; font-variant-numeric: tabular-nums; }
.crew-table .crew-input {
    background: #fff;
    border: 1.5px solid #b6c2d1;
    color: var(--text);
    cursor: text;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .07);
}
.crew-table .crew-input:placeholder-shown {
    background: #eef2f7;
    border-style: dashed;
    border-color: #94a3b8;
    color: #94a3b8;
}
.crew-table .crew-input::placeholder { color: #94a3b8; font-weight: 700; }
.crew-table .crew-input:hover { border-color: #64748b; background: #fff; }
.crew-table .crew-input:focus {
    border: 1.5px solid var(--brand);
    border-style: solid;
    background: #fff;
    box-shadow: 0 0 0 3px var(--brand-ring);
}
.crew-table .crew-input.is-saving { opacity: .7; }
.crew-table .crew-input.is-saved { border-color: var(--success); box-shadow: 0 0 0 2.5px rgba(22, 163, 74, .16); }
.crew-table .crew-input.is-error { border-color: #dc2626; background: #fef2f2; }
.crew-row.is-locked .crew-input,
.crew-row.is-locked .crew-input:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    border-style: solid;
    color: var(--muted);
    cursor: not-allowed;
    box-shadow: none;
}
.crew-table tr.crew-new-group td { background: var(--surface-2); }
.crew-group-act { white-space: nowrap; text-align: right; }
.crew-group-act .btn { margin-right: 4px; }

/* ==========================================================================
   Puantaj + Mesai kalan (minimal) + Roller
   ========================================================================== */
.text-ok { color: #16a34a !important; }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-warn { background: #ffedd5; color: #9a3412; }
.empty-state {
    padding: 24px 14px;
    text-align: center;
    color: var(--muted);
    font-size: 13.5px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 12px;
}

.att-mini-bar, .mk-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.mk-nav {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}
.mk-period, .att-mini-bar .mk-period {
    flex: 1;
    min-width: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.25;
}
.mk-period strong { font-size: 13.5px; font-weight: 700; }
.mk-period span { font-size: 11px; color: var(--muted); }

.att-days, .mk-days {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0 8px;
    margin-bottom: 4px;
}
.att-day, .mk-day {
    flex: 1 1 0;
    min-width: 40px;
    max-width: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 6px 4px 5px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.15;
}
.att-day-name, .mk-day > span {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
}
.att-day-num, .mk-day > b {
    font-size: 14px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}
.att-day-meta, .mk-day > i {
    font-size: 9px;
    font-style: normal;
    color: var(--muted);
    font-weight: 600;
}
.att-day.is-today, .mk-day.is-today { border-color: #fdba74; background: #fff7ed; }
.att-day.is-active, .mk-day.is-active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}
.att-day.is-active .att-day-name,
.att-day.is-active .att-day-meta,
.mk-day.is-active > span,
.mk-day.is-active > i { color: rgba(255,255,255,.85); }

.att-search, .mk-search { margin-bottom: 6px; }
.att-search .input, .mk-search .input {
    width: 100%;
    min-height: 34px;
    height: 34px;
    font-size: 13.5px;
    border-radius: 10px;
}

/* Puantaj satırları — kompakt */
.att-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
}
.att-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) auto auto;
    gap: 6px;
    align-items: center;
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
    background: var(--row-odd);
}
.att-card:nth-child(even) { background: var(--row-even); }
.att-card:last-child { border-bottom: 0; }
.att-card-who {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.att-card-who strong {
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.att-card-who .badge { font-size: 9.5px; padding: 1px 5px; }
.att-card-status {
    display: inline-flex;
    gap: 3px;
}
.att-st {
    min-height: 28px;
    height: 28px;
    padding: 0 7px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-2);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
}
.att-st:disabled { opacity: .5; cursor: not-allowed; }
.att-st.is-on.is-ok { background: #16a34a; border-color: #16a34a; color: #fff; }
.att-st.is-on.is-bad { background: #dc2626; border-color: #dc2626; color: #fff; }
.att-st.is-on.is-warn { background: #0369a1; border-color: #0369a1; color: #fff; }
.att-out.is-focus-out {
    border-color: #0369a1;
    box-shadow: 0 0 0 2px rgba(3, 105, 161, .2);
}

.att-card-times {
    display: inline-flex;
    gap: 3px;
}
.att-card-times.is-disabled { opacity: .35; pointer-events: none; }
.att-card-times .input {
    width: 78px;
    min-height: 28px;
    height: 28px;
    padding: 0 4px;
    font-size: 12px;
    font-weight: 650;
    border-radius: 7px;
    font-variant-numeric: tabular-nums;
}

.att-cell-ok { background: #f0fdf4; }
.att-cell-bad { background: #fef2f2; }
.att-cell-warn { background: #fff7ed; }
.att-cell-btn, .att-th-day {
    border: 0; background: transparent; font: inherit; cursor: pointer;
    width: 100%; min-height: 28px; color: inherit;
}
.att-th-day { font-weight: 700; line-height: 1.2; }
.att-th-day small { font-weight: 500; color: var(--muted); }

.att-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 14px);
    transform: translateX(-50%);
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 16px;
    background: #1c1917;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    max-width: calc(100vw - 28px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
    letter-spacing: .01em;
    animation: attToastIn .18s ease-out;
}
.att-toast[hidden] { display: none !important; }
.att-toast.is-confirm {
    min-width: min(280px, calc(100vw - 28px));
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}
.att-toast.has-detail { padding: 12px 18px 14px; }
.att-toast.is-ok { background: #15803d; }
.att-toast.is-bad { background: #b91c1c; }
.att-toast.is-warn { background: #b45309; }
.att-toast-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.att-toast-name { font-size: 16px; font-weight: 800; }
.att-toast-st {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    white-space: nowrap;
}
.att-toast-detail {
    display: block;
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.35;
    opacity: .95;
    max-width: 34em;
}
.att-toast-msg { font-weight: 650; }
@keyframes attToastIn {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
@media (min-width: 901px) {
    .att-toast { bottom: 28px; }
}
@media (max-width: 520px) {
    .att-card {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 5px 8px;
        padding: 8px 10px;
    }
    .att-card-who { grid-column: 1; }
    .att-card-status { grid-column: 2; justify-self: end; }
    .att-card-times { grid-column: 1 / -1; width: 100%; }
    .att-card-times .input { flex: 1; width: auto; }
}

/* Mesai kalan — gündüz / gece tek tık */
.mk-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 6px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}
.mk-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mk-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
    border: 1px solid var(--border);
    background: var(--surface-2);
}
.mk-dot.is-day { background: #ea580c; border-color: #ea580c; }
.mk-dot.is-night { background: #1e3a5f; border-color: #1e3a5f; }

.mk-list {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
}
.mk-head, .mk-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 72px 72px;
    gap: 6px;
    align-items: center;
    padding: 6px 10px;
}
.mk-head {
    background: var(--surface-2);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 1px solid var(--border);
}
.mk-row {
    border-bottom: 1px solid var(--border);
    min-height: 40px;
    background: var(--row-odd);
}
.mk-row:nth-child(even) { background: var(--row-even); }
.mk-row:last-child { border-bottom: 0; }
.mk-who { min-width: 0; }
.mk-who strong {
    display: block;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mk-tog {
    height: 30px;
    min-height: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    padding: 0 4px;
    transition: .1s ease;
}
.mk-tog:disabled { opacity: .5; cursor: not-allowed; }
.mk-tog .mk-tog-on { display: none; }
.mk-tog .mk-tog-off { display: inline; }
.mk-tog.is-on .mk-tog-on { display: inline; }
.mk-tog.is-on .mk-tog-off { display: none; }
.mk-tog.is-day.is-on {
    background: #ea580c;
    border-color: #c2410c;
    color: #fff;
}
.mk-tog.is-night.is-on {
    background: #1e3a5f;
    border-color: #0f2744;
    color: #fff;
}
.mk-tog:active:not(:disabled) { transform: scale(.96); }

.md-filters { margin: 4px 0 12px; width: 100%; }
.md-filters a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

/* Gündelik — gündüz / gece tek tık */
.crew-app { margin-top: 4px; }
.crew-dn-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
}
.crew-dn-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}
.crew-dn-row:last-child { border-bottom: 0; }
.crew-dn-row.is-locked { opacity: .78; background: #fafafa; }
.crew-dn-who { min-width: 0; }
.crew-dn-who strong {
    display: block;
    font-size: 13.5px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.crew-dn-who small {
    font-size: 11px;
    color: var(--muted);
}
.crew-dn-ctrls {
    display: flex;
    gap: 8px;
}
.crew-dn-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.crew-dn-label {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}
.crew-dn-block.is-day .crew-dn-label { color: #c2410c; }
.crew-dn-block.is-night .crew-dn-label { color: #1e3a5f; }
.crew-dn-step {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-2);
}
.crew-dn-block.is-day .crew-dn-step { border-color: #fdba74; }
.crew-dn-block.is-night .crew-dn-step { border-color: #94a3b8; }
.crew-dn-btn {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    line-height: 1;
}
.crew-dn-btn:disabled { opacity: .4; cursor: not-allowed; }
.crew-dn-btn:active:not(:disabled) { background: rgba(0,0,0,.06); }
.crew-dn-val {
    min-width: 28px;
    text-align: center;
    font-size: 13.5px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    padding: 0 2px;
}
.crew-dn-block.is-day .crew-dn-val { color: #c2410c; }
.crew-dn-block.is-night .crew-dn-val { color: #1e3a5f; }
.crew-dn-pay { justify-self: end; }
@media (max-width: 620px) {
    .crew-dn-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 6px;
    }
    .crew-dn-who { grid-column: 1 / -1; }
    .crew-dn-pay { grid-column: 1 / -1; justify-self: stretch; }
    .crew-dn-pay .btn { width: 100%; }
}

/* Roller */
.roles-create, .roles-rename {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}
.roles-tabs {
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 12px;
}
.roles-tabs a { flex: 0 1 auto; }
.roles-group { margin-bottom: 18px; }
.roles-rows { display: flex; flex-direction: column; gap: 8px; }
.roles-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
}
.roles-row-label strong { display: block; font-size: 14px; }
.roles-row-label small { color: var(--muted); font-size: 11px; }
.roles-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.sticky-actions {
    position: sticky;
    bottom: calc(var(--bottom-nav-h, 0px) + 8px);
    display: flex;
    gap: 8px;
    padding: 12px 0 4px;
    background: linear-gradient(transparent, var(--bg) 30%);
}
@media (max-width: 620px) {
    .roles-row {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    .roles-row-label { grid-column: 1 / -1; }
    .mk-head, .mk-row { grid-template-columns: minmax(0, 1fr) 64px 64px; padding: 6px 8px; }
}

@media print {
    .sidebar, .topbar, .page-foot, .pay-toolbar, .bulk-fill, .no-print, .toast-stack { display: none !important; }    .app { display: block; }
    .content { padding: 0; }
    body { background: #fff; }
    .card { box-shadow: none; border-color: #d1d5db; break-inside: avoid; }
    .pay-table { min-width: 0; font-size: 10.5px; }
    .cell-input { border: 0; background: transparent; }
}
