/* Phoenix Secure Ticketing V2
   Clean production stylesheet - formatted for direct editing in vi/notepad.
*/

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    background: #eef3f9;
    color: #122033;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.35;
}

a {
    color: #0f5aa6;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

.v2-app-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at top left, rgba(48, 112, 176, 0.12), transparent 32%),
        linear-gradient(180deg, #f8fbff 0%, #edf3f9 100%);
}

.v2-shell {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */

.v2-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dce6f2;
    border-radius: 22px;
    padding: 18px 22px;
    margin-bottom: 18px;
    box-shadow: 0 16px 38px rgba(15, 35, 60, 0.07);
}

.v2-brand-block {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
}

.v2-logo-mark {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #e9f2ff;
    color: #145da0;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.v2-brand {
    display: block;
    font-size: 24px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.v2-subtitle {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
}

.v2-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.v2-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #eef5ff;
    color: #0f4c81;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.v2-nav a:hover {
    background: #dcecff;
    color: #073b68;
}

/* Page heads and hero */

.v2-page-head,
.polished-head,
.v2-ticket-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin: 16px 0;
}

.polished-head,
.v2-ticket-hero {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #dce6f2;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 14px 34px rgba(15, 35, 60, 0.06);
}

.dashboard-hero {
    margin-top: 4px;
}

.v2-page-title,
.v2-ticket-hero h1 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.v2-page-caption,
.v2-card-caption {
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.v2-crumb,
.v2-eyebrow {
    margin-bottom: 6px;
    color: #155eef;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.v2-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.v2-hero-meta span,
.v2-info-strip span,
.v2-quick-context span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eef5ff;
    color: #315779;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.v2-hero-actions,
.v2-page-actions,
.v2-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Grid and cards */

.v2-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.v2-col-3 { grid-column: span 3; }
.v2-col-4 { grid-column: span 4; }
.v2-col-5 { grid-column: span 5; }
.v2-col-6 { grid-column: span 6; }
.v2-col-7 { grid-column: span 7; }
.v2-col-8 { grid-column: span 8; }
.v2-col-12 { grid-column: span 12; }

.v2-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dce6f2;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 14px 34px rgba(15, 35, 60, 0.045);
}

.v2-card-title {
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
}

.v2-section-row,
.v2-ops-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.dark-card {
    background: linear-gradient(145deg, #10243d, #163a63);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.dark-card .v2-card-title {
    color: #ffffff;
}

.dark-card .v2-card-caption {
    color: #b9c7d8;
}

/* Stats */

.v2-stat-card {
    display: block;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.v2-stat-card:hover {
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(15, 35, 60, 0.11);
}

.v2-stat {
    color: #0f172a;
    font-size: 34px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.v2-stat-label {
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.v2-stat-danger { color: #c62828; }
.v2-stat-warn { color: #a15c00; }
.v2-stat-ok { color: #217a3a; }

.v2-mini-stat {
    min-height: 94px;
    border: 1px solid #e5eaf2;
    border-radius: 16px;
    background: #f8fbff;
    padding: 14px;
}

.v2-mini-stat.wide {
    min-width: 260px;
}

.v2-mini-label {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.v2-mini-value {
    color: #0f172a;
    font-size: 22px;
    font-weight: 950;
}

.v2-mini-text {
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

/* Buttons */

.v2-btn {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 9px 14px;
    background: #145da0;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(20, 93, 160, 0.15);
}

.v2-btn:hover {
    background: #0f4e88;
    color: #ffffff;
}

.v2-btn.secondary,
.v2-btn.light {
    background: #eef5ff;
    color: #0f4c81;
    box-shadow: none;
}

.v2-btn.secondary:hover,
.v2-btn.light:hover {
    background: #dcecff;
    color: #073b68;
}

.v2-btn.danger {
    background: #b91c1c;
    color: #ffffff;
}

.v2-btn.danger:hover {
    background: #991b1b;
}

/* Badges */

.v2-badge,
.v2-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 900;
}

.v2-badge {
    padding: 5px 9px;
    background: #eef2f7;
    color: #344054;
}

.v2-pill {
    padding: 4px 9px;
    background: #eef2f7;
    color: #475467;
}

.v2-pill.danger { background: #fde7e7; color: #b42318; }
.v2-pill.warn { background: #fff1d6; color: #946200; }
.v2-pill.ok { background: #e9f7ef; color: #177245; }

.status-1 { background: #fff4d6; color: #7a4a00; }
.status-2 { background: #e6f0ff; color: #164f9f; }
.status-3 { background: #e7f8eb; color: #1b6b34; }
.status-4 { background: #fff2cc; color: #7a5400; }
.status-5 { background: #edf7d4; color: #526b00; }
.status-6 { background: #e8eaee; color: #374151; }
.status-7 { background: #ffe4e6; color: #9f1239; }
.status-8 { background: #e0e7ff; color: #3730a3; }
.status-9 { background: #ddf7f1; color: #075c4f; }
.status-10 { background: #fde7f3; color: #9d174d; }
.status-13 { background: #ffe8cc; color: #a04300; }

/* Forms */

.v2-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.v2-field label {
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.v2-field input,
.v2-field select,
.v2-field textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    padding: 10px 11px;
    color: #0f172a;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    outline: none;
}

.v2-field textarea {
    min-height: 86px;
    resize: vertical;
}

.v2-field input:focus,
.v2-field select:focus,
.v2-field textarea:focus {
    border-color: #2b75bb;
    box-shadow: 0 0 0 3px rgba(43, 117, 187, 0.12);
}

.v2-form-row {
    display: grid;
    gap: 10px;
    align-items: end;
}

.v2-form-row.three {
    grid-template-columns: 1fr 1fr 1fr;
}

.v2-form-row.four {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
}

.v2-form-row.status-row {
    grid-template-columns: 220px 1fr auto;
}

.v2-field.grow {
    min-width: 0;
}

.button-field {
    align-self: end;
}

.v2-wide {
    min-width: 280px;
}

.v2-check-row {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fbff;
    padding: 10px 12px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.v2-date-helper {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.v2-date-helper button {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #315779;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.v2-date-helper button:hover {
    border-color: #2b75bb;
    background: #eef5ff;
}

/* Work console */

.v2-ops-card {
    padding: 18px;
}

.v2-quick-context {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.v2-workbench {
    display: grid;
    gap: 14px;
}

.v2-workbench-main {
    grid-template-columns: minmax(360px, 0.95fr) minmax(460px, 1.25fr);
    align-items: stretch;
}

.v2-workbench-secondary {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 14px;
}

.v2-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.v2-action-panel {
    display: flex;
    flex-direction: column;
    gap: 11px;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    background: #fbfdff;
    padding: 15px;
}

.v2-action-panel.danger-soft {
    background: #fff8f8;
    border-color: #ffd7d7;
}

.v2-action-title {
    color: #0f172a;
    font-size: 15px;
    font-weight: 950;
}

.v2-action-footer {
    display: flex;
    justify-content: flex-start;
    margin-top: auto;
}

.note-panel textarea,
.visit-panel textarea {
    min-height: 112px;
}

/* Tables */

.v2-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.v2-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
}

.v2-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fbff;
    border-bottom: 1px solid #dfe7f0;
    color: #344054;
    padding: 11px 10px;
    text-align: left;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.v2-table td {
    border-bottom: 1px solid #edf2f7;
    padding: 12px 10px;
    vertical-align: top;
}

.v2-table tr:hover td {
    background: #fbfdff;
}

.v2-two-line {
    max-width: 430px;
}

.v2-two-line .main {
    color: #0f172a;
    font-weight: 850;
}

.v2-two-line .sub {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

/* Ticket detail */

.v2-kv {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid #edf2f7;
    padding: 8px 0;
}

.v2-kv:last-child {
    border-bottom: 0;
}

.v2-kv .k {
    color: #64748b;
    font-weight: 700;
}

.v2-kv .v {
    color: #0f172a;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.v2-problem {
    white-space: pre-wrap;
    line-height: 1.48;
    color: #1f2937;
    border: 1px solid #e6edf5;
    border-radius: 16px;
    background: #f8fbff;
    padding: 14px;
}

.v2-big-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #edf2f7;
    padding: 9px 0;
}

.v2-big-line span {
    color: #64748b;
    font-weight: 700;
}

.v2-big-line strong {
    color: #0f172a;
    text-align: right;
}

.v2-info-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.v2-alert {
    border: 1px solid #fed7aa;
    border-radius: 14px;
    background: #fff7ed;
    color: #9a3412;
    margin-bottom: 8px;
    padding: 11px 12px;
    font-weight: 700;
}

.v2-alert.red {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.v2-alert.green {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.v2-rating {
    color: #0f172a;
    font-size: 22px;
    font-weight: 950;
}

/* Timeline and comments */

.v2-timeline {
    position: relative;
    margin-top: 4px;
}

.v2-timeline-item {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 14px;
    border-left: 3px solid #dbe7f3;
    margin-left: 6px;
    padding: 0 0 16px 16px;
}

.v2-timeline-time {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.v2-timeline-box {
    border: 1px solid #e6edf5;
    border-radius: 16px;
    background: #f8fbff;
    padding: 12px;
}

.v2-timeline-type {
    margin-bottom: 4px;
    color: #0f172a;
    font-weight: 950;
}

.v2-comment {
    white-space: pre-wrap;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.v2-legacy-list {
    display: grid;
    gap: 10px;
}

.v2-legacy-item {
    border: 1px solid #e6edf5;
    border-radius: 15px;
    background: #fbfdff;
    padding: 12px;
}

.v2-legacy-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

/* Dashboard and reports */

.v2-attention-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 16px;
}

.v2-attention {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: 1px solid #d8e8fa;
    border-radius: 16px;
    background: #f7fbff;
    color: #0f172a;
    padding: 14px;
}

.v2-attention strong {
    font-size: 28px;
    line-height: 1;
    font-weight: 950;
}

.v2-attention span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.v2-attention.danger {
    background: #fff5f5;
    border-color: #fecaca;
}

.v2-attention.warn {
    background: #fffbeb;
    border-color: #fde68a;
}

.v2-mini-heading {
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 950;
}

.v2-workload-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 0;
}

.v2-workload-row:last-child {
    border-bottom: 0;
}

.v2-workload-row strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
}

.v2-workload-row span {
    display: block;
    color: #b9c7d8;
    font-size: 12px;
    margin-top: 3px;
}

.v2-workload-row b {
    color: #ffffff;
    font-size: 24px;
}

.v2-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #edf2f7;
    color: inherit;
    padding: 11px 0;
}

.v2-status-row:last-child {
    border-bottom: 0;
}

.v2-status-row:hover {
    background: #f8fbff;
    border-radius: 12px;
    margin-left: -8px;
    margin-right: -8px;
    padding-left: 8px;
    padding-right: 8px;
}

.v2-status-row strong {
    color: #0f172a;
    font-size: 18px;
}

.v2-event-card {
    display: block;
    border: 1px solid #e7edf5;
    border-radius: 16px;
    background: #fbfdff;
    color: #0f172a;
    margin-bottom: 10px;
    padding: 12px;
}

.v2-event-card:hover {
    background: #f1f7ff;
}

.v2-event-card strong,
.v2-event-card span,
.v2-event-card em {
    display: block;
}

.v2-event-card span {
    color: #64748b;
    font-size: 12px;
    margin: 3px 0;
}

.v2-event-card em {
    color: #334155;
    font-size: 13px;
    font-style: normal;
    line-height: 1.42;
}

.v2-risk-score {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #eef2f7;
    color: #334155;
    font-size: 18px;
    font-weight: 950;
}

.v2-risk-score.high {
    background: #fee2e2;
    color: #b42318;
}

/* Filter panel */

.v2-filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr 1fr 1fr 1fr auto auto;
    gap: 10px;
    align-items: end;
}

.search-field input {
    font-weight: 800;
}

/* Utilities */

.v2-muted { color: #64748b; }
.v2-small { font-size: 12px; }
.v2-strong { font-weight: 900; }
.v2-gap-lg { margin-top: 18px; }

.v2-message {
    border-radius: 14px;
    margin-bottom: 12px;
    padding: 12px 14px;
    font-weight: 800;
}

.v2-message.ok {
    background: #e9f7ef;
    color: #177245;
}

.v2-message.err {
    background: #fde7e7;
    color: #b42318;
}

.v2-grid.compact {
    grid-template-columns: 190px 190px minmax(0, 1fr);
    gap: 12px;
}

/* Responsive */

@media (max-width: 1180px) {
    .v2-filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .v2-attention-grid,
    .v2-workbench-main,
    .v2-action-grid {
        grid-template-columns: 1fr;
    }

    .button-field {
        align-self: auto;
    }
}

@media (max-width: 900px) {
    .v2-shell {
        padding: 12px;
    }

    .v2-topbar,
    .v2-page-head,
    .polished-head,
    .v2-ticket-hero,
    .v2-section-row,
    .v2-ops-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .v2-nav,
    .v2-page-actions,
    .v2-hero-actions,
    .v2-quick-context {
        justify-content: flex-start;
    }

    .v2-col-3,
    .v2-col-4,
    .v2-col-5,
    .v2-col-6,
    .v2-col-7,
    .v2-col-8,
    .v2-col-12 {
        grid-column: span 12;
    }

    .v2-form-row.three,
    .v2-form-row.four,
    .v2-form-row.status-row,
    .v2-grid.compact {
        grid-template-columns: 1fr;
    }

    .v2-timeline-item {
        grid-template-columns: 1fr;
    }

    .v2-kv {
        grid-template-columns: 120px minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .v2-filter-panel {
        grid-template-columns: 1fr;
    }

    .v2-page-actions,
    .v2-hero-actions {
        width: 100%;
    }

    .v2-page-actions .v2-btn,
    .v2-hero-actions .v2-btn {
        flex: 1;
    }
}


/* Build 4: closure, feedback and performance polish */
.v2-inline-form-block {
    margin-bottom: 16px;
}

.v2-feedback-form {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    margin-top: 14px;
    padding-top: 14px;
}

.v2-btn.success {
    background: #12805c;
    color: #ffffff;
}

.v2-btn.success:hover {
    background: #0f6f50;
}

.v2-action-panel.closure-panel {
    background: linear-gradient(180deg, #f8fffb 0%, #ffffff 100%);
    border-color: #cdeedd;
}

.v2-legacy-list.compact {
    max-height: 360px;
    overflow: auto;
}

.v2-legacy-item.danger-soft {
    background: #fff7f7;
    border-color: #fed7d7;
}

.v2-rating {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    background: #ecfdf5;
    color: #047857;
    font-weight: 800;
}

.v2-page-head.clean {
    align-items: center;
}

.v2-table td,
.v2-table th {
    vertical-align: top;
}


/* Ticket View data clarity refresh: customer, handling, location, health and comments */
.compact-head {
    align-items: center;
    margin-bottom: 10px;
}

.v2-btn.mini {
    min-height: 32px;
    padding: 7px 11px;
    font-size: 12px;
}

.v2-title-hint {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    border-radius: 999px;
    background: #eef5ff;
    color: #315779;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
}

.customer-card .v2-kv.important {
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fbff;
    margin-bottom: 8px;
    padding: 10px 12px;
}

.customer-card .strong-mobile {
    color: #0f5fa8;
    font-size: 15px;
    letter-spacing: 0.01em;
}

.customer-card .muted-address {
    color: #475569;
    font-weight: 700;
    line-height: 1.45;
}

.handling-card {
    position: relative;
    overflow: hidden;
}

.handling-card::after {
    content: "";
    position: absolute;
    inset: auto -30px -45px auto;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.handling-card.is-assigned {
    background: linear-gradient(145deg, #0f2f4f, #145c47);
}

.handling-card.is-missing {
    background: linear-gradient(145deg, #3b1d1d, #7f1d1d);
}

.handling-card.report-stale {
    background: linear-gradient(145deg, #3b1d1d, #7f1d1d);
}

.handling-card.report-slow {
    background: linear-gradient(145deg, #3c2c0b, #92400e);
}

.dark-card .v2-big-line {
    border-bottom-color: rgba(255, 255, 255, 0.18);
}

.dark-card .v2-big-line span {
    color: rgba(226, 232, 240, 0.82);
}

.dark-card .v2-big-line strong {
    color: #ffffff;
}

.v2-handling-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.v2-handling-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.v2-handling-pill.assigned,
.v2-handling-pill.live {
    background: rgba(34, 197, 94, 0.18);
    color: #dcfce7;
}

.v2-handling-pill.missing,
.v2-handling-pill.stale {
    background: rgba(248, 113, 113, 0.18);
    color: #fee2e2;
}

.v2-handling-pill.slow {
    background: rgba(251, 191, 36, 0.20);
    color: #fef3c7;
}

.v2-state-dot {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    margin-left: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.v2-state-dot.live,
.v2-health-row.live {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.v2-state-dot.slow,
.v2-health-row.slow {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.v2-state-dot.stale,
.v2-health-row.stale {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.v2-state-dot.unknown,
.v2-health-row.unknown {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.v2-health-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}

.v2-health-row {
    display: grid;
    gap: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px;
}

.v2-health-row span {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.v2-health-row strong {
    color: inherit;
    font-size: 15px;
    font-weight: 950;
}

.v2-health-row em {
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
}

.v2-location-current {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.v2-location-current > div {
    border: 1px solid #e6edf5;
    border-radius: 15px;
    background: #f8fbff;
    padding: 11px 12px;
}

.v2-location-current span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 4px;
}

.v2-location-current strong {
    display: block;
    color: #0f172a;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.v2-location-suggestions {
    display: none;
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    margin-top: 6px;
    border: 1px solid #dbe7f3;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 35, 60, 0.16);
    overflow: hidden;
}

.location-search-wrap {
    position: relative;
}

.v2-location-suggestions button {
    display: block;
    width: 100%;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    background: #ffffff;
    color: #0f172a;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    font-weight: 700;
}

.v2-location-suggestions button:hover {
    background: #eef5ff;
}

.v2-mini-help {
    margin-top: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.v2-legacy-list {
    max-height: 520px;
    overflow: auto;
    padding-right: 4px;
}

.v2-legacy-item:first-child,
.v2-timeline-item:first-child .v2-timeline-box {
    border-color: #bfdbfe;
    background: #f8fbff;
}

@media (max-width: 900px) {
    .v2-location-current {
        grid-template-columns: 1fr;
    }
}

/* Device health snapshot detail grid */
.v2-health-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.v2-metric {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    padding: 9px 10px;
    min-height: 54px;
}

.v2-metric span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 3px;
}

.v2-metric strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.device-health-card .v2-card-caption {
    margin-bottom: 10px;
}

/* Location popup refinements */
.v2-info-strip .v2-info-action,
.v2-location-summary {
    appearance: none;
    border: 0;
    background: #f3f8ff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.v2-info-strip .v2-info-action {
    border-radius: 999px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: transform .15s ease, background .15s ease;
}

.v2-info-strip .v2-info-action:hover {
    background: #e7f1ff;
    transform: translateY(-1px);
}

.v2-info-strip .v2-info-action span {
    color: #59708f;
    font-weight: 800;
}

.v2-info-strip .v2-info-action strong {
    color: #0b2545;
    font-weight: 900;
}

.v2-info-strip .v2-info-action em {
    color: #0b63b6;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.v2-location-summary {
    width: 100%;
    display: grid;
    grid-template-columns: 180px 1fr 230px;
    gap: 12px;
    border: 1px solid #d7e5f4;
    border-radius: 18px;
    padding: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.v2-location-summary:hover {
    border-color: #96bce8;
    box-shadow: 0 12px 28px rgba(24, 88, 152, .08);
}

.v2-location-summary span {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #60738f;
    margin-bottom: 4px;
}

.v2-location-summary strong {
    display: block;
    color: #0c1c33;
    font-size: 14px;
    line-height: 1.35;
    word-break: break-word;
}

.v2-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 22, 42, .56);
    backdrop-filter: blur(6px);
}

.v2-modal-card {
    width: min(960px, 96vw);
    max-height: 90vh;
    overflow: visible;
    border: 1px solid #d7e5f4;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 26px 80px rgba(7, 28, 58, .28);
    padding: 22px;
}

.v2-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.v2-modal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: #eff5fc;
    color: #12345a;
    cursor: pointer;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.v2-modal-close:hover {
    background: #dfeeff;
}

.v2-location-form .location-search-wrap {
    position: relative;
}

.v2-location-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 10002;
    display: none;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #cbdff3;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(10, 38, 76, .18);
}

.v2-location-suggestions button {
    display: block;
    width: 100%;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid #eef3f8;
    background: #fff;
    color: #17243a;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.35;
}

.v2-location-suggestions button:hover {
    background: #f1f7ff;
}

@media (max-width: 900px) {
    .v2-location-summary {
        grid-template-columns: 1fr;
    }
}

/* Ticket type and installation request */
.v2-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    margin-top: 5px;
    background: #eef6ff;
    color: #174a7c;
    white-space: nowrap;
}

.v2-type-badge.type-installation {
    background: #e9f8ef;
    color: #166534;
}

.v2-type-badge.type-welcome {
    background: #fce7f3;
    color: #9d174d;
}

.v2-type-badge.type-auto {
    background: #fff7ed;
    color: #9a3412;
}

.v2-type-badge.type-activation {
    background: #f1f5f9;
    color: #475569;
}

.v2-type-badge.type-payment {
    background: #fef9c3;
    color: #854d0e;
}

.installation-request-card {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4, #ffffff 68%);
}

.v2-install-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 18px;
}

@media (max-width: 900px) {
    .v2-install-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Refinements: dashboard / ticket view / status strip ---------- */
.v2-nav a.active {
    background: linear-gradient(180deg, #0f5aa6 0%, #124f90 100%);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 90, 166, 0.22);
}

.v2-ticket-hero.dashboard-hero-refined,
.v2-page-head,
.v2-ticket-hero {
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(20, 40, 70, 0.08);
}

.v2-dashboard-card-grid {
    margin-top: 4px;
}

.v2-stat-card.refined {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    border: 1px solid #d8e5f2;
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(16, 42, 67, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.v2-stat-card.refined:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(16, 42, 67, 0.09);
}

.v2-status-strip {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #dce6f2;
    border-radius: 22px;
    padding: 16px 18px;
    box-shadow: 0 16px 34px rgba(15, 35, 60, 0.06);
}

.v2-status-strip-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.v2-status-strip-title {
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
}

.v2-status-strip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.v2-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #f2f7fd;
    border: 1px solid #dbe7f3;
    color: #24425f;
    font-weight: 700;
}

.v2-status-chip strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ffffff;
    color: #0f5aa6;
}

.v2-status-chip.active {
    background: #0f5aa6;
    color: #ffffff;
    border-color: #0f5aa6;
}

.v2-status-chip.active strong {
    background: rgba(255,255,255,0.18);
    color: #ffffff;
}

.v2-dashboard-side-panel {
    background: linear-gradient(180deg, #14263d 0%, #0f1f34 100%);
    color: #ffffff;
}

.v2-dashboard-side-panel .v2-card-title,
.v2-dashboard-side-panel .v2-card-caption,
.v2-dashboard-side-panel .v2-muted,
.v2-dashboard-side-panel .v2-workload-row span,
.v2-dashboard-side-panel .v2-workload-row strong,
.v2-dashboard-side-panel .v2-workload-row b {
    color: #ffffff;
}

.v2-workload-row.refined {
    border-radius: 16px;
    padding: 12px 14px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.v2-focus-card,
.v2-card {
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(15, 35, 60, 0.05);
}

.handling-card.dark-card {
    background: linear-gradient(180deg, #f7fbff 0%, #edf4fb 100%);
    color: #122033;
    border: 1px solid #dce6f2;
}

.handling-card.dark-card .v2-card-title,
.handling-card.dark-card .v2-card-caption,
.handling-card.dark-card .v2-muted,
.handling-card.dark-card .v2-handling-pill,
.handling-card.dark-card .v2-handle-stack,
.handling-card.dark-card .v2-kv .k,
.handling-card.dark-card .v2-kv .v {
    color: #122033;
}

.v2-ops-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.v2-kv {
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
}

.v2-kv:last-child {
    border-bottom: 0;
}

.v2-table thead th {
    background: #f6f9fc;
}

.v2-two-line .main {
    font-weight: 700;
    color: #122033;
}

.v2-two-line .sub {
    margin-top: 4px;
    color: #6b7d90;
    font-size: 12px;
}

.v2-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 18, 30, 0.55);
    padding: 24px;
    overflow: auto;
}

.v2-modal.open {
    display: block;
}

.v2-modal-card {
    max-width: 980px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 24px 48px rgba(10, 18, 30, 0.25);
}

.v2-modal-close {
    border: 0;
    background: #eef5ff;
    color: #0f4c81;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
}

.v2-modal-grid {
    margin-top: 8px;
}

.v2-modal-form .v2-field input,
.v2-modal-form .v2-field select,
.v2-modal-form .v2-field textarea,
.v2-filter-panel .v2-field input,
.v2-filter-panel .v2-field select,
.v2-filter-panel .v2-field textarea {
    width: 100%;
    border: 1px solid #d6e2ef;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
}

.v2-modal-form .v2-field label,
.v2-filter-panel .v2-field label {
    display: block;
    margin-bottom: 6px;
    color: #38526f;
    font-weight: 700;
}

.v2-actions.right {
    justify-content: flex-end;
    margin-top: 14px;
}

@media (max-width: 980px) {
    .v2-status-strip-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .v2-modal {
        padding: 12px;
    }

    .v2-modal-card {
        margin: 10px auto;
        padding: 18px;
    }
}

/* ---------- Build 20260506b: production typography and layout cleanup ---------- */
html {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    background: #f2f6fb;
    color: #162033;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.v2-shell {
    max-width: none;
    width: calc(100% - 48px);
    padding: 22px 0 34px;
}

.v2-brand {
    font-size: 23px;
    letter-spacing: -0.025em;
    font-weight: 800;
}

.v2-subtitle,
.v2-page-caption,
.v2-card-caption {
    color: #607089;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.v2-page-title,
.v2-ticket-hero h1 {
    font-size: 28px;
    letter-spacing: -0.025em;
    font-weight: 800;
}

.v2-crumb,
.v2-eyebrow {
    color: #1b64b0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.v2-card-title {
    color: #121a2b;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.015em;
}

.v2-topbar,
.polished-head,
.v2-ticket-hero,
.v2-card,
.v2-status-strip {
    border-color: #d8e3ef;
    box-shadow: 0 14px 32px rgba(27, 50, 80, 0.055);
}

.v2-nav a,
.v2-btn,
.v2-pill,
.v2-badge,
.v2-type-badge,
.v2-status-chip,
.v2-hero-meta span {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.v2-btn {
    min-height: 36px;
    padding: 9px 14px;
    border-radius: 12px;
}

.v2-wide-panel {
    overflow: hidden;
}

.v2-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
}

.v2-table {
    width: 100%;
    min-width: 1160px;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.v2-table th {
    color: #1b2b44;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.v2-table td {
    color: #172238;
    font-weight: 500;
    vertical-align: top;
}

.v2-table td strong,
.v2-two-line .main,
.v2-kv .v {
    color: #101827;
    font-weight: 700;
}

.v2-table td:last-child,
.v2-table th:last-child {
    position: sticky;
    right: 0;
    z-index: 3;
    background: #ffffff;
    box-shadow: -10px 0 16px rgba(255,255,255,0.86);
    min-width: 86px;
    text-align: right;
}

.v2-two-line .sub,
.v2-small,
.v2-muted,
.v2-kv .k {
    color: #63738b;
    font-weight: 600;
}

.v2-stat {
    font-weight: 800;
    letter-spacing: -0.035em;
}

.v2-stat-label {
    color: #617188;
    font-weight: 650;
}

.v2-attention-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v2-workload-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.v2-workload-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.v2-workload-row.refined {
    margin-top: 0;
    background: #f4f8fc;
    border: 1px solid #dce7f2;
    color: #172238;
}

.v2-workload-row.refined strong,
.v2-workload-row.refined span,
.v2-workload-row.refined b {
    color: #172238;
}

.handling-card-light,
.handling-card-light.dark-card {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%) !important;
    color: #172238 !important;
    border: 1px solid #d8e3ef !important;
}

.handling-card-light *,
.handling-card-light .v2-card-title,
.handling-card-light .v2-card-caption,
.handling-card-light .v2-kv .k,
.handling-card-light .v2-kv .v,
.handling-card-light .v2-handle-stack,
.handling-card-light strong,
.handling-card-light span,
.handling-card-light div {
    color: #172238 !important;
}

.handling-card-light .v2-handling-pill.assigned {
    color: #0f5132 !important;
    background: #dff5e8;
}

.handling-card-light .v2-handling-pill.missing,
.handling-card-light .v2-handling-pill.stale {
    color: #8a1f1f !important;
    background: #fde8e8;
}

.device-health-card {
    grid-row: auto;
}

.device-health-card .v2-health-grid {
    gap: 10px;
}

.device-health-card .v2-health-row,
.device-health-card .v2-device-mini-grid > div {
    border-radius: 14px;
    padding: 11px 12px;
}

.customer-card .v2-section-row,
.handling-card .v2-section-row {
    align-items: flex-start;
}

.v2-user-summary-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 22px;
}

.v2-user-summary-card .v2-card-title {
    grid-column: 1 / -1;
}

@media (max-width: 1500px) {
    .v2-workload-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .v2-shell {
        width: calc(100% - 28px);
    }

    .v2-workload-grid,
    .v2-user-summary-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .v2-shell {
        width: calc(100% - 18px);
    }

    .v2-workload-grid,
    .v2-user-summary-card,
    .v2-attention-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Build 20260506d: ticket view scanability pass ---------- */
.v2-status-strip {
    padding: 12px 14px;
    margin: 12px 0 14px;
}

.v2-status-strip-head {
    margin-bottom: 8px;
}

.v2-status-strip-title {
    font-size: 15px;
    letter-spacing: -0.01em;
}

.v2-status-strip-list {
    gap: 8px;
}

.v2-status-chip {
    padding: 8px 12px;
    font-size: 13px;
}

.v2-ticket-detail-grid {
    gap: 16px;
}

.v2-issue-card,
.v2-current-card,
.v2-customer-vehicle-panel,
.v2-ops-card {
    border-radius: 22px;
    border-color: #d6e1ee;
    box-shadow: 0 14px 34px rgba(18, 36, 60, 0.06);
}

.v2-problem-clean {
    background: #f7fafc;
    border: 1px solid #dce7f2;
    border-radius: 16px;
    padding: 16px 18px;
    color: #172238;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;
}

.v2-ticket-scan-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) minmax(320px, 1.7fr) minmax(220px, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.v2-scan-item {
    min-height: 62px;
    border: 1px solid #dce7f2;
    border-radius: 16px;
    background: #f6f9fd;
    padding: 10px 12px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

button.v2-scan-item {
    cursor: pointer;
    font: inherit;
}

button.v2-scan-item:hover {
    border-color: #9fc3e7;
    background: #eef6ff;
}

.v2-scan-item span {
    color: #65748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.v2-scan-item strong {
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
}

.v2-scan-item em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 650;
}

.v2-scan-location strong {
    white-space: normal;
    word-break: break-word;
}

.v2-current-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

.v2-current-card,
.v2-current-card * {
    color: #172238 !important;
}

.v2-current-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.v2-current-grid > div {
    min-height: 72px;
    background: #f6f9fd;
    border: 1px solid #dce7f2;
    border-radius: 16px;
    padding: 12px;
}

.v2-current-grid span {
    display: block;
    color: #66758c !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.v2-current-grid strong {
    color: #111827 !important;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
}

.v2-customer-vehicle-panel {
    background: #ffffff;
}

.v2-summary-columns {
    display: grid;
    grid-template-columns: 1.05fr 1.05fr 1.25fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

.v2-summary-column {
    min-width: 0;
    background: #f8fbff;
    border: 1px solid #dce7f2;
    border-radius: 18px;
    padding: 14px;
}

.v2-summary-column h3 {
    margin: 0 0 10px;
    color: #121a2b;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: -0.01em;
}

.v2-summary-column .v2-kv {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
}

.v2-summary-column .v2-kv .k {
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
}

.v2-summary-column .v2-kv .v {
    color: #111827;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
    min-width: 0;
    word-break: break-word;
}

.compact-health {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.compact-health .v2-health-row {
    padding: 10px 12px;
    border-radius: 14px;
}

.compact-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.compact-metrics .v2-metric {
    padding: 9px 10px;
    border-radius: 12px;
    min-height: auto;
}

.compact-metrics .v2-metric span {
    font-size: 10px;
}

.compact-metrics .v2-metric strong {
    font-size: 12px;
}

.v2-ticket-hero {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.v2-hero-meta span {
    background: #edf5ff;
    color: #294865;
    border: 1px solid #dbe9f7;
}

@media (max-width: 1550px) {
    .v2-summary-columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 980px) {
    .v2-ticket-scan-row,
    .v2-summary-columns,
    .v2-current-grid {
        grid-template-columns: 1fr;
    }

    .v2-summary-column .v2-kv {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}


/* Latest comment previews */
.v2-issue-cell {
    min-width: 420px;
}

.v2-comment-preview {
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px dashed #d6e2ef;
    color: #465b73;
}

.v2-comment-preview-title {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 900;
    color: #60758d;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.v2-comment-preview-line {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.35;
    color: #465b73;
    font-weight: 600;
}

.v2-comment-preview-line strong {
    color: #102033;
    font-weight: 850;
}

.v2-comment-preview-line span {
    color: #7a8da3;
    font-weight: 650;
}

.v2-comment-preview.table-comments {
    max-width: 560px;
}

.v2-comment-preview.table-comments .v2-comment-preview-line {
    white-space: normal;
}

.v2-comment-preview.ticket-comments {
    margin: 10px 0 8px 0;
    padding: 10px 12px;
    border: 1px solid #dce8f5;
    border-radius: 14px;
    background: #ffffff;
}

.v2-comment-preview.ticket-comments .v2-comment-preview-line {
    font-size: 12px;
    line-height: 1.45;
}

/* ---------- Priority + login link refinements ---------- */
.v2-login-link {
    color: #0b4f8a;
    font-weight: 850;
    text-decoration: none;
    border-bottom: 1px dashed rgba(11,79,138,0.35);
}

.v2-login-link:hover {
    color: #073b68;
    border-bottom-color: #073b68;
}

.priority-pill {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.1;
}

.priority-click:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15,35,60,0.10);
}

.v2-issue-actions {
    align-items: center;
    justify-content: flex-end;
}

.v2-priority-modal-card {
    max-width: 520px;
}

.v2-priority-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 16px;
}

.v2-priority-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px;
    border: 1px solid #dbe7f3;
    border-radius: 16px;
    background: #f8fbff;
    cursor: pointer;
}

.v2-priority-form textarea {
    width: 100%;
    border: 1px solid #d6e2ef;
    border-radius: 14px;
    padding: 10px 12px;
    resize: vertical;
}

.v2-priority-form .v2-field label {
    display: block;
    margin-bottom: 6px;
    color: #38526f;
    font-weight: 800;
}

@media (max-width: 720px) {
    .v2-priority-options {
        grid-template-columns: 1fr;
    }
}

/* ---------- Clickability + table action safety patch ---------- */
.v2-table td:last-child,
.v2-table th:last-child {
    position: static !important;
    right: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
    background: transparent !important;
}

.v2-table a,
.v2-table button,
.v2-nav a,
.v2-btn,
.v2-status-chip,
.v2-login-link,
.priority-click {
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
}

.v2-wide-panel,
.v2-card,
.v2-table-wrap {
    overflow: visible;
}

.v2-table-wrap {
    overflow-x: auto;
}

.priority-click {
    appearance: none;
    -webkit-appearance: none;
}

/* ---------- Dashboard clickable cards patch ---------- */
a.v2-stat-card,
a.v2-workload-row {
    display: flex;
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
}

a.v2-stat-card {
    flex-direction: column;
    justify-content: center;
}

a.v2-workload-row {
    align-items: center;
    justify-content: space-between;
}

a.v2-stat-card:hover,
a.v2-workload-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(16, 42, 67, 0.11);
}

.v2-dashboard-card-grid a,
.v2-workload-grid a,
.v2-section-row a,
.v2-hero-actions a,
.v2-hero-actions button {
    pointer-events: auto !important;
    position: relative;
    z-index: 25;
}

.v2-dashboard-card-grid,
.v2-workload-grid,
.v2-section-row,
.v2-hero-actions {
    position: relative;
    z-index: 20;
}


/* Status mix SLA split counts */
.v2-status-chip {
    gap: 8px;
}

.v2-status-chip .v2-status-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 24px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.v2-status-chip .v2-status-count.ok {
    background: #e7f1ff;
    color: #075ca8;
    border: 1px solid #c8def6;
}

.v2-status-chip .v2-status-count.risk {
    background: #ffe8e8;
    color: #bd1f1f;
    border: 1px solid #ffc4c4;
}

.v2-status-chip.active .v2-status-count.ok {
    background: #ffffff;
    color: #075ca8;
    border-color: rgba(255, 255, 255, 0.7);
}

.v2-status-chip.active .v2-status-count.risk {
    background: #ffe1e1;
    color: #b91515;
    border-color: #ffc0c0;
}


/* Assign technician modal and inline list action */
.v2-assign-inline-btn {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    min-height: 30px;
    box-shadow: 0 8px 16px rgba(15, 90, 166, 0.14);
}

.v2-assign-modal-card {
    max-width: 820px;
}

.v2-assign-form .v2-field input,
.v2-assign-form .v2-field select,
.v2-assign-form .v2-field textarea {
    width: 100%;
    border: 1px solid #d6e2ef;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
    color: #122033;
    font-weight: 700;
}

.v2-assign-form .v2-field label {
    display: block;
    margin-bottom: 6px;
    color: #38526f;
    font-size: 12px;
    font-weight: 800;
}

.v2-table td .v2-assign-inline-btn:hover {
    transform: translateY(-1px);
}

/* 20260516 operational quick actions */
.v2-row-actions {
    min-width: 150px;
}

.v2-row-actions .v2-btn,
.v2-row-actions button.v2-btn {
    display: inline-flex;
    margin: 3px 3px 3px 0;
    white-space: nowrap;
}

.v2-row-actions .v2-btn.mini {
    padding: 7px 10px;
    font-size: 12px;
}

button.v2-workload-row {
    border: 1px solid #dce8f5;
    background: #f8fbff;
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

button.v2-workload-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(16, 42, 67, 0.11);
}

.v2-workload-modal-card {
    max-width: 900px;
}

.v2-workload-timeline {
    display: none;
    max-height: 70vh;
    overflow: auto;
}

.v2-timeline-mini-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #e6eef8;
}

.v2-timeline-mini-row > div:first-child strong,
.v2-timeline-mini-row > div:first-child span {
    display: block;
    color: #49637f;
    font-size: 12px;
}

.v2-timeline-mini-row > div:nth-child(2) {
    color: #102033;
    font-weight: 650;
}

.v2-charge-modal-card {
    max-width: 520px;
}

.v2-charge-form .v2-field input {
    width: 100%;
    border: 1px solid #d6e2ef;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 800;
}

.strong-line {
    font-weight: 900;
    color: #0b4f8a !important;
}

/* V2 login page */
.v2-login-body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at top left, #e6f2ff 0, #f6f9fd 42%, #eef4fb 100%);
    color: #102033;
    font-family: Inter, Arial, sans-serif;
}

.v2-login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.v2-login-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border: 1px solid #dce8f5;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 25px 80px rgba(18, 48, 80, 0.16);
}

.v2-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.v2-login-brand strong,
.v2-login-brand span {
    display: block;
}

.v2-login-brand strong {
    font-size: 22px;
    font-weight: 950;
}

.v2-login-brand span span,
.v2-login-brand div > span {
    color: #5d718a;
    font-size: 13px;
    font-weight: 700;
}

.v2-login-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 950;
}

.v2-login-card p {
    margin: 0 0 18px;
    color: #5d718a;
}

.v2-login-form {
    display: grid;
    gap: 14px;
}

.v2-login-form .v2-field input {
    width: 100%;
    border: 1px solid #d6e2ef;
    border-radius: 14px;
    padding: 13px 14px;
    font-weight: 800;
}

@media (max-width: 760px) {
    .v2-timeline-mini-row {
        grid-template-columns: 1fr;
    }
}

/* Build: ticket list comments + technician job cards */
.v2-link-btn{background:transparent;border:0;color:#2563eb;padding:4px 0;font-size:12px;cursor:pointer;text-decoration:underline;}
.v2-comments-link{display:inline-block;margin-top:6px;}
.v2-comments-modal-card{max-width:820px;max-height:86vh;overflow:auto;}
.v2-job-card-list{display:grid;grid-template-columns:1fr;gap:12px;}
.v2-job-card{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:14px;padding:14px;border:1px solid #e5e7eb;border-radius:16px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.04);}
.v2-job-title{font-weight:800;margin-bottom:7px;display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.v2-job-title a{color:#111827;text-decoration:none;}
.v2-job-sub{color:#64748b;font-size:13px;margin-bottom:8px;}
.v2-job-side{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:12px;}
.v2-job-side div{background:#f8fafc;border:1px solid #eef2f7;border-radius:12px;padding:8px;}
.v2-job-side div.v2-actions{grid-column:1/-1;background:transparent;border:0;padding:0;display:flex;justify-content:flex-end;gap:8px;}
.v2-job-side span{display:block;color:#64748b;margin-bottom:3px;}
.v2-job-side strong{color:#0f172a;}
.touched-today-panel{border-color:#bfdbfe;}
@media(max-width:900px){.v2-job-card{grid-template-columns:1fr}.v2-job-side{grid-template-columns:1fr}}

/* Ops workflow refinement: fast modals + technician time slots */
.v2-inline-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px;align-items:center;}
.v2-status-button{background:transparent;border:0;padding:0;margin:0;cursor:pointer;display:inline-block;text-align:left;}
.v2-status-button:hover .v2-badge{box-shadow:0 0 0 2px rgba(37,99,235,.12);}
.v2-status-modal-card,.v2-add-comment-modal-card{max-width:720px;}
.v2-status-option-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-top:14px;}
.v2-status-choice{border:1px solid #dbe7f5;background:#f7fbff;color:#0b3d66;border-radius:14px;padding:12px 14px;font-weight:900;cursor:pointer;text-align:left;}
.v2-status-choice:hover{background:#eaf4ff;border-color:#9dccff;}
.v2-status-choice.current{background:#102f55;color:#fff;border-color:#102f55;}
.v2-touch-note{display:inline-block;margin-top:7px;padding:4px 8px;border-radius:999px;background:#ecfdf5;color:#047857;font-size:12px;font-weight:800;}
.v2-slot-board{display:grid;gap:14px;}
.v2-slot-row{display:grid;grid-template-columns:190px minmax(0,1fr);gap:14px;border-top:1px solid #e6eef7;padding-top:14px;}
.v2-slot-row:first-child{border-top:0;padding-top:0;}
.v2-slot-row.empty{opacity:.72;}
.v2-slot-time{border-left:4px solid #0d5ea8;background:#f3f8ff;border-radius:16px;padding:12px;position:sticky;top:12px;align-self:start;}
.v2-slot-time strong{display:block;font-size:14px;color:#10233d;}
.v2-slot-time span{display:block;margin-top:6px;color:#64748b;font-size:12px;font-weight:800;}
.v2-slot-jobs{display:grid;gap:12px;}
.v2-slot-empty{border:1px dashed #d7e4f2;border-radius:16px;padding:16px;color:#64748b;background:#fbfdff;font-weight:800;}
.v2-slot-job-card{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:12px;border:1px solid #dfeaf6;border-radius:18px;background:#fff;padding:14px;box-shadow:0 8px 22px rgba(15,23,42,.05);}
.v2-slot-job-main{min-width:0;}
.v2-slot-job-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-self:start;}
.v2-slot-job-meta div{background:#f8fafc;border:1px solid #eef2f7;border-radius:12px;padding:8px;}
.v2-slot-job-meta span{display:block;color:#64748b;font-size:11px;font-weight:900;margin-bottom:4px;}
.v2-slot-job-meta strong{color:#0f172a;font-size:12px;}
.v2-slot-job-actions{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;border-top:1px dashed #e2eaf4;padding-top:10px;}
.v2-job-location{margin-top:8px;color:#42526b;font-size:12px;background:#f8fafc;border-radius:12px;padding:8px;}
.v2-add-comment-form textarea{width:100%;box-sizing:border-box;}
.v2-assign-modal-card{max-width:960px;}
@media(max-width:1000px){.v2-slot-row{grid-template-columns:1fr}.v2-slot-time{position:static}.v2-slot-job-card{grid-template-columns:1fr}.v2-slot-job-meta{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.v2-slot-job-meta{grid-template-columns:1fr}.v2-slot-job-actions{justify-content:flex-start}}

/* Hotfix: clean inline assignment controls and prevent duplicate action clutter */
.v2-tech-cell{min-width:130px;}
.v2-tech-name-action{background:transparent;border:0;color:#12304e;font-weight:900;padding:0;margin:0;cursor:pointer;text-align:left;font:inherit;line-height:1.25;}
.v2-tech-name-action:hover{color:#0d5ea8;text-decoration:underline;}
.v2-link-action{display:inline-block;margin-top:4px;background:#eef6ff;border:1px solid #d8eafa;color:#0d5ea8;border-radius:999px;padding:3px 9px;font-size:11px;font-weight:900;cursor:pointer;line-height:1.2;}
.v2-link-action:hover{background:#0d5ea8;color:#fff;border-color:#0d5ea8;}
.v2-table .v2-row-actions{white-space:nowrap;}
.v2-table .v2-row-actions .v2-btn + .v2-btn{margin-left:6px;}

/* Close complaint modal on list rows */
.v2-close-ticket-modal-card{max-width:780px;}
.v2-close-ticket-form textarea{width:100%;box-sizing:border-box;}
.v2-alert.soft{box-shadow:none;margin:10px 0 0;}
.v2-row-actions .v2-btn.danger{box-shadow:0 8px 18px rgba(185,28,28,.14);}

/* Close modal payment/install refinement */
.v2-install-link-box {
    display: none;
    grid-column: 1 / -1;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;
    margin: 2px 0 4px;
}
.v2-section-mini-title {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}
.v2-modal-grid.compact {
    margin-top: 10px;
    gap: 10px;
}
.v2-close-payment-hint {
    grid-column: 1 / -1;
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px 11px;
}
.v2-close-payment-hint.required {
    color: #991b1b;
    background: #fff1f2;
    border-color: #fecdd3;
    font-weight: 700;
}

/* Close modal customer/vehicle search */
.v2-search-field { position: relative; }
.v2-search-results {
    display: none;
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% - 2px);
    background: #ffffff;
    border: 1px solid #d7e3f3;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15, 44, 77, 0.16);
    max-height: 260px;
    overflow: auto;
    padding: 6px;
}
.v2-search-results button {
    width: 100%;
    text-align: left;
    border: 0;
    background: #fff;
    color: #102033;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
}
.v2-search-results button:hover { background: #eef6ff; color: #0b5da8; }
.v2-search-empty { padding: 10px 12px; color: #64748b; font-weight: 800; }
.v2-selected-pill {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eaf7ef;
    color: #146c3e;
    font-weight: 900;
    font-size: 12px;
}
.v2-selected-pill.muted { background: #f2f6fb; color: #64748b; }
#v2-close-ticket-error { margin: 8px 0 4px; }

/* Create complaint / installation UX refinement */
.v2-modal-grid.compact { gap: 10px; }
.v2-search-field { position: relative; }
.v2-search-results { z-index: 80; }
.v2-selected-pill { margin-top: 7px; }
#v2_install_location_picked { margin-top: 8px; }


/* Add installation modal readability */
.v2-installation-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.v2-install-section {
    border: 1px solid #dbe7f3;
    background: #f8fbff;
    border-radius: 16px;
    padding: 12px;
}
.v2-install-section-title {
    color: #0f3f6f;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.v2-location-input-field input#v2_install_address {
    min-height: 44px;
    font-size: 14px;
    background: #fff;
}
.v2-install-time-grid {
    align-items: end;
}
.v2-installation-form .v2-selected-pill {
    border-radius: 10px;
    line-height: 1.35;
}


/* Add installation modal compact layout fix */
.v2-installation-modal-card {
    max-width: 1120px;
    margin: 18px auto;
    padding: 20px;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
}
.v2-install-modal-head {
    align-items: flex-start;
    margin-bottom: 10px;
}
.v2-installation-form.compact {
    display: grid;
    gap: 10px;
}
.v2-install-panel {
    border: 1px solid #dbe7f3;
    background: #f8fbff;
    border-radius: 16px;
    padding: 12px;
}
.v2-install-section-title {
    margin-bottom: 8px;
}
.v2-install-compact-grid {
    display: grid;
    gap: 10px 14px;
}
.v2-install-compact-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.v2-install-compact-grid.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.v2-installation-form .v2-field label,
.v2-install-time-picks label {
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 850;
}
.v2-location-input-field input#v2_install_address {
    min-height: 42px;
    font-size: 14px;
    background: #fff;
}
.v2-install-location-panel {
    position: relative;
}
.v2-install-location-panel .v2-location-suggestions {
    max-height: 190px;
    overflow-y: auto;
}
.v2-install-date-row {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr) 150px;
    gap: 12px;
    align-items: end;
}
.v2-time-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.v2-time-chip {
    border: 1px solid #cfe0f2;
    background: #fff;
    color: #0f4c81;
    border-radius: 999px;
    padding: 9px 12px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 76, 129, 0.06);
}
.v2-time-chip.active,
.v2-time-chip:hover {
    background: #0f5fa8;
    border-color: #0f5fa8;
    color: #fff;
}
.v2-install-actions {
    margin-top: 4px;
}
@media (max-width: 980px) {
    .v2-installation-modal-card {
        max-width: calc(100vw - 20px);
        margin: 8px auto;
        padding: 14px;
    }
    .v2-install-compact-grid.two-col,
    .v2-install-compact-grid.three-col,
    .v2-install-date-row {
        grid-template-columns: 1fr;
    }
}
