/* Payment Tracker - Responsive styles */
:root {
    --bg: #f1f5f9;
    --surface: #fff;
    --text: #0f172a;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: rgba(37, 99, 235, 0.1);
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --border: #e2e8f0;
    --success: #059669;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --header-h: 4rem;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1600px; margin: 0 auto; padding: 1rem 1.5rem; }
@media (min-width: 768px) { .container { padding: 1.5rem 2rem; } }

/* App header / navigation */
.app-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 4px 24px rgba(15, 23, 42, 0.04);
}
.app-header-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.25rem;
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 1rem 1.5rem;
}
.app-header-start {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}
.app-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}
.app-nav-toggle:hover {
    background: var(--bg);
    border-color: #cbd5e1;
}
.app-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
}
.app-brand:hover {
    text-decoration: none;
    color: inherit;
}
.app-brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background: transparent;
    flex-shrink: 0;
    overflow: hidden;
}
.app-brand-logo {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    object-position: center;
}
.app-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}
.app-brand-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
.app-brand-tagline {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
}
.app-nav {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
}
.app-nav-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 12px;
}
.app-nav-list > li {
    list-style: none;
    margin: 0;
}
.app-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border: none;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
a.app-nav-link:hover {
    text-decoration: none;
    background: #fff;
    color: var(--primary);
}
.app-nav-link.is-active,
.app-nav-dropdown.is-active > .app-nav-dropdown-toggle {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.app-nav-chevron {
    transition: transform 0.2s ease;
}
.app-nav-dropdown {
    position: relative;
}
.app-nav-dropdown.open .app-nav-chevron {
    transform: rotate(180deg);
}
.app-nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: 0.4rem;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
    z-index: 210;
    display: none;
}
.app-nav-dropdown.open .app-nav-dropdown-menu {
    display: block;
}
.app-nav-dropdown-menu li {
    margin: 0;
    list-style: none;
}
.app-nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
}
.app-nav-dropdown-menu a:hover {
    background: var(--primary-soft);
    color: var(--primary);
    text-decoration: none;
}
.app-header-end {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}
.app-user-chip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0.75rem 0.3rem 0.35rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    max-width: 11rem;
}
.app-user-avatar {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: linear-gradient(145deg, #3b82f6, #1e40af);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
}
.app-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
}
.app-user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-user-role {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.95rem;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #475569;
    background: #fff;
    border: 1px solid var(--border);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.app-btn-logout:hover {
    text-decoration: none;
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--danger);
}
.app-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 190;
}
.app-nav-backdrop.is-visible {
    display: block;
}
.app-nav-mobile-only {
    display: none;
}
@media (max-width: 1100px) {
    .app-user-meta {
        display: none;
    }
    .app-user-chip {
        padding: 0.25rem;
        border-radius: 10px;
    }
}
@media (max-width: 960px) {
    .app-nav-toggle {
        display: flex;
    }
    .app-brand-tagline {
        display: none;
    }
    .app-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 195;
        background: #fff;
        padding: 1rem 1.25rem 2rem;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        justify-content: flex-start;
    }
    .app-nav.is-open {
        transform: translateX(0);
    }
    .app-nav-list {
        flex-direction: column;
        align-items: stretch;
        background: transparent;
        border: none;
        padding: 0;
        gap: 0.35rem;
    }
    .app-nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.65rem 0.85rem;
        font-size: 0.95rem;
    }
    .app-nav-dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        padding: 0 0 0 0.75rem;
        margin-top: 0.25rem;
    }
    .app-nav-dropdown.open .app-nav-dropdown-menu {
        display: block;
    }
    .app-nav-mobile-only {
        display: list-item;
    }
    .app-nav-link--logout-mobile {
        margin-top: 0.5rem;
        color: var(--danger) !important;
        border: 1px solid #fecaca;
        background: #fef2f2 !important;
    }
}
@media (max-width: 960px) {
    .app-header-end .app-btn-logout {
        display: none;
    }
}

.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-header h1 { margin: 0; font-size: 1.5rem; }

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1rem;
}
@media (min-width: 768px) { .card { padding: 1.5rem; } }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-weight: 600; background: var(--bg); }
tr:hover td { background: rgba(0,0,0,0.02); }
.table-actions { white-space: nowrap; }
.table-actions a, .table-actions button { margin-right: 0.5rem; }

/* Data tables: fixed layout for consistent alignment */
.data-table { table-layout: fixed; }
.data-table th,
.data-table td { word-break: break-word; }
.data-table .table-actions { white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* Vendors table column widths */
.table-vendors col:nth-child(1) { width: 14%; }   /* Vendor Name */
.table-vendors col:nth-child(2) { width: 16%; }   /* Company Name */
.table-vendors col:nth-child(3) { width: 10%; }   /* Email */
.table-vendors col:nth-child(4) { width: 9%; }   /* Phone */
.table-vendors col:nth-child(5) { width: 14%; }   /* Bank Name */
.table-vendors col:nth-child(6) { width: 12%; }   /* Bank Account Number */
.table-vendors col:nth-child(7) { width: 10%; }   /* IFSC Code */
.table-vendors col:nth-child(8) { width: 15%; }   /* Actions */

/* Payments table column widths */
.table-payments col:nth-child(1) { width: 8%; }   /* Date */
.table-payments col:nth-child(2) { width: 10%; }  /* Subject */
.table-payments col:nth-child(3) { width: 14%; }  /* Supplier / Employee Name */
.table-payments col:nth-child(4) { width: 8%; }   /* Invoice */
.table-payments col:nth-child(5) { width: 8%; }   /* Amount */
.table-payments col:nth-child(6) { width: 8%; }   /* Type */
.table-payments col:nth-child(7) { width: 8%; }   /* Mode */
.table-payments col:nth-child(8) { width: 8%; }   /* Cheque Number */
.table-payments col:nth-child(9) { width: 14%; }  /* Remarks */
.table-payments col:nth-child(10) { width: 14%; } /* Actions */

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    background: var(--border);
    color: var(--text);
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); color: #fff; }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.85rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 0.25rem; }
.form-hint { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.25rem; }

.alert { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* Login — SKS theme (teal #108a6d); left panel matches centered typographic hero */
.login-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #fff;
    color: var(--text);
}
.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
    width: 100%;
}
.login-aside {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
}
.login-aside-inner {
    max-width: 22rem;
    margin: 0 auto;
    text-align: center;
}
.login-aside-logo {
    display: block;
    margin: 0 auto 1.25rem;
    max-width: 10rem;
    width: 100%;
    height: auto;
}
.login-aside-kicker {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #108a6d;
}
.login-aside-title {
    margin: 0 0 0.875rem;
    font-size: clamp(1.75rem, 3.2vw, 2.125rem);
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.login-aside-text {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 400;
    color: #64748b;
    line-height: 1.6;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
}
.login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #fff;
}
.login-card {
    width: 100%;
    max-width: 400px;
}
.login-heading {
    margin: 0 0 0.35rem;
    font-size: 1.625rem;
    font-weight: 700;
    text-align: center;
    color: #111;
}
.login-lede {
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
    text-align: center;
    color: #5c6360;
    line-height: 1.5;
}
.login-page .login-form .form-group { margin-bottom: 1.1rem; }
.login-page .login-form .form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}
.login-page .login-form .form-group input {
    max-width: none;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #e2e8e0;
    background: #f8faf9;
    font-family: inherit;
    font-size: 0.95rem;
}
.login-page .login-form .form-group input::placeholder { color: #9ca3af; }
.login-page .login-form .form-group input:focus {
    outline: none;
    border-color: #108a6d;
    box-shadow: 0 0 0 3px rgba(16, 138, 109, 0.18);
    background: #fff;
}
.login-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.login-password-wrap input { padding-right: 2.75rem; }
.login-password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    padding: 0.35rem;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-password-toggle:hover { color: #64748b; background: rgba(0,0,0,0.04); }
.login-password-toggle:focus-visible {
    outline: 2px solid #108a6d;
    outline-offset: 2px;
}
.login-page .btn-login {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 12px;
    background: #108a6d;
    color: #fff;
    border: none;
    cursor: pointer;
}
.login-page .btn-login:hover {
    background: #0d7359;
    opacity: 1;
    text-decoration: none;
}
.login-page .btn-login:focus-visible {
    outline: 2px solid #0a5c48;
    outline-offset: 2px;
}
.login-page .alert { border-radius: 12px; }
@media (max-width: 880px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-aside {
        min-height: auto;
        padding: 1.75rem 1.5rem;
        border-bottom: 1px solid #e8eceb;
    }
    .login-aside-inner { max-width: none; text-align: center; }
}

/* Vendor detail */
.vendor-detail-header { margin-bottom: 1.5rem; }
.vendor-detail-header h2 { margin: 0 0 0.5rem; }
.vendor-stats { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1rem 0; }
.vendor-stats span { font-weight: 600; color: var(--primary); }

/* Vendor show page (two-column info + payments table) */
.vendor-show-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.vendor-show-header h1 { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--text); }
.vendor-show-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.vendor-show-actions .export-form { margin: 0; }

.vendor-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
    .vendor-info-grid { grid-template-columns: 1fr; }
}
.vendor-info-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}
.vendor-info-card-title {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}
.vendor-info-list {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1.5rem;
    align-items: baseline;
}
.vendor-info-list dt {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
}
.vendor-info-list dd {
    margin: 0;
    font-size: 0.95rem;
}
.vendor-info-list dd a { color: var(--primary); text-decoration: none; }
.vendor-info-list dd a:hover { text-decoration: underline; }
.info-icon {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-right: 0.35rem;
    color: var(--text-muted);
}
.bank-icon-sm { color: var(--primary); }
.vendor-stats-inline {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.vendor-stats-inline span { font-weight: 600; color: var(--primary); }
.vendor-stats-inline a { color: var(--primary); text-decoration: none; }
.vendor-stats-inline a:hover { text-decoration: underline; }

.vendor-bank-section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.vendor-bank-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.vendor-bank-details { display: flex; flex-direction: column; gap: 0.5rem; }
.vendor-bank-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.bank-name-text { font-weight: 500; }
.bank-account-with-copy,
.bank-ifsc-with-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.bank-label { font-size: 0.85rem; color: var(--text-muted); }
.vendor-bank-row .btn-copy { width: 1.5rem; height: 1.5rem; padding: 0; }
.vendor-bank-row .btn-copy svg { width: 12px; height: 12px; }
.text-muted { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

.vendor-section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 1rem 0.75rem;
}
.dashboard-card > .table-wrap { padding: 0; }
.dashboard-card > .dashboard-pagination { margin: 0; }

/* Reports filter */
.report-filters { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin-bottom: 1.5rem; }
.report-filters .form-group { margin-bottom: 0; }
.report-filters label { margin-bottom: 0.25rem; }
.export-form { display: inline; }
.export-form button { margin-left: 0.5rem; }

/* Add/Edit Payment form - two-column card UI */
.payment-form-header { margin-bottom: 1rem; }
.payment-form-header .btn-back { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text-muted); }
.payment-form-header .btn-back:hover { color: var(--primary); }
.btn-back-arrow { font-size: 1.1rem; }

.payment-form-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) { .payment-form-card { padding: 2rem; } }
.payment-form-title { margin: 0 0 1rem; font-size: 1.5rem; font-weight: 700; }
.payment-form-card .btn-back-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
}
.payment-form.two-col-form .form-row-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 767px) {
    .payment-form.two-col-form .form-row-two-cols { grid-template-columns: 1fr; }
}
.payment-form .form-col { display: flex; flex-direction: column; gap: 0; }
.payment-form .form-group { margin-bottom: 1rem; }
.payment-form .form-group-full { margin-bottom: 1rem; }
.payment-form .form-group label { display: block; margin-bottom: 0.35rem; font-weight: 500; font-size: 0.9rem; }
.payment-form .form-group input,
.payment-form .form-group select,
.payment-form .form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}
.payment-form .form-group input:focus,
.payment-form .form-group select:focus,
.payment-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.payment-form .input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.payment-form .input-with-icon .input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.payment-form .input-with-icon .input-icon-right { left: auto; right: 0.75rem; }
.payment-form .input-with-icon input[type="text"],
.payment-form .input-with-icon input[type="number"],
.payment-form .input-with-icon input[type="date"] {
    padding-left: 2.5rem;
}
.payment-form .input-with-icon input[type="date"] { padding-right: 2.5rem; }
.payment-form .input-with-icon .input-icon-right + input { padding-left: 0.75rem; padding-right: 2.5rem; }

.payment-form .file-upload-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}
.payment-form .btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--primary);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
}
.payment-form .btn-upload:hover { background: rgba(37, 99, 235, 0.08); }
.btn-upload-icon { display: inline-flex; }
.payment-form .file-input-hidden {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}
.payment-form .file-name { font-size: 0.9rem; color: var(--text-muted); }

.payment-form .form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

/* Payment form — premium layout (add / edit) */
.pf-page {
    max-width: 880px;
    margin: 0 auto;
}
.pf-card {
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}
.pf-card-header {
    margin-bottom: 1.5rem;
}
.pf-form .vp-sections {
    gap: 1.25rem;
}
.pf-form .form-group {
    margin-bottom: 0;
}
.pf-form .form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.pf-form .form-group input,
.pf-form .form-group select,
.pf-form .form-group textarea {
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    border-color: #cbd5e1;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pf-form .form-group input:hover,
.pf-form .form-group select:hover,
.pf-form .form-group textarea:hover {
    border-color: #94a3b8;
}
.pf-select-lg {
    font-size: 0.95rem;
}
.pf-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}
.pf-field-hint {
    margin: -0.25rem 0 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.pf-vendor-hint {
    margin-top: 0.5rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.82rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e40af;
}
.pf-vendor-hint-label {
    font-weight: 600;
    margin-right: 0.35rem;
}
.pf-input-currency {
    display: flex;
    align-items: stretch;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pf-input-currency:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.pf-currency-symbol {
    display: flex;
    align-items: center;
    padding: 0 0.85rem;
    background: #f1f5f9;
    font-weight: 700;
    color: var(--text);
    border-right: 1px solid #e2e8f0;
}
.pf-amount-input {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-size: 1.15rem !important;
    font-weight: 600;
    flex: 1;
    min-width: 0;
}
.pf-amount-input:focus {
    outline: none;
}
.pf-amount-wrap {
    grid-column: span 1;
}
@media (min-width: 641px) {
    .pf-amount-wrap .pf-input-currency {
        max-width: 100%;
    }
}
.pf-file-upload {
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
}
.pf-btn-upload {
    border-radius: 8px;
}
.pf-form-actions {
    margin-top: 1.75rem;
    padding: 1.25rem 0 0;
    border-top: 1px solid var(--border);
    gap: 0.65rem;
}
.pf-submit {
    min-width: 10rem;
    font-weight: 600;
}
.btn-lg {
    padding: 0.65rem 1.35rem;
    font-size: 1rem;
}

/* Responsive table */
@media (max-width: 768px) {
    th, td { padding: 0.5rem; font-size: 0.9rem; }
}

/* ========== Dashboard UI (Vendor & Payment screens) ========== */
.dashboard-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.dashboard-header .dashboard-title h1 { margin: 0 0 0.25rem; font-size: 1.5rem; font-weight: 700; color: var(--text); }
.dashboard-header .dashboard-title .subtitle { color: var(--text-muted); font-size: 0.9rem; }
.dashboard-header .dashboard-actions { flex-shrink: 0; }

.dashboard-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.dashboard-search {
    flex: 1;
    min-width: 200px;
    max-width: 320px;
    position: relative;
}
.dashboard-search input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--surface);
}
.dashboard-search input::placeholder { color: var(--text-muted); }
.dashboard-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.dashboard-date-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.dashboard-date-filters .date-filter-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}
.dashboard-date-filters input[type="date"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--surface);
}
.dashboard-date-filters input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
}
.dashboard-filter-subject {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dashboard-filter-subject .date-filter-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}
.dashboard-filter-subject select {
    min-width: 160px;
}

.dashboard-search .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.dashboard-toolbar select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}
.dashboard-toolbar .btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.dashboard-toolbar .btn-outline:hover { background: var(--bg); border-color: var(--text-muted); }

.dashboard-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1rem;
}
.dashboard-table { width: 100%; border-collapse: collapse; }
.dashboard-table th,
.dashboard-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dashboard-table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    background: var(--bg);
}
.dashboard-table tbody tr:hover td { background: rgba(0,0,0,0.02); }
.dashboard-table .cell-vendor {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.avatar-badge {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.avatar-badge.bg-blue { background: #2563eb; }
.avatar-badge.bg-green { background: #059669; }
.avatar-badge.bg-teal { background: #0d9488; }
.avatar-badge.bg-orange { background: #ea580c; }
.avatar-badge.bg-violet { background: #7c3aed; }
.avatar-badge.bg-rose { background: #e11d48; }
.cell-vendor .vendor-info .name { font-weight: 500; display: block; }
.cell-vendor .vendor-info .name a { color: var(--primary); text-decoration: none; }
.cell-vendor .vendor-info .name a:hover { text-decoration: underline; }
.cell-vendor .vendor-info .meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.1rem; }

.cell-bank {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.bank-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    flex-shrink: 0;
}
.cell-bank .bank-name { font-size: 0.9rem; }

.cell-account {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-copy {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.btn-copy:hover { background: var(--border); color: var(--text); }
.btn-copy svg { width: 14px; height: 14px; }

.dashboard-actions-cell { white-space: nowrap; }
.dashboard-actions-cell .btn-icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.25rem;
    text-decoration: none;
}
.dashboard-actions-cell .btn-icon:hover { background: var(--bg); color: var(--primary); }
.dashboard-actions-cell .btn-icon.btn-danger:hover { background: #fee2e2; color: var(--danger); }
.dashboard-actions-cell .btn-icon svg { width: 1.1rem; height: 1.1rem; }

.dashboard-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.9rem;
    color: var(--text-muted);
}
.dashboard-pagination .pagination-info { display: flex; align-items: center; gap: 0.75rem; }
.dashboard-pagination select {
    padding: 0.35rem 1.5rem 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
    background: var(--surface);
}
.dashboard-pagination .pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.dashboard-pagination .pagination-pages a,
.dashboard-pagination .pagination-pages span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text);
    border: 1px solid transparent;
}
.dashboard-pagination .pagination-pages a:hover { background: var(--bg); color: var(--primary); }
.dashboard-pagination .pagination-pages .page-current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.dashboard-pagination .pagination-pages .page-current:hover { color: #fff; background: var(--primary-hover); }
.dashboard-pagination .pagination-pages .btn-prev-next {
    padding: 0 0.5rem;
    font-size: 0.85rem;
}

/* Import Payments page */
.payment-form-card .form-description { color: var(--text-muted); margin: 0 0 1.5rem; }
.accounts-tools-form input[type="file"] { max-width: 480px; }
.accounts-tools-placeholder {
    margin-top: 0.75rem;
    background: var(--bg);
    box-shadow: none;
}

/* Sales convertor page (inspired by requested theme) */
.sales-convertor-page {
    max-width: 900px;
    margin: 2.25rem auto 0;
    text-align: center;
}
.sales-convertor-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.8rem, 4vw, 2.9rem);
    font-weight: 700;
    color: #1f2937;
}
.sales-convertor-subtitle {
    margin: 0 auto 1.75rem;
    max-width: 760px;
    font-size: 1.05rem;
    color: #4b5563;
}
.sales-convertor-form {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 2rem 1.25rem;
    border: 1px dashed #d1d5db;
}
.sales-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}
.sales-convertor-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}
.sales-upload-btn,
.sales-convert-btn {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.8rem;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    background: #ef2d2d;
    box-shadow: 0 6px 12px rgba(239, 45, 45, 0.28);
    transition: transform 0.12s ease, opacity 0.12s ease;
}
.sales-upload-btn:hover,
.sales-convert-btn:hover {
    opacity: 0.94;
    transform: translateY(-1px);
    text-decoration: none;
}
.sales-file-name {
    margin: 1rem 0 0;
    color: #6b7280;
    font-size: 0.98rem;
}
@media (max-width: 640px) {
    .sales-upload-btn,
    .sales-convert-btn {
        width: 100%;
        max-width: 330px;
    }
}
.import-steps { margin-bottom: 2rem; }
.import-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius);
}
.import-step-num {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}
.import-step strong { display: block; margin-bottom: 0.25rem; }
.import-step p { margin: 0 0 0.75rem; font-size: 0.9rem; color: var(--text-muted); }
.import-step p:last-child { margin-bottom: 0; }
.import-form { border-top: 1px solid var(--border); padding-top: 1.5rem; }
.import-form .file-upload-wrap input[type="file"] { padding: 0.5rem 0; }
.import-report-alert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.import-reports-history {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}
.import-reports-title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 600;
}
.import-reports-empty {
    margin: 0.75rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.import-reports-table .import-failed-count {
    font-weight: 600;
    color: var(--danger);
}

/* Vendor ID (vendor_code) */
.vendor-code { font-family: ui-monospace, monospace; font-weight: 600; color: var(--primary); }
.vendor-code-badge {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}
.form-readonly { margin: 0; padding: 0.5rem 0; font-weight: 500; color: var(--text); }
.vendor-type-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    vertical-align: middle;
}
.vendor-type-badge--vendor {
    background: #dbeafe;
    color: #1e40af;
}
.vendor-type-badge--employee {
    background: #fef3c7;
    color: #92400e;
}
.vendor-party-type-select {
    max-width: 20rem;
}
.vendor-type-readonly .form-readonly {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.vendor-code-inline {
    font-family: ui-monospace, monospace;
    font-size: 0.88rem;
    color: var(--primary);
}
.form-hint-block {
    margin: 0 0 1rem;
}

/* Vendor / employee add form */
.vp-page {
    max-width: 920px;
    margin: 0 auto;
}
.vp-page-header {
    margin-bottom: 1.25rem;
}
.vp-card {
    padding: 1.5rem 1.35rem 1.35rem;
}
@media (min-width: 768px) {
    .vp-card {
        padding: 2rem 2.25rem 1.75rem;
    }
}
.vp-card-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.vp-card-title {
    margin: 0 0 0.35rem;
    font-size: 1.55rem;
    letter-spacing: -0.02em;
}
.vp-card-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 36rem;
}
.vp-type-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.vp-type-banner-code {
    font-family: ui-monospace, monospace;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
}
.vp-type-picker {
    border: none;
    margin: 0 0 1.75rem;
    padding: 0;
}
.vp-section-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.vp-type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}
@media (max-width: 520px) {
    .vp-type-options {
        grid-template-columns: 1fr;
    }
}
.vp-type-option {
    cursor: pointer;
    margin: 0;
}
.vp-type-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.vp-type-option-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1.1rem 1.15rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    min-height: 100%;
}
.vp-type-option-card.is-selected,
.vp-type-radio:checked + .vp-type-option-card {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.vp-type-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
}
.vp-type-option-icon--vendor {
    background: #dbeafe;
    color: #1d4ed8;
}
.vp-type-option-icon--employee {
    background: #fef3c7;
    color: #b45309;
}
.vp-type-option-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.vp-type-option-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.vp-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.vp-section {
    padding: 1.25rem 1.2rem;
    background: #fafbfc;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
}
.vp-section--notes {
    background: #fff;
    border-style: dashed;
    padding: 1.1rem 1.2rem;
}
.vp-section-title {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.vp-section-lead {
    margin: -0.5rem 0 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 40rem;
}
.vp-field-grid {
    display: grid;
    gap: 0 1.1rem;
}
.vp-field-grid--2 {
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) {
    .vp-field-grid--2 {
        grid-template-columns: 1fr;
    }
}
.vp-field-full {
    grid-column: 1 / -1;
}
.vp-field-grid-span {
    margin-bottom: 0.25rem;
}
.vendor-party-form .form-group {
    margin-bottom: 1rem;
}
.vendor-party-form .form-group:last-child {
    margin-bottom: 0;
}
.vendor-party-form .form-group label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}
.vendor-party-form .form-group input,
.vendor-party-form .form-group select,
.vendor-party-form .form-group textarea {
    min-height: 2.65rem;
    border-radius: 10px;
    border-color: #e2e8f0;
}
.vendor-party-form .form-group textarea,
.vendor-party-form .vp-textarea {
    min-height: 5.5rem;
    resize: vertical;
}
.vp-input-upper {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.vp-req {
    color: #dc2626;
    font-weight: 700;
}
.vp-optional {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.vp-readonly-value {
    margin: 0;
    padding: 0.55rem 0;
    font-family: ui-monospace, monospace;
    font-weight: 600;
    color: var(--primary);
}
.vp-dropzone {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.vp-dropzone:hover,
.vp-dropzone:focus-within {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.02);
}
.vp-dropzone.has-file {
    border-color: #22c55e;
    border-style: solid;
    background: #f0fdf4;
}
.vp-dropzone .file-input-hidden {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.vp-dropzone-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    padding: 1.75rem 1.25rem;
    cursor: pointer;
    margin: 0;
}
.vp-dropzone-icon {
    color: var(--primary);
    opacity: 0.85;
}
.vp-dropzone-text {
    font-size: 0.92rem;
    color: var(--text);
}
.vp-dropzone-text strong {
    color: var(--primary);
}
.vp-dropzone-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.vp-dropzone-filename {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    word-break: break-all;
}
.vp-field-note {
    margin: 0.65rem 0 0;
    font-size: 0.82rem;
}
.vp-field-note a {
    color: var(--primary);
    font-weight: 600;
}
.vp-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}
.vp-alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.vp-form-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.vp-submit-btn {
    min-width: 10rem;
    padding: 0.6rem 1.35rem;
    font-size: 0.95rem;
}
.btn-outline {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Admin panel */
.admin-dashboard-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.admin-card {
    display: block;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15); text-decoration: none; color: inherit; }
.admin-card-icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; color: var(--primary); }
.admin-card h2 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.admin-card p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.permissions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 0.5rem; }
.permissions-module { background: var(--bg); padding: 0.75rem 1rem; border-radius: var(--radius); }
.permissions-module-title { margin: 0 0 0.5rem; font-size: 0.9rem; font-weight: 600; }
.permissions-list { list-style: none; margin: 0; padding: 0; }
.permissions-list li { margin-bottom: 0.35rem; }
.permission-checkbox { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; font-weight: normal; }
.permission-desc { display: block; font-size: 0.8rem; color: var(--text-muted); margin-left: 1.5rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* Finance Dashboard (premium) */
.finance-dash { margin: 0 0 2rem; }
.fd-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    margin-bottom: 1.5rem;
    padding: 1.75rem 2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 48%, #2563eb 100%);
    color: #f8fafc;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}
.fd-hero-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.65);
}
.fd-hero-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.fd-hero-sub {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(248, 250, 252, 0.82);
    max-width: 36rem;
}
.fd-hero-sub strong { color: #fff; font-weight: 600; }
.fd-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.fd-hero .btn-primary {
    background: #fff;
    color: #1e3a5f;
    border: none;
    font-weight: 600;
}
.fd-hero .btn-primary:hover { background: #e2e8f0; text-decoration: none; }
.fd-btn-ghost {
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #f8fafc !important;
    background: rgba(255, 255, 255, 0.08) !important;
}
.fd-btn-ghost:hover { background: rgba(255, 255, 255, 0.16) !important; text-decoration: none; }

.fd-filter {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.fd-filter-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}
.fd-filter-icon {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--primary-soft);
    position: relative;
    align-self: flex-end;
    margin-bottom: 0.1rem;
}
.fd-filter-icon::after {
    content: '';
    position: absolute;
    inset: 0.45rem 0.55rem 0.5rem;
    border: 2px solid var(--primary);
    border-radius: 3px;
    box-shadow: inset 0 -5px 0 var(--primary);
}
.fd-filter-fields label.fd-filter-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.fd-filter-fields input[type="date"] {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 10.5rem;
}
.fd-filter-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.fd-filter-hint {
    margin: 0.85rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.fd-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 1400px) { .fd-kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .fd-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .fd-kpi-grid { grid-template-columns: 1fr; } }

.fd-kpi {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}
.fd-kpi:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}
.fd-kpi--primary {
    background: linear-gradient(145deg, #eff6ff 0%, #fff 100%);
    border-color: #bfdbfe;
}
.fd-kpi--salary {
    background: linear-gradient(145deg, #f0fdf4 0%, #fff 100%);
    border-color: #bbf7d0;
}
.fd-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.fd-kpi-icon { font-size: 0.85rem; opacity: 0.5; }
.fd-kpi-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.fd-kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.fd-kpi-value--sm { font-size: 1.15rem; }
.fd-kpi-meta {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.fd-trend-up { color: var(--success); font-weight: 600; }
.fd-trend-down { color: var(--danger); font-weight: 600; }

.fd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 1100px) { .fd-layout { grid-template-columns: 1fr; } }

.fd-panel {
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.fd-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.1rem 1.35rem 0;
}
.fd-panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}
.fd-panel-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
}
.fd-panel-hint, .fd-empty {
    margin: 0.5rem 1.35rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.fd-link-more {
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}
.fd-link-more:hover { text-decoration: underline; }

.fd-chart { padding: 0 1.35rem 1.25rem; display: flex; flex-direction: column; gap: 0.65rem; }
.fd-chart-row {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr) 6.5rem 3.5rem;
    gap: 0.75rem;
    align-items: center;
    padding: 0.45rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.fd-chart-row:hover { background: var(--bg); text-decoration: none; }
.fd-chart-label { font-size: 0.82rem; font-weight: 500; color: var(--text); }
.fd-chart-track {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.fd-chart-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    min-width: 2px;
    transition: width 0.35s ease;
}
.fd-chart-amt { font-size: 0.85rem; font-weight: 700; color: var(--primary); text-align: right; }
.fd-chart-cnt { font-size: 0.72rem; color: var(--text-muted); text-align: right; }
@media (max-width: 560px) {
    .fd-chart-row { grid-template-columns: 1fr 1fr; }
    .fd-chart-track { grid-column: 1 / -1; }
}

.fd-table-wrap { margin: 0; }
.fd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.fd-table th,
.fd-table td {
    padding: 0.7rem 1.35rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.fd-table th {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: #f8fafc;
}
.fd-table tbody tr:hover td { background: #f8fafc; }
.fd-cell-date { white-space: nowrap; color: var(--text-muted); font-size: 0.82rem; }
.fd-cell-amt { font-weight: 700; white-space: nowrap; }
.fd-payee-link { font-weight: 600; display: block; }
.fd-remark {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.fd-subject {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}
.fd-subject--supplier { background: #dbeafe; color: #1d4ed8; }
.fd-subject--salary { background: #d1fae5; color: #047857; }
.fd-subject--other { background: #f3e8ff; color: #7c3aed; }
.fd-subject--rent { background: #ffedd5; color: #c2410c; }
.fd-subject--tneb { background: #fef3c7; color: #b45309; }
.fd-subject--default { background: #f1f5f9; color: #475569; }

.fd-subject-list { list-style: none; margin: 0; padding: 0.5rem 1.35rem 1.25rem; }
.fd-subject-item { margin-bottom: 0.65rem; }
.fd-subject-item:last-child { margin-bottom: 0; }
.fd-subject-trigger {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.fd-subject-trigger:hover {
    background: #f8fafc;
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.fd-subject-trigger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.fd-subject-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.fd-subject-name {
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
}
.fd-subject-name:hover { text-decoration: none; opacity: 0.9; }
.fd-subject-amt { font-weight: 700; font-size: 0.9rem; }
.fd-subject-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}
.fd-subject-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
}
.fd-subject-fill--supplier { background: #3b82f6; }
.fd-subject-fill--salary { background: #10b981; }
.fd-subject-fill--other { background: #8b5cf6; }
.fd-subject-fill--rent { background: #f97316; }
.fd-subject-fill--tneb { background: #eab308; }
.fd-subject-fill--default { background: #94a3b8; }
.fd-subject-meta { font-size: 0.75rem; color: var(--text-muted); }

/* Dashboard subject modal */
body.fd-modal-open { overflow: hidden; }
.fd-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.fd-modal[hidden] { display: none !important; }
.fd-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}
.fd-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 32rem;
    max-height: min(85vh, 520px);
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    border: 1px solid var(--border);
    animation: fd-modal-in 0.2s ease;
}
@keyframes fd-modal-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.fd-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.35rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.fd-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.fd-modal-period {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.fd-modal-close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.fd-modal-close:hover { background: #e2e8f0; color: var(--text); }
.fd-modal-body {
    padding: 1rem 1.35rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.fd-modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.85rem 1.35rem 1.15rem;
    border-top: 1px solid var(--border);
}
.fd-modal-loading,
.fd-modal-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1.5rem 0;
}
.fd-modal-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.fd-modal-list-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}
.fd-modal-list-item:last-child { border-bottom: none; }
.fd-modal-rank {
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 8px;
}
.fd-modal-list-main { flex: 1; min-width: 0; }
.fd-modal-list-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.2rem;
}
.fd-modal-list-top a {
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}
.fd-modal-list-top a:hover { text-decoration: underline; }
.fd-modal-list-amt {
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
}
.fd-modal-list-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.fd-modal-remark {
    display: block;
    margin-top: 0.15rem;
    font-style: italic;
}

.fd-mode-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 1.35rem 1.25rem;
}
.fd-mode-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.fd-mode-list li:last-child { border-bottom: none; }
.fd-mode-name { font-weight: 600; }
.fd-mode-detail { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }

.fd-rank-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 1.35rem 1.25rem;
    counter-reset: fd-rank;
}
.fd-rank-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}
.fd-rank-list li:last-child { border-bottom: none; }
.fd-rank-num {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 8px;
}
.fd-rank-body { flex: 1; min-width: 0; }
.fd-rank-body a {
    font-weight: 600;
    font-size: 0.88rem;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fd-rank-meta { display: block; font-size: 0.75rem; color: var(--text-muted); }
.fd-rank-amt { font-weight: 700; font-size: 0.85rem; white-space: nowrap; }

/* Legacy finance dashboard (payments list page) */
.dashboard-filter-form { margin-bottom: 1.5rem; }
.dashboard-filter-title { margin: 0 0 0.75rem; font-size: 1rem; font-weight: 600; }
.dashboard-filter-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}
.dashboard-filter-fields .form-group { margin-bottom: 0; }
.dashboard-filter-fields .form-group label { display: block; margin-bottom: 0.25rem; font-size: 0.9rem; }
.dashboard-filter-fields .form-group input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}
.form-group-actions { display: flex; gap: 0.5rem; }

.finance-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 1200px) {
    .finance-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .finance-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .finance-kpi-grid { grid-template-columns: 1fr; }
}
.finance-kpi-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    border-left: 4px solid var(--primary);
}
.finance-kpi-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.finance-kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.dashboard-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .dashboard-grid-two { grid-template-columns: 1fr; }
}
.dashboard-card-chart { overflow: visible; }
.chart-card-inner { padding: 0 1rem 1rem; min-width: 0; }
.dashboard-card-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0 1rem;
    padding-top: 1rem;
}
.dashboard-table-compact th,
.dashboard-table-compact td { padding: 0.5rem 0.75rem; font-size: 0.9rem; }
.text-right { text-align: right; }

.chart-hint { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 0.75rem; }
.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.chart-bar-item {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) 110px;
    gap: 1rem;
    align-items: center;
}
.chart-bar-item-link {
    text-decoration: none;
    color: inherit;
    padding: 0.35rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
}
.chart-bar-item-link:hover { background: rgba(0,0,0,0.04); }
.chart-bar-item-link:hover .chart-bar-fill { opacity: 0.9; }
.chart-bar-item-link .chart-bar-value { color: var(--primary); }
@media (max-width: 480px) {
    .chart-bar-item,
    .chart-bar-item-link { grid-template-columns: 80px minmax(0, 1fr) 95px; gap: 0.75rem; }
}
.chart-bar-label {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
    flex-shrink: 0;
}
.chart-bar-track {
    height: 28px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    min-width: 0;
}
.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #3b82f6);
    border-radius: 4px;
    min-width: 2px;
    transition: width 0.3s ease;
}
.chart-bar-value {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    color: var(--text);
    white-space: nowrap;
    min-width: 0;
    overflow: visible;
}

/* Audit Tracker — SKS Daily Operations theme (scoped) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.audit-sks-theme {
    background: #e8edf4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}
body.audit-sks-theme main.container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
}
body.audit-sks-theme main.container > .alert {
    margin: 0.75rem auto 0;
    max-width: 1720px;
    width: calc(100% - 2rem);
    box-sizing: border-box;
}

.audit-sks-shell {
    display: flex;
    width: 100%;
    min-height: calc(100dvh - 52px);
    align-items: stretch;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
}

.audit-sks-sidebar {
    flex: 0 0 268px;
    width: 268px;
    background: linear-gradient(180deg, #0f172a 0%, #0b1224 100%);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0.9rem 1.35rem;
    box-shadow: 4px 0 32px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
    scrollbar-gutter: stable;
}
@media (prefers-reduced-motion: no-preference) {
    .audit-sks-sidebar {
        transition:
            flex-basis 0.22s ease,
            width 0.22s ease,
            opacity 0.18s ease,
            padding 0.22s ease,
            margin 0.22s ease;
    }
}
@media (min-width: 901px) {
    .audit-sks-sidebar {
        position: sticky;
        top: 52px;
        align-self: flex-start;
        max-height: calc(100dvh - 52px);
        overflow-y: auto;
    }
    .audit-sks-shell--sidebar-collapsed .audit-sks-sidebar {
        flex: 0 0 0;
        width: 0;
        max-width: 0;
        padding-left: 0;
        padding-right: 0;
        margin: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        border: none;
        box-shadow: none;
    }
}
.audit-sks-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    margin-bottom: 1.1rem;
    padding: 0 0.75rem 1rem;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.audit-sks-brand-link {
    display: block;
    line-height: 0;
    text-decoration: none;
}
.audit-sks-brand-link:hover .audit-sks-brand-logo {
    opacity: 0.92;
}
.audit-sks-brand-link:focus {
    outline: 2px solid rgba(96, 165, 250, 0.65);
    outline-offset: 4px;
    border-radius: 6px;
}
.audit-sks-brand-logo {
    display: block;
    width: auto;
    max-width: 112px;
    max-height: 112px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
}
.audit-sks-brand-sub {
    margin: 0;
    font-size: 0.68rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    max-width: 100%;
    line-height: 1.35;
    overflow-wrap: anywhere;
    hyphens: auto;
}
.audit-sks-nav-section {
    width: 100%;
    margin-bottom: 0.95rem;
    box-sizing: border-box;
}
.audit-sks-nav-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin: 0 0 0.4rem;
    padding: 0 0.75rem;
    line-height: 1.3;
}
.audit-sks-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
    margin: 0;
    padding: 0;
}
.audit-sks-nav-link {
    display: block;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}
.audit-sks-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-decoration: none !important;
}
.audit-sks-nav-link-active {
    background: linear-gradient(135deg, #0052cc 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 82, 204, 0.35);
}
.audit-sks-nav-link-active:hover {
    background: linear-gradient(135deg, #0041a3 0%, #1d4ed8 100%);
    color: #fff;
}
.audit-sks-nav-link-muted {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}
.audit-sks-sidebar a.audit-sks-nav-link:visited {
    color: #cbd5e1;
}
.audit-sks-sidebar a.audit-sks-nav-link-active:visited {
    color: #fff;
}
.audit-sks-sidebar-footer {
    margin-top: auto;
    padding-top: 1.25rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}
.audit-sks-help {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    background: rgba(30, 41, 59, 0.9);
    border-radius: 10px;
    padding: 0.85rem;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.45;
}
.audit-sks-help-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}
.audit-sks-help strong {
    display: block;
    color: #e2e8f0;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
}

.audit-sks-canvas {
    flex: 1;
    min-width: 0;
    padding: 0;
    background: linear-gradient(165deg, #fbfcfe 0%, #f1f5f9 55%, #eef2f7 100%);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.audit-sks-canvas-inner {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding: 1.5rem clamp(0.75rem, 2.5vw, 2rem) 2.5rem;
    box-sizing: border-box;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.audit-sks-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    padding-bottom: 0.25rem;
}
.audit-sks-header-left {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    flex: 1;
    min-width: 0;
}
.audit-sks-header-text {
    flex: 1;
    min-width: 0;
}
.audit-sks-sidebar-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-top: 0.1rem;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.audit-sks-sidebar-toggle:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}
.audit-sks-sidebar-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}
.audit-sks-sidebar-toggle-icon {
    display: block;
}
.audit-sks-header-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    align-self: center;
}
.audit-sks-breadcrumb {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.35rem;
}
.audit-sks-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}
.audit-sks-breadcrumb a:hover {
    text-decoration: underline;
}
.audit-sks-bc-sep {
    margin: 0 0.35rem;
    color: #cbd5e1;
}
.audit-sks-page-title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.audit-sks-page-desc {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: #64748b;
    max-width: 42rem;
}
.audit-sks-date-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.audit-sks-date-input {
    padding: 0.45rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    color: #0f172a;
}
.audit-sks-user-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.65rem 0.35rem 0.35rem;
    background: #fff;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.audit-sks-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.audit-sks-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    padding-right: 0.25rem;
}
.audit-sks-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
}
.audit-sks-user-role {
    font-size: 0.72rem;
    color: #64748b;
}

.audit-sks-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.audit-sks-btn-primary {
    background: #2563eb;
    color: #fff;
}
.audit-sks-btn-primary:hover {
    background: #1d4ed8;
}
.audit-sks-btn-secondary {
    background: #fff;
    color: #334155;
    border: 1px solid #e2e8f0;
    text-decoration: none;
}
.audit-sks-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}
.audit-sks-btn-block {
    width: 100%;
    padding: 0.65rem 1rem;
    margin-top: 0.25rem;
}

.audit-sks-empty-filters {
    padding: 1rem 0 1.25rem;
    max-width: 40rem;
}
.audit-sks-empty-filters-title {
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: #0f172a;
}
.audit-sks-empty-filters .audit-sks-muted {
    margin: 0 0 0.75rem;
    line-height: 1.55;
}
.audit-sks-empty-filters-actions {
    margin: 0 0 0.75rem;
}

.audit-sks-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.1rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}
@media (max-width: 1200px) {
    .audit-sks-kpi-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .audit-sks-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .audit-sks-kpi-row { grid-template-columns: 1fr; }
}

.audit-sks-kpi {
    background: #fff;
    border-radius: 14px;
    padding: 1.1rem 1.15rem 1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    border: 1px solid #e8ecf1;
    border-left-width: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-height: 7.75rem;
    box-sizing: border-box;
}
.audit-sks-kpi-blue { border-left-color: #2563eb; }
.audit-sks-kpi-green { border-left-color: #059669; }
.audit-sks-kpi-orange { border-left-color: #ea580c; }
.audit-sks-kpi-red { border-left-color: #dc2626; }
.audit-sks-kpi-purple { border-left-color: #7c3aed; }
.audit-sks-kpi-icon {
    color: #94a3b8;
    margin-bottom: 0.15rem;
}
.audit-sks-kpi-blue .audit-sks-kpi-icon { color: #2563eb; }
.audit-sks-kpi-green .audit-sks-kpi-icon { color: #059669; }
.audit-sks-kpi-orange .audit-sks-kpi-icon { color: #ea580c; }
.audit-sks-kpi-red .audit-sks-kpi-icon { color: #dc2626; }
.audit-sks-kpi-purple .audit-sks-kpi-icon { color: #7c3aed; }
.audit-sks-kpi-label {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.audit-sks-kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.audit-sks-kpi-sub {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
}

.audit-sks-verify-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
    .audit-sks-verify-row { grid-template-columns: repeat(2, 1fr); }
}
.audit-sks-verify-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.audit-sks-verify-label {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.audit-sks-verify-card strong {
    font-size: 1.25rem;
    color: #0f172a;
    font-weight: 700;
}

.audit-sks-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8ecf1;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    padding: 1.25rem 1.35rem;
}
.audit-sks-card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.audit-sks-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
}
.audit-sks-card-meta {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}
.audit-sks-muted {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}
.audit-sks-muted a {
    color: #2563eb;
}

.audit-sks-kpi-foot {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.15rem;
}
.audit-sks-kpi-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2563eb;
    margin-top: 0.25rem;
    text-decoration: none;
}
.audit-sks-kpi-link:hover {
    text-decoration: underline;
}
.audit-sks-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.audit-sks-icon-btn:hover {
    background: #f8fafc;
    color: #0f172a;
}
.audit-sks-badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    background: #dc2626;
    border-radius: 50%;
    border: 2px solid #fff;
}

.audit-sks-table-card {
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    border-radius: 14px;
}
.audit-sks-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem 1.25rem;
    margin-bottom: 1.15rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #eef2f6;
}
.audit-sks-table-title {
    margin-bottom: 0.15rem;
}
.audit-sks-toolbar-meta {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
}
.audit-sks-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}
.audit-sks-filter-form {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.audit-sks-select {
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.88rem;
    background: #fff;
    min-width: 160px;
}

.audit-grid-scroll {
    overflow-x: auto;
    margin: 0;
    padding: 0.35rem;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid #e8ecf1;
    background: #fdfefe;
    box-sizing: border-box;
}
body.audit-sks-theme .audit-grid {
    border-collapse: collapse;
    font-size: 0.78rem;
    min-width: max(100%, 1280px);
}
body.audit-sks-theme .audit-grid th,
body.audit-sks-theme .audit-grid td {
    border: 1px solid #e2e8f0;
    padding: 0.4rem 0.45rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
body.audit-sks-theme .audit-grid thead th {
    background: #0f172a;
    color: #f8fafc;
    font-weight: 600;
    border-color: #1e293b;
}
body.audit-sks-theme .audit-group-head {
    background: #1e3a5f !important;
    color: #f1f5f9 !important;
    font-size: 0.76rem;
}
body.audit-sks-theme .audit-col-branch {
    position: sticky;
    left: 0;
    z-index: 2;
    text-align: left !important;
    background: #fff;
    box-shadow: 3px 0 12px rgba(15, 23, 42, 0.07);
    min-width: 8.5rem;
    max-width: 13rem;
    white-space: normal;
    color: #0f172a;
}
body.audit-sks-theme .audit-grid thead .audit-col-branch {
    z-index: 3;
    background: #0f172a;
    color: #f8fafc;
}
body.audit-sks-theme .audit-grid tbody th.audit-col-branch {
    font-weight: 600;
}
body.audit-sks-theme .audit-grid tbody tr:nth-child(even) td,
body.audit-sks-theme .audit-grid tbody tr:nth-child(even) th.audit-col-branch {
    background: #fafbfc;
}
body.audit-sks-theme .audit-grid tbody tr:nth-child(even) th.audit-col-branch {
    background: #f1f5f9;
}
.audit-row-ok td,
.audit-row-ok th.audit-col-branch {
    background: rgba(240, 253, 244, 0.55) !important;
}
.audit-row-warn td,
.audit-row-warn th.audit-col-branch {
    background: rgba(255, 247, 237, 0.65) !important;
}
.audit-row-critical td,
.audit-row-critical th.audit-col-branch {
    background: rgba(254, 242, 242, 0.75) !important;
}
.audit-num {
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-feature-settings: "tnum" 1;
}
body.audit-sks-theme .audit-grid thead th.audit-num-head,
body.audit-sks-theme .audit-grid td.audit-num {
    text-align: right;
}
body.audit-sks-theme .audit-grid thead th.audit-photo-head {
    text-align: center;
}
body.audit-sks-theme .audit-grid .audit-photo-cell,
body.audit-sks-theme .audit-grid .audit-col-status,
body.audit-sks-theme .audit-grid .audit-col-action {
    text-align: center;
}
.audit-photo-cell { padding: 0.25rem !important; }
.audit-photo-thumb {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}
.audit-photo-link { display: inline-block; line-height: 0; }
body.audit-sks-theme .audit-diff-empty { color: #94a3b8; }
body.audit-sks-theme .audit-diff-match { color: #059669; font-weight: 700; }
body.audit-sks-theme .audit-diff-mismatch { color: #dc2626; font-weight: 700; }
.audit-cell-warn {
    background: #fff7ed;
    box-shadow: inset 0 0 0 2px #fb923c;
}
.audit-col-action {
    width: 44px;
}
.audit-sks-icon-link {
    display: inline-flex;
    color: #2563eb;
    padding: 0.35rem;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
}
.audit-sks-icon-link:hover {
    background: #eff6ff;
    color: #1d4ed8;
}
.audit-status-pill {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}
.audit-status-compliant { background: #d1fae5; color: #065f46; }
.audit-status-mismatch { background: #ffedd5; color: #9a3412; }
.audit-status-critical { background: #fee2e2; color: #991b1b; }
.audit-status-pending { background: #f1f5f9; color: #475569; }

.audit-sks-table-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}
.audit-sks-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: #64748b;
}
.audit-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.35rem;
    vertical-align: middle;
}
.audit-legend-match { background: #059669; }
.audit-legend-bad { background: #dc2626; }
.audit-legend-warn { background: #fb923c; }
.audit-sks-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}
.audit-sks-page-info {
    font-size: 0.8rem;
    color: #64748b;
}
.audit-sks-page-btns {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.audit-sks-page-btn {
    min-width: 2rem;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    text-align: center;
}
.audit-sks-page-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.audit-sks-page-btn.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.audit-sks-widgets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
    margin-bottom: 2rem;
}
@media (max-width: 1200px) {
    .audit-sks-widgets-grid { grid-template-columns: 1fr; }
}
.audit-sks-widget-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-height: 100%;
}
.audit-sks-card-subtitle {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}
.audit-sks-verify-row--compact {
    margin-bottom: 0;
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 480px) {
    .audit-sks-verify-row--compact { grid-template-columns: repeat(4, 1fr); }
}
.audit-sks-mini-table-wrap {
    overflow-x: auto;
}
.audit-sks-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.audit-sks-mini-table th,
.audit-sks-mini-table td {
    border-bottom: 1px solid #f1f5f9;
    padding: 0.45rem 0.5rem;
    text-align: left;
}
.audit-sks-mini-table th {
    color: #64748b;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.audit-sks-pie-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
}
.audit-sks-pie-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 10px #fff, 0 4px 16px rgba(15, 23, 42, 0.08);
}
.audit-sks-pie-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
    color: #475569;
}
.audit-sks-pie-legend li {
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.audit-sks-pie-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}
.audit-sks-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.audit-sks-quick-btn {
    display: block;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.audit-sks-quick-btn:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.audit-entry-form .form-group { margin-bottom: 1rem; }
.audit-sks-form .form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}
.audit-sks-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 560px) {
    .audit-sks-form-row { grid-template-columns: 1fr; }
}
.audit-sks-input,
.audit-sks-form select,
.audit-sks-form input[type="number"] {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    color: #0f172a;
}
.audit-sks-file-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 1rem;
    background: #f8fafc;
    text-align: center;
}
.audit-sks-file-input {
    width: 100%;
    font-size: 0.85rem;
}
.audit-sks-file-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: #64748b;
}
.audit-procedure-list {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.65;
    color: #475569;
    font-size: 0.9rem;
}
.audit-procedure-list li { margin-bottom: 0.45rem; }

@media (max-width: 900px) {
    .audit-sks-shell {
        flex-direction: column;
        min-height: auto;
    }
    .audit-sks-sidebar {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0;
        padding: 1rem 0.75rem;
    }
    .audit-sks-shell--sidebar-collapsed .audit-sks-sidebar {
        display: none;
    }
    .audit-sks-brand {
        margin-bottom: 0;
        padding: 0 0.75rem 0.75rem;
        border-bottom: none;
        flex: 1 1 100%;
        min-width: 0;
    }
    .audit-sks-nav-section {
        flex: 1 1 100%;
        width: 100%;
        margin-bottom: 0.75rem;
    }
    .audit-sks-nav-label {
        width: 100%;
        margin-top: 0.35rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .audit-sks-nav {
        flex-direction: column;
        flex-wrap: nowrap;
        width: 100%;
    }
    .audit-sks-nav-link {
        flex: 0 0 auto;
        width: 100%;
        text-align: left;
        min-width: 0;
    }
    .audit-sks-sidebar-footer {
        width: 100%;
        margin-top: 0;
        padding: 0.75rem 0.75rem 0;
    }
}

.audit-sks-field-hint {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    line-height: 1.45;
}
.audit-history-page {
    max-width: 1040px;
    margin: 0 auto;
}
.audit-history-back {
    margin-bottom: 1rem;
}
.audit-history-header-card .audit-history-title {
    margin-top: 0;
    margin-bottom: 0.35rem;
}

/* Kennel occupancy (audit kennel page) — light, friendly dashboard theme */
.audit-sks-canvas-inner.kennel-occupancy {
    gap: 1.25rem;
}
.kennel-occupancy .audit-sks-page-title.kennel-occupancy-title {
    letter-spacing: -0.02em;
}
.kennel-occupancy .audit-sks-page-desc.kennel-occupancy-desc {
    max-width: 58rem;
}
.kennel-filter-card .kennel-filter-bar {
    margin: 0;
}
.kennel-filter-bar-main {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    align-items: flex-end;
}
.kennel-filter-group {
    min-width: 10rem;
}
.kennel-occupancy .audit-sks-btn-primary,
.kennel-toolbar-cta.audit-sks-btn-primary {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
    border-radius: 10px;
    padding: 0.55rem 1.15rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.kennel-occupancy .audit-sks-btn-primary:hover,
.kennel-toolbar-cta.audit-sks-btn-primary:hover {
    background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
    filter: none;
}
.kennel-kpi-row {
    margin-bottom: 0;
}
.kennel-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1.25rem;
    padding: 0.85rem 1.1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.kennel-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
    min-width: 12rem;
}
.kennel-search-input {
    flex: 1;
    min-width: 11rem;
    max-width: 22rem;
    border-radius: 10px;
}
.kennel-species-select {
    min-width: 8.5rem;
    border-radius: 10px;
}
.kennel-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    font-size: 0.78rem;
    color: #64748b;
    align-items: center;
}
.kennel-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.kennel-toolbar-hint {
    width: 100%;
    margin: 0;
    font-size: 0.82rem;
}
.kennel-day-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65rem;
    min-height: 1.65rem;
    padding: 0.1rem 0.25rem;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}
.kennel-day-badge--p {
    background: #d1fae5;
    color: #065f46;
}
.kennel-day-badge--a {
    background: #fee2e2;
    color: #991b1b;
}
.kennel-day-badge--b {
    background: #fef3c7;
    color: #92400e;
}
.kennel-day-badge--ip {
    background: #dbeafe;
    color: #1e40af;
}
.kennel-day-badge--na {
    background: #f1f5f9;
    color: #475569;
}
.kennel-day-badge--empty {
    background: #f8fafc;
    color: #cbd5e1;
    font-weight: 600;
}
.kennel-grid-card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}
.kennel-grid-card-meta {
    margin: 0;
    font-size: 0.85rem;
}
.kennel-empty-grid {
    margin: 0;
}
.kennel-grid-scroll {
    overflow-x: auto;
    margin: 0 -0.25rem;
    padding: 0 0.25rem 0.35rem;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
}
.kennel-occ-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}
.kennel-occ-th,
.kennel-occ-td {
    border-bottom: 1px solid #eef2f6;
    padding: 0.45rem 0.35rem;
    vertical-align: middle;
    background: #fff;
}
.kennel-occ-th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 4;
    box-shadow: 0 1px 0 #eef2f6;
}
.kennel-occ-th--sr {
    left: 0;
    z-index: 6;
    min-width: 2.25rem;
    text-align: center;
    box-shadow: 1px 0 0 #eef2f6, 0 1px 0 #eef2f6;
}
.kennel-occ-th--detail {
    left: 2.25rem;
    z-index: 5;
    min-width: 15rem;
    text-align: left;
    box-shadow: 1px 0 0 #eef2f6, 0 1px 0 #eef2f6;
}
.kennel-occ-th--day {
    min-width: 2rem;
    text-align: center;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}
.kennel-occ-th--actions {
    min-width: 11rem;
    text-align: right;
    position: sticky;
    right: 0;
    z-index: 5;
    box-shadow: -1px 0 0 #eef2f6, 0 1px 0 #eef2f6;
}
.kennel-occ-td--sr {
    position: sticky;
    left: 0;
    z-index: 2;
    text-align: center;
    font-weight: 600;
    color: #475569;
    box-shadow: 1px 0 0 #eef2f6;
}
.kennel-occ-td--detail {
    position: sticky;
    left: 2.25rem;
    z-index: 2;
    min-width: 15rem;
    max-width: 22rem;
    box-shadow: 1px 0 0 #eef2f6;
}
.kennel-occ-td--day {
    text-align: center;
    padding: 0.35rem 0.2rem;
}
.kennel-occ-td--actions {
    position: sticky;
    right: 0;
    z-index: 2;
    text-align: right;
    white-space: nowrap;
    box-shadow: -1px 0 0 #eef2f6;
    background: #fafbfc;
}
.kennel-occ-table tbody tr:hover .kennel-occ-td {
    background: #f8fafc;
}
.kennel-occ-table tbody tr:hover .kennel-occ-td--actions {
    background: #f1f5f9;
}
.kennel-occ-table tbody tr:hover .kennel-occ-td--sr,
.kennel-occ-table tbody tr:hover .kennel-occ-td--detail {
    background: #f8fafc;
}
.kennel-occ-row--active .kennel-occ-td {
    background: #ecfdf5 !important;
}
.kennel-occ-row--active .kennel-occ-td--actions {
    background: #d1fae5 !important;
}
.kennel-pet-cell {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.15rem 0;
}
.kennel-pet-avatar {
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}
.kennel-pet-avatar--dog {
    background: linear-gradient(145deg, #22c55e, #15803d);
}
.kennel-pet-avatar--cat {
    background: linear-gradient(145deg, #a855f7, #6d28d9);
}
.kennel-pet-body {
    min-width: 0;
}
.kennel-pet-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.9rem;
    line-height: 1.25;
}
.kennel-pet-meta {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 0.1rem;
}
.kennel-pet-forms {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}
.kennel-pet-badges {
    margin-top: 0.35rem;
}
.kennel-chip {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}
.kennel-chip--ok {
    background: #d1fae5;
    color: #065f46;
}
.kennel-chip--warn {
    background: #ffedd5;
    color: #9a3412;
}
.kennel-admission-card {
    scroll-margin-top: 1rem;
    border-top: 3px solid #22c55e;
    padding-top: 1.35rem;
}
.kennel-admission-head {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.35rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid #e8ecf1;
}
@media (min-width: 800px) {
    .kennel-admission-head {
        grid-template-columns: minmax(0, 1fr) minmax(14rem, 24rem);
        align-items: start;
        gap: 0.75rem 2rem;
    }
}
.kennel-admission-head-text {
    min-width: 0;
}
.kennel-admission-title {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}
.kennel-admission-sub {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}
.kennel-admission-lead {
    margin: 0;
    max-width: none;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #475569;
}
.kennel-admission-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.kennel-form-section {
    margin: 0 0 1.1rem;
    padding: 1.1rem 1.2rem 1.15rem;
    background: #fafbfc;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    box-sizing: border-box;
}
.kennel-form-section--highlight {
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 55%);
    border-color: #bbf7d0;
}
.kennel-form-section-title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.kennel-form-section-desc {
    margin: 0 0 1rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #64748b;
}
.kennel-admission-form .audit-sks-form-row {
    gap: 1rem 1.25rem;
    margin-bottom: 0.35rem;
}
.kennel-admission-form .audit-sks-form-row:last-child {
    margin-bottom: 0;
}
.kennel-form-row--3 {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
    .kennel-form-row--3 {
        grid-template-columns: 1fr;
    }
}
.kennel-label {
    font-weight: 600;
    color: #334155;
    font-size: 0.84rem;
}
.kennel-req {
    color: #16a34a;
    font-weight: 700;
}
.kennel-input {
    min-height: 2.65rem;
    border-radius: 10px;
    border-color: #e2e8f0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.kennel-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    outline: none;
}
.kennel-form-details {
    margin: 0 0 1.1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.kennel-form-details-summary {
    cursor: pointer;
    list-style: none;
    padding: 0.85rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}
.kennel-form-details-summary::-webkit-details-marker {
    display: none;
}
.kennel-form-details-summary::before {
    content: "";
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    margin-right: 0.15rem;
}
.kennel-form-details[open] .kennel-form-details-summary::before {
    transform: rotate(45deg);
    margin-top: 0.15rem;
}
.kennel-form-details-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
}
.kennel-form-details-body {
    padding: 0 1.1rem 1.1rem;
    border-top: 1px solid #f1f5f9;
}
.kennel-form-details-lead {
    margin: 0.85rem 0 0.75rem;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
}
.kennel-file-zone {
    border-radius: 10px;
    border-color: #e2e8f0;
    background: #fff;
}
.kennel-consent-wrap {
    margin-top: 0.25rem;
    padding: 0.75rem 0.85rem;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 10px;
}
.kennel-consent-label {
    margin: 0;
}
.kennel-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 1.15rem;
    border-top: 1px solid #e8ecf1;
}
.kennel-form-submit {
    min-width: 10.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
}
.kennel-json-textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    border-radius: 10px;
    min-height: 7rem;
}
.kennel-json-textarea:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
    outline: none;
}
.audit-kennel-consent {
    align-items: flex-start;
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.45;
}
.audit-kennel-inline-form {
    display: inline;
    margin-left: 0.25rem;
}
.audit-kennel-inline-form button {
    margin-top: 0;
}
.audit-sks-btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
}

.checkbox-label { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
