:root {
    --sidebar-bg: #0F172A;
    --sidebar-width: 268px;
    --sidebar-width-collapsed: 78px;
    --brand-gold: #F59E0B;
    --sidebar-active-border: #F59E0B;
    --sidebar-active-bg: rgba(245, 158, 11, 0.10);
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    --topbar-height: 60px;
    --body-bg: #f1f5f9;
}

body {
    background-color: var(--body-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Sidebar layout */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.28s ease, transform 0.28s ease;
}

.sidebar-brand {
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-brand-inner .brand-icon {
    color: var(--brand-gold);
    font-size: 1.5rem;
}

.sidebar-brand-text .brand-name {
    color: var(--brand-gold);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.sidebar-brand-text .brand-sub {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.btn-sidebar-collapse {
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.65rem;
    padding: 0.35rem 0.5rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.04);
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-sidebar-collapse:hover {
    color: var(--brand-gold);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(245, 158, 11, 0.35);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1035;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

body.sidebar-mobile-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sidebar-nav {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.sidebar-nav-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-nav-group:last-child {
    border-bottom: none;
}

.sidebar-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1rem 0.65rem 1rem;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.48);
    background: transparent;
    border: none;
    text-align: left;
    transition: color 0.15s ease, background 0.15s ease;
}

.sidebar-group-toggle:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-group-leading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    flex-shrink: 0;
    color: rgba(245, 158, 11, 0.85);
    font-size: 1rem;
}

.sidebar-group-label {
    flex: 1;
    min-width: 0;
}

.sidebar-group-chevron {
    flex-shrink: 0;
    font-size: 0.72rem;
    opacity: 0.55;
    transition: transform 0.22s ease;
}

.sidebar-group-toggle:not(.collapsed) .sidebar-group-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu {
    padding: 0 0 0.35rem;
    background: rgba(0, 0, 0, 0.12);
}

.sidebar-nav-link {
    color: rgba(255, 255, 255, 0.62);
    padding: 0.5rem 1rem 0.5rem 2.85rem;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-left: 3px solid transparent;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.sidebar-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav-link.active {
    color: var(--brand-gold);
    background: var(--sidebar-active-bg);
    border-left-color: var(--sidebar-active-border);
    font-weight: 600;
}

.sidebar-nav-link i {
    width: 1.15rem;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.9;
}

.sidebar-nav-link-root {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.sidebar-nav-link-root i {
    width: 1.85rem;
    flex-shrink: 0;
    color: rgba(245, 158, 11, 0.88);
    opacity: 1;
}

/* Desktop collapsed rail */
@media (min-width: 992px) {
    body.sidebar-collapsed {
        --sidebar-width: var(--sidebar-width-collapsed);
    }

    body.sidebar-collapsed .sidebar-brand-text,
    body.sidebar-collapsed .sidebar-group-label,
    body.sidebar-collapsed .sidebar-group-chevron {
        display: none;
    }

    body.sidebar-collapsed .sidebar-brand {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    body.sidebar-collapsed .sidebar-brand-inner {
        justify-content: center;
        width: 100%;
    }

    body.sidebar-collapsed .sidebar-group-toggle {
        justify-content: center;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    body.sidebar-collapsed .sidebar-group-leading {
        width: auto;
        font-size: 1.1rem;
    }

    body.sidebar-collapsed .sidebar-nav-link {
        padding: 0.48rem 0.3rem;
        justify-content: center;
        gap: 0;
        border-left: none;
        border-radius: 0.3rem;
        margin-left: 0.2rem;
        margin-right: 0.2rem;
    }

    body.sidebar-collapsed .sidebar-nav-link.active {
        border-left: none;
    }

    body.sidebar-collapsed .sidebar-link-text {
        display: none;
    }

    body.sidebar-collapsed .sidebar-nav-link i {
        width: auto;
        font-size: 1.08rem;
    }

    body.sidebar-collapsed .sidebar-collapse-icon-expanded {
        display: none !important;
    }

    body.sidebar-collapsed .sidebar-collapse-icon-collapsed {
        display: inline-block !important;
    }

    body.sidebar-collapsed .btn-sidebar-collapse {
        margin-top: 0.5rem;
    }
}

/* Mobile drawer */
@media (max-width: 991.98px) {
    body.sidebar-mobile-open {
        overflow: hidden;
    }

    .sidebar {
        width: min(288px, 88vw);
        max-width: 100%;
        transform: translateX(-100%);
        box-shadow: 4px 0 32px rgba(0, 0, 0, 0.35);
    }

    body.sidebar-mobile-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-collapsed {
        --sidebar-width: 268px;
    }

    body.sidebar-collapsed .sidebar-brand-text,
    body.sidebar-collapsed .sidebar-group-label,
    body.sidebar-collapsed .sidebar-group-chevron {
        display: block;
    }

    body.sidebar-collapsed .sidebar-brand-inner {
        justify-content: flex-start;
    }

    body.sidebar-collapsed .sidebar-group-toggle {
        justify-content: flex-start;
    }

    body.sidebar-collapsed .sidebar-nav-link {
        padding: 0.5rem 1rem 0.5rem 2.85rem;
        justify-content: flex-start;
        gap: 0.65rem;
    }

    body.sidebar-collapsed .sidebar-nav-link.sidebar-nav-link-root {
        padding: 0.65rem 1rem;
    }

    body.sidebar-collapsed .sidebar-link-text {
        display: inline;
    }

    body.sidebar-collapsed .sidebar-nav-link i {
        width: 1.15rem;
        font-size: 0.95rem;
    }

    body.sidebar-collapsed .sidebar-collapse-icon-expanded {
        display: inline-block !important;
    }

    body.sidebar-collapsed .sidebar-collapse-icon-collapsed {
        display: none !important;
    }
}

.topbar-menu-btn {
    border: none;
    line-height: 1;
    margin-left: -0.25rem;
}

.topbar-menu-btn:hover,
.topbar-menu-btn:focus {
    color: var(--brand-gold) !important;
}

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem 0 1rem;
    transition: left 0.28s ease;
}

@media (max-width: 991.98px) {
    .topbar {
        left: 0;
    }
}

.topbar .page-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.topbar .admin-dropdown .dropdown-toggle {
    color: #475569;
    font-size: 0.875rem;
    text-decoration: none;
}

.topbar .admin-dropdown .dropdown-toggle::after {
    margin-left: 0.5rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: calc(var(--topbar-height) + 1.5rem);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 2rem;
    min-height: 100vh;
    transition: margin-left 0.28s ease;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
    }
}

/* Cards */
.card {
    border: none;
    box-shadow: var(--card-shadow);
    border-radius: 0.5rem;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

/* Stat Cards */
.stat-card {
    border: none;
    box-shadow: var(--card-shadow);
    border-radius: 0.5rem;
    transition: transform 0.15s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-card .stat-label {
    font-size: 0.78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tables */
.table {
    font-size: 0.875rem;
}

.table th {
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

/* Installment Summary Panel */
.installment-summary {
    background: linear-gradient(135deg, #0F172A 0%, #1e293b 100%);
    color: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.installment-summary .summary-title {
    color: var(--brand-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.installment-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.installment-summary .summary-row:last-child {
    border-bottom: none;
}

.installment-summary .summary-label {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
}

.installment-summary .summary-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.installment-summary .summary-row-stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
}

.installment-summary .summary-row-stacked .summary-row-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.installment-summary .summary-formula {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
    line-height: 1.35;
}

.installment-summary .summary-row-subtotal .summary-value {
    color: rgba(255, 255, 255, 0.95);
}

.installment-summary .summary-row.highlight {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 2px solid var(--brand-gold);
}

.installment-summary .summary-row.highlight .summary-value {
    color: var(--brand-gold);
    font-size: 1.1rem;
}

/* Compact “interest applies to” callout */
.installment-summary .summary-interest-applied {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0.1rem 0 0.6rem;
    padding: 0.42rem 0.55rem;
    border-radius: 0.375rem;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.32);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.installment-summary .summary-interest-applied[data-basis="balance"] {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.38);
}

.installment-summary .summary-interest-applied-icon {
    color: var(--brand-gold);
    font-size: 0.95rem;
    line-height: 1.2;
    margin-top: 0.08rem;
    flex-shrink: 0;
}

.installment-summary .summary-interest-applied[data-basis="balance"] .summary-interest-applied-icon {
    color: #38bdf8;
}

.installment-summary .summary-interest-applied-line {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}

.installment-summary .summary-interest-applied-muted {
    display: block;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
}

.installment-summary .summary-interest-applied-target {
    display: block;
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

/* Hero row: monthly installment */
.installment-summary .summary-row.summary-row-monthly {
    margin-top: 0.35rem;
    padding: 0.8rem 0.75rem;
    border-radius: 0.5rem;
    border-bottom: none !important;
    border-top: 1px solid rgba(245, 158, 11, 0.35);
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.28) 0%, rgba(15, 23, 42, 0.65) 55%, rgba(245, 158, 11, 0.12) 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    align-items: center;
}

.installment-summary .summary-row-monthly .summary-monthly-label {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.installment-summary .summary-row-monthly .summary-monthly-kicker {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.installment-summary .summary-row-monthly .summary-monthly-title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.installment-summary .summary-row-monthly .summary-monthly-title i {
    color: var(--brand-gold);
    font-size: 1rem;
}

.installment-summary .summary-row-monthly .summary-value {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Installment sale: summary + recovery assignment — one sticky stack (avoids overlap on scroll) */
.inst-sale-sidebar-sticky {
    position: sticky;
    top: 80px;
    z-index: 1020;
    align-self: flex-start;
    max-width: 100%;
}

.inst-sale-sidebar-sticky .recovery-assignment-card {
    position: relative;
    z-index: 1;
    background-color: var(--bs-body-bg, #fff);
}

/* Login Page */
.login-page {
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #0a0f1a;
    color: #e2e8f0;
    overflow-x: hidden;
}

.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(145deg, #0a0f1a 0%, #0f172a 40%, #1a1f35 100%);
}

.login-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 75%);
}

.login-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: loginOrbFloat 18s ease-in-out infinite;
}

.login-bg-orb-1 {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -80px;
    background: rgba(245, 158, 11, 0.35);
}

.login-bg-orb-2 {
    width: 360px;
    height: 360px;
    bottom: -100px;
    left: -60px;
    background: rgba(99, 102, 241, 0.25);
    animation-delay: -6s;
}

.login-bg-orb-3 {
    width: 280px;
    height: 280px;
    top: 45%;
    left: 35%;
    background: rgba(245, 158, 11, 0.15);
    animation-delay: -12s;
}

@keyframes loginOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(24px, -18px) scale(1.05); }
    66% { transform: translate(-16px, 12px) scale(0.97); }
}

.login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-shell {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    width: 100%;
    max-width: 920px;
    min-height: 560px;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 24px 80px -12px rgba(0, 0, 0, 0.55);
    animation: loginFadeUp 0.6s ease-out both;
}

@keyframes loginFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-panel {
    display: flex;
    flex-direction: column;
}

.login-panel-brand {
    position: relative;
    padding: 2.75rem 2.5rem;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #172033 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    justify-content: space-between;
}

.login-panel-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-gold), #fbbf24, var(--brand-gold));
}

.login-brand-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand-mark {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
    margin-bottom: 1.5rem;
}

.login-brand-mark i {
    font-size: 1.65rem;
    color: var(--brand-gold);
}

.login-brand-name {
    font-size: 1.65rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 0.4rem;
}

.login-brand-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 2rem;
    font-weight: 400;
}

.login-brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login-brand-features li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
}

.login-brand-features i {
    color: var(--brand-gold);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.login-brand-footer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
    padding-top: 1.5rem;
}

.login-panel-form {
    padding: 2.75rem 2.75rem 2.25rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    justify-content: center;
}

.login-form-header {
    margin-bottom: 1.75rem;
}

.login-form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
}

.login-form-header p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.45;
}

.login-alert i {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.login-alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.login-alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.login-alert-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.login-alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.login-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.01em;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.login-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.65rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-input::placeholder {
    color: #94a3b8;
}

.login-input:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.login-input:focus {
    outline: none;
    border-color: var(--brand-gold);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.login-input-wrap:focus-within .login-input-icon {
    color: var(--brand-gold);
}

.login-input-wrap:has(.login-toggle-pw) .login-input {
    padding-right: 2.75rem;
}

.login-toggle-pw {
    position: absolute;
    right: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 0.4rem;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.login-toggle-pw:hover {
    color: #475569;
    background: rgba(15, 23, 42, 0.05);
}

.login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    color: #0f172a;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    border: none;
    border-radius: 0.65rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.login-submit:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
    transform: translateY(-1px);
}

.login-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.login-submit i {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.login-submit:hover i {
    transform: translateX(3px);
}

.login-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 1.75rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.login-secure-note i {
    font-size: 0.85rem;
}

@media (max-width: 767.98px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 440px;
        min-height: auto;
    }

    .login-panel-brand {
        padding: 2rem 1.75rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .login-brand-features {
        display: none;
    }

    .login-brand-footer {
        display: none;
    }

    .login-brand-mark {
        width: 3rem;
        height: 3rem;
        margin-bottom: 1rem;
    }

    .login-brand-name {
        font-size: 1.35rem;
    }

    .login-brand-tagline {
        margin-bottom: 0;
    }

    .login-panel-form {
        padding: 2rem 1.75rem 1.75rem;
    }
}

/* Receipt Print */
@media print {
    .sidebar, .topbar, .app-footer, .no-print {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
}

/* Guarantor Card */
.guarantor-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8fafc;
}

.guarantor-card .remove-guarantor {
    color: #ef4444;
    cursor: pointer;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
}

/* Progress bar styling */
.progress {
    height: 0.75rem;
    border-radius: 1rem;
}

/* Badge adjustments */
.badge {
    font-weight: 500;
    padding: 0.4em 0.65em;
}

.badge.badge-stock-low {
    background-color: #1e293b;
    color: #f8fafc;
}

/* Action buttons in tables */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.78rem;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* Select2 — align with Bootstrap 5 form controls */
.select2-container--bootstrap-5 .select2-selection--single {
    min-height: calc(1.5em + 0.75rem + 2px);
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
}

/* DataTables — align with admin UI */
.dataTables_wrapper .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    align-items: center;
    justify-content: flex-end;
}

.dataTables_wrapper .dt-buttons .btn {
    margin: 0;
    padding: 0.28rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.02em;
    white-space: nowrap;
    color: #1e293b !important;
    background-color: #ffffff !important;
    border: 1px solid #94a3b8 !important;
    border-radius: 0.35rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.dataTables_wrapper .dt-buttons .btn:hover {
    color: #0f172a !important;
    background-color: #f1f5f9 !important;
    border-color: #64748b !important;
}

.dataTables_wrapper .dt-buttons .btn:focus-visible {
    outline: 2px solid rgba(245, 158, 11, 0.5);
    outline-offset: 1px;
}

.dataTables_wrapper .dt-buttons .btn:active {
    background-color: #e2e8f0 !important;
}

.dataTables_wrapper .dt-buttons .btn span {
    color: inherit !important;
    opacity: 1 !important;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 0.75rem;
    font-size: 0.875rem;
    color: #64748b;
}

table.dataTable {
    border-collapse: collapse !important;
}

/* App footer */
.app-footer {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.app-footer-text {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.6;
}

.app-footer-text a {
    color: #475569;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.app-footer-text a:hover {
    color: var(--brand-gold);
}

.app-footer-heart {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0 0.15rem;
    color: #ef4444;
    animation: app-footer-heartbeat 1.2s ease-in-out infinite;
}

.app-footer-heart .bi {
    font-size: 0.9rem;
}

@keyframes app-footer-heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.18);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.12);
    }
    56% {
        transform: scale(1);
    }
}

/* Change password — account security layout */
.change-password-layout {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.change-password-card {
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.cp-card-header {
    padding: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 72%, rgba(245, 158, 11, 0.12) 100%);
    border: none !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.12) !important;
}

.cp-header-inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.65rem 1.75rem 1.65rem;
}

.cp-header-icon {
    width: 3.125rem;
    height: 3.125rem;
    background: rgba(245, 158, 11, 0.2);
    color: var(--brand-gold);
    font-size: 1.65rem;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.cp-header-overline {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: rgba(245, 158, 11, 0.9);
}

.cp-header-title {
    color: #fff;
}

.cp-header-lead {
    color: rgba(226, 232, 240, 0.75);
}

.cp-field .input-group-lg > .btn.pw-toggle-btn {
    padding-left: 0.75rem;
    padding-right: 0.85rem;
    border-color: #dee2e6;
}

.cp-field .input-group-text {
    border-color: #dee2e6;
}

.cp-field .input-group:focus-within .btn.pw-toggle-btn {
    border-color: #fdc86d;
}

.cp-field .input-group:focus-within .form-control,
.cp-field .input-group:focus-within .input-group-text {
    border-color: #fca311;
}

.cp-rule.cp-rule-met {
    color: #166534 !important;
}

.cp-rule.cp-rule-met .cp-rule-icon {
    opacity: 1;
}

@media (max-width: 991.98px) {
    .cp-header-inner {
        padding: 1.35rem 1.35rem;
    }
}
