:root {
    --pc-bg: #f6f8fc;
    --pc-surface: #ffffff;
    --pc-surface-2: #f1f5ff;
    --pc-border: rgba(15, 23, 42, 0.10);
    --pc-text: rgba(15, 23, 42, 0.92);
    --pc-text-muted: rgba(71, 85, 105, 0.92);
    --pc-accent: #2563eb; /* Primary blue */
    --pc-accent-2: #1d4ed8;
    --pc-radius: 16px;
    --pc-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    --pc-shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
    --pc-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
    --pc-danger: #ef4444;
    --pc-success: #10b981;
    --pc-warning: #f59e0b;
}

html, body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    font-feature-settings: "ss01" 1, "cv11" 1, "rlig" 1;
}

body {
    background: linear-gradient(180deg, #f7f9ff, var(--pc-bg));
    color: var(--pc-text);
    overflow-x: clip;
    line-height: 1.45;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
    border-radius: 12px;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pc-link {
    color: var(--pc-accent);
}

.pc-link:hover {
    color: var(--pc-accent-2);
}

.pc-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    flex: 0 0 auto;
    color: currentColor;
}

.pc-icon.lg {
    width: 20px;
    height: 20px;
}

.pc-muted {
    color: var(--pc-text-muted);
}

.pc-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.pc-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 14px;
    border-right: 1px solid var(--pc-border);
    background: color-mix(in srgb, var(--pc-surface) 96%, transparent);
    backdrop-filter: blur(8px);
}

.pc-sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pc-sidebar-close {
    display: none;
}

.pc-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 14px 10px;
}

.pc-brand-name {
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pc-subtle {
    color: var(--pc-text-muted);
    font-size: 12px;
}

.pc-section-title {
    margin-top: 6px;
    padding: 0 10px;
    color: color-mix(in srgb, var(--pc-text-muted) 80%, transparent);
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pc-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.10);
    border: 1px solid rgba(37, 99, 235, 0.22);
    display: grid;
    place-items: center;
}

.pc-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.pc-nav a,
.pc-nav button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--pc-text-muted);
    border: 1px solid transparent;
    background: transparent;
    text-align: left;
    text-decoration: none;
}

.pc-nav a.active {
    color: var(--pc-text);
    background: color-mix(in srgb, var(--pc-surface-2) 92%, transparent);
    border: 1px solid var(--pc-border);
    text-decoration: none;
}

.pc-nav a:hover {
    color: var(--pc-text);
    background: color-mix(in srgb, var(--pc-surface-2) 70%, transparent);
    text-decoration: none;
}

.pc-nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.10);
    border: 1px solid rgba(37, 99, 235, 0.18);
    display: grid;
    place-items: center;
    color: rgba(29, 78, 216, 0.98);
    flex: 0 0 auto;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.pc-nav-icon svg {
    width: 16px;
    height: 16px;
}

.pc-spacer {
    flex: 1 1 auto;
}

.pc-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--pc-border);
    background: color-mix(in srgb, var(--pc-surface-2) 60%, transparent);
}

.pc-user .avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.22);
    display: grid;
    place-items: center;
    font-weight: 900;
    color: rgba(29, 78, 216, 0.98);
    flex: 0 0 auto;
}

.pc-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pc-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--pc-border);
    background: color-mix(in srgb, var(--pc-bg) 88%, transparent);
    backdrop-filter: blur(12px);
}

.pc-topbar-left,
.pc-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pc-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    max-width: 1400px;
    margin: 0 auto;
}

.pc-search {
    flex: 1 1 auto;
    max-width: 520px;
    display: none;
}

/* Inline search: one field only — icon sits inside the input (no nested boxes). */
.pc-search.pc-search-inline {
    display: flex;
    align-items: center;
    width: min(62vw, 640px);
    max-width: 640px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    position: relative;
}

.pc-table-search {
    width: min(44vw, 520px);
    max-width: 520px;
}

.pc-search.pc-search-inline svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
    color: color-mix(in srgb, var(--pc-text-muted) 88%, transparent);
}

.pc-search.pc-search-inline input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid color-mix(in srgb, var(--pc-border) 92%, transparent);
    background: color-mix(in srgb, var(--pc-surface) 96%, transparent);
    border-radius: 6px;
    padding: 11px 14px 11px 40px;
    outline: none;
}

.pc-search.pc-search-inline input:focus {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Non-inline search (rare): full-width field */
.pc-search input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--pc-border);
    background: color-mix(in srgb, var(--pc-surface) 92%, transparent);
    border-radius: 6px;
    padding: 11px 14px;
    outline: none;
}

.pc-search input:focus {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.pc-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--pc-border);
    background: color-mix(in srgb, var(--pc-surface) 92%, transparent);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--pc-shadow-sm);
}

.pc-icon-btn:hover {
    border-color: rgba(37, 99, 235, 0.35);
}

.pc-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 999px;
}

.pc-topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.22);
    display: grid;
    place-items: center;
    font-weight: 900;
    color: rgba(29, 78, 216, 0.98);
    flex: 0 0 auto;
}

.pc-topbar-user-meta {
    display: grid;
    line-height: 1.15;
}

.pc-topbar-user-name {
    font-weight: 800;
    letter-spacing: -0.01em;
    font-size: 13px;
    white-space: nowrap;
}

.pc-topbar-user-role {
    color: var(--pc-text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.pc-topbar-signout {
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: none;
}

.pc-stack {
    display: grid;
    gap: 10px;
}

.pc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pc-row.between {
    justify-content: space-between;
}

.pc-wrap {
    flex-wrap: wrap;
}

.pc-align-end {
    align-items: flex-end;
}

.pc-justify-end {
    justify-content: flex-end;
}

.pc-text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pc-main {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 18px;
}

.pc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    z-index: 25;
}

.pc-page-title h1,
.pc-page-title h2 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.pc-page-title h1 {
    font-size: clamp(24px, 2.2vw, 34px);
    line-height: 1.1;
}

.pc-page-title p {
    margin: 6px 0 0 0;
    color: var(--pc-text-muted);
    max-width: 72ch;
}

.pc-grid {
    display: grid;
    gap: 14px;
}

.pc-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pc-card {
    background: color-mix(in srgb, var(--pc-surface) 96%, transparent);
    border: 1px solid color-mix(in srgb, var(--pc-border) 92%, transparent);
    border-radius: var(--pc-radius);
    padding: 16px;
    box-shadow: var(--pc-shadow-sm);
}

.pc-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.pc-page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pc-section {
    margin-top: 14px;
}

.pc-section:first-child {
    margin-top: 0;
}

.pc-alert {
    border-radius: var(--pc-radius);
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--pc-border) 92%, transparent);
    background: color-mix(in srgb, var(--pc-surface-2) 55%, transparent);
    box-shadow: none;
}

.pc-alert.danger {
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.06);
}

.pc-alert-title {
    font-weight: 900;
    letter-spacing: -0.01em;
}

.pc-divider {
    height: 1px;
    background: color-mix(in srgb, var(--pc-border) 92%, transparent);
}

.pc-divider.sm {
    margin: 2px 0 4px 0;
}

.pc-section-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--pc-text-muted) 88%, transparent);
}

.pc-empty {
    padding: 26px;
    border-radius: calc(var(--pc-radius) - 4px);
    border: 1px dashed color-mix(in srgb, var(--pc-border) 86%, transparent);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--pc-surface) 98%, transparent),
        color-mix(in srgb, var(--pc-surface-2) 30%, transparent)
    );
}

.pc-empty-inner {
    display: grid;
    gap: 10px;
    justify-items: center;
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}

.pc-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--pc-border) 92%, transparent);
    background: color-mix(in srgb, var(--pc-surface) 92%, transparent);
    box-shadow: var(--pc-shadow-xs);
    color: color-mix(in srgb, var(--pc-accent) 82%, #111827);
}

.pc-empty-icon svg {
    width: 22px;
    height: 22px;
}

.pc-empty-title {
    font-weight: 900;
    letter-spacing: -0.02em;
    font-size: 16px;
    margin-top: 4px;
}

.pc-empty-desc {
    color: var(--pc-text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.pc-empty-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

.pc-empty-hint {
    margin-top: 10px;
    color: var(--pc-text-muted);
    font-size: 12px;
}

.pc-empty-hint kbd {
    font-family: inherit;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--pc-border) 92%, transparent);
    background: color-mix(in srgb, var(--pc-surface) 92%, transparent);
    box-shadow: var(--pc-shadow-xs);
}

.pc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.pc-card-header.tight {
    margin-bottom: 10px;
}

.pc-card-title {
    font-weight: 800;
    letter-spacing: -0.01em;
}

.pc-card-subtitle {
    margin-top: 4px;
    color: var(--pc-text-muted);
    font-size: 13px;
}

.pc-kpi {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.pc-kpi .kpi-left {
    min-width: 0;
}

.pc-kpi .kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--pc-border) 92%, transparent);
    background: color-mix(in srgb, var(--pc-surface-2) 55%, transparent);
    color: color-mix(in srgb, var(--pc-accent) 85%, #111827);
}

.pc-kpi .kpi-icon svg {
    width: 18px;
    height: 18px;
}

.pc-kpi .meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pc-kpi-title {
    font-weight: 800;
    letter-spacing: -0.01em;
}

.pc-kpi-sub {
    color: var(--pc-text-muted);
    font-size: 13px;
}

.pc-kpi .value {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.pc-kpi .label {
    color: var(--pc-text-muted);
    font-size: 13px;
}

.pc-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    border: 1px solid rgba(37, 99, 235, 0.22);
    color: rgba(29, 78, 216, 0.98);
    font-size: 12px;
    font-weight: 600;
}

.pc-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--pc-border);
    background: color-mix(in srgb, var(--pc-surface-2) 55%, transparent);
    color: var(--pc-text);
}

.pc-badge.success {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.10);
    color: rgba(6, 95, 70, 0.95);
}

.pc-badge.info {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.10);
    color: rgba(30, 64, 175, 0.95);
}

.pc-badge.warning {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.12);
    color: rgba(146, 64, 14, 0.98);
}

.pc-badge.neutral {
    border-color: color-mix(in srgb, var(--pc-border) 92%, transparent);
    background: color-mix(in srgb, var(--pc-surface-2) 50%, transparent);
    color: var(--pc-text);
}

.pc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--pc-border) 92%, transparent);
    background: color-mix(in srgb, var(--pc-surface) 92%, transparent);
    color: var(--pc-text);
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--pc-shadow-xs);
}

.pc-btn {
    padding: 9px 12px;
}

.pc-btn.sm {
    padding: 8px 10px;
    border-radius: 10px;
}

.pc-btn.ghost {
    background: transparent;
    box-shadow: none;
}

.pc-btn:active {
    transform: translateY(0.5px);
}

.pc-btn.danger {
    border-color: rgba(239, 68, 68, 0.28);
    color: rgba(185, 28, 28, 0.95);
    background: rgba(239, 68, 68, 0.06);
}

.pc-btn.danger:hover {
    border-color: rgba(239, 68, 68, 0.40);
}

.pc-btn:hover {
    border-color: rgba(37, 99, 235, 0.35);
    text-decoration: none;
}

.pc-btn.primary {
    border-color: rgba(37, 99, 235, 0.35);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.92), rgba(29, 78, 216, 0.92));
    color: #fff;
}

.pc-btn.primary:hover {
    filter: brightness(1.02);
}

.pc-form {
    display: grid;
    gap: 12px;
}

.pc-form.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pc-form .full {
    grid-column: 1 / -1;
}

.pc-help {
    color: var(--pc-text-muted);
    font-size: 12px;
    margin-top: 6px;
}

.pc-field :is(.validation-message, .text-danger) {
    display: block;
    margin-top: 6px;
    font-size: 12px;
}

.pc-field label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: color-mix(in srgb, var(--pc-text-muted) 85%, transparent);
    margin-bottom: 6px;
}

.pc-input {
    width: 100%;
    border: 1px solid var(--pc-border);
    background: color-mix(in srgb, var(--pc-surface) 96%, transparent);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
}

.pc-input::placeholder {
    color: color-mix(in srgb, var(--pc-text-muted) 70%, transparent);
}

.pc-input:focus {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.pc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.pc-table th,
.pc-table td {
    padding: 12px 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--pc-border) 90%, transparent);
    vertical-align: middle;
}

.pc-table th {
    text-align: left;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--pc-text-muted) 85%, transparent);
}

.pc-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: color-mix(in srgb, var(--pc-surface) 98%, transparent);
}

.pc-table tbody tr:nth-child(even) td {
    background: color-mix(in srgb, var(--pc-surface-2) 22%, transparent);
}

.pc-table td {
    color: color-mix(in srgb, var(--pc-text) 96%, transparent);
}

.pc-table td:last-child,
.pc-table th:last-child {
    text-align: right;
}

.pc-table .pc-row-title {
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pc-table .pc-row-subtitle {
    color: var(--pc-text-muted);
    font-size: 12px;
}

.pc-table tr:hover td {
    background: color-mix(in srgb, var(--pc-surface-2) 45%, transparent);
}

.pc-table-wrap {
    width: 100%;
    overflow: auto;
    border-radius: calc(var(--pc-radius) - 4px);
}

.pc-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--pc-border) 90%, transparent);
}

.pc-pagination-meta {
    color: var(--pc-text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.pc-pagination-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pc-pagination-pages {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pc-pagination-ellipsis {
    padding: 0 6px;
    color: color-mix(in srgb, var(--pc-text-muted) 88%, transparent);
    user-select: none;
}

.pc-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
}

.pc-dashboard-grid > aside.pc-card {
    position: sticky;
    top: 92px;
}

.pc-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pc-stat {
    box-shadow: none;
}

.pc-stat-label {
    color: var(--pc-text-muted);
    font-size: 12px;
    font-weight: 700;
}

.pc-stat-value {
    font-weight: 900;
    margin-top: 6px;
}

.pc-stat-sub {
    color: var(--pc-text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.pc-stat-mono {
    margin-top: 6px;
    font-weight: 800;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
}

@media (max-width: 992px) {
    .pc-shell {
        grid-template-columns: 1fr;
    }

    .pc-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 320px);
        transform: translateX(-105%);
        transition: transform 160ms ease;
        box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
        z-index: 30;
    }

    body.pc-nav-open .pc-sidebar {
        transform: translateX(0);
    }

    body.pc-nav-open .pc-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .pc-sidebar-close {
        display: grid;
    }

    .pc-topbar {
        z-index: 20;
    }

    .pc-search {
        display: none;
    }

    .pc-search.pc-search-inline {
        width: 100%;
        max-width: 520px;
    }

    .pc-topbar-user-meta {
        display: none;
    }

    .pc-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pc-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .pc-dashboard-grid > aside.pc-card {
        position: static;
        top: auto;
    }
    .pc-details-grid {
        grid-template-columns: 1fr;
    }

    .pc-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .pc-pagination-meta {
        text-align: center;
    }

    .pc-pagination-right {
        justify-content: center;
    }
}

@media (min-width: 993px) {
    .pc-search {
        display: block;
    }
}

.pc-live-driver-grid {
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    align-items: start;
}

.pc-live-map {
    min-height: 560px;
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--pc-border);
    overflow: hidden;
    background: linear-gradient(180deg, #eff6ff, #dbeafe);
}

.pc-live-map-search {
    margin-bottom: 16px;
    max-width: 420px;
}

.pc-live-map-search.pc-search-inline {
    width: 100%;
    max-width: 420px;
    padding: 0;
}

.pc-live-map-search.pc-search-inline input {
    padding: 10px 12px 10px 38px;
    border-radius: 6px;
}

.pc-live-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--pc-border);
    background: color-mix(in srgb, var(--pc-surface-2) 80%, transparent);
    color: var(--pc-text-muted);
}

.pc-live-status.ok {
    color: var(--pc-success);
}

.pc-live-status.error {
    color: var(--pc-danger);
}

.pc-alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
}

.pc-alert-danger {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.pc-alert-warning {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.pc-live-driver-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pc-live-driver-item {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--pc-border);
    background: color-mix(in srgb, var(--pc-surface-2) 54%, transparent);
}

.pc-live-driver-main,
.pc-live-driver-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pc-live-driver-side {
    align-items: end;
    text-align: right;
}

.pc-live-driver-name {
    font-weight: 700;
}

.pc-live-driver-meta,
.pc-live-driver-time {
    color: var(--pc-text-muted);
    font-size: 13px;
}

.pc-live-driver-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.pc-live-driver-badge.online {
    color: #065f46;
    background: #d1fae5;
}

.pc-live-driver-badge.offline {
    color: #92400e;
    background: #fef3c7;
}

.pc-empty.pc-empty-compact {
    min-height: 240px;
}

@media (max-width: 1100px) {
    .pc-live-driver-grid {
        grid-template-columns: 1fr;
    }

    .pc-live-map {
        min-height: 420px;
    }
}

/* ---------------------------------------------------------------------------
   Global: autosave toast (Tarrifs admin) — not scoped so fixed + animations work
   --------------------------------------------------------------------------- */
.pc-admin-autosave-toast {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    z-index: 99999;
    max-width: min(380px, calc(100vw - 40px));
    border-radius: 16px;
    overflow: hidden;
    isolation: isolate;
    pointer-events: none;
    transform-origin: top right;
    animation: pc-admin-autosave-toast-enter 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.65) inset,
        0 8px 32px rgba(15, 23, 42, 0.12),
        0 24px 48px -12px rgba(15, 23, 42, 0.18);
}

.pc-admin-autosave-toast__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        125deg,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0) 42%,
        rgba(255, 255, 255, 0.12) 100%
    );
    pointer-events: none;
}

.pc-admin-autosave-toast__inner {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px 14px 14px;
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.pc-admin-autosave-toast--saving .pc-admin-autosave-toast__inner {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--pc-accent) 12%, rgba(255, 255, 255, 0.92)) 0%,
        rgba(255, 255, 255, 0.88) 100%
    );
    border: 1px solid color-mix(in srgb, var(--pc-accent) 28%, var(--pc-border));
}

.pc-admin-autosave-toast--success .pc-admin-autosave-toast__inner {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--pc-success) 10%, rgba(255, 255, 255, 0.94)) 0%,
        rgba(255, 255, 255, 0.9) 100%
    );
    border: 1px solid color-mix(in srgb, var(--pc-success) 35%, var(--pc-border));
}

.pc-admin-autosave-toast--error .pc-admin-autosave-toast__inner {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--pc-danger) 10%, rgba(255, 255, 255, 0.94)) 0%,
        rgba(255, 255, 255, 0.9) 100%
    );
    border: 1px solid color-mix(in srgb, var(--pc-danger) 35%, var(--pc-border));
}

.pc-admin-autosave-toast--saving .pc-admin-autosave-toast__shine {
    animation: pc-admin-autosave-shimmer 1.8s ease-in-out infinite;
}

@keyframes pc-admin-autosave-shimmer {
    0%,
    100% {
        opacity: 0.55;
    }

    50% {
        opacity: 1;
    }
}

.pc-admin-autosave-toast__icon-wrap {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-top: 1px;
}

.pc-admin-autosave-toast--saving .pc-admin-autosave-toast__icon-wrap {
    background: color-mix(in srgb, var(--pc-accent) 16%, transparent);
    color: var(--pc-accent);
}

.pc-admin-autosave-toast--success .pc-admin-autosave-toast__icon-wrap {
    background: color-mix(in srgb, var(--pc-success) 18%, transparent);
    color: #047857;
}

.pc-admin-autosave-toast--error .pc-admin-autosave-toast__icon-wrap {
    background: color-mix(in srgb, var(--pc-danger) 16%, transparent);
    color: #b91c1c;
}

.pc-admin-autosave-toast__icon-svg {
    width: 22px;
    height: 22px;
}

.pc-admin-autosave-toast__spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2.5px solid color-mix(in srgb, var(--pc-accent) 28%, transparent);
    border-top-color: var(--pc-accent);
    animation: pc-admin-autosave-spin 0.7s linear infinite;
}

@keyframes pc-admin-autosave-spin {
    to {
        transform: rotate(360deg);
    }
}

.pc-admin-autosave-toast__copy {
    min-width: 0;
    flex: 1;
}

.pc-admin-autosave-toast__title {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--pc-text);
}

.pc-admin-autosave-toast__detail {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--pc-text-muted);
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

@keyframes pc-admin-autosave-toast-enter {
    from {
        opacity: 0;
        transform: translate3d(16px, -12px, 0) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

/* Modern time range (Tarrifs admin) */
.pc-time-range-edit {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px 10px;
    min-width: 0;
}

.pc-time-range-edit__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    min-width: 0;
}

.pc-time-range-edit__label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pc-text-muted);
    line-height: 1;
}

.pc-time-range-edit__shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px 0 10px;
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid var(--pc-border);
    background: linear-gradient(180deg, var(--pc-surface) 0%, color-mix(in srgb, var(--pc-surface-2) 40%, var(--pc-surface)) 100%);
    box-shadow: var(--pc-shadow-xs);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.pc-time-range-edit__shell:hover {
    border-color: color-mix(in srgb, var(--pc-accent) 35%, var(--pc-border));
}

.pc-time-range-edit__shell:focus-within {
    border-color: var(--pc-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc-accent) 22%, transparent);
    outline: none;
}

.pc-time-range-edit__clock {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: color-mix(in srgb, var(--pc-accent) 75%, var(--pc-text-muted));
    opacity: 0.9;
}

.pc-time-range-edit__input {
    flex: 1;
    min-width: 5.5rem;
    border: none !important;
    background: transparent !important;
    color: var(--pc-text);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    padding: 0;
    margin: 0;
    line-height: 1.3;
    box-shadow: none !important;
    outline: none !important;
    color-scheme: light;
}

.pc-time-range-edit__input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.65;
    padding: 4px;
    border-radius: 6px;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.pc-time-range-edit__input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--pc-accent) 12%, transparent);
}

.pc-time-range-edit__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 6px;
    color: var(--pc-text-muted);
    opacity: 0.75;
}

.pc-time-range-edit__arrow svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 640px) {
    .pc-time-range-edit {
        flex-direction: column;
        align-items: stretch;
    }

    .pc-time-range-edit__arrow {
        transform: rotate(90deg);
        margin: 0 auto;
    }
}

/* Tarrifs reset modal — global (not scoped) so fixed + centering always work */
.pc-admin-tarrif-reset-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)) !important;
    box-sizing: border-box !important;
    z-index: 200000 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: auto !important;
    background: rgba(15, 23, 42, 0.5) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    animation: pc-admin-tarrif-reset-backdrop-in 0.2s ease-out;
}

@keyframes pc-admin-tarrif-reset-backdrop-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.pc-admin-tarrif-reset-panel {
    position: relative !important;
    flex: 0 0 auto !important;
    width: min(440px, 100%) !important;
    max-width: 100% !important;
    margin: auto !important;
    padding: 22px 22px 18px !important;
    border-radius: 16px !important;
    background: var(--pc-surface) !important;
    border: 1px solid var(--pc-border) !important;
    box-shadow: var(--pc-shadow) !important;
    pointer-events: auto !important;
    animation: pc-admin-tarrif-reset-panel-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pc-admin-tarrif-reset-panel-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pc-admin-tarrif-reset-heading {
    margin: 0 0 10px !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: var(--pc-text) !important;
}

.pc-admin-tarrif-reset-text {
    margin: 0 0 20px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: var(--pc-text-muted) !important;
}

.pc-admin-tarrif-reset-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}