:root {
    --bg: #f3f6fb;
    --card: #ffffff;
    --text: #101828;
    --muted: #667085;
    --line: #e4e7ec;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --shadow: 0 18px 45px rgba(16, 24, 40, .08);
    --radius: 22px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #dbeafe 0, transparent 35%), var(--bg);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.sidebar {
    position: fixed;
    top: 18px;
    left: 18px;
    bottom: 18px;
    width: 270px;
    height: calc(100vh - 36px);
    background: #111827;
    color: white;
    border-radius: 28px;
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 10;
    overflow: hidden;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px 16px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    flex-shrink: 0;
}
.brand-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, #2563eb, #22c55e); font-size: 23px; }
.brand strong { display: block; font-size: 18px; }
.brand span { display: block; color: #cbd5e1; font-size: 12px; margin-top: 3px; line-height: 1.35; }
nav {
    display: grid;
    gap: 8px;
    align-content: start;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}
nav a { padding: 13px 14px; border-radius: 16px; color: #d1d5db; font-weight: 800; }
nav a:hover, nav a.active { background: rgba(255,255,255,.12); color: white; }

.sidebar-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-weight: 900;
    padding: 10px 12px;
    cursor: pointer;
    min-height: 40px;
    white-space: nowrap;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.18); }
.main { margin-left: 306px; padding: 30px; min-height: 100vh; }
.main-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: 34px; }
.login-logo { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, #2563eb, #16a34a); color: white; font-size: 32px; margin-bottom: 16px; }
.login-card h1 { margin: 0 0 6px; font-size: 30px; }
.login-card p { color: var(--muted); margin: 0 0 22px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.03em; }
.page-head p { margin: 0; color: var(--muted); line-height: 1.5; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat-card, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card { padding: 22px; min-width: 0; }
.stat-card span { color: var(--muted); font-size: 14px; display: block; margin-bottom: 10px; }
.stat-card strong { font-size: clamp(20px, 2.1vw, 30px); word-break: break-word; }
.stat-card.highlight { background: #eff6ff; border-color: #bfdbfe; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-bottom: 20px; }
.customers-grid { align-items: stretch; }
.card { padding: 22px; margin-bottom: 20px; }
.card h2 { margin: 0 0 16px; font-size: 20px; letter-spacing: -.02em; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title h2 { margin: 0; }
.card-title a { color: var(--primary); font-weight: 900; font-size: 14px; }
.form { display: grid; gap: 12px; }
.compact-form { gap: 10px; }
.form label { font-size: 14px; font-weight: 850; color: #344054; }
input, textarea, select {
    width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; outline: none; background: white; color: var(--text);
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #93c5fd; box-shadow: 0 0 0 4px #dbeafe; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-card { max-width: 820px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: white; color: var(--text); border-radius: 13px; padding: 12px 16px; font-weight: 900; cursor: pointer; white-space: nowrap; transition: .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); border-color: var(--success); color: white; }
.btn-light { background: #f8fafc; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: white; }
.btn-small { padding: 8px 11px; font-size: 13px; border-radius: 11px; }
.inline-form { display: inline-flex; margin: 0; }
.radio-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.radio-tabs label { border: 1px solid var(--line); border-radius: 16px; padding: 13px; background: #f8fafc; cursor: pointer; }
.radio-tabs input { width: auto; margin-right: 6px; }
.filters-row, .month-filter { display: grid; grid-template-columns: auto minmax(260px, 1fr) auto auto; gap: 12px; align-items: end; }
.month-filter { grid-template-columns: 220px auto auto auto; }
.filter-actions { display: flex; gap: 10px; }
.month-filter-card { margin-top: -4px; }
.dashboard-card { height: 430px; display: flex; flex-direction: column; overflow: hidden; }
.report-card { height: 520px; }
.dashboard-card .card-title { flex: 0 0 auto; }
.dashboard-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: auto; padding-right: 6px; scrollbar-gutter: stable; }
.list-scroll, .movements-scroll { max-height: 560px; overflow: auto; padding-right: 6px; scrollbar-gutter: stable; border-radius: 14px; }
.large-scroll { max-height: 650px; }
.small-scroll { max-height: 360px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
.jobs-table { min-width: 1050px; }
.jobs-table-clean { min-width: 860px; }
.jobs-table-clean td.right small { margin-top: 6px; }
.customers-table { min-width: 920px; }
.items-table { min-width: 760px; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 13px; font-weight: 900; background: var(--card); }
.list-scroll thead th, .movements-scroll thead th, .dashboard-scroll thead th { position: sticky; top: 0; z-index: 2; background: var(--card); }
tbody tr:hover { background: #f8fafc; }
td small, .activity small, .customers-table small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; line-height: 1.35; }
.right { text-align: right; }
.center { text-align: center; }
.muted { color: var(--muted); }
.debt-text { color: var(--danger); font-weight: 900; }
.payment-text { color: var(--success); font-weight: 900; }
.badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; white-space: nowrap; }
.badge-debt { background: #fee2e2; color: #991b1b; }
.badge-payment { background: #dcfce7; color: #166534; }
.activity-list { display: grid; gap: 10px; }
.activity { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 15px; }
.activity:hover { background: #f8fafc; }
.actions-col { width: 270px; }
.actions-cell { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: nowrap; }
.action-btn { min-width: 122px; height: 38px; padding: 0 12px; }
.alert { padding: 13px 15px; border-radius: 14px; margin-bottom: 16px; border: 1px solid transparent; transition: opacity .3s, transform .3s; }
.alert-hide { opacity: 0; transform: translateY(-6px); }
.alert-success { background: #dcfce7; border-color: #bbf7d0; color: #166534; }
.alert-danger { background: #fee2e2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.link-danger { border: 0; background: transparent; color: var(--danger); cursor: pointer; font-weight: 900; }
.tip-box, .report-note p { background: #f8fafc; border: 1px dashed #cbd5e1; color: #475467; border-radius: 16px; padding: 12px; line-height: 1.55; }
.small-note { font-size: 13px; margin: 7px 0 0; }
.totals-box { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.totals-box > div { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #f8fafc; }
.totals-box span { display:block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.totals-box strong { font-size: 19px; }
.totals-box.one-line { grid-template-columns: 1fr; }
.sticky-actions { position: sticky; bottom: 12px; background: rgba(243,246,251,.82); backdrop-filter: blur(10px); padding: 12px; border-radius: 18px; border: 1px solid rgba(228,231,236,.8); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 1180px) {
    .stats, .stats-5, .stats-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
    .sidebar { position: static; width: 100%; border-radius: 0 0 24px 24px; }
    .main { margin-left: 0; padding: 20px; }
    .stats, .stats-5, .stats-6, .grid-2, .form-row, .radio-tabs, .totals-box { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; }
    .head-actions { justify-content: flex-start; }
    .filters-row, .month-filter { grid-template-columns: 1fr; }
    .filter-actions { flex-direction: column; }
    .dashboard-card { height: 460px; }
}


.small-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.warning-card { border-color: #f59e0b; background: #fffbeb; color: #92400e; }


/* Cari müşteriler aktif/pasif seçim butonları */
.customer-toggle-actions { gap: 10px; flex-wrap: wrap; }
.customer-toggle-btn {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}
.customer-toggle-btn:hover { background: #1d4ed8; border-color: #1d4ed8; }
.customer-toggle-btn.is-selected {
    background: #1e40af;
    border-color: #1e40af;
    color: #fff !important;
}

/* Müşteri detayında işler ve cari hareketler: 10 kayıt yüklenir, kutuda yaklaşık 3 satır görünür */
.customer-compact-scroll {
    max-height: 235px;
    overflow-y: auto;
    overflow-x: auto;
}
.table-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.pager-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Yazılım kategorisi için işçi/yüzde alanı */
.worker-section {
    margin-top: 14px;
    border: 1px dashed #bfdbfe;
    background: #eff6ff;
    border-radius: 18px;
    padding: 14px;
}
.worker-section h3 {
    margin: 0 0 8px;
    font-size: 17px;
}
.worker-preview {
    margin-top: 12px;
    background: #ffffff;
}
.worker-summary-card {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* Ayarlar sayfası */
.settings-grid { align-items: start; }
.workers-table { min-width: 1180px; }
.inline-settings-form { display: block; margin: 0; }
.settings-rate-cell input { max-width: 130px; display: inline-block; }
.settings-actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; flex-wrap: wrap; }
.worker-add-form { margin-top: 14px; }


/* Kâr raporu işçi dökümü */
.worker-report-card { overflow: hidden; }
.worker-report-table { min-width: 920px; }

/* İşçi ayarları maaş alanı */
.settings-money-cell input { max-width: 150px; display: inline-block; }
.recurring-expense-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; justify-content:flex-end; }
.recurring-expense-card { border-color:#bfdbfe; background:#eff6ff; }

/* İşçi paneli giriş ve ayarları */
.check-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 850;
    color: #344054;
}
.check-line input[type="checkbox"] {
    width: auto;
    min-width: 18px;
    height: 18px;
    box-shadow: none;
}
.check-line.mini {
    margin-top: 8px;
    font-size: 12px;
}
.worker-login-info-card {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.worker-login-url {
    display: inline-flex;
    align-items: center;
    width: 100%;
    border: 1px dashed #93c5fd;
    background: #fff;
    color: #1d4ed8;
    border-radius: 14px;
    padding: 13px 14px;
    font-weight: 900;
    overflow-x: auto;
}
.worker-login-cell {
    min-width: 260px;
}
.worker-login-cell input {
    margin-bottom: 8px;
    padding: 10px 11px;
}
.worker-sidebar .brand-icon {
    background: linear-gradient(135deg, #f59e0b, #2563eb);
}
@media (max-width: 920px) {
    .worker-login-cell { min-width: 220px; }
}

/* Ortadan çıkan bildirim: sayfayı aşağı-yukarı oynatmaz */
.alert[data-auto-dismiss] {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: min(430px, calc(100vw - 32px));
    margin: 0;
    padding: 16px 18px;
    text-align: center;
    font-weight: 900;
    line-height: 1.45;
    z-index: 99999;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
    animation: toast-pop .18s ease-out;
}
.alert[data-auto-dismiss].alert-hide {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 10px)) scale(.96);
}
@keyframes toast-pop {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)) scale(.96); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* İşçi paneli telefon optimizasyonu */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 640px) {
    body {
        background: #f3f6fb;
        -webkit-text-size-adjust: 100%;
    }
    .main { padding: 14px; }
    .main-login { padding: 14px; align-items: start; padding-top: 18px; }
    .login-card { padding: 22px; border-radius: 22px; }
    .login-card h1 { font-size: 25px; }
    .sidebar {
        padding: 12px;
        gap: 10px;
        border-radius: 0 0 22px 22px;
    }
    .brand {
        gap: 10px;
        padding: 6px 4px 10px;
    }
    .brand-icon {
        width: 40px;
        height: 40px;
        border-radius: 14px;
        font-size: 21px;
    }
    .brand strong { font-size: 16px; }
    .brand span { font-size: 11px; }
    .worker-sidebar nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .worker-sidebar nav a {
        padding: 10px 8px;
        font-size: 13px;
        text-align: center;
        border-radius: 14px;
    }
    .worker-main .page-head,
    .page-head {
        gap: 12px;
        margin-bottom: 16px;
    }
    .page-head h1 { font-size: 26px; }
    .page-head p { font-size: 14px; }
    .worker-main .head-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
    .worker-main .head-actions .btn { width: 100%; }
    .card {
        padding: 16px;
        margin-bottom: 14px;
        border-radius: 18px;
    }
    .card-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .card-title .muted { font-size: 12px; }
    .worker-main .stats,
    .worker-main .stats-5,
    .worker-main .stats-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .worker-main .stat-card {
        padding: 14px;
        border-radius: 18px;
    }
    .worker-main .stat-card span {
        font-size: 12px;
        margin-bottom: 6px;
    }
    .worker-main .stat-card strong {
        font-size: 18px;
    }
    .worker-month-filter {
        grid-template-columns: 1fr;
    }
    .worker-month-filter .btn,
    .worker-main .form-actions .btn {
        width: 100%;
    }
    .worker-report-card .table-wrap {
        max-height: 62vh;
        overflow: auto;
        border-radius: 14px;
        -webkit-overflow-scrolling: touch;
    }
    .worker-report-table,
    .worker-main .items-table {
        min-width: 980px !important;
    }
    .worker-report-table th,
    .worker-report-table td,
    .worker-main .items-table th,
    .worker-main .items-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    .worker-report-table thead th,
    .worker-main .items-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--card);
    }
    .worker-main .small-actions {
        justify-content: flex-start;
        gap: 7px;
    }
    .worker-main .inline-form {
        flex-wrap: wrap !important;
        width: 100%;
    }
    .worker-main .inline-form input[type="number"] {
        width: 120px !important;
        min-width: 110px;
    }
    .worker-main .radio-tabs,
    .worker-main .form-row {
        grid-template-columns: 1fr;
    }
    .worker-main input,
    .worker-main select,
    .worker-main textarea,
    .main-login input,
    .main-login select,
    .main-login textarea {
        font-size: 16px;
    }
    .sticky-actions {
        bottom: 8px;
        padding: 10px;
        border-radius: 16px;
    }
}


/* İşçi yeni iş kaydı: telefon formu düzgün kayar, kaydet butonu hep okunur */
@media (max-width: 640px) {
    body.worker-job-page {
        overflow-x: hidden;
        padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
    }
    body.worker-job-page .worker-main {
        padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
    }
    body.worker-job-page .form {
        gap: 12px;
    }
    body.worker-job-page .card {
        overflow: visible;
    }
    body.worker-job-page .table-wrap {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    body.worker-job-page .items-table,
    body.worker-job-page .items-table tbody,
    body.worker-job-page .items-table tr,
    body.worker-job-page .items-table td {
        display: block;
        width: 100%;
        min-width: 0 !important;
    }
    body.worker-job-page .items-table {
        border-collapse: separate;
        border-spacing: 0;
    }
    body.worker-job-page .items-table thead {
        display: none;
    }
    body.worker-job-page .items-table tr {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(16, 24, 40, .05);
    }
    body.worker-job-page .items-table td {
        border: 0;
        padding: 0;
        margin-bottom: 10px;
        text-align: left !important;
    }
    body.worker-job-page .items-table td:last-child {
        margin-bottom: 0;
    }
    body.worker-job-page .items-table td::before {
        display: block;
        margin: 0 0 6px;
        color: #344054;
        font-size: 13px;
        font-weight: 900;
    }
    body.worker-job-page .items-table td:nth-child(1)::before { content: "Yapılan iş / parça"; }
    body.worker-job-page .items-table td:nth-child(2)::before { content: "Satış"; }
    body.worker-job-page .items-table td:nth-child(3)::before { content: "Maliyet"; }
    body.worker-job-page .items-table td:nth-child(4)::before { content: "İşlem"; }
    body.worker-job-page .items-table input {
        width: 100%;
        text-align: left !important;
    }
    body.worker-job-page .items-table input[type="number"] {
        text-align: right !important;
    }
    body.worker-job-page .items-table .link-danger {
        width: 100%;
        min-height: 42px;
        border: 1px solid #fecaca;
        border-radius: 12px;
        background: #fff1f2;
    }
    body.worker-job-page .sticky-actions {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 9999;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: auto;
        margin: 0;
        padding: 10px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid #dbeafe;
        box-shadow: 0 18px 50px rgba(15, 23, 42, .22);
        backdrop-filter: blur(12px);
    }
    body.worker-job-page .sticky-actions .btn {
        width: 100%;
        min-height: 48px;
        white-space: normal;
        line-height: 1.2;
        text-align: center;
        padding: 12px 14px;
        font-size: 15px;
    }
    body.worker-job-page .sticky-actions .btn-primary {
        font-size: 16px;
    }
}


/* Admin panel: telefon/tablet tam optimizasyonu */
@media (max-width: 760px) {
    body.admin-page {
        overflow-x: hidden;
        background: #f3f6fb;
        -webkit-text-size-adjust: 100%;
        padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
    }
    body.admin-page .sidebar {
        position: static;
        inset: auto;
        width: 100%;
        border-radius: 0 0 22px 22px;
        padding: 12px;
        gap: 10px;
        box-shadow: 0 14px 36px rgba(15, 23, 42, .14);
    }
    body.admin-page .brand {
        gap: 10px;
        padding: 6px 4px 10px;
    }
    body.admin-page .brand-icon {
        width: 40px;
        height: 40px;
        border-radius: 14px;
        font-size: 21px;
    }
    body.admin-page .brand strong { font-size: 16px; }
    body.admin-page .brand span { font-size: 11px; }
    body.admin-page nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    body.admin-page nav a {
        padding: 10px 8px;
        font-size: 13px;
        text-align: center;
        border-radius: 14px;
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.25;
    }
    body.admin-page .main {
        margin-left: 0;
        padding: 14px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px));
    }
    body.admin-page .page-head {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 16px;
    }
    body.admin-page .page-head h1 { font-size: 26px; }
    body.admin-page .page-head p { font-size: 14px; }
    body.admin-page .head-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        justify-content: stretch;
    }
    body.admin-page .head-actions .btn { width: 100%; }
    body.admin-page .card {
        padding: 16px;
        margin-bottom: 14px;
        border-radius: 18px;
        max-width: 100%;
        overflow: hidden;
    }
    body.admin-page .card-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    body.admin-page .card-title .small-actions,
    body.admin-page .card-title .head-actions,
    body.admin-page .card-title .filter-actions {
        width: 100%;
        justify-content: stretch;
    }
    body.admin-page .stats,
    body.admin-page .stats-5,
    body.admin-page .stats-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 14px;
    }
    body.admin-page .stat-card {
        padding: 14px;
        border-radius: 18px;
        min-width: 0;
    }
    body.admin-page .stat-card span {
        font-size: 12px;
        margin-bottom: 6px;
    }
    body.admin-page .stat-card strong {
        font-size: 18px;
        line-height: 1.25;
    }
    body.admin-page .grid-2,
    body.admin-page .form-row,
    body.admin-page .radio-tabs,
    body.admin-page .totals-box,
    body.admin-page .filters-row,
    body.admin-page .month-filter {
        grid-template-columns: 1fr !important;
    }
    body.admin-page .filter-actions,
    body.admin-page .form-actions,
    body.admin-page .small-actions,
    body.admin-page .settings-actions,
    body.admin-page .recurring-expense-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        justify-content: stretch;
        gap: 8px;
    }
    body.admin-page .filter-actions .btn,
    body.admin-page .form-actions .btn,
    body.admin-page .small-actions .btn,
    body.admin-page .settings-actions .btn,
    body.admin-page .recurring-expense-actions .btn,
    body.admin-page .inline-form .btn {
        width: 100%;
        min-height: 44px;
        white-space: normal;
        line-height: 1.2;
    }
    body.admin-page input,
    body.admin-page select,
    body.admin-page textarea,
    body.admin-login-page input,
    body.admin-login-page select,
    body.admin-login-page textarea {
        font-size: 16px;
    }
    body.admin-page .dashboard-card,
    body.admin-page .report-card {
        height: auto;
        min-height: 0;
        max-height: none;
    }
    body.admin-page .dashboard-scroll,
    body.admin-page .list-scroll,
    body.admin-page .movements-scroll,
    body.admin-page .table-wrap {
        width: 100%;
        max-width: 100%;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 14px;
    }
    body.admin-page .dashboard-scroll,
    body.admin-page .list-scroll,
    body.admin-page .movements-scroll {
        max-height: 62vh;
    }
    body.admin-page table {
        min-width: 760px;
    }
    body.admin-page .jobs-table,
    body.admin-page .customers-table,
    body.admin-page .workers-table {
        min-width: 980px;
    }
    body.admin-page th,
    body.admin-page td {
        padding: 10px 8px;
        font-size: 13px;
    }
    body.admin-page thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--card);
    }
    body.admin-page .actions-cell {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 7px;
    }
    body.admin-page .action-btn {
        min-width: 108px;
        height: 38px;
    }
    body.admin-page .inline-form {
        width: 100%;
        display: block;
    }
    body.admin-page .inline-form input,
    body.admin-page .inline-form select {
        margin-bottom: 8px;
    }
    body.admin-page .check-line {
        width: 100%;
        justify-content: flex-start;
    }
    body.admin-page .worker-login-cell,
    body.admin-page .settings-money-cell,
    body.admin-page .settings-rate-cell {
        min-width: 0;
    }
    body.admin-page .settings-money-cell input,
    body.admin-page .settings-rate-cell input {
        max-width: 100%;
        width: 100%;
    }
    body.admin-page .worker-login-url {
        white-space: nowrap;
        overflow-x: auto;
    }
    body.admin-page .sticky-actions {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 9998;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: auto;
        margin: 0;
        padding: 10px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid #dbeafe;
        box-shadow: 0 18px 50px rgba(15, 23, 42, .22);
        backdrop-filter: blur(12px);
        border-radius: 16px;
    }
    body.admin-page .sticky-actions .btn {
        width: 100%;
        min-height: 48px;
        white-space: normal;
        line-height: 1.2;
        text-align: center;
        padding: 12px 14px;
        font-size: 15px;
    }
}

/* Admin yeni iş / iş düzenle formu: telefonda kalemleri kart gibi göster */
@media (max-width: 640px) {
    body.admin-page form[action="save_job.php"] .table-wrap {
        overflow: visible;
    }
    body.admin-page form[action="save_job.php"] .items-table,
    body.admin-page form[action="save_job.php"] .items-table tbody,
    body.admin-page form[action="save_job.php"] .items-table tr,
    body.admin-page form[action="save_job.php"] .items-table td {
        display: block;
        width: 100%;
        min-width: 0 !important;
    }
    body.admin-page form[action="save_job.php"] .items-table thead {
        display: none;
    }
    body.admin-page form[action="save_job.php"] .items-table tr {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(16, 24, 40, .05);
    }
    body.admin-page form[action="save_job.php"] .items-table td {
        border: 0;
        padding: 0;
        margin-bottom: 10px;
        text-align: left !important;
    }
    body.admin-page form[action="save_job.php"] .items-table td:last-child {
        margin-bottom: 0;
    }
    body.admin-page form[action="save_job.php"] .items-table td::before {
        display: block;
        margin: 0 0 6px;
        color: #344054;
        font-size: 13px;
        font-weight: 900;
    }
    body.admin-page form[action="save_job.php"] .items-table td:nth-child(1)::before { content: "Yapılan iş / parça"; }
    body.admin-page form[action="save_job.php"] .items-table td:nth-child(2)::before { content: "Satış"; }
    body.admin-page form[action="save_job.php"] .items-table td:nth-child(3)::before { content: "Maliyet"; }
    body.admin-page form[action="save_job.php"] .items-table td:nth-child(4)::before { content: "İşlem"; }
    body.admin-page form[action="save_job.php"] .items-table input {
        width: 100%;
        text-align: left !important;
    }
    body.admin-page form[action="save_job.php"] .items-table input[type="number"] {
        text-align: right !important;
    }
    body.admin-page form[action="save_job.php"] .items-table .link-danger {
        width: 100%;
        min-height: 42px;
        border: 1px solid #fecaca;
        border-radius: 12px;
        background: #fff1f2;
    }
}


/* Admin mobil menü: kapalı/açık kullanımı */
@media (max-width: 760px) {
    body.admin-page .sidebar {
        position: sticky;
        top: 0;
        z-index: 9997;
        border-radius: 0 0 22px 22px;
    }
    body.admin-page .sidebar .brand {
        border-bottom: 0;
        padding: 8px 6px;
    }
    body.admin-page .sidebar .brand-text {
        min-width: 0;
    }
    body.admin-page .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
    }
    body.admin-page .sidebar nav {
        display: none;
        margin-top: 8px;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,.10);
    }
    body.admin-page .sidebar.menu-open nav {
        display: grid;
    }
    body.admin-page .sidebar:not(.menu-open) {
        gap: 0;
        box-shadow: 0 10px 26px rgba(15, 23, 42, .12);
    }
    body.admin-page .sidebar:not(.menu-open) .brand {
        padding-bottom: 8px;
    }
}

@media (max-width: 390px) {
    body.admin-page .stats,
    body.admin-page .stats-5,
    body.admin-page .stats-6 {
        grid-template-columns: 1fr;
    }
    body.admin-page nav {
        grid-template-columns: 1fr;
    }
}


/* İşçi paneli mobil menü: aç/kapat kullanımı */
@media (max-width: 760px) {
    .worker-sidebar {
        position: sticky;
        top: 0;
        z-index: 9997;
        width: 100%;
        border-radius: 0 0 22px 22px;
        padding: 12px;
        gap: 0;
        box-shadow: 0 10px 26px rgba(15, 23, 42, .12);
    }
    .worker-sidebar .brand {
        border-bottom: 0;
        padding: 8px 6px;
        gap: 10px;
    }
    .worker-sidebar .brand-text {
        min-width: 0;
    }
    .worker-sidebar .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
    }
    .worker-sidebar nav {
        display: none;
        margin-top: 8px;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,.10);
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .worker-sidebar.menu-open nav {
        display: grid;
    }
    .worker-sidebar nav a {
        text-align: center;
        padding: 12px 10px;
        border-radius: 14px;
    }
    .worker-sidebar:not(.menu-open) .brand {
        padding-bottom: 8px;
    }
}


/* İşçi paneli iş listesi: satır bozulması ve para alanı taşma düzeltmesi */
.worker-report-table th,
.worker-report-table td {
    vertical-align: middle;
}
.worker-report-table td.right,
.worker-report-table th.right,
.worker-report-table .payment-text,
.worker-report-table .debt-text,
.worker-report-table .rate-badge,
.worker-report-table .badge {
    white-space: nowrap;
}
.worker-report-table .right {
    min-width: 104px;
}
.worker-report-table td:nth-child(7),
.worker-report-table th:nth-child(7) {
    min-width: 76px;
}
.worker-report-table td:nth-child(10),
.worker-report-table th:nth-child(10) {
    min-width: 112px;
}
@media (min-width: 761px) {
    .worker-report-table td:last-child,
    .worker-report-table th:last-child {
        min-width: 350px;
    }
    .worker-report-table .small-actions {
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: flex-start;
    }
    .worker-report-table .inline-form {
        display: inline-flex;
        flex-wrap: nowrap !important;
        width: auto;
        align-items: center;
    }
    .worker-report-table .inline-form input[type="number"] {
        flex: 0 0 95px;
    }
    .worker-report-table .btn-small,
    .worker-report-table input[type="number"] {
        min-height: 36px;
    }
}
@media (max-width: 640px) {
    .worker-report-table,
    .worker-main .worker-report-table {
        min-width: 1180px !important;
    }
    .worker-report-table .right {
        min-width: 92px;
    }
}

/* İşçi panosu: tıklanabilir iş satırı (düzenlemeye gider) */
.worker-jobs-table tr.clickable-row { cursor: pointer; }
.worker-jobs-table tr.clickable-row:hover { background: rgba(37, 99, 235, .06); }


/* =========================================================
   Page specific styles moved from inline <style> blocks
   ========================================================= */

/* dashboard.php */
.dashboard-title-line { display:flex; align-items:center; gap:12px; flex-wrap:wrap; min-width:0; }
.dashboard-mini-counts { display:flex; align-items:center; gap:8px; }
.dashboard-mini-counts span { display:inline-flex; align-items:center; gap:5px; padding:6px 10px; border:1px solid var(--line); border-radius:999px; background:#f8fafc; color:#0f172a; font-weight:800; font-size:14px; line-height:1; white-space:nowrap; }
@media (max-width: 680px) {
    .dashboard-title-line { gap:8px; }
    .dashboard-mini-counts span { font-size:13px; padding:5px 8px; }
}

/* jobs.php */
.jobs-filter { grid-template-columns: 170px 170px minmax(260px, 1fr) 130px auto; }
@media (max-width: 1100px) { .jobs-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); } .jobs-filter .filter-actions { grid-column: span 2; } }
@media (max-width: 700px) { .jobs-filter { grid-template-columns: 1fr; } .jobs-filter .filter-actions { grid-column: auto; } }

/* reports.php */
.report-head { align-items: center; position: relative; }
.report-help-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .24);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
    color: #334155;
    font-weight: 900;
    white-space: nowrap;
}
.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 8px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: help;
    vertical-align: middle;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
}
.info-tooltip .tooltip-box {
    position: absolute;
    top: 34px;
    right: 0;
    left: auto;
    transform: translateY(-4px);
    width: min(460px, 74vw);
    max-width: calc(100vw - 42px);
    padding: 12px 14px;
    border-radius: 14px;
    background: #111827;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 500;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: .18s ease;
    z-index: 50;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .25);
}
.info-tooltip .tooltip-box::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 10px;
    left: auto;
    transform: none;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #111827;
}
.info-tooltip:hover .tooltip-box,
.info-tooltip:focus .tooltip-box {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.report-mini-note { color: var(--muted); font-size: 12px; display: block; margin-top: 4px; }
.stat-card.percent strong { color: #0f172a; }
@media (max-width: 720px) {
    .report-head { align-items: flex-start; }
    .report-help-top { margin-top: 12px; }
    .info-tooltip .tooltip-box { width: min(330px, 86vw); }
}

/* worker_report.php */
.worker-report-head { align-items: center; position: relative; }
.report-help-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .24);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
    color: #334155;
    font-weight: 900;
    white-space: nowrap;
}
.report-help-card .card-title { align-items: center; }
.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 8px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: help;
    vertical-align: middle;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
}
.info-tooltip .tooltip-box {
    position: absolute;
    top: 34px;
    right: 0;
    left: auto;
    transform: translateY(-4px);
    width: min(380px, 74vw);
    padding: 12px 14px;
    border-radius: 14px;
    background: #111827;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 500;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: .18s ease;
    z-index: 50;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .25);
}
.info-tooltip .tooltip-box::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 10px;
    left: auto;
    transform: none;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #111827;
}
.info-tooltip:hover .tooltip-box,
.info-tooltip:focus .tooltip-box {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.worker-report-table tr.clickable-row { cursor: pointer; }
.worker-report-table tr.clickable-row:hover { background: rgba(37, 99, 235, .06); }
.worker-report-table tr.selected-worker-row { background: rgba(37, 99, 235, .08); }
.worker-report-table tr.selected-worker-row td:first-child { border-left: 4px solid #2563eb; }
.worker-report-table tr.selected-worker-row .worker-name-link { color: #1d4ed8; }
.worker-name-cell { min-width: 170px; }
.worker-name-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    margin: -6px -9px;
    border-radius: 12px;
    transition: .18s ease;
    color: inherit;
}
.worker-name-cell:hover .worker-name-link {
    background: rgba(37, 99, 235, .12);
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.click-hint {
    display: none;
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    background: rgba(37, 99, 235, .10);
    border-radius: 999px;
    padding: 3px 7px;
    white-space: nowrap;
}
.worker-name-cell:hover .click-hint { display: inline-flex; }
.rate-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 5px 8px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    background: rgba(37, 99, 235, .10);
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, .18);
    white-space: nowrap;
}
.rate-badge.rate-different {
    background: rgba(245, 158, 11, .14);
    color: #b45309;
    border-color: rgba(245, 158, 11, .35);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .08);
}
.rate-note {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 800;
    color: #b45309;
    white-space: nowrap;
}
@media (max-width: 760px) {
    .info-tooltip .tooltip-box {
        left: auto;
        right: -20px;
        transform: translateY(-4px);
    }
    .info-tooltip:hover .tooltip-box,
    .info-tooltip:focus .tooltip-box {
        transform: translateY(0);
    }
    .info-tooltip .tooltip-box::before {
        left: auto;
        right: 24px;
        transform: none;
    }
}
.worker-month-filter { grid-template-columns: minmax(220px, 320px) minmax(220px, 1fr); align-items: end; }
@media (max-width: 760px) { .worker-month-filter { grid-template-columns: 1fr; } }


/* =========================================================
   Utility, print/export and newly added page styles
   ========================================================= */
.js-hidden { display: none; }
.mt-16 { margin-top: 16px; }
.uppercase-input { text-transform: uppercase; }
.login-switch { text-align: center; margin: 8px 0 0; }
.inline-block { display: inline-block; }
.white-link { color: #fff !important; }
.global-search-form { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 12px; align-items: end; }
.muted-card { color: var(--muted); }
.report-head-actions { align-items: center; justify-content: flex-end; }
.audit-filter-row { grid-template-columns: minmax(260px,1fr) 220px auto; }
.audit-table small { display: block; color: var(--muted); margin-top: 4px; max-width: 520px; overflow-wrap: anywhere; }
.worker-jobs-table { min-width: 1640px; }
.worker-row-actions { justify-content: flex-start; gap: 6px; }
.worker-inline-action { gap: 6px; align-items: center; flex-wrap: nowrap; }
.worker-payment-input { width: 95px; height: 36px; padding: 8px 9px; }

.print-body { background: #f8fafc; color: #111827; }
.print-page { width: min(980px, calc(100% - 32px)); margin: 24px auto; background: #fff; border: 1px solid #e5e7eb; border-radius: 18px; padding: 28px; box-shadow: 0 18px 45px rgba(15, 23, 42, .08); }
.print-actions { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 18px; }
.print-header { display: flex; justify-content: space-between; gap: 24px; border-bottom: 2px solid #111827; padding-bottom: 18px; margin-bottom: 18px; }
.print-header h1 { margin: 0 0 6px; font-size: 30px; }
.print-header p { margin: 0; color: #64748b; }
.print-header-right { text-align: right; display: grid; gap: 4px; align-content: start; }
.print-header-right span { color: #64748b; }
.statement-filter { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 12px; align-items: end; margin-bottom: 18px; }
.statement-summary, .receipt-info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.statement-summary div, .receipt-info-grid div { border: 1px solid #e5e7eb; border-radius: 14px; padding: 13px; background: #f8fafc; }
.statement-summary span, .receipt-info-grid span { display: block; color: #64748b; font-size: 12px; margin-bottom: 6px; }
.statement-summary strong, .receipt-info-grid strong { font-size: 18px; }
.print-table { width: 100%; min-width: 0; border-collapse: collapse; margin-top: 12px; }
.print-table th, .print-table td { border-bottom: 1px solid #e5e7eb; padding: 10px 8px; vertical-align: top; }
.print-table th { text-align: left; background: #f8fafc; color: #334155; }
.print-table .right { text-align: right; }
.compact-print-table th, .compact-print-table td { padding: 8px; }
.receipt-total-box { grid-template-columns: repeat(3, minmax(0,1fr)); }
.print-note { border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px; background: #f8fafc; }
.signature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-top: 56px; }
.signature-row div { border-top: 1px solid #111827; padding-top: 10px; text-align: center; color: #334155; }

@media print {
    @page { margin: 12mm; }
    .no-print { display: none !important; }
    body.print-body { background: #fff; }
    .print-page { width: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
    .print-table th, .print-table td { font-size: 12px; }
}

@media (max-width: 760px) {
    .global-search-form, .statement-filter, .statement-summary, .receipt-info-grid { grid-template-columns: 1fr; }
    .print-header { display: block; }
    .print-header-right { text-align: left; margin-top: 12px; }
}



/* Sidebar scroll düzeltmesi: düşük çözünürlüklü laptoplarda sol menü sabit kalır, kendi içinde kayar */
.sidebar nav::-webkit-scrollbar {
    width: 8px;
}
.sidebar nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.22);
    border-radius: 999px;
}
.sidebar nav::-webkit-scrollbar-track {
    background: transparent;
}
@media (max-height: 820px) {
    .sidebar {
        padding: 14px;
        gap: 12px;
    }
    .brand {
        padding: 6px 4px 10px;
    }
    .brand strong {
        font-size: 16px;
    }
    .brand span {
        font-size: 11px;
    }
    nav a {
        padding: 10px 12px;
        font-size: 14px;
    }
}
@media (max-height: 700px) {
    .sidebar {
        top: 10px;
        bottom: 10px;
        height: calc(100vh - 20px);
        border-radius: 22px;
    }
    nav a {
        padding: 9px 10px;
        font-size: 13px;
    }
}




/* Mobilde eski davranış korunur: sidebar üstte açılır/kapanır, sabit yükseklik kullanılmaz */
@media (max-width: 920px) {
    .sidebar {
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .sidebar nav {
        overflow: visible;
        padding-right: 0;
    }
}




/* =========================================================
   İş Teslim / Tahsilat Fişi - kompakt yazdırma düzeni
   Amaç: normal tek iş fişini A4'te tek sayfaya sığdırmak
   ========================================================= */
.print-help-note {
    margin: -6px 0 18px;
    color: #64748b;
    font-size: 13px;
    text-align: right;
}
.receipt-print-page h2 {
    margin: 18px 0 8px;
}
.receipt-print-page .receipt-info-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.receipt-print-page .receipt-total-box {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.receipt-print-page .signature-row {
    page-break-inside: avoid;
    break-inside: avoid;
}
@media screen {
    .receipt-print-page {
        max-width: 920px;
    }
}

@media print {
    @page {
        size: A4;
        margin: 8mm 10mm;
    }

    html,
    body.print-body {
        width: 210mm;
        min-height: 0 !important;
        background: #fff !important;
        color: #111827 !important;
        font-size: 11.5px;
        line-height: 1.25;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .no-print {
        display: none !important;
    }

    .receipt-print-page,
    .print-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    .receipt-print-page .print-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr);
        gap: 14px;
        align-items: start;
        border-bottom: 1.5px solid #111827;
        padding-bottom: 8px;
        margin-bottom: 10px;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .receipt-print-page .print-header h1 {
        font-size: 22px;
        line-height: 1.1;
        margin: 0 0 4px;
        letter-spacing: -.02em;
    }

    .receipt-print-page .print-header p {
        font-size: 11.5px;
        margin: 0;
        color: #475569;
    }

    .receipt-print-page .print-header-right {
        text-align: right;
        gap: 2px;
        font-size: 11.5px;
    }

    .receipt-print-page .print-header-right b {
        font-size: 13px;
    }

    .receipt-print-page .print-header-right span {
        color: #475569;
    }

    .receipt-print-page .receipt-info-grid {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 6px;
        margin: 10px 0 12px;
    }

    .receipt-print-page .receipt-info-grid div,
    .receipt-print-page .statement-summary div {
        border: 1px solid #d7dce5;
        border-radius: 8px;
        padding: 7px 8px;
        background: #fff !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .receipt-print-page .receipt-info-grid span,
    .receipt-print-page .statement-summary span {
        font-size: 9.8px;
        color: #475569;
        margin-bottom: 3px;
    }

    .receipt-print-page .receipt-info-grid strong,
    .receipt-print-page .statement-summary strong {
        font-size: 13px;
        line-height: 1.15;
        word-break: break-word;
    }

    .receipt-print-page h2 {
        font-size: 16px;
        line-height: 1.15;
        margin: 12px 0 5px;
        page-break-after: avoid;
    }

    .receipt-print-page .print-table {
        margin: 0 0 8px;
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: collapse;
        page-break-inside: auto;
    }

    .receipt-print-page .print-table thead {
        display: table-header-group;
    }

    .receipt-print-page .print-table tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .receipt-print-page .print-table th,
    .receipt-print-page .print-table td {
        font-size: 10.8px;
        padding: 5px 6px;
        border-bottom: 1px solid #e5e7eb;
        vertical-align: top;
    }

    .receipt-print-page .print-table th {
        background: #fff !important;
        color: #334155;
        font-weight: 900;
    }

    .receipt-print-page .receipt-total-box {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px;
        margin: 10px 0 8px;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .receipt-print-page .print-note {
        margin: 8px 0 0;
        padding: 7px 8px;
        border-radius: 8px;
        font-size: 10.8px;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .receipt-print-page .signature-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 28mm;
        margin-top: 20mm;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .receipt-print-page .signature-row div {
        border-top: 1px solid #111827;
        padding-top: 6px;
        font-size: 11px;
        text-align: center;
        color: #334155;
    }

    .receipt-print-page * {
        overflow: visible !important;
    }
}




/* =========================================================
   Logo / favicon ayarları ve yazdırma logo yerleşimi
   ========================================================= */
.branding-settings-card {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}
.branding-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.branding-box {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 18px;
    padding: 16px;
}
.branding-box h3 {
    margin: 0 0 6px;
    font-size: 17px;
}
.branding-preview {
    min-height: 92px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    display: grid;
    place-items: center;
    padding: 12px;
    margin: 12px 0;
}
.branding-preview-logo {
    max-width: 100%;
    max-height: 72px;
    object-fit: contain;
}
.favicon-preview {
    min-height: 92px;
}
.branding-preview-favicon {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .10);
}
.print-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.print-brand > div {
    min-width: 0;
}
.print-logo {
    display: block;
    width: auto;
    max-width: 170px;
    max-height: 58px;
    object-fit: contain;
    flex: 0 0 auto;
}
@media (max-width: 920px) {
    .branding-grid {
        grid-template-columns: 1fr;
    }
}
@media print {
    .print-brand {
        gap: 9px;
        align-items: center;
    }
    .print-logo {
        max-width: 42mm;
        max-height: 17mm;
        object-fit: contain;
    }
}




/* =========================================================
   Ayarlar sayfası sağ menülü sekme düzeni
   ========================================================= */
.settings-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 18px;
    align-items: start;
}
.settings-content {
    min-width: 0;
}
.settings-side-menu {
    position: sticky;
    top: 30px;
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 14px;
}
.settings-side-title {
    padding: 6px 8px 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
}
.settings-side-title strong {
    display: block;
    font-size: 18px;
}
.settings-side-title span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}
.settings-tab {
    width: 100%;
    border: 1px solid transparent;
    background: #f8fafc;
    color: #334155;
    border-radius: 15px;
    padding: 12px 13px;
    font-weight: 900;
    text-align: right;
    cursor: pointer;
    transition: .15s;
}
.settings-tab:hover {
    background: #eef2ff;
    color: #1d4ed8;
    transform: translateX(-2px);
}
.settings-tab.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .20);
}
.settings-tab-link {
    display: block;
}
.settings-section {
    display: none;
}
.settings-section.is-active {
    display: block;
}
.settings-section .card:first-child,
.settings-section.card {
    margin-top: 0;
}
@media (max-width: 1100px) {
    .settings-shell {
        grid-template-columns: 1fr;
    }
    .settings-side-menu {
        position: static;
        order: -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
    }
    .settings-side-title {
        grid-column: 1 / -1;
    }
    .settings-tab {
        text-align: center;
    }
}
@media (max-width: 640px) {
    .settings-side-menu {
        grid-template-columns: 1fr;
        border-radius: 18px;
        padding: 12px;
    }
    .settings-tab {
        text-align: center;
    }
}




/* =========================================================
   Ayarlar sayfası - orta ince menü düzeni
   ========================================================= */
.settings-shell {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 16px;
    align-items: start;
}
.settings-content {
    min-width: 0;
    width: 100%;
}
.settings-center-menu {
    order: -1;
    width: min(780px, 100%);
    margin: 0 auto 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    box-shadow: 0 14px 38px rgba(16, 24, 40, .08);
    padding: 6px;
    position: sticky;
    top: 18px;
    z-index: 8;
}
.settings-center-menu .settings-tab {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #334155;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.15;
    transition: .15s;
}
.settings-center-menu .settings-tab:hover {
    background: #eef2ff;
    color: #1d4ed8;
    transform: translateY(-1px);
}
.settings-center-menu .settings-tab.is-active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, .18);
}
.settings-section {
    display: none;
}
.settings-section.is-active {
    display: block;
}
#password.settings-section {
    max-width: 620px;
    margin: 0 auto;
}
#password .card {
    margin-top: 0;
}
@media (max-width: 760px) {
    .settings-center-menu {
        width: 100%;
        border-radius: 20px;
        display: grid;
        grid-template-columns: 1fr;
        position: static;
    }
    .settings-center-menu .settings-tab {
        width: 100%;
        white-space: normal;
    }
}




/* Ayarlar bar menüsüne İşlem Geçmişi eklendi */
.settings-center-menu {
    width: min(960px, 100%);
}
.settings-center-menu .settings-tab {
    font-size: 14px;
}
.audit-table-wrap {
    max-height: 68vh;
    overflow: auto;
    border-radius: 16px;
}
.audit-table {
    min-width: 920px;
}
.audit-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--card);
}
@media (max-width: 1180px) {
    .settings-center-menu {
        width: 100%;
    }
    .settings-center-menu .settings-tab {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 13px;
    }
}








/* Sol menü marka ikonu: favicon yüklendiyse otomatik gösterilir */
.brand-icon img {
    display: block;
    width: 78%;
    height: 78%;
    object-fit: contain;
    border-radius: 12px;
}
.sidebar .brand-icon {
    overflow: hidden;
}




/* Sol menü ikon alanı: yüklenen favicon kutunun tamamını kaplasın */
.brand-icon.brand-icon-image {
    padding: 0;
    background: transparent;
    overflow: hidden;
}
.brand-icon.brand-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}




/* İşçi paneli menü düzeltmesi: az menü elemanı varken linkler dikeyde dev kart gibi esnemesin */
.sidebar nav {
    align-content: start;
}
.sidebar nav a {
    align-self: start;
}
.worker-sidebar nav {
    align-content: start;
}
.worker-sidebar nav a {
    height: auto;
    min-height: 0;
    align-self: start;
}




/* Tek giriş ekranı logo düzeni */
.login-logo.unified-login-logo {
    overflow: hidden;
    padding: 0;
}
.login-logo.unified-login-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}




/* =========================================================
   Kök dizin / tek giriş ekranı - sade sağ giriş düzeni
   ========================================================= */
body.unified-login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 10%, rgba(37, 99, 235, .18), transparent 32%),
        radial-gradient(circle at 88% 88%, rgba(34, 197, 94, .13), transparent 36%),
        #f3f6fb;
    color: var(--text);
}
.unified-login-wrap {
    min-height: 100vh;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 410px;
    align-items: center;
    gap: 58px;
    padding: 42px 0;
}
.unified-login-intro {
    display: grid;
    gap: 24px;
}
.unified-login-brand {
    display: flex;
    align-items: center;
    gap: 22px;
}
.unified-login-brand-icon {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb, #22c55e);
    color: #fff;
    font-size: 42px;
    box-shadow: 0 20px 45px rgba(16, 24, 40, .14);
    flex: 0 0 auto;
}
.unified-login-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}
.unified-login-brand h1 {
    margin: 0;
    font-size: clamp(44px, 5vw, 68px);
    line-height: .98;
    letter-spacing: -.055em;
}
.unified-login-brand p {
    margin: 14px 0 0;
    color: #475467;
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.25;
}
.unified-login-note {
    max-width: 560px;
    border: 1px solid rgba(37, 99, 235, .16);
    background: rgba(255,255,255,.66);
    backdrop-filter: blur(10px);
    border-radius: 22px;
    padding: 18px 20px;
    box-shadow: 0 18px 45px rgba(16, 24, 40, .07);
}
.unified-login-note strong,
.unified-login-note span {
    display: block;
}
.unified-login-note strong {
    font-size: 18px;
    margin-bottom: 4px;
}
.unified-login-note span {
    color: #667085;
    line-height: 1.45;
}
.unified-login-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(16, 24, 40, .13);
    padding: 24px;
}
.unified-login-card h2 {
    margin: 0 0 18px;
    font-size: 24px;
    letter-spacing: -.025em;
}
.unified-login-card .form {
    gap: 12px;
}
.unified-login-card label {
    font-size: 13px;
    font-weight: 900;
    color: #344054;
}
.unified-login-card input {
    min-height: 52px;
    border-radius: 14px;
    font-size: 16px;
}
.unified-login-submit {
    min-height: 52px;
    width: 100%;
    margin-top: 4px;
    font-size: 17px;
    border-radius: 14px;
}
@media (max-width: 900px) {
    .unified-login-wrap {
        grid-template-columns: 1fr;
        gap: 26px;
        width: min(520px, calc(100% - 32px));
        padding: 28px 0;
    }
    .unified-login-brand {
        align-items: flex-start;
        gap: 14px;
    }
    .unified-login-brand-icon {
        width: 68px;
        height: 68px;
        border-radius: 22px;
        font-size: 32px;
    }
    .unified-login-brand h1 {
        font-size: 36px;
    }
    .unified-login-brand p {
        font-size: 17px;
        margin-top: 8px;
    }
    .unified-login-note {
        display: none;
    }
    .unified-login-card {
        padding: 20px;
    }
}




/* =========================================================
   Login ekranı görünüm düzeltmesi
   - Sol büyük ikon kırpılmaz, kutuya sığar
   - Giriş ekranı daha dengeli ve sade görünür
   ========================================================= */
.unified-login-wrap {
    grid-template-columns: minmax(0, 1.05fr) 400px;
    gap: 64px;
}
.unified-login-brand-icon {
    padding: 10px;
    background: linear-gradient(135deg, #2563eb, #22c55e);
}
.unified-login-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
    background: #fff;
}
.unified-login-brand h1 {
    font-size: clamp(42px, 4.4vw, 62px);
}
.unified-login-brand p {
    font-size: clamp(19px, 1.9vw, 25px);
}
.unified-login-card {
    max-width: 400px;
    width: 100%;
}
@media (max-width: 900px) {
    .unified-login-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .unified-login-brand-icon {
        padding: 7px;
    }
    .unified-login-brand-icon img {
        border-radius: 16px;
    }
}



/* =========================================================
   Mobil iş kalemleri düzeni düzeltmesi
   - Admin formunda Kalem Tipi / Satış / Maliyet / İşlem sırası doğru gösterilir
   - Worker formunda alanlar kart düzeninde daha okunaklı görünür
   ========================================================= */
@media (max-width: 640px) {
    body.admin-page form[action="save_job.php"] .items-table td:nth-child(1)::before { content: "Yapılan iş / parça"; }
    body.admin-page form[action="save_job.php"] .items-table td:nth-child(2)::before { content: "Kalem Tipi"; }
    body.admin-page form[action="save_job.php"] .items-table td:nth-child(3)::before { content: "Satış"; }
    body.admin-page form[action="save_job.php"] .items-table td:nth-child(4)::before { content: "Maliyet"; }
    body.admin-page form[action="save_job.php"] .items-table td:nth-child(5)::before { content: "İşlem"; }

    body.admin-page form[action="save_job.php"] .items-table input,
    body.admin-page form[action="save_job.php"] .items-table select,
    .worker-main form[action="worker_save_job.php"] .items-table input {
        width: 100%;
        min-height: 46px;
    }

    body.admin-page form[action="save_job.php"] .items-table input[type="text"],
    .worker-main form[action="worker_save_job.php"] .items-table input[type="text"] {
        font-size: 15px;
        line-height: 1.35;
        padding: 12px 14px;
    }

    body.admin-page form[action="save_job.php"] .items-table input::placeholder,
    .worker-main form[action="worker_save_job.php"] .items-table input::placeholder {
        font-size: 14px;
        line-height: 1.35;
    }

    .worker-main form[action="worker_save_job.php"] .table-wrap {
        overflow: visible;
    }
    .worker-main form[action="worker_save_job.php"] .items-table,
    .worker-main form[action="worker_save_job.php"] .items-table tbody,
    .worker-main form[action="worker_save_job.php"] .items-table tr,
    .worker-main form[action="worker_save_job.php"] .items-table td {
        display: block;
        width: 100%;
        min-width: 0 !important;
    }
    .worker-main form[action="worker_save_job.php"] .items-table thead {
        display: none;
    }
    .worker-main form[action="worker_save_job.php"] .items-table tr {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(16, 24, 40, .05);
    }
    .worker-main form[action="worker_save_job.php"] .items-table td {
        border: 0;
        padding: 0;
        margin-bottom: 10px;
        text-align: left !important;
    }
    .worker-main form[action="worker_save_job.php"] .items-table td:last-child {
        margin-bottom: 0;
    }
    .worker-main form[action="worker_save_job.php"] .items-table td::before {
        display: block;
        margin: 0 0 6px;
        color: #344054;
        font-size: 13px;
        font-weight: 900;
    }
    .worker-main form[action="worker_save_job.php"] .items-table td:nth-child(1)::before { content: "Yapılan iş / parça"; }
    .worker-main form[action="worker_save_job.php"] .items-table td:nth-child(2)::before { content: "Satış"; }
    .worker-main form[action="worker_save_job.php"] .items-table td:nth-child(3)::before { content: "Maliyet"; }
    .worker-main form[action="worker_save_job.php"] .items-table td:nth-child(4)::before { content: "İşlem"; }
    .worker-main form[action="worker_save_job.php"] .items-table input[type="number"] {
        text-align: right !important;
    }
    .worker-main form[action="worker_save_job.php"] .items-table .link-danger {
        width: 100%;
        min-height: 42px;
        border: 1px solid #fecaca;
        border-radius: 12px;
        background: #fff1f2;
    }
}



/* Mobil iş kalemleri: silme kolonunda masaüstünde başlık olmadığı için telefonda da "İşlem" etiketi gösterilmez */
@media (max-width: 640px) {
    body.admin-page form[action="save_job.php"] .items-table td:nth-child(5)::before,
    .worker-main form[action="worker_save_job.php"] .items-table td:nth-child(4)::before {
        content: none !important;
        display: none !important;
    }

    body.admin-page form[action="save_job.php"] .items-table td:nth-child(5),
    .worker-main form[action="worker_save_job.php"] .items-table td:nth-child(4) {
        margin-top: 2px;
    }
}




/* Kayıt bekleme / çift tıklama önleme */
.btn.is-loading,
button[disabled].is-loading {
    opacity: .78;
    cursor: wait;
    transform: none !important;
}
.save-progress-note {
    position: fixed;
    left: 50%;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(520px, calc(100vw - 28px));
    z-index: 99999;
    background: rgba(15, 23, 42, .94);
    color: #fff;
    border-radius: 16px;
    padding: 13px 15px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .28);
    text-align: center;
    font-weight: 900;
    line-height: 1.35;
}
.save-progress-note.save-progress-warning {
    background: rgba(146, 64, 14, .96);
}




/* Cari müşteri seçimi: çok müşteri olduğunda hızlı filtreleme */
.customer-search-input {
    margin-bottom: 6px;
}
.customer-search-note {
    display: block;
    margin: -1px 0 8px;
    font-size: 12px;
    line-height: 1.35;
}
@media (max-width: 640px) {
    .customer-search-input {
        min-height: 46px;
        font-size: 16px;
    }
}




/* Cari müşteri seçimi: tek kutudan yaz ve seç */
.customer-combo-input {
    margin-bottom: 6px;
}
.customer-native-select-hidden {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.customer-search-note {
    display: block;
    margin: -1px 0 8px;
    font-size: 12px;
    line-height: 1.35;
}
@media (max-width: 640px) {
    .customer-combo-input {
        min-height: 46px;
        font-size: 16px;
    }
}




/* Cari müşteri seçimi: yazdıkça aşağıdaki listeyi filtrele */
.customer-filter-select {
    position: relative;
}
.customer-combo-input {
    margin-bottom: 6px;
}
.customer-filter-list {
    display: none;
    width: 100%;
    max-height: 280px;
    overflow: auto;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
    margin: 6px 0 8px;
    padding: 6px;
    z-index: 20;
}
.customer-filter-select.is-open .customer-filter-list {
    display: grid;
    gap: 4px;
}
.customer-filter-option {
    width: 100%;
    border: 0;
    background: transparent;
    border-radius: 13px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    color: var(--text);
}
.customer-filter-option:hover,
.customer-filter-option.is-selected {
    background: #eff6ff;
}
.customer-filter-option strong {
    display: block;
    font-size: 15px;
    line-height: 1.25;
}
.customer-filter-option span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
    line-height: 1.35;
}
.customer-filter-empty {
    padding: 12px;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}
.customer-native-select-hidden {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.customer-search-note {
    display: block;
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.35;
}
@media (max-width: 640px) {
    .customer-combo-input {
        min-height: 46px;
        font-size: 16px;
    }
    .customer-filter-list {
        max-height: 240px;
        border-radius: 16px;
    }
    .customer-filter-option {
        padding: 12px;
    }
}




/* =========================================================
   Yazdırma ekranı: logo üst orta konum
   ========================================================= */
.print-logo-center {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0 0 12px;
}
.print-logo-center .print-logo {
    max-width: 220px;
    max-height: 76px;
    object-fit: contain;
}
.print-brand {
    align-items: flex-start;
}
@media print {
    .print-logo-center {
        margin: 0 0 7px;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .print-logo-center .print-logo {
        max-width: 55mm;
        max-height: 20mm;
        object-fit: contain;
    }
    .receipt-print-page .print-header .print-logo-center,
    .print-page .print-header .print-logo-center {
        grid-column: 1 / -1 !important;
    }
}
@media (max-width: 760px) {
    .print-logo-center {
        justify-content: center;
        margin-bottom: 10px;
    }
}




/* =========================================================
   Yazdırma başlık düzeni
   Logo üstte ortada; başlık sol, müşteri bilgisi sağda
   ========================================================= */
.print-page .print-header,
.receipt-print-page .print-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .9fr) !important;
    gap: 14px 24px !important;
    align-items: start !important;
}

.print-page .print-logo-center,
.receipt-print-page .print-logo-center {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    width: 100% !important;
    margin: 0 0 6px !important;
}

.print-page .print-brand,
.receipt-print-page .print-brand {
    grid-column: 1 / 2 !important;
    display: block !important;
    min-width: 0 !important;
}

.print-page .print-header-right,
.receipt-print-page .print-header-right {
    grid-column: 2 / 3 !important;
    text-align: right !important;
    justify-self: end !important;
    align-content: start !important;
    min-width: 0 !important;
}

.print-page .print-header-right b,
.receipt-print-page .print-header-right b {
    display: block !important;
    font-size: 13px !important;
    margin-bottom: 3px !important;
}

.print-page .print-header-right span,
.receipt-print-page .print-header-right span {
    display: block !important;
    color: #475569 !important;
    line-height: 1.35 !important;
}

@media print {
    .print-page .print-header,
    .receipt-print-page .print-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(45mm, .85fr) !important;
        gap: 6px 14px !important;
        border-bottom: 1.5px solid #111827 !important;
        padding-bottom: 8px !important;
        margin-bottom: 10px !important;
    }

    .print-page .print-logo-center .print-logo,
    .receipt-print-page .print-logo-center .print-logo {
        max-width: 55mm !important;
        max-height: 20mm !important;
    }

    .print-page .print-header h1,
    .receipt-print-page .print-header h1 {
        margin: 0 0 4px !important;
    }
}

@media (max-width: 760px) {
    .print-page .print-header,
    .receipt-print-page .print-header {
        grid-template-columns: 1fr !important;
    }

    .print-page .print-brand,
    .receipt-print-page .print-brand,
    .print-page .print-header-right,
    .receipt-print-page .print-header-right {
        grid-column: 1 / -1 !important;
        text-align: left !important;
        justify-self: stretch !important;
    }
}




/* =========================================================
   Yazdırma üst başlık tek sıra düzeni
   Sol: başlık/tarih | Orta: logo | Sağ: müşteri bilgisi
   Ekranda ve PDF/yazdırmada aynı hizayı korur
   ========================================================= */
.print-page .print-header,
.receipt-print-page .print-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: start !important;
    border-bottom: 2px solid #111827 !important;
    padding-bottom: 14px !important;
    margin-bottom: 18px !important;
}

.print-page .print-brand,
.receipt-print-page .print-brand {
    grid-column: 1 / 2 !important;
    grid-row: 1 !important;
    align-self: start !important;
    justify-self: start !important;
    display: block !important;
    text-align: left !important;
}

.print-page .print-logo-center,
.receipt-print-page .print-logo-center {
    grid-column: 2 / 3 !important;
    grid-row: 1 !important;
    align-self: start !important;
    justify-self: center !important;
    width: auto !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
}

.print-page .print-header-right,
.receipt-print-page .print-header-right {
    grid-column: 3 / 4 !important;
    grid-row: 1 !important;
    align-self: start !important;
    justify-self: end !important;
    text-align: right !important;
    margin: 0 !important;
}

.print-page .print-logo-center .print-logo,
.receipt-print-page .print-logo-center .print-logo {
    max-width: 185px !important;
    max-height: 66px !important;
    object-fit: contain !important;
}

@media print {
    .print-page .print-header,
    .receipt-print-page .print-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
        gap: 8mm !important;
        align-items: start !important;
        border-bottom: 1.5px solid #111827 !important;
        padding-bottom: 7px !important;
        margin-bottom: 10px !important;
    }

    .print-page .print-brand,
    .receipt-print-page .print-brand {
        grid-column: 1 / 2 !important;
        grid-row: 1 !important;
        align-self: start !important;
        justify-self: start !important;
        text-align: left !important;
    }

    .print-page .print-logo-center,
    .receipt-print-page .print-logo-center {
        grid-column: 2 / 3 !important;
        grid-row: 1 !important;
        align-self: start !important;
        justify-self: center !important;
        width: auto !important;
        margin: 0 !important;
    }

    .print-page .print-header-right,
    .receipt-print-page .print-header-right {
        grid-column: 3 / 4 !important;
        grid-row: 1 !important;
        align-self: start !important;
        justify-self: end !important;
        text-align: right !important;
        margin: 0 !important;
    }

    .print-page .print-logo-center .print-logo,
    .receipt-print-page .print-logo-center .print-logo {
        max-width: 42mm !important;
        max-height: 16mm !important;
        object-fit: contain !important;
    }

    .print-page .print-header h1,
    .receipt-print-page .print-header h1 {
        font-size: 20px !important;
        line-height: 1.1 !important;
        margin: 0 0 4px !important;
    }

    .print-page .print-header p,
    .receipt-print-page .print-header p,
    .print-page .print-header-right,
    .receipt-print-page .print-header-right {
        font-size: 10.8px !important;
        line-height: 1.3 !important;
    }
}

@media (max-width: 760px) {
    .print-page .print-header,
    .receipt-print-page .print-header {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .print-page .print-brand,
    .receipt-print-page .print-brand,
    .print-page .print-logo-center,
    .receipt-print-page .print-logo-center,
    .print-page .print-header-right,
    .receipt-print-page .print-header-right {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        justify-self: stretch !important;
        text-align: center !important;
    }

    .print-page .print-brand,
    .receipt-print-page .print-brand,
    .print-page .print-header-right,
    .receipt-print-page .print-header-right {
        text-align: left !important;
    }
}




/* =========================================================
   FINAL PDF/YAZDIRMA DÜZENİ
   Print önizlemede mobil kurallar devreye girmesin diye en sonda
   özel print override kullanılır.
   ========================================================= */
@media print {
    .print-page .print-header,
    .receipt-print-page .print-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
        gap: 8mm !important;
        align-items: start !important;
        border-bottom: 1.5px solid #111827 !important;
        padding-bottom: 7px !important;
        margin-bottom: 10px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .print-page .print-brand,
    .receipt-print-page .print-brand {
        grid-column: 1 / 2 !important;
        grid-row: 1 !important;
        align-self: start !important;
        justify-self: start !important;
        display: block !important;
        text-align: left !important;
        margin: 0 !important;
        min-width: 0 !important;
    }

    .print-page .print-logo-center,
    .receipt-print-page .print-logo-center {
        grid-column: 2 / 3 !important;
        grid-row: 1 !important;
        align-self: start !important;
        justify-self: center !important;
        display: flex !important;
        width: auto !important;
        margin: 0 !important;
        text-align: center !important;
    }

    .print-page .print-header-right,
    .receipt-print-page .print-header-right {
        grid-column: 3 / 4 !important;
        grid-row: 1 !important;
        align-self: start !important;
        justify-self: end !important;
        display: grid !important;
        gap: 2px !important;
        text-align: right !important;
        margin: 0 !important;
        min-width: 0 !important;
        font-size: 10.8px !important;
        line-height: 1.3 !important;
    }

    .print-page .print-logo-center .print-logo,
    .receipt-print-page .print-logo-center .print-logo {
        display: block !important;
        max-width: 42mm !important;
        max-height: 16mm !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }

    .print-page .print-header h1,
    .receipt-print-page .print-header h1 {
        font-size: 20px !important;
        line-height: 1.1 !important;
        margin: 0 0 4px !important;
    }

    .print-page .print-header p,
    .receipt-print-page .print-header p {
        font-size: 10.8px !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        color: #475569 !important;
    }

    .print-page .statement-summary,
    .receipt-print-page .statement-summary,
    .print-page .receipt-info-grid,
    .receipt-print-page .receipt-info-grid {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 6px !important;
        margin: 10px 0 12px !important;
        width: 100% !important;
    }

    .print-page .statement-summary div,
    .receipt-print-page .statement-summary div,
    .print-page .receipt-info-grid div,
    .receipt-print-page .receipt-info-grid div {
        border: 1px solid #d7dce5 !important;
        border-radius: 8px !important;
        padding: 7px 8px !important;
        background: #fff !important;
        min-width: 0 !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .print-page .statement-summary span,
    .receipt-print-page .statement-summary span,
    .print-page .receipt-info-grid span,
    .receipt-print-page .receipt-info-grid span {
        display: block !important;
        font-size: 9.8px !important;
        color: #475569 !important;
        margin-bottom: 3px !important;
    }

    .print-page .statement-summary strong,
    .receipt-print-page .statement-summary strong,
    .print-page .receipt-info-grid strong,
    .receipt-print-page .receipt-info-grid strong {
        display: block !important;
        font-size: 13px !important;
        line-height: 1.15 !important;
        word-break: break-word !important;
    }
}



/* =========================================================
   İşçi hakediş ve iki dönemli ödeme sistemi
   ========================================================= */
.worker-entitlement-filter {
    display: flex;
    gap: 14px;
    align-items: end;
    flex-wrap: wrap;
}
.worker-entitlement-filter > div { min-width: 210px; }
.worker-entitlement-stats { margin-bottom: 18px; }
.settlement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.settlement-card {
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}
.settlement-card-paid { border-color: #bbf7d0; background: linear-gradient(180deg, #fff, #f0fdf4); }
.settlement-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.settlement-card-head h3 { margin: 3px 0 4px; font-size: 19px; }
.settlement-card-head p { margin: 0; color: var(--muted); font-size: 13px; }
.settlement-kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #2563eb; }
.settlement-lines { display: grid; gap: 8px; }
.settlement-lines > div { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 7px; border-bottom: 1px dashed #dbe3ef; }
.settlement-lines span { color: var(--muted); font-size: 13px; }
.settlement-lines strong { font-size: 14px; text-align: right; }
.settlement-total { margin-top: 14px; padding: 14px; border-radius: 14px; background: #0f172a; color: #fff; display: grid; gap: 3px; }
.settlement-total span { font-size: 12px; color: #cbd5e1; }
.settlement-total strong { font-size: 27px; }
.settlement-total small { color: #cbd5e1; }
.settlement-pay-form { margin-top: 14px; display: grid; grid-template-columns: minmax(150px, .7fr) minmax(180px, 1fr); gap: 10px; align-items: end; }
.settlement-pay-form label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.settlement-pay-form .btn { grid-column: 1 / -1; }
.next-cycle-preview { margin-top: 16px; border: 1px dashed #94a3b8; border-radius: 15px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #f8fafc; }
.next-cycle-preview div { display: grid; gap: 3px; }
.next-cycle-preview span { color: var(--muted); font-size: 12px; }
.next-cycle-preview strong { font-size: 22px; }
.next-cycle-preview small { color: var(--muted); }
.worker-due-alert-card { margin: 18px 0; border-color: #fbbf24; background: linear-gradient(180deg, #fff, #fffbeb); }
.worker-due-alert-list { display: grid; gap: 9px; }
.worker-due-alert-list a { text-decoration: none; color: inherit; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; background: #fff; border: 1px solid #fde68a; border-radius: 13px; }
.worker-due-alert-list a:hover { border-color: #f59e0b; transform: translateY(-1px); }
.worker-due-alert-list div { display: grid; gap: 3px; }
.worker-due-alert-list small { color: var(--muted); }
.worker-due-alert-list strong { color: #b45309; font-size: 18px; white-space: nowrap; }
.btn-small { padding: 7px 10px; font-size: 12px; }
@media (max-width: 900px) {
    .settlement-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .settlement-pay-form { grid-template-columns: 1fr; }
    .next-cycle-preview, .worker-due-alert-list a { align-items: stretch; flex-direction: column; }
    .worker-due-alert-list strong { white-space: normal; }
}

.entitlement-start-card { border-color: #bfdbfe; background: linear-gradient(180deg, #fff, #eff6ff); }
.entitlement-start-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto; gap: 14px; align-items: end; }
.entitlement-start-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.entitlement-start-form small { color: var(--muted); font-weight: 400; line-height: 1.35; }
@media (max-width: 850px) { .entitlement-start-form { grid-template-columns: 1fr; } }



/* =========================================================
   İşçi hakediş ekranı - sade günlük kullanım görünümü
   ========================================================= */
.simple-worker-report-head {
    margin-bottom: 14px;
}

.simple-worker-filter-card {
    padding: 16px;
}

.simple-worker-filter {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(160px, 220px) auto;
    align-items: end;
    gap: 12px;
}

.simple-worker-filter label,
.simple-payout-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.simple-worker-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 16px 0;
    padding: 15px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.simple-worker-intro > div {
    display: grid;
    gap: 3px;
}

.simple-worker-intro span {
    color: var(--muted);
    font-size: 12px;
}

.simple-worker-intro strong {
    font-size: 20px;
}

.simple-worker-intro p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.simple-payout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.simple-payout-card {
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.simple-payout-card.is-due {
    border-color: rgba(239, 68, 68, .3);
}

.simple-payout-card.is-complete {
    border-color: rgba(34, 197, 94, .25);
}

.simple-payout-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.simple-payout-head h2 {
    margin: 4px 0 5px;
    font-size: 21px;
}

.simple-payout-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.simple-payout-kicker {
    color: var(--primary);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .06em;
}

.simple-payout-total {
    display: grid;
    gap: 4px;
    padding: 18px;
    border-radius: 15px;
    background: #f5f8ff;
}

.simple-payout-total span {
    color: var(--muted);
    font-size: 13px;
}

.simple-payout-total strong {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
}

.simple-payout-breakdown {
    display: grid;
    gap: 9px;
}

.simple-payout-breakdown > div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
}

.simple-payout-breakdown > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.simple-payout-breakdown span {
    color: var(--muted);
}

.simple-payout-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.simple-next-payment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.simple-next-payment > div {
    display: grid;
    gap: 4px;
}

.simple-next-payment span,
.simple-next-payment small {
    color: var(--muted);
}

.simple-next-payment strong {
    font-size: 24px;
}

.simple-history-card {
    margin-bottom: 18px;
}

.simple-worker-advanced {
    padding: 0;
    overflow: hidden;
}

.simple-worker-advanced > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.simple-worker-advanced > summary::-webkit-details-marker {
    display: none;
}

.simple-worker-advanced > summary::after {
    content: "＋";
    font-size: 22px;
    color: var(--primary);
}

.simple-worker-advanced[open] > summary::after {
    content: "−";
}

.simple-worker-advanced > summary small {
    color: var(--muted);
    font-weight: 500;
}

.simple-advanced-content {
    border-top: 1px solid var(--border);
}

.simple-advanced-section {
    padding: 20px;
}

.simple-advanced-section + .simple-advanced-section {
    border-top: 1px solid var(--border);
}

@media (max-width: 820px) {
    .simple-worker-filter,
    .simple-payout-grid,
    .simple-payout-form {
        grid-template-columns: 1fr;
    }

    .simple-worker-intro,
    .simple-next-payment,
    .simple-worker-advanced > summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .simple-payout-head {
        flex-direction: column;
    }

    .simple-payout-card {
        padding: 16px;
    }
}




/* =========================================================
   İşçi aylık ödeme + sonradan tahsilat ek hakediş ekranı
   ========================================================= */
.monthly-worker-filter-card { padding: 16px; }
.monthly-worker-filter { display:grid; grid-template-columns:minmax(200px,1fr) minmax(190px,240px) auto; align-items:end; gap:12px; }
.monthly-worker-filter label,.monthly-pay-form label { display:grid; gap:6px; font-weight:700; }
.monthly-worker-explain { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:16px 0; padding:16px 18px; background:#fff; border:1px solid var(--border); border-radius:16px; }
.monthly-worker-explain>div { display:grid; gap:3px; }
.monthly-worker-explain span { color:var(--muted); font-size:12px; }
.monthly-worker-explain strong { font-size:20px; }
.monthly-worker-explain p { margin:0; max-width:760px; color:var(--muted); line-height:1.55; }
.monthly-worker-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-bottom:18px; }
.monthly-main-card,.monthly-extra-card { display:grid; gap:18px; padding:20px; background:#fff; border:1px solid var(--border); border-radius:18px; box-shadow:var(--shadow); }
.monthly-main-card.is-open { border-color:rgba(239,68,68,.28); }
.monthly-main-card.is-closed { border-color:rgba(34,197,94,.28); }
.monthly-extra-card.has-due { border-color:rgba(245,158,11,.38); }
.monthly-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.monthly-card-head h2 { margin:4px 0 5px; font-size:22px; }
.monthly-card-head p { margin:0; color:var(--muted); font-size:13px; line-height:1.45; }
.monthly-kicker { color:var(--primary); font-weight:900; font-size:12px; letter-spacing:.06em; }
.monthly-big-total { display:grid; gap:5px; padding:18px; border-radius:15px; background:#f5f8ff; }
.monthly-big-total span { color:var(--muted); font-size:13px; }
.monthly-big-total strong { font-size:clamp(30px,4vw,44px); line-height:1; }
.monthly-breakdown { display:grid; gap:9px; }
.monthly-breakdown>div { display:flex; justify-content:space-between; gap:14px; padding-bottom:8px; border-bottom:1px dashed var(--border); }
.monthly-breakdown>div:last-child { border-bottom:0; padding-bottom:0; }
.monthly-breakdown span { color:var(--muted); }
.monthly-pay-form { display:grid; grid-template-columns:minmax(160px,1fr) auto; align-items:end; gap:10px; }
.monthly-window-note { display:block; color:var(--muted); line-height:1.45; }
.monthly-info-note { padding:12px 14px; background:#f8fafc; border:1px solid var(--border); border-radius:12px; color:var(--muted); line-height:1.5; }
.monthly-pending-card,.monthly-history-card { margin-bottom:18px; }
.monthly-pending-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.monthly-pending-stats>div { display:grid; gap:6px; padding:15px; border:1px solid var(--border); border-radius:14px; background:#f8fafc; }
.monthly-pending-stats span { color:var(--muted); font-size:13px; }
.monthly-pending-stats strong { font-size:21px; }
.monthly-worker-details { padding:0; overflow:hidden; }
.monthly-worker-details>summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px; cursor:pointer; list-style:none; font-weight:800; }
.monthly-worker-details>summary::-webkit-details-marker { display:none; }
.monthly-worker-details>summary::after { content:'＋'; font-size:22px; color:var(--primary); }
.monthly-worker-details[open]>summary::after { content:'−'; }
.monthly-worker-details>summary small { color:var(--muted); font-weight:500; }
.monthly-details-body { border-top:1px solid var(--border); }
.monthly-details-body>section { padding:20px; }
.monthly-details-body>section+section { border-top:1px solid var(--border); }
.monthly-details-body h2 { margin-top:0; }
@media (max-width:860px) {
  .monthly-worker-filter,.monthly-worker-grid,.monthly-pay-form,.monthly-pending-stats { grid-template-columns:1fr; }
  .monthly-worker-explain,.monthly-card-head,.monthly-worker-details>summary { align-items:flex-start; flex-direction:column; }
  .monthly-main-card,.monthly-extra-card { padding:16px; }
}



.monthly-overdue-banner { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; border-color:rgba(239,68,68,.32); }
.monthly-overdue-banner>div { display:grid; gap:4px; }
.monthly-overdue-banner span { color:var(--muted); }
@media (max-width:860px) { .monthly-overdue-banner { align-items:flex-start; flex-direction:column; } }
