.brand-logo-topbar-lg {
    height: 34px;
    width: auto;
}

/* Global symmetric card shape across the app */
.card {
    border-radius: 14px;
    border-color: #e8edf2;
    box-shadow: none;
}

.card > .card-header:first-child {
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

.card > .card-footer:last-child {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

/* Reusable form layout utilities */
.form-page-card {
    border-radius: 14px;
    border: 1px solid #e8edf2;
    box-shadow: none;
}

.form-actions {
    margin-top: 1rem;
    margin-bottom: 1.25rem;
}

.table-custom > :not(caption) > * > * {
    border: 1px solid var(--bs-border-color-translucent) !important;
}

.table-custom thead th {
    border-bottom-width: 1px !important;
}

.brand-logo-topbar-sm {
    height: 34px;
    width: auto;
}

.brand-logo-sidebar-lg {
    height: 100px !important;
    width: auto;
}

.brand-logo-sidebar-sm {
    max-height: 34px;
    width: auto;
}

.sidenav-toggle-btn {
    width: 34px;
    height: 34px;
    transition: all 0.2s ease;
}

.auth-brand-logo {
    height: 84px;
    width: auto;
}

@media (max-width: 576px) {
    .auth-brand-logo {
        height: 64px;
    }
}

.notyf-toast-success-dark,
.notyf-toast-error-dark {
    border-radius: 10px !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35) !important;
}

.notyf-toast-success-dark .notyf__message,
.notyf-toast-error-dark .notyf__message {
    color: #f8fafc !important;
    font-weight: 600;
    padding-left: 26px;
    position: relative;
}

.notyf-toast-success-dark .notyf__message::before,
.notyf-toast-error-dark .notyf__message::before {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    content: "✓";
}

.notyf-toast-success-dark .notyf__message::before {
    background: #22c55e;
}

.notyf-toast-error-dark .notyf__message::before {
    background: #ef4444;
    content: "!";
}

.plans-rate-badge {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 0.35rem 0.65rem;
}

.plans-rate-muted {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
    font-weight: 600;
    border: 1px solid rgba(100, 116, 139, 0.2);
    padding: 0.35rem 0.65rem;
}

.badge-soft-primary {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, 0.2);
    font-weight: 600;
}

.badge-soft-success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
    font-weight: 600;
}

.badge-soft-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-weight: 600;
}

.badge-soft-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.25);
    font-weight: 600;
}

.badge-soft-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.2);
    font-weight: 600;
}

.invoice-striped-table tbody tr:nth-child(odd) > td {
    background: #ffffff;
}

.invoice-striped-table tbody tr:nth-child(even) > td {
    background: #f1f5f9;
}

.table-custom thead th,
.table-custom thead td {
    background: #e5e7eb !important;
}

.invoice-stat-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .invoice-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .invoice-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .invoice-stat-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.invoice-stat-card {
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.invoice-stat-tile .card-body {
    position: relative;
    padding: 1rem 1rem 1.1rem;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.invoice-stat-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.12) !important;
}

.invoice-stat-tile__accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

.invoice-stat-tile--all .invoice-stat-tile__accent {
    background: linear-gradient(180deg, #64748b, #475569);
}

.invoice-stat-tile--pending .invoice-stat-tile__accent {
    background: linear-gradient(180deg, #f59e0b, #d97706);
}

.invoice-stat-tile--overdue .invoice-stat-tile__accent {
    background: linear-gradient(180deg, #f43f5e, #be123c);
}

.invoice-stat-tile--paid .invoice-stat-tile__accent {
    background: linear-gradient(180deg, #14b8a6, #0d9488);
}

.invoice-stat-tile--outstanding .invoice-stat-tile__accent {
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

.invoice-stat-tile--all {
    background: linear-gradient(145deg, #f8fafc 0%, #ffffff 55%);
}

.invoice-stat-tile--pending {
    background: linear-gradient(145deg, #fffbeb 0%, #ffffff 60%);
}

.invoice-stat-tile--overdue {
    background: linear-gradient(145deg, #fff1f2 0%, #ffffff 60%);
}

.invoice-stat-tile--paid {
    background: linear-gradient(145deg, #f0fdfa 0%, #ffffff 60%);
}

.invoice-stat-tile--outstanding {
    background: linear-gradient(145deg, #eff6ff 0%, #ffffff 60%);
}

.invoice-stat-tile__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.invoice-stat-tile__value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.invoice-stat-tile__value--currency {
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

@media (min-width: 1200px) {
    .invoice-stat-tile__value--currency {
        font-size: 1.25rem;
    }
}

.invoice-stat-tile__icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0.92;
}

.invoice-stat-tile--all .invoice-stat-tile__icon {
    background: rgba(100, 116, 139, 0.15);
    color: #475569;
}

.invoice-stat-tile--pending .invoice-stat-tile__icon {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.invoice-stat-tile--overdue .invoice-stat-tile__icon {
    background: rgba(244, 63, 94, 0.18);
    color: #be123c;
}

.invoice-stat-tile--paid .invoice-stat-tile__icon {
    background: rgba(20, 184, 166, 0.18);
    color: #0f766e;
}

.invoice-stat-tile--outstanding .invoice-stat-tile__icon {
    background: rgba(59, 130, 246, 0.18);
    color: #1d4ed8;
}

.dashboard-stat-card {
    position: relative;
    overflow: hidden;
}

.dashboard-stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

.dashboard-stat-card--revenue::before {
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

.dashboard-stat-card--revenue {
    background: linear-gradient(145deg, #eff6ff 0%, #ffffff 60%);
}

.dashboard-stat-card--invoices::before {
    background: linear-gradient(180deg, #f59e0b, #d97706);
}

.dashboard-stat-card--invoices {
    background: linear-gradient(145deg, #fffbeb 0%, #ffffff 60%);
}

.dashboard-stat-card--clients::before {
    background: linear-gradient(180deg, #8b5cf6, #7c3aed);
}

.dashboard-stat-card--clients {
    background: linear-gradient(145deg, #f5f3ff 0%, #ffffff 60%);
}

.dashboard-stat-card--minutes::before {
    background: linear-gradient(180deg, #10b981, #059669);
}

.dashboard-stat-card--minutes {
    background: linear-gradient(145deg, #ecfdf5 0%, #ffffff 60%);
}

.invoice-modal-shell {
    max-width: 920px;
    margin: 0 auto;
    text-align: left !important;
}

.invoice-modal-shell .row,
.invoice-modal-shell .col,
.invoice-modal-shell .card,
.invoice-modal-shell .card-body,
.invoice-modal-shell .card-header,
.invoice-modal-shell .small,
.invoice-modal-shell .text-muted,
.invoice-modal-shell .fw-semibold,
.invoice-modal-shell .fw-bold {
    text-align: left !important;
}

.invoice-modal-shell table,
.invoice-modal-shell thead,
.invoice-modal-shell tbody,
.invoice-modal-shell tr,
.invoice-modal-shell th,
.invoice-modal-shell td {
    text-align: left !important;
}

.invoice-modal-shell .text-end,
.invoice-modal-shell td.text-end,
.invoice-modal-shell th.text-end,
.invoice-modal-shell td.is-numeric,
.invoice-modal-shell th.is-numeric {
    text-align: right !important;
}

.invoice-head-card {
    border: 0;
    border-radius: 14px;
    background: transparent;
    padding: 12px 10px;
    text-align: left !important;
}

.invoice-head-logo {
    width: 100px;
    height: 100px;
    min-width: 100px;
    min-height: 100px;
    object-fit: contain;
    display: block;
}

.invoice-head-company {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.invoice-head-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 2px;
}

.invoice-head-address {
    margin-top: 10px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #64748b;
}

.invoice-head-number {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.1;
}

.invoice-head-meta {
    font-size: 0.95rem;
    color: #64748b;
    margin-top: 2px;
}

.invoice-head-status {
    font-size: 0.78rem;
    padding: 0.36rem 0.7rem;
}

.invoice-head-card--right {
    text-align: right !important;
}

.invoice-head-card--right .invoice-head-number,
.invoice-head-card--right .invoice-head-meta {
    text-align: right !important;
}

.invoice-party-card {
    border: 1px solid #dbe2ec;
    border-radius: 14px;
    background: #f8fafc;
    padding: 16px 18px;
}

.invoice-party-label {
    text-transform: uppercase;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 700;
}

.invoice-party-name {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.invoice-party-text {
    color: #64748b;
    line-height: 1.45;
    font-size: 0.95rem;
}

@media (max-width: 991.98px) {
    .invoice-head-number {
        font-size: 1.6rem;
    }
}

.invoice-modal-chart {
    min-height: 180px;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 8px;
    padding: 8px;
}

.table-pagination-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-pagination-wrap .pagination {
    width: max-content;
    max-width: none;
    flex-wrap: nowrap;
    margin-left: auto;
}

@media (max-width: 768px) {
    .table-pagination-wrap {
        width: 100%;
    }
    .table-pagination-wrap .pagination {
        margin-left: 0;
    }
}

.pagination-ellipsis .page-link {
    pointer-events: none;
    cursor: default;
    min-width: 2rem;
    text-align: center;
}

/* Sidenav: brand blue (#0a5587) + hover/active in same hue family */
html[data-menu-color="dark"] .sidenav-menu {
    --univox-sidenav-bg: #0a5587;
    --univox-sidenav-hover: rgba(255, 255, 255, 0.12);
    --univox-sidenav-active-bg: rgba(4, 38, 58, 0.55);
    --univox-sidenav-active-accent: #6ec4e8;
    background-color: var(--univox-sidenav-bg) !important;
}

html[data-menu-color="dark"] .sidenav-menu .logo {
    background-color: transparent !important;
}

html[data-menu-color="dark"] .sidenav-menu .side-nav-title {
    color: rgba(255, 255, 255, 0.48) !important;
}

html[data-menu-color="dark"] .sidenav-menu .side-nav-link {
    color: rgba(255, 255, 255, 0.88) !important;
}

html[data-menu-color="dark"] .sidenav-menu .side-nav-link .menu-icon,
html[data-menu-color="dark"] .sidenav-menu .side-nav-link i {
    color: rgba(255, 255, 255, 0.72) !important;
}

html[data-menu-color="dark"] .sidenav-menu .side-nav-link:hover,
html[data-menu-color="dark"] .sidenav-menu .side-nav-link:focus {
    color: #fff !important;
    background-color: var(--univox-sidenav-hover) !important;
}

html[data-menu-color="dark"] .sidenav-menu .side-nav-link:hover .menu-icon,
html[data-menu-color="dark"] .sidenav-menu .side-nav-link:hover i,
html[data-menu-color="dark"] .sidenav-menu .side-nav-link:focus .menu-icon,
html[data-menu-color="dark"] .sidenav-menu .side-nav-link:focus i {
    color: #fff !important;
}

html[data-menu-color="dark"] .sidenav-menu .side-nav-link.active {
    color: #fff !important;
    background-color: var(--univox-sidenav-active-bg) !important;
    box-shadow: inset 3px 0 0 var(--univox-sidenav-active-accent);
}

html[data-menu-color="dark"] .sidenav-menu .side-nav-link.active .menu-icon,
html[data-menu-color="dark"] .sidenav-menu .side-nav-link.active i {
    color: #fff !important;
}

html[data-menu-color="dark"] .sidenav-menu .button-close-offcanvas,
html[data-menu-color="dark"] .sidenav-menu .button-on-hover {
    color: rgba(255, 255, 255, 0.85) !important;
}

html[data-menu-color="dark"] .sidenav-menu .button-close-offcanvas:hover,
html[data-menu-color="dark"] .sidenav-menu .button-on-hover:hover {
    color: #fff !important;
    background-color: var(--univox-sidenav-hover) !important;
}
