body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
    color: #212529;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
}

.field-label {
    font-size: 16px;
    font-weight: 600;
}

.field-input {
    font-size: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
}

.loss-text {
    color: #dc3545;
    font-weight: 600;
}

.empty-state {
    border: 1px dashed rgba(100, 116, 139, 0.4);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    background: #fff;
    color: #64748b;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    border-radius: 1rem;
}

.has-adminlte .app-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.has-adminlte .app-header-title {
    color: inherit;
    text-decoration: none;
}

.has-adminlte .app-header .nav-link {
    display: inline-flex;
    align-items: center;
}

.has-adminlte .app-content-header {
    padding: 1.25rem 0 0.5rem;
}

.has-adminlte .app-content {
    padding-bottom: 2rem;
}

.has-adminlte .sidebar-brand .brand-link {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    text-decoration: none;
    gap: 0.75rem;
}

.has-adminlte .brand-text {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
    font-size: 1.05rem;
}

.has-adminlte .brand-image {
    float: none;
    max-height: 32px;
    width: auto;
}

.has-adminlte .nav-sidebar .nav-link p {
    margin-bottom: 0;
}

.has-adminlte .nav-sidebar .nav-link .nav-icon {
    font-size: 1rem;
}

.has-adminlte .nav-sidebar .menu-open > .nav-link {
    font-weight: 600;
}

.has-adminlte .nav-header {
    letter-spacing: 0.08em;
}

.has-adminlte .sidebar-toggle-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.has-adminlte .user-menu .user-image {
    width: 2rem;
    height: 2rem;
    object-fit: cover;
}

.has-adminlte .user-menu .dropdown-menu .user-header img {
    width: 90px;
    height: 90px;
    object-fit: cover;
}

.has-adminlte .user-avatar-placeholder {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.has-adminlte .small-box .inner h3 {
    font-size: 2.2rem;
}

.has-adminlte .small-box .small-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.soft-note {
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.12);
    color: #355070;
    border-radius: 0.9rem;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.code-sample {
    background: #111827;
    color: #f8fafc;
    border-radius: 0.9rem;
    padding: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    margin-bottom: 1rem;
}

.preview-summary-card {
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.profit-hero {
    display: grid;
    gap: 1rem;
}

.profit-hero-item {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    padding: 1.1rem 1.15rem;
    background: #fff;
}

.profit-hero-label {
    display: block;
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.profit-hero-value {
    display: block;
    font-size: 1.8rem;
    line-height: 1.15;
}

.dashboard-hero-card {
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.dashboard-label,
.table-section-label {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #3b82f6;
    margin-bottom: 0.45rem;
}

.dashboard-hero-title {
    font-size: 1.55rem;
    line-height: 1.2;
    font-weight: 700;
}

.net-profit-command-card {
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 22rem),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.net-profit-command-copy {
    max-width: 48rem;
    margin-bottom: 1rem;
}

.net-profit-context {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.net-profit-context-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 13rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    color: #0f172a;
    font-size: 0.9rem;
}

.net-profit-context-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.net-profit-hero-metrics {
    display: grid;
    gap: 0.85rem;
}

.net-profit-hero-metric {
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 1.1rem;
    box-shadow:
        0 14px 28px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.net-profit-hero-label {
    display: block;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.net-profit-hero-value {
    display: block;
    color: #0f172a;
    font-size: 1.28rem;
    line-height: 1.2;
}

.dashboard-flow-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.dashboard-flow-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.dashboard-flow-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.dashboard-flow-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.2rem;
}

.dashboard-flow-text {
    font-size: 0.82rem;
    line-height: 1.45;
    color: #64748b;
}

.dashboard-toolbar-card {
    border-color: rgba(15, 23, 42, 0.08);
}

.dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.dashboard-toolbar-copy {
    max-width: 45rem;
}

.dashboard-toolbar-title {
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.dashboard-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.dashboard-toolbar-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.dashboard-toolbar-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #334155;
    font-size: 0.88rem;
    font-weight: 600;
}

.settlement-snapshot-grid {
    display: grid;
    gap: 0.85rem;
}

.settlement-snapshot-item {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 0.95rem 1rem;
}

.settlement-snapshot-item-accent {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border-color: rgba(59, 130, 246, 0.18);
}

.settlement-snapshot-label {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.settlement-snapshot-value {
    display: block;
    color: #0f172a;
    font-size: 1.2rem;
    line-height: 1.2;
}

.dashboard-action-list {
    display: grid;
    gap: 0.75rem;
}

.dashboard-action-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: #fff;
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dashboard-action-link:hover {
    border-color: rgba(59, 130, 246, 0.25);
    background: #f8fbff;
    color: #1e40af;
}

.quick-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.9rem;
    padding: 0.9rem 1rem;
    background: #fff;
}

.clean-simple-table th {
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@media (max-width: 1199.98px) {
    .dashboard-flow-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-toolbar-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .dashboard-flow-strip,
    .quick-link-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-title {
        font-size: 1.35rem;
    }

    .net-profit-context {
        flex-direction: column;
    }

    .net-profit-context-chip {
        width: 100%;
        min-width: 0;
    }
}

.clean-simple-table td {
    vertical-align: middle;
}

.inline-edit-form {
    min-width: 250px;
}

.fallback-adminlte {
    margin: 0;
}

.fallback-adminlte .app-wrapper {
    min-height: 100vh;
}

.fallback-adminlte .container-fluid {
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    margin-right: auto;
    margin-left: auto;
    box-sizing: border-box;
}

.fallback-adminlte .app-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.fallback-adminlte .navbar {
    min-height: 57px;
}

.fallback-adminlte .app-header-title,
.fallback-adminlte .navbar-brand {
    color: #111827;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
}

.fallback-adminlte .sidebar-toggle-link {
    color: #0f172a;
    text-decoration: none;
}

.fallback-adminlte .app-sidebar {
    position: fixed;
    top: 57px;
    left: 0;
    width: 280px;
    height: calc(100vh - 57px);
    overflow-y: auto;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    background: #1f2a44;
    color: #e5e7eb;
    box-shadow: 0 0.125rem 0.75rem rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease;
}

.fallback-adminlte .app-main {
    margin-left: 280px;
    min-height: calc(100vh - 57px);
}

.fallback-adminlte .app-content-header {
    padding: 1.25rem 0 0.5rem;
}

.fallback-adminlte .app-content {
    padding-bottom: 2rem;
}

.fallback-adminlte .sidebar-brand {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fallback-adminlte .sidebar-brand .brand-link {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    color: #ffffff;
    text-decoration: none;
}

.fallback-adminlte .brand-text {
    display: block;
    font-size: 1.05rem;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

.fallback-adminlte .sidebar-wrapper {
    padding: 0.75rem 0;
}

.fallback-adminlte .sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fallback-adminlte .sidebar-menu .nav-item {
    list-style: none;
}

.fallback-adminlte .sidebar-menu .nav-link {
    margin: 0.125rem 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    color: #dbe4f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 500;
    background: transparent;
}

.fallback-adminlte .sidebar-menu .nav-link.active,
.fallback-adminlte .sidebar-menu .nav-link:hover {
    background: #0d6efd;
    color: #fff;
    box-shadow: 0 0.375rem 1rem rgba(13, 110, 253, 0.18);
}

.fallback-adminlte .sidebar-menu .nav-link p {
    margin: 0;
}

.fallback-adminlte .nav-icon {
    font-size: 1rem;
    line-height: 1;
}

.fallback-adminlte .card {
    border-radius: 1rem;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 0.125rem 0.75rem rgba(15, 23, 42, 0.06);
}

.fallback-adminlte .card-header {
    background: #fff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding: 1.25rem 1.25rem 1rem;
}

.fallback-adminlte .card-body {
    padding: 1.25rem;
}

.fallback-adminlte .table {
    width: 100%;
    border-collapse: collapse;
}

.fallback-adminlte .table > :not(caption) > * > * {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    vertical-align: middle;
}

.fallback-adminlte .table-light {
    background: #f8fafc;
}

.fallback-adminlte .table-responsive {
    overflow-x: auto;
}

.fallback-adminlte .form-control,
.fallback-adminlte .form-select {
    display: block;
    width: 100%;
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #111827;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 0.75rem;
    box-sizing: border-box;
}

.fallback-adminlte .form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.fallback-adminlte .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.fallback-adminlte .btn-primary {
    background: #2563eb;
    color: #fff;
}

.fallback-adminlte .btn-outline-primary {
    background: #fff;
    border-color: #2563eb;
    color: #2563eb;
}

.fallback-adminlte .btn-outline-secondary {
    background: #fff;
    border-color: #cbd5e1;
    color: #475569;
}

.fallback-adminlte .btn-success {
    background: #198754;
    color: #fff;
}

.fallback-adminlte .btn-sm {
    padding: 0.5rem 0.8rem;
    border-radius: 0.6rem;
}

.fallback-adminlte .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.fallback-adminlte .text-bg-primary { background: #dbeafe; color: #1d4ed8; }
.fallback-adminlte .text-bg-secondary { background: #e2e8f0; color: #475569; }
.fallback-adminlte .text-bg-success { background: #dcfce7; color: #15803d; }
.fallback-adminlte .text-bg-warning { background: #fef3c7; color: #b45309; }
.fallback-adminlte .text-bg-danger { background: #fee2e2; color: #b91c1c; }
.fallback-adminlte .text-bg-info { background: #dbeafe; color: #0f766e; }

.fallback-adminlte .alert {
    padding: 1rem 1.1rem;
    border-radius: 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.fallback-adminlte .alert-success {
    background: #e8f7ef;
    border-color: #b7e4c7;
    color: #166534;
}

.fallback-adminlte .alert-danger {
    background: #fbe9e9;
    border-color: #fecaca;
    color: #b91c1c;
}

.fallback-adminlte .metric-card .metric-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.fallback-adminlte .metric-card .metric-label {
    font-size: 0.95rem;
    color: #64748b;
}

.fallback-adminlte .soft-note {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.12);
}

.fallback-adminlte .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.fallback-adminlte .row > * {
    box-sizing: border-box;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

.fallback-adminlte .col-lg-5,
.fallback-adminlte .col-lg-6,
.fallback-adminlte .col-lg-7 {
    width: 100%;
}

@media (min-width: 992px) {
    .fallback-adminlte .col-lg-5 { width: 41.66666667%; }
    .fallback-adminlte .col-lg-6 { width: 50%; }
    .fallback-adminlte .col-lg-7 { width: 58.33333333%; }
}

@media (max-width: 991.98px) {
    .has-adminlte .brand-text {
        font-size: 1rem;
    }

    .fallback-adminlte .app-sidebar {
        transform: translateX(-100%);
        top: 57px;
        z-index: 1040;
    }

    .fallback-adminlte.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .fallback-adminlte .app-main {
        margin-left: 0;
    }
}

.base-rate-row {
    --bs-table-bg: rgba(13, 110, 253, 0.06);
}

.base-rate-row td {
    background: rgba(13, 110, 253, 0.06) !important;
}

.submitted-entries-table th {
    white-space: nowrap;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.submitted-entries-table td {
    vertical-align: top;
}

.submitted-entries-table .submitted-label {
    display: inline-block;
    min-width: 72px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
}

@media (max-width: 991.98px) {
    .quick-link-grid {
        grid-template-columns: 1fr;
    }

    .summary-line {
        align-items: flex-start;
        flex-direction: column;
    }
}
