/* =========================================================
   SISTEM PENILAIAN KINERJA PETUGAS PENAGIHAN PAJAK
   Modern UI Redesign - Clean, Professional, Premium Look
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Color System - Deep Navy + Cyan Accent */
    --bg: #f0f4f8;
    --bg-alt: #e8eef5;
    --card: #ffffff;
    --text: #0f172a;
    --text-secondary: #334155;
    --muted: #64748b;
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #e0f2fe;
    --accent: #06b6d4;
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: #0ea5e9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-full: 9999px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

/* ========== LAYOUT ========== */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 270px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 50;
}

.sidebar-brand {
    padding: 28px 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand h1 {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0;
}

.sidebar-brand .brand-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 6px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.sidebar-user {
    padding: 16px 22px;
    background: rgba(14, 165, 233, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user .user-info {
    overflow: hidden;
}

.sidebar-user .user-name {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 11px;
    color: #94a3b8;
    text-transform: capitalize;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-nav a {
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    margin-bottom: 3px;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.sidebar-nav a .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
    opacity: 0.85;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    text-decoration: none;
}

.sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.25), rgba(14, 165, 233, 0.08));
    color: #38bdf8;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #0ea5e9;
}

.sidebar-footer {
    padding: 16px 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-footer a {
    color: #f87171;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-footer a:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    text-decoration: none;
}

/* ========== MAIN CONTENT ========== */
.main {
    flex: 1;
    padding: 28px 32px;
    min-width: 0;
    background: var(--bg);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
}

.topbar h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
}

.topbar .date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--muted);
    background: var(--card);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    font-weight: 500;
}

/* ========== CARDS ========== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.card .muted {
    font-size: 13px;
}

/* ========== STATS ========== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 18px 16px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 4px 0 0 4px;
}

.stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat h3 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat strong {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    display: block;
}

/* ========== GRID ========== */
.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ========== TABLES ========== */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8fafc;
}

/* ========== FORMS ========== */
label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 7px;
    color: var(--text-secondary);
}

input[type=text],
input[type=password],
input[type=date],
input[type=number],
textarea,
select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

input[type=file] {
    width: 100%;
    padding: 10px 0;
    font-size: 13px;
}

.form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(320px,1fr));
    gap:18px 22px;
}

.form-group:has(textarea){
    grid-column:1 / -1;
}

.form-group textarea{
    min-height:110px;
}

.form-span-2{
    grid-column:1 / -1;
}

@media (max-width:900px){

    .form-grid{
        grid-template-columns:1fr;
    }

    .form-span-2{
        grid-column:auto;
    }

}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 600;
    font-size: 13.5px;
    font-family: inherit;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
    color: #fff;
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

.btn.secondary {
    background: linear-gradient(135deg, #475569, #334155);
    box-shadow: 0 2px 8px rgba(51, 65, 85, 0.2);
}

.btn.success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.btn.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn.light {
    background: #f1f5f9;
    color: var(--text-secondary);
    box-shadow: none;
    border: 1px solid var(--border);
}

.btn.light:hover {
    background: #e2e8f0;
    color: var(--text);
    box-shadow: none;
}

form.inline {
    display: inline;
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge.status-assigned,
.badge.status-open {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge.status-accepted {
    background: #ecfccb;
    color: #3f6212;
}

.badge.status-submitted {
    background: #fef3c7;
    color: #92400e;
}

.badge.status-approved,
.badge.status-active {
    background: #d1fae5;
    color: #065f46;
}

.badge.status-rejected,
.badge.status-inactive,
.badge.status-closed {
    background: #fee2e2;
    color: #991b1b;
}

/* ========== ALERTS ========== */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.alert.success {
    background: var(--success-bg);
    color: #065f46;
    border-color: #a7f3d0;
}

.alert.error {
    background: var(--danger-bg);
    color: #991b1b;
    border-color: #fecaca;
}

.alert.warning {
    background: var(--warning-bg);
    color: #92400e;
    border-color: #fde68a;
}

/* ========== KPI BAR ========== */
.kpi-bar {
    height: 8px;
    border-radius: var(--radius-full);
    background: #e0f2fe;
    overflow: hidden;
    min-width: 80px;
}

.kpi-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

/* ========== LOGIN ========== */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 40%),
        linear-gradient(160deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
}

.login-wrap .card {
    width: 100%;
    max-width: 420px;
    padding: 36px 32px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border-radius: 20px;
}

.login-wrap h1 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
    color: var(--text);
    text-align: center;
}

.login-wrap .login-sub {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 28px;
}

.login-wrap .btn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    margin-top: 8px;
}

.login-wrap hr {
    margin: 24px 0;
    border: none;
    border-top: 1px solid var(--border);
}

/* ========== UTILITIES ========== */
.muted {
    color: var(--muted);
}

.list-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.topbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ========== MASTER TABS ========== */
.master-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.master-tabs a {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    background: #f1f5f9;
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: var(--transition);
}

.master-tabs a:hover {
    background: #e2e8f0;
    color: var(--text);
    text-decoration: none;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.empty-state .empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 960px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        box-shadow: none;
    }

    /* sidebar-nav di mobile memakai grid app-style (didefinisikan di bagian bawah) */
    .sidebar-user {
        display: flex;
    }

    .main {
        padding: 20px 16px;
    }

    .topbar h2 {
        font-size: 20px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== MASTER DATA MODERN ========== */
.master-nav-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}

.master-nav-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 12px;
}

.master-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.master-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
}

.master-tab:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

.master-tab.active {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.master-tab .tab-icon {
    font-size: 22px;
    line-height: 1;
}

.master-tab .tab-label {
    line-height: 1.25;
}

.master-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.master-panel-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 10px !important;
    font-size: 12px !important;
}

/* ========== GPS PANEL ========== */
.gps-panel {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1.5px solid #7dd3fc;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 8px;
}

.gps-panel-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.gps-icon {
    font-size: 28px;
    line-height: 1;
}

.gps-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.gps-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    flex-shrink: 0;
}

.gps-status.gps-loading .gps-dot {
    background: #0ea5e9;
    animation: pulse 1s infinite;
}

.gps-status.gps-ok {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

.gps-status.gps-ok .gps-dot {
    background: #10b981;
}

.gps-status.gps-error {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.gps-status.gps-error .gps-dot {
    background: #ef4444;
}

.gps-status.gps-warn {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.gps-status.gps-warn .gps-dot {
    background: #f59e0b;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.gps-input {
    background: #f1f5f9 !important;
    color: var(--text);
    font-weight: 600;
    font-family: ui-monospace, monospace;
}

.gps-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.info-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 2px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

@media (max-width: 640px) {
    .master-tabs {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================================
   MOBILE-FIRST + PWA SHELL
   ========================================================= */

.mobile-topbar {
    display: none;
}

.bottom-nav {
    display: none;
}

.sidebar-overlay {
    display: none;
}

.sidebar-close {
    display: none;
}

.desktop-only {
    display: flex;
}

.page-content {
    /* spacer for bottom nav on mobile */
}

.login-logo {
    font-size: 42px;
    text-align: center;
    margin-bottom: 8px;
}

.login-card {
    width: 100%;
}

/* ========== MOBILE (<= 960px) ========== */
@media (max-width: 960px) {
    body.has-app-shell {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    body.menu-open {
        overflow: hidden;
    }

    .layout {
        flex-direction: column;
        min-height: 100vh;
    }

    /* Drawer sidebar */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(300px, 86vw);
        height: 100%;
        height: 100dvh;
        z-index: 200;
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
    }

    .sidebar-brand {
        position: relative;
        padding-right: 48px;
    }

    .sidebar-close {
        display: flex;
        position: absolute;
        top: 20px;
        right: 14px;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        font-size: 16px;
        cursor: pointer;
    }

    .sidebar-user {
        display: flex;
    }

    /* grid app-style di-override di blok APP-STYLE SIDEBAR */

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.55);
        z-index: 150;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.show {
        opacity: 1;
        pointer-events: auto;
    }

    /* Mobile top bar */
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        padding-top: calc(10px + env(safe-area-inset-top, 0px));
        background: #0f172a;
        color: #fff;
        position: sticky;
        top: 0;
        z-index: 100;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    }

    .btn-menu {
        width: 42px;
        height: 42px;
        border: none;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-topbar-title {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }

    .mobile-topbar-title strong {
        font-size: 15px;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-topbar-title small {
        font-size: 11px;
        color: #94a3b8;
        margin-top: 1px;
    }

    .mobile-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: linear-gradient(135deg, #0ea5e9, #06b6d4);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 13px;
        flex-shrink: 0;
    }

    .desktop-only {
        display: none !important;
    }

    .main {
        padding: 14px 12px 20px;
        width: 100%;
    }

    .page-content {
        padding-bottom: 8px;
    }

    /* Bottom navigation */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 120;
        background: #ffffff;
        border-top: 1px solid var(--border);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
        justify-content: space-around;
        align-items: stretch;
    }

    .bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 6px 4px;
        min-height: 52px;
        color: #64748b;
        text-decoration: none;
        font-size: 10px;
        font-weight: 600;
        border-radius: 10px;
        transition: var(--transition);
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav a .bn-icon {
        font-size: 20px;
        line-height: 1;
    }

    .bottom-nav a .bn-label {
        max-width: 72px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    .bottom-nav a.active {
        color: #0284c7;
        background: #e0f2fe;
    }

    .bottom-nav a:active {
        background: #f1f5f9;
    }

    /* Cards & tables more compact */
    .card {
        padding: 14px;
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat {
        padding: 14px 12px;
    }

    .stat strong {
        font-size: 18px;
    }

    .table-wrap {
        margin: 0 -2px;
        border-radius: 10px;
    }

    table {
        font-size: 12.5px;
    }

    th, td {
        padding: 10px 8px;
    }

    .btn {
        min-height: 44px;
        padding: 11px 16px;
        font-size: 14px;
    }

    .btn-sm {
        min-height: 36px !important;
        padding: 7px 12px !important;
    }

    input[type=text],
    input[type=password],
    input[type=date],
    input[type=number],
    textarea,
    select {
        min-height: 46px;
        font-size: 16px; /* cegah zoom iOS */
        padding: 12px 14px;
    }

    textarea {
        min-height: 110px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .master-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .master-tab {
        padding: 12px 8px;
    }

    .gps-panel {
        padding: 14px;
    }

    .gps-actions {
        flex-direction: column;
    }

    .gps-actions .btn {
        width: 100%;
    }

    .list-inline {
        gap: 6px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .login-wrap {
        padding: 20px 16px;
        align-items: flex-start;
        padding-top: 10vh;
    }

    .login-wrap .card {
        padding: 28px 20px;
        border-radius: 18px;
    }
}

/* Small phones */
@media (max-width: 400px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .bottom-nav a .bn-label {
        font-size: 9px;
        max-width: 60px;
    }

    .master-tabs {
        grid-template-columns: 1fr 1fr;
    }
}

/* PWA standalone adjustments */
@media all and (display-mode: standalone) {
    .mobile-topbar {
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
    }
}

/* =========================================================
   APP-STYLE SIDEBAR (kotak-kotak seperti APK)
   ========================================================= */

.sidebar {
    width: 280px;
}

.sidebar-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 12px;
}

.sidebar-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 10px;
    min-height: 88px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0;
    transition: var(--transition);
    text-decoration: none;
}

.sidebar-nav a .nav-icon {
    width: auto;
    font-size: 26px;
    line-height: 1;
    opacity: 1;
    display: block;
}

.sidebar-nav a:hover {
    background: rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.35);
    color: #e0f2fe;
    transform: translateY(-2px);
    text-decoration: none;
}

.sidebar-nav a.active {
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.35), rgba(6, 182, 212, 0.2));
    border-color: rgba(56, 189, 248, 0.5);
    color: #7dd3fc;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.2), inset 0 0 0 1px rgba(125, 211, 252, 0.15);
    font-weight: 700;
}

/* Hapus gaya list lama yang bentrok */
.sidebar-nav a.active {
    /* no left border strip in grid mode */
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.2);
}

.sidebar-footer {
    padding: 12px;
}

.sidebar-footer a {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    font-weight: 600;
    text-decoration: none;
}

.sidebar-footer a:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
    text-decoration: none;
}

/* Button row fixes */
.form-actions-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.form-actions-row .btn,
.incentive-recalc-form .btn {
    width: auto;
    min-width: 140px;
}

.incentive-recalc-form {
    display: inline-block;
    margin-top: 10px;
}

form.inline {
    display: inline-flex;
    vertical-align: middle;
}

/* Desktop: sidebar grid tetap */
@media (min-width: 961px) {
    .sidebar-nav {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile drawer: tetap grid 2 kolom, lebih lega */
@media (max-width: 960px) {
    .sidebar-nav {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 12px;
    }

    .sidebar-nav a {
        min-height: 92px;
        padding: 18px 10px;
        border-radius: 18px;
        font-size: 12.5px;
    }

    .sidebar-nav a .nav-icon {
        font-size: 28px;
    }

    .form-actions-row {
        flex-direction: column;
    }

    .form-actions-row .btn,
    .incentive-recalc-form .btn {
        width: 100%;
    }

    .incentive-recalc-form {
        display: block;
        width: 100%;
    }
}

/* =========================================================
   DASHBOARD INDEKS PRESTASI (Professional)
   ========================================================= */

.hero-strip {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #0ea5e9 160%);
    color: #fff;
    border-radius: 20px;
    padding: 24px 26px;
    margin-bottom: 18px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
}

.hero-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7dd3fc;
    margin-bottom: 6px;
}

.hero-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-sub {
    margin: 8px 0 0;
    font-size: 13px;
    color: #94a3b8;
    max-width: 420px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
}

.hero-metric {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 14px;
    min-width: 130px;
}

.hero-metric span {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 4px;
}

.hero-metric strong {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.my-score-card {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #ecfdf5, #fff);
    border: 1px solid #a7f3d0;
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 18px;
}

.my-score-rank {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.my-score-value {
    font-size: 28px;
    font-weight: 800;
    color: #065f46;
    letter-spacing: -0.03em;
}

.my-score-value small {
    font-size: 13px;
    font-weight: 600;
    color: #047857;
}

.my-score-bars {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    min-width: 220px;
}

.mini-metric {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 8px;
    align-items: center;
    font-size: 11px;
}

.mini-metric span { color: var(--muted); font-weight: 600; grid-column: 1 / -1; }
.mini-metric .kpi-bar { grid-column: 1; }
.mini-metric strong { font-size: 12px; color: var(--text); }

.stats-rich .stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.stats-rich .stat::before { display: none; }

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #f1f5f9;
    flex-shrink: 0;
}

.stat.tone-blue .stat-icon { background: #dbeafe; }
.stat.tone-cyan .stat-icon { background: #cffafe; }
.stat.tone-violet .stat-icon { background: #ede9fe; }
.stat.tone-amber .stat-icon { background: #fef3c7; }
.stat.tone-green .stat-icon { background: #d1fae5; }
.stat.tone-rose .stat-icon { background: #ffe4e6; }

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.card-head h3 { margin: 0; }

.pipeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    align-items: end;
    min-height: 140px;
    padding-top: 8px;
}

.pipe-step {
    text-align: center;
}

.pipe-count {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.pipe-bar {
    height: 90px;
    background: #f1f5f9;
    border-radius: 12px 12px 6px 6px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin: 0 auto 8px;
    width: 100%;
    max-width: 56px;
}

.pipe-bar span {
    display: block;
    width: 100%;
    border-radius: 10px 10px 4px 4px;
    min-height: 6px;
    transition: height 0.5s ease;
}

.pipe-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
}

.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    min-height: 180px;
    margin-bottom: 16px;
    padding: 0 8px;
}

.podium-item {
    flex: 1;
    max-width: 120px;
    text-align: center;
}

.podium-medal { font-size: 28px; line-height: 1; }
.podium-name {
    font-size: 12px;
    font-weight: 700;
    margin: 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.podium-score {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 6px;
}
.podium-col {
    border-radius: 14px 14px 6px 6px;
    background: linear-gradient(180deg, #38bdf8, #0284c7);
    margin: 0 auto;
    width: 100%;
    max-width: 72px;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.25);
}
.podium-item.rank-1 .podium-col {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}
.podium-item.rank-2 .podium-col {
    background: linear-gradient(180deg, #94a3b8, #64748b);
}
.podium-item.rank-3 .podium-col {
    background: linear-gradient(180deg, #fdba74, #ea580c);
}

.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row {
    display: grid;
    grid-template-columns: 36px 1fr minmax(60px, 1.2fr) 48px;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}
.rank-no { font-weight: 800; color: var(--muted); }
.rank-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flex-bar { width: 100%; }

.chart-wrap {
    position: relative;
    height: 240px;
}

.chart-donut {
    max-width: 320px;
    margin: 0 auto;
}

.field-map {
    height: 280px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #e2e8f0;
    z-index: 1;
}

@media (max-width: 960px) {
    .hero-strip {
        padding: 18px;
        border-radius: 16px;
    }
    .hero-title { font-size: 18px; }
    .hero-metrics {
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }
    .pipeline {
        grid-template-columns: repeat(5, minmax(48px, 1fr));
        gap: 6px;
        overflow-x: auto;
    }
    .pipe-bar { max-width: 40px; height: 70px; }
    .pipe-count { font-size: 16px; }
    .pipe-label { font-size: 10px; }
    .field-map { height: 240px; }
    .chart-wrap { height: 220px; }
    .rank-row {
        grid-template-columns: 28px 1fr 40px;
    }
    .rank-row .flex-bar { display: none; }
}

/* Selfie panel */
.selfie-panel {
    background: linear-gradient(135deg, #fdf4ff 0%, #f5f3ff 100%);
    border: 1.5px solid #d8b4fe;
    border-radius: 14px;
    padding: 18px;
    margin: 14px 0 8px;
}

.selfie-box {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 12px auto 0;
    aspect-ratio: 3/4;
    background: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #c4b5fd;
}

.selfie-box video,
.selfie-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* PWA install */
.btn-install {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: rgba(14, 165, 233, 0.25);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.pwa-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: linear-gradient(90deg, #e0f2fe, #f0f9ff);
    border-bottom: 1px solid #bae6fd;
}

.pwa-banner-text {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12.5px;
}

.pwa-banner-text strong {
    font-size: 13px;
    color: #0c4a6e;
}

.pwa-banner-text span {
    color: #0369a1;
}

@media (min-width: 961px) {
    .pwa-banner {
        border-radius: 12px;
        margin-bottom: 12px;
        border: 1px solid #bae6fd;
    }
    .btn-install {
        display: none;
    }
}


/* =========================================================
   SIMPAN BRANDING + PROFESSIONAL FORMS
   ========================================================= */

.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    background: #fff;
    object-fit: cover;
}

.sidebar-brand h1 {
    font-size: 20px;
    letter-spacing: 0.04em;
    margin: 0;
}

.brand-org {
    font-size: 10px;
    color: #38bdf8;
    font-weight: 600;
    margin-top: 2px;
    letter-spacing: 0.02em;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.login-logo-img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.25);
}

.login-brand h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 0.06em;
    text-align: left;
}

.login-brand .login-sub {
    text-align: left;
    margin: 4px 0 0;
    line-height: 1.4;
}

.login-brand .login-sub span {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Professional form controls */
.form-section {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.form-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.form-group .hint {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 400;
    margin-top: 5px;
}

input[type=text],
input[type=password],
input[type=date],
input[type=number],
textarea,
select {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover,
textarea:hover,
select:hover {
    border-color: #cbd5e1;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
    background: #fff;
}

input:read-only,
input.gps-input {
    background: #f1f5f9 !important;
    color: #334155;
    cursor: default;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

input[type=file] {
    padding: 12px;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 13px;
}

input[type=file]:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.checkbox-label {
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.form-actions {
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
    margin-top: 20px;
}

.master-panel .form-grid {
    gap: 16px 18px;
}

.floating-field {
    position: relative;
}

@media (max-width: 960px) {
    .login-brand {
        flex-direction: column;
        text-align: center;
    }
    .login-brand h1,
    .login-brand .login-sub {
        text-align: center;
    }
}


.profile-photo-wrap {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.profile-photo {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
}
.target-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #f8fafc;
}
.target-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}
.target-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12.5px;
    margin-bottom: 8px;
}


/* SIMPAN theme polish — teal government */
:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #ccfbf1;
    --accent: #14b8a6;
    --sidebar-bg: #0f172a;
    --sidebar-active: rgba(13, 148, 136, 0.28);
    --success: #059669;
    --info: #0d9488;
}
.btn { background: linear-gradient(135deg, #0d9488, #0f766e); }
.btn:hover { filter: brightness(1.05); }
.btn.success { background: linear-gradient(135deg, #10b981, #059669); }
.sidebar-nav a.active {
    background: linear-gradient(145deg, rgba(13, 148, 136, 0.4), rgba(15, 118, 110, 0.22));
    border-color: rgba(45, 212, 191, 0.45);
    color: #5eead4;
}
.hero-strip {
    background: linear-gradient(135deg, #0f172a 0%, #134e4a 55%, #0d9488 160%);
}
.stat.tone-cyan .stat-icon { background: #ccfbf1; }
.login-card .btn { width: 100%; }
.logo-upload-form { flex: 1; min-width: 220px; }

/* =========================================================
   DATA WAJIB PAJAK - SEARCH BOX
   Keep the existing table layout responsive; only style the
   search controls for desktop and mobile.
   ========================================================= */
.master-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 14px;
}

.master-search-input {
    flex: 1 1 320px;
    min-width: 0;
}

.master-taxpayer-search {
    display: block;
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    line-height: 1.3;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.master-taxpayer-search::placeholder {
    color: #94a3b8;
}

.master-taxpayer-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}

.master-taxpayer-count {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 12px;
}

@media (max-width: 768px) {
    .master-search-row {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .master-search-input {
        width: 100%;
        flex: 0 0 auto;
        min-height: 0;
    }

    .master-taxpayer-search {
        width: 100%;
    }

    .master-taxpayer-count {
        white-space: normal;
        text-align: left;
    }
}

/* =========================================================
   DATA WAJIB PAJAK - BULK SELECTION / DELETE
   ========================================================= */
.taxpayer-bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 12px;
    margin: 0 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.taxpayer-bulk-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.taxpayer-select-all,
.taxpayer-select-col input {
    cursor: pointer;
}

.taxpayer-select-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
}

.taxpayer-select-col {
    width: 42px;
    min-width: 42px;
    text-align: center;
}

.taxpayer-select-col input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--primary);
}

@media (max-width: 768px) {
    .taxpayer-bulk-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .taxpayer-bulk-left {
        justify-content: space-between;
    }

    .taxpayer-bulk-toolbar .btn {
        width: 100%;
    }
}

/* =========================================================
   V11 - FIX TAXPAYER SEARCH BOX WIDTH
   Keep table layout untouched. Search uses a two-column grid
   so the input always fills the available card width.
   ========================================================= */
.master-search-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: end !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 0 0 14px !important;
}

.master-search-input {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
}

.master-taxpayer-search,
input#master-taxpayer-search {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 42px !important;
    box-sizing: border-box !important;
    appearance: none;
    -webkit-appearance: none;
}

.master-taxpayer-count {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    flex: none !important;
    white-space: nowrap !important;
}

@media (max-width: 768px) {
    .master-search-row {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .master-search-input,
    .master-taxpayer-search,
    input#master-taxpayer-search {
        width: 100% !important;
        max-width: none !important;
    }

    .master-taxpayer-count {
        width: 100% !important;
        white-space: normal !important;
    }
}
