.gp {
    --gp-bg: var(--card-bg, #ffffff);
    --gp-text: var(--text, #0f172a);
    --gp-muted: var(--saas-muted, #64748b);
    --gp-line: var(--border, #cbd5e1);
    --gp-field: var(--surface-card, #ffffff);
    --gp-soft: var(--surface-muted, #f8fafc);
    color: var(--gp-text);
}

html.dark-mode .gp,
.dark-mode .gp {
    --gp-bg: var(--card-bg, #1e293b);
    --gp-text: var(--text, #e2e8f0);
    --gp-muted: #94a3b8;
    --gp-line: #475569;
    --gp-field: #0f172a;
    --gp-soft: #1e293b;
}

.gp-page {
    padding: 1.25rem 1rem 2rem;
    max-width: 1180px;
    margin-inline: auto;
}

.gp-embedded {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gp-line);
}

.gp-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.gp h1 {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.gp-kicker,
.gp-identity,
.gp-muted,
.gp-sla,
.gp-timer-label {
    color: var(--gp-muted);
    margin: 0;
}

.gp-kicker {
    font-size: 0.78rem;
    font-weight: 700;
}

.gp-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.gp-crumbs a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.15rem;
}

.gp-timers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.gp-timer,
.gp-file,
.gp-stay,
.gp-review {
    background: var(--gp-bg);
    border: 1px solid var(--gp-line);
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.gp-timer-value {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0.2rem 0;
}

.gp-badges,
.gp-stay-top,
.gp-review-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.gp-stay-top,
.gp-review-top {
    justify-content: space-between;
}

.gp-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--gp-line);
    border-radius: 999px;
    padding: 0.12rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--gp-soft);
    color: var(--gp-text);
}

.gp-badge-ok { background: rgba(16, 185, 129, 0.16); color: #047857; }
.gp-badge-warn { background: rgba(245, 158, 11, 0.2); color: #92400e; }
.gp-badge-danger { background: rgba(244, 63, 94, 0.16); color: #9f1239; }

html.dark-mode .gp-badge-ok,
.dark-mode .gp-badge-ok { color: #6ee7b7; }
html.dark-mode .gp-badge-warn,
.dark-mode .gp-badge-warn { color: #fcd34d; }
html.dark-mode .gp-badge-danger,
.dark-mode .gp-badge-danger { color: #fda4af; }

.gp-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.gp-stay {
    width: 100%;
    text-align: start;
    cursor: pointer;
    color: inherit;
}

.gp-stay.is-selected {
    border-color: #6366f1;
    box-shadow: inset 0 0 0 1px #6366f1;
}

.gp-file {
    margin-bottom: 0.55rem;
}

.gp-file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 650;
}

.gp .form-control,
.gp select,
.gp textarea,
.gp input[type="text"],
.gp input[type="number"],
.gp input[type="date"],
.gp input[type="password"],
.gp input[type="file"] {
    display: block;
    width: 100%;
    min-height: 2.55rem;
    border: 1px solid var(--gp-line) !important;
    border-radius: 8px !important;
    background: var(--gp-field) !important;
    color: var(--gp-text) !important;
    padding: 0.45rem 0.7rem !important;
    box-shadow: none;
}

.gp select,
.gp select.form-control {
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    cursor: pointer;
}

.gp textarea.form-control {
    min-height: 6rem;
}

.gp .form-control:focus,
.gp select:focus,
.gp textarea:focus {
    outline: 2px solid #6366f1 !important;
    outline-offset: 1px;
    border-color: #6366f1 !important;
}

.gp .form-control:disabled,
.gp select:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.gp .form-label,
.gp label {
    color: var(--gp-text);
}

.gp a:focus-visible,
.gp button:focus-visible,
.gp .form-control:focus-visible,
.gp select:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.gp-review {
    margin-bottom: 0.7rem;
}

@media (max-width: 767px) {
    .gp-timers,
    .gp-head {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gp *,
    .gp *::before,
    .gp *::after {
        transition: none !important;
        animation: none !important;
    }
}

.gp-toolbar,
.gp-modal-head,
.gp-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.gp-toolbar,
.gp-tabs {
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.gp-tabs {
    justify-content: flex-start;
    border-bottom: 1px solid var(--gp-line);
}

.gp-tab {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--gp-muted);
    font-weight: 700;
    padding: 0.45rem 0.7rem;
}

.gp-tab.is-selected {
    color: var(--gp-text);
    border-bottom-color: #6366f1;
}

.gp-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}

.gp-vehicle,
.gp-quote {
    background: var(--gp-bg);
    border: 1px solid var(--gp-line);
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.gp-quote {
    margin-bottom: 0.7rem;
}

.gp-quote.is-current {
    border-color: #6366f1;
}

.gp-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0.75rem;
}

.gp-modal {
    width: min(920px, 100%);
    max-height: min(92vh, 900px);
    overflow: auto;
    background: var(--gp-bg);
    color: var(--gp-text);
    border-radius: 16px 16px 0 0;
    padding: 1rem;
}

.gp-modal-head {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .gp-modal-backdrop {
        align-items: center;
    }

    .gp-modal {
        border-radius: 16px;
    }
}
