html, body {
    height: 100%;
}

/* Tabler preview typography (Inter) + subtle smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tabler dashboard demo: placeholder blocks until charts are wired (e.g. ApexCharts) */
.chart-placeholder.chart-sm {
    min-height: 3.5rem;
}
.chart-placeholder.chart-lg {
    min-height: 10rem;
}

/* Country flag SVGs in dashboard tables (32×24, 4:3) */
.dashboard-country-flag {
    display: inline-block;
    width: 2rem;
    height: 1.5rem;
    object-fit: cover;
    flex-shrink: 0;
    vertical-align: middle;
    border-radius: var(--tblr-border-radius, 4px);
    box-shadow: 0 0 0 1px var(--tblr-border-color-translucent, rgba(0, 0, 0, 0.08));
}

.dashboard-country-cell {
    width: 2.75rem;
    padding-right: 0.5rem !important;
    vertical-align: middle;
}

.dashboard-country-flag-fallback {
    --tblr-avatar-size: 2rem;
    width: 2rem;
    height: 1.5rem;
    font-size: 0.95rem;
}

/* Keep Yii default helpers working nicely with Tabler / Bootstrap */
.breadcrumb {
    background: transparent;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

.form-group {
    margin-bottom: 1rem;
}

/* Dashboard incoming tickets feed */
.dashboard-tickets-card {
    display: flex;
    flex-direction: column;
}

.dashboard-tickets-card > .card-header {
    flex-shrink: 0;
}

.dashboard-tickets-summary {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--tblr-border-color, rgba(0, 0, 0, 0.08));
    background: var(--tblr-bg-surface-secondary, rgba(0, 0, 0, 0.02));
}

.dashboard-tickets-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.875rem;
}

.dashboard-tickets-stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.2;
}

.dashboard-tickets-list {
    flex: 1 1 auto;
}

.dashboard-ticket-item {
    padding: 0.875rem 1.25rem;
    border-left: 3px solid transparent;
    text-decoration: none;
    color: inherit;
}

.dashboard-ticket-item:hover,
.dashboard-ticket-item:focus {
    color: inherit;
    background-color: var(--tblr-bg-surface-secondary, rgba(0, 0, 0, 0.02));
}

.dashboard-ticket-item--overdue {
    border-left-color: var(--tblr-red, #d63939);
    background-color: rgba(214, 57, 57, 0.04);
}

.dashboard-ticket-item--overdue:hover,
.dashboard-ticket-item--overdue:focus {
    background-color: rgba(214, 57, 57, 0.08);
}

.dashboard-ticket-item .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.dashboard-tickets-card .card-footer {
    margin-top: auto;
}

/* Tickets supervisor queue */
.tickets-queue-table tr.ticket-row-overdue {
    background-color: rgba(214, 57, 57, 0.06);
}
.tickets-queue-table tr.ticket-row-overdue:hover {
    background-color: rgba(214, 57, 57, 0.1);
}

/* Settlements queue */
.settlements-table tr.settlement-row-overdue {
    background-color: rgba(214, 57, 57, 0.06);
}
.settlements-table tr.settlement-row-overdue:hover {
    background-color: rgba(214, 57, 57, 0.1);
}
.settlements-panel {
    display: flex;
    flex-direction: column;
}
.settlements-panel > .card-header {
    flex-shrink: 0;
}
.settlements-panel .settlements-toolbar {
    flex-shrink: 0;
}
.settlements-panel .settlements-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.settlements-panel .settlements-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}
.merchants-roster-table tr:hover {
    background-color: rgba(32, 107, 196, 0.04);
}

.settlements-table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: var(--tblr-card-bg, #fff);
    border-bottom-width: 2px;
    box-shadow: 0 1px 0 var(--tblr-border-color, #e6e7e9);
}

/* —— BI report pages —— */
.report-period-nav-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem;
    background: var(--tblr-bg-surface-secondary, #f8fafc);
    border-radius: var(--tblr-border-radius-lg, 8px);
    border: 1px solid var(--tblr-border-color-translucent, rgba(0, 0, 0, 0.08));
}

.report-period-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: var(--tblr-border-radius, 6px);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--tblr-secondary, #656d77);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.report-period-pill:hover {
    color: var(--tblr-primary, #206bc4);
    background: rgba(32, 107, 196, 0.08);
}

.report-period-pill.is-active {
    color: #fff;
    background: var(--tblr-primary, #206bc4);
    box-shadow: 0 2px 8px rgba(32, 107, 196, 0.35);
}

.report-hero {
    background: linear-gradient(135deg, rgba(32, 107, 196, 0.08) 0%, rgba(47, 179, 68, 0.06) 50%, rgba(255, 255, 255, 0) 100%);
    border: 1px solid var(--tblr-border-color-translucent, rgba(0, 0, 0, 0.06)) !important;
}

.report-hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tblr-primary, #206bc4);
}

.report-hero-title {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.35;
    max-width: 36rem;
}

.report-kpi-card {
    border: 1px solid var(--tblr-border-color-translucent, rgba(0, 0, 0, 0.06));
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.report-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.report-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--tblr-border-radius, 6px);
    font-size: 1rem;
}

.report-chart-wrap {
    min-height: 300px;
    max-height: 380px;
    position: relative;
}

.report-mix-chart-wrap {
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
}

.report-insights-card {
    background: linear-gradient(180deg, rgba(32, 107, 196, 0.03) 0%, transparent 40%);
}

.report-insight-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.report-insight-list li {
    position: relative;
    padding: 0.65rem 0 0.65rem 1.25rem;
    border-bottom: 1px solid var(--tblr-border-color-translucent, rgba(0, 0, 0, 0.06));
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--tblr-body-color, #1e293b);
}

.report-insight-list li:last-child {
    border-bottom: none;
}

.report-insight-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.95rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tblr-primary, #206bc4);
}

.report-legend-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.report-legend-dot.bg-blue { background: #206bc4; }
.report-legend-dot.bg-purple { background: #6554c0; }
.report-legend-dot.bg-green { background: #2fb344; }

.report-commission-banner {
    background: linear-gradient(90deg, rgba(32, 107, 196, 0.06), rgba(47, 179, 68, 0.04));
}

.report-breakdown-table tbody tr:hover {
    background-color: rgba(32, 107, 196, 0.03);
}

.report-bar-track {
    display: block;
    height: 4px;
    background: var(--tblr-border-color-translucent, rgba(0, 0, 0, 0.08));
    border-radius: 2px;
    overflow: hidden;
}

.report-bar-fill {
    display: block;
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.tracking-wide {
    letter-spacing: 0.05em;
}