:root {
    --teal: #0f766e;
    --ink: #111827;
    --muted: #64748b;
    --line: #dbe3ea;
    --soft: #f8fafc;
}

body {
    background: var(--soft);
    color: var(--ink);
}

.bg-teal {
    background: var(--teal);
}

.pwa-install-button {
    color: #fff;
    font-weight: 600;
}

.pwa-install-button:hover,
.pwa-install-button:focus {
    color: #fff;
}

.mobile-app-gate {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.82);
}

.mobile-app-gate-card {
    width: min(440px, 100%);
    padding: 26px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
    text-align: center;
}

.mobile-app-gate-card h1 {
    margin: 8px 0 10px;
    font-size: 1.55rem;
}

.mobile-app-gate-card p,
.mobile-app-gate-card small {
    color: var(--muted);
}

.mobile-app-gate-card small {
    display: block;
    margin-top: 12px;
}

.mobile-gate-help {
    margin-top: 14px;
    padding: 11px 12px;
    border-radius: 10px;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.84rem;
    line-height: 1.45;
}

.hero-panel,
.panel,
.auth-box,
.vehicle-card,
.public-contact,
.call-screen {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}

.auth-box {
    max-width: 440px;
    margin: 24px auto;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-row img {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f0fdfa;
    flex: 0 0 auto;
}

.captcha-input {
    max-width: 110px;
    height: 44px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-align: center;
    text-transform: uppercase;
}

.verification-mail-note {
    margin: 18px 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.88rem;
    line-height: 1.5;
}

.verification-code-input {
    height: 58px;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 0.35em;
    text-align: center;
}

.verification-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    margin-top: 14px;
}

.verification-secondary-actions form {
    display: inline;
}

.status-board {
    display: grid;
    gap: 12px;
}

.status-board div,
.metric {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}

.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
    gap: clamp(32px, 6vw, 76px);
    align-items: center;
    min-height: 620px;
    padding: clamp(42px, 7vw, 88px);
    overflow: hidden;
    border-radius: 28px;
    background:
        radial-gradient(circle at 8% 15%, rgba(45, 212, 191, 0.2), transparent 30%),
        linear-gradient(135deg, #f0fdfa 0%, #ffffff 52%, #ecfeff 100%);
    border: 1px solid #ccfbf1;
}

.home-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -180px;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: rgba(15, 118, 110, 0.07);
}

.home-hero-copy,
.home-install-card {
    position: relative;
    z-index: 1;
}

.home-kicker,
.home-card-eyebrow {
    color: var(--teal);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home-hero-copy h1 {
    max-width: 760px;
    margin: 14px 0 20px;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.home-hero-copy > p {
    max-width: 680px;
    margin: 0;
    color: #475569;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.7;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.home-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 30px;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
}

.home-trust span::before {
    content: "✓";
    margin-right: 7px;
    color: var(--teal);
    font-weight: 800;
}

.how-it-works {
    padding: clamp(24px, 5vw, 64px) 0;
}

.how-it-works-header {
    max-width: 780px;
    margin: 0 auto 42px;
    text-align: center;
}

.how-it-works-header h1 {
    margin: 10px 0 16px;
    font-size: clamp(2.2rem, 6vw, 4.4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.how-it-works-header p,
.how-step p,
.how-privacy p,
.how-cta p {
    color: var(--muted);
    line-height: 1.7;
}

.how-it-works-header p {
    font-size: 1.12rem;
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.how-step {
    position: relative;
    padding: 30px;
    border: 1px solid #ccfbf1;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.how-step-number {
    position: absolute;
    top: 20px;
    right: 22px;
    color: #99f6e4;
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1;
}

.how-step-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 24px;
    border-radius: 17px;
    background: #ccfbf1;
    color: var(--teal);
}

.how-step-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.how-step h2 {
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 750;
}

.how-step p {
    margin: 0;
}

.how-privacy {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 40px;
    align-items: center;
    margin-top: 28px;
    padding: clamp(28px, 5vw, 52px);
    border-radius: 24px;
    background: linear-gradient(135deg, #ecfdf5, #ecfeff);
    border: 1px solid #a7f3d0;
}

.how-privacy h2 {
    margin: 8px 0 12px;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 800;
}

.how-privacy p {
    margin: 0;
}

.how-privacy-points {
    display: grid;
    gap: 12px;
}

.how-privacy-points span {
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    color: #134e4a;
    font-weight: 700;
}

.how-privacy-points span::before {
    content: "✓";
    margin-right: 9px;
    color: var(--teal);
}

.how-cta {
    max-width: 760px;
    margin: 52px auto 0;
    text-align: center;
}

.how-cta h2 {
    font-weight: 800;
}

.home-install-card {
    padding: 30px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(12px);
}

.home-brand-logo {
    display: block;
    width: 150px;
    height: 150px;
    margin: 0 auto 22px;
    object-fit: contain;
}

.home-install-card h2 {
    margin: 8px 0 10px;
    font-size: 1.7rem;
    line-height: 1.15;
}

.home-install-card > p {
    color: var(--muted);
    line-height: 1.6;
}

.home-setup-steps {
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.home-setup-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
}

.home-step-number {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-weight: 800;
    flex: 0 0 auto;
}

.home-setup-step strong,
.home-setup-step small {
    display: block;
}

.home-setup-step small {
    margin-top: 2px;
    color: var(--muted);
}

.home-setup-step.is-complete {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.home-setup-step.is-complete .home-step-number {
    background: var(--teal);
    color: transparent;
}

.home-setup-step.is-complete .home-step-number::after {
    content: "✓";
    color: #fff;
}

.home-install-status {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.home-install-status.is-ready {
    color: #047857;
    font-weight: 700;
}

.installed-page {
    max-width: 620px;
    margin: 7vh auto;
    padding: clamp(28px, 6vw, 54px);
    border: 1px solid #99f6e4;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    text-align: center;
}

.installed-check {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
}

.installed-page h1 {
    margin: 10px 0 14px;
}

.installed-page p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.installed-page small {
    display: block;
    margin-top: 14px;
    color: var(--muted);
}

.legal-document {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
}

.legal-document header {
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.legal-document header h1 {
    margin: 8px 0 10px;
}

.legal-document header p,
.legal-document section p {
    color: #475569;
    line-height: 1.75;
}

.legal-document section {
    padding-top: 24px;
}

.legal-document section h2 {
    font-size: 1.18rem;
}

.legal-document footer {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.metric span {
    color: var(--muted);
    display: block;
}

.metric strong {
    display: block;
    font-size: 32px;
}

.vehicle-card {
    height: 100%;
}

.qr-preview {
    width: 148px;
    height: 148px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 12px;
}

.public-contact {
    max-width: 600px;
    margin: 0 auto;
    padding: 32px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
}

.public-contact-header {
    text-align: center;
    margin-bottom: 24px;
}

.public-contact-header h1 {
    margin: 6px 0 8px;
    font-size: clamp(1.65rem, 5vw, 2.15rem);
    line-height: 1.15;
}

.public-contact-header p {
    margin: 0;
    color: var(--muted);
}

.public-eyebrow {
    color: var(--teal);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plate-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--soft);
}

.plate-box span {
    color: var(--muted);
    font-size: 0.9rem;
}

.plate-box strong {
    letter-spacing: 0.08em;
}

.vehicle-public-note {
    margin: -8px 0 20px;
    padding: 12px;
    border-left: 3px solid var(--teal);
    background: #f0fdfa;
    color: #115e59;
    border-radius: 0 8px 8px 0;
}

.quick-message-fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

.quick-message-fieldset legend {
    display: flex;
    align-items: center;
    gap: 8px;
    float: none;
    width: auto;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 700;
}

.section-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    color: var(--teal);
}

.section-icon svg,
.action-icon svg,
.button-icon,
.message-option-icon {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.public-call-action {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin-bottom: 18px;
    padding: 15px 16px;
    border: 1px solid #99f6e4;
    border-radius: 12px;
    background: #f0fdfa;
    color: #115e59;
    text-align: left;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.public-call-action:hover,
.public-call-action:focus {
    border-color: var(--teal);
    background: #ccfbf1;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.public-call-action .action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 10px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    flex: 0 0 auto;
}

.public-call-action strong,
.public-call-action small {
    display: block;
}

.public-call-action strong {
    font-size: 1rem;
}

.public-call-action small {
    margin-top: 2px;
    color: #477d78;
    font-size: 0.8rem;
}

.contact-choice-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.78rem;
}

.contact-choice-divider::before,
.contact-choice-divider::after {
    content: "";
    height: 1px;
    background: var(--line);
    flex: 1;
}

.contact-choice-divider span {
    white-space: nowrap;
}

.quick-message-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-message-option {
    cursor: pointer;
    position: relative;
}

.quick-message-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.quick-message-option > span {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 68px;
    height: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.25;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.quick-message-option > span > span {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    line-height: 1.35;
    text-align: left;
}

.message-option-icon {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    flex: 0 0 auto;
}

.quick-message-option input:checked + span .message-option-icon {
    color: var(--teal);
}

.quick-message-option input:checked + span {
    border-color: var(--teal);
    background: #f0fdfa;
    color: #115e59;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.quick-message-option input:focus-visible + span {
    outline: 3px solid rgba(15, 118, 110, 0.25);
    outline-offset: 2px;
}

.message-note {
    position: relative;
    margin-top: 18px;
}

.message-note label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
}

.message-note label span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 400;
}

.message-note textarea {
    resize: none;
    padding-right: 58px;
}

.message-note small {
    position: absolute;
    right: 10px;
    bottom: 8px;
    color: var(--muted);
    font-size: 0.75rem;
}

.public-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 18px;
    min-height: 52px;
    background: var(--teal);
    border-color: var(--teal);
    font-weight: 700;
}

.button-icon {
    width: 20px;
    height: 20px;
}

.public-primary-action:hover,
.public-primary-action:focus {
    background: #0b625c;
    border-color: #0b625c;
}

.public-privacy-note {
    margin-top: 10px;
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
}

.public-result:not(:empty) {
    margin-top: 20px;
}

.public-owner-cta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 14px;
    align-items: center;
    margin-top: 28px;
    padding: 18px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 55%, #ecfeff 100%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.public-owner-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #fff;
    color: var(--teal);
    box-shadow: 0 5px 16px rgba(15, 118, 110, 0.12);
}

.public-owner-cta-icon svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

.public-owner-cta-copy strong,
.public-owner-cta-copy span {
    display: block;
}

.public-owner-cta-copy strong {
    color: #0f172a;
    font-size: 0.98rem;
}

.public-owner-cta-copy span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.public-owner-cta-button {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 11px 15px;
    border-radius: 11px;
    background: #0f172a;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.015em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.public-owner-cta-button svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
    flex: 0 0 auto;
}

.public-owner-cta-button:hover,
.public-owner-cta-button:focus {
    background: var(--teal);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.2);
}

.live-events {
    min-height: 80px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 12px;
}

.call-screen {
    max-width: 640px;
    margin: 0 auto;
}

.call-state {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--muted);
    font-weight: 600;
}

.call-state.is-ringing,
.call-state.is-waiting {
    background: #fffbeb;
    color: #92400e;
}

.call-state.is-connected {
    background: #ecfdf5;
    color: #047857;
}

.call-state.is-error {
    background: #fef2f2;
    color: #b91c1c;
}

.call-state.is-ended {
    background: #f1f5f9;
    color: #475569;
}

.public-call-panel {
    padding: 24px 18px;
    border: 1px solid #99f6e4;
    border-radius: 16px;
    background: #f0fdfa;
    text-align: center;
}

.public-call-result {
    display: none;
    margin: -4px 0 18px;
}

.public-call-result.is-active {
    display: block;
}

.public-call-panel.is-preparing {
    opacity: 0.85;
}

.voice-recorder {
    margin-bottom: 18px;
}

.voice-record-start {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff7ed, #fff1f2);
    color: #9f1239;
    text-align: left;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.voice-record-start:hover,
.voice-record-start:focus {
    border-color: #fb7185;
    box-shadow: 0 8px 22px rgba(190, 24, 93, 0.12);
    transform: translateY(-1px);
}

.voice-record-start .action-icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    padding: 11px;
    border-radius: 50%;
    background: #e11d48;
    color: #fff;
    flex: 0 0 auto;
    box-shadow: 0 0 0 7px rgba(225, 29, 72, 0.1);
}

.voice-record-start .action-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.voice-record-start strong,
.voice-record-start small {
    display: block;
}

.voice-record-start small {
    margin-top: 3px;
    color: #9f5367;
    font-size: 0.8rem;
}

.voice-recording-panel,
.voice-preview-panel {
    padding: 18px;
    border: 1px solid #fecdd3;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(190, 24, 93, 0.09);
}

.voice-recording-head,
.voice-ready-badge,
.owner-voice-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-recording-head time {
    margin-left: auto;
    color: #be123c;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.voice-live-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #e11d48;
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.45);
    animation: voice-live-pulse 1.1s infinite;
}

@keyframes voice-live-pulse {
    70% { box-shadow: 0 0 0 9px rgba(225, 29, 72, 0); }
    100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

.voice-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 76px;
    margin: 10px 0 16px;
}

.voice-wave i {
    width: 4px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(#fb7185, #be123c);
    animation: voice-wave 0.8s ease-in-out infinite alternate;
}

.voice-wave i:nth-child(3n) { animation-delay: -0.2s; }
.voice-wave i:nth-child(4n) { animation-delay: -0.45s; }
.voice-wave i:nth-child(5n) { animation-delay: -0.65s; }

@keyframes voice-wave {
    from { height: 12px; opacity: 0.55; }
    to { height: 58px; opacity: 1; }
}

.voice-ready-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-size: 1.2rem;
    font-weight: 900;
}

.voice-ready-badge strong,
.voice-ready-badge small {
    display: block;
}

.voice-ready-badge small {
    color: var(--muted);
}

.voice-preview-panel audio,
.owner-voice-message audio {
    width: 100%;
    margin-top: 14px;
}

.voice-preview-actions {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 10px;
    margin-top: 14px;
}

.voice-retention-note,
.voice-auto-delete-note {
    margin-top: 9px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.4;
    text-align: center;
}

.voice-recorder-feedback:not(:empty) {
    margin-top: 12px;
}

.voice-recorder-feedback .alert {
    margin-bottom: 0;
}

.owner-voice-message {
    margin: 14px 0;
    padding: 15px;
    border: 1px solid #ddd6fe;
    border-radius: 14px;
    background: linear-gradient(135deg, #faf5ff, #f8fafc);
}

.owner-voice-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    padding: 10px;
    border-radius: 50%;
    background: #7c3aed;
    color: #fff;
}

.owner-voice-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.owner-voice-heading strong,
.owner-voice-heading small {
    display: block;
}

.owner-voice-heading small {
    color: var(--muted);
}

.voice-expiry-badge {
    margin-left: auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 0.72rem;
    font-weight: 700;
}

.owner-voice-expired {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    padding: 13px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
}

.owner-voice-expired > span {
    font-size: 1.3rem;
}

.owner-voice-expired strong,
.owner-voice-expired small {
    display: block;
}

.owner-voice-expired small {
    margin-top: 2px;
}

.public-call-panel h2 {
    margin: 14px 0 6px;
    font-size: 1.35rem;
}

.public-call-pulse {
    display: inline-block;
    width: 58px;
    height: 58px;
    border: 14px solid #ccfbf1;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.35);
    animation: public-call-ring 1.5s infinite;
}

@keyframes public-call-ring {
    70% {
        box-shadow: 0 0 0 18px rgba(15, 118, 110, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(15, 118, 110, 0);
    }
}

.message-status-card {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    padding: 18px;
}

.status-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.message-status-line {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 11px 0;
}

.message-status-line + .message-status-line {
    border-top: 1px solid #e5e7eb;
}

.message-status-line strong,
.owner-reply-bubble strong {
    display: block;
    color: #111827;
}

.message-status-line small,
.owner-reply-bubble span {
    display: block;
    color: #64748b;
}

.status-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.is-complete .status-dot {
    background: var(--teal);
}

.is-pending {
    opacity: 0.62;
}

.waiting-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--teal);
    animation: waiting-pulse 1.5s infinite;
}

@keyframes waiting-pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

.keep-open-note {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.88rem;
    text-align: center;
}

.response-next-actions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.response-next-actions > span {
    display: block;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.response-next-actions > div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.response-next-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    font-weight: 600;
}

.response-next-actions svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.public-reply-popup {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.78);
}

.public-reply-popup-card {
    width: min(460px, 100%);
    padding: 28px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
    text-align: center;
}

.public-reply-popup-card h2 {
    margin: 7px 0 18px;
    font-size: 1.55rem;
    font-weight: 800;
}

.public-reply-popup-message {
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid #99f6e4;
    border-radius: 14px;
    background: #f0fdfa;
    color: #134e4a;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.55;
}

.public-reply-popup-card .btn {
    min-width: 150px;
}

.owner-reply-bubble {
    margin-top: 12px;
    border-left: 4px solid #0f766e;
    background: #ecfdf5;
    border-radius: 8px;
    padding: 12px;
}

.callback-box {
    margin-top: 12px;
    border: 1px solid #bae6fd;
    background: #f0f9ff;
    border-radius: 8px;
    padding: 12px;
    color: #075985;
}

.owner-reply-select {
    max-width: 280px;
}

.page-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--teal);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-heading,
.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-heading h1,
.page-heading h1 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.2rem);
}

.dashboard-heading p,
.page-heading p {
    margin: 5px 0 0;
    color: var(--muted);
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.dashboard-metrics .metric {
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.dashboard-metrics .metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.dashboard-metrics .metric small {
    color: var(--teal);
}

.dashboard-metrics .metric-important {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: 20px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.section-heading h2,
.notification-panel h2 {
    margin: 0;
    font-size: 1.15rem;
}

.section-heading p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.section-heading a {
    color: var(--teal);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.recent-message-list {
    display: grid;
}

.recent-message {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    color: var(--ink);
    text-decoration: none;
    border-top: 1px solid #eef2f7;
}

.recent-message-state {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.recent-message-state.is-new {
    background: var(--teal);
}

.recent-message div {
    min-width: 0;
}

.recent-message div strong,
.recent-message div span {
    display: block;
}

.recent-message div span {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-message time {
    color: var(--muted);
    font-size: 0.78rem;
}

.notification-panel p {
    margin: 10px 0 16px;
    color: var(--muted);
}

.notification-panel small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: 28px;
    text-align: center;
}

.empty-state span {
    margin-top: 5px;
    color: var(--muted);
}

.message-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    padding: 4px;
    width: fit-content;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.message-filters a {
    padding: 8px 14px;
    border-radius: 7px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.message-filters a.active {
    background: var(--teal);
    color: #fff;
}

.message-feedback:empty {
    display: none;
}

.message-card-list {
    display: grid;
    gap: 12px;
}

.owner-message-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.owner-message-card.is-new {
    border-left: 4px solid var(--teal);
}

.owner-message-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.owner-message-card header time {
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.new-badge {
    margin-left: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #ccfbf1;
    color: #115e59;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.owner-message-text {
    margin: 12px 0 16px;
    color: #334155;
    font-size: 1.02rem;
    font-weight: 400;
}

.owner-message-text.is-waiting {
    color: #0f172a;
    font-weight: 700;
}

.owner-reply-controls {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) auto auto;
    gap: 8px;
}

.owner-reply-controls .owner-reply-select {
    max-width: none;
}

.sent-reply {
    padding: 11px 13px;
    border-radius: 8px;
    background: #f0fdfa;
    color: #115e59;
}

.sent-reply span,
.sent-reply strong {
    display: block;
}

.sent-reply span {
    font-size: 0.78rem;
}

.message-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.message-action-btn {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.message-action-btn:hover,
.message-action-btn:focus {
    color: var(--teal);
}

.message-action-btn.is-danger:hover,
.message-action-btn.is-danger:focus {
    color: #b91c1c;
}

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

.blocked-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.blocked-list-item strong,
.blocked-list-item span {
    display: block;
}

.blocked-list-item span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.82rem;
}

.incoming-message-notice {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1080;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(380px, calc(100vw - 24px));
    padding: 14px 16px;
    border: 1px solid #99f6e4;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    text-decoration: none;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.2s, transform 0.2s;
}

.incoming-message-notice.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.incoming-message-notice strong,
.incoming-message-notice small {
    display: block;
}

.incoming-message-notice small {
    overflow: hidden;
    margin-top: 2px;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.incoming-message-copy b {
    display: block;
    margin-top: 5px;
    color: var(--teal);
    font-size: 0.76rem;
}

.incoming-message-notice.is-urgent {
    border-width: 2px;
    animation: incoming-message-pulse 1.8s ease-in-out infinite;
}

@keyframes incoming-message-pulse {
    0%,
    100% {
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    }
    50% {
        box-shadow: 0 16px 46px rgba(15, 118, 110, 0.38);
    }
}

.incoming-message-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    padding: 9px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    flex: 0 0 auto;
}

.incoming-message-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.vehicle-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.vehicle-card-header span:first-child {
    color: var(--muted);
    font-size: 0.82rem;
}

.vehicle-card-header h2 {
    margin: 2px 0 0;
    font-size: 1.25rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill.is-active {
    background: #dcfce7;
    color: #166534;
}

.status-pill.is-passive {
    background: #f1f5f9;
    color: #64748b;
}

.vehicle-qr-area {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 10px;
    background: var(--soft);
}

.vehicle-qr-area .qr-preview {
    width: 104px;
    height: 104px;
    margin: 0;
    background: #fff;
}

.vehicle-qr-area strong,
.vehicle-qr-area span {
    display: block;
}

.vehicle-qr-area strong {
    margin-bottom: 7px;
}

.vehicle-actions,
.no-qr-state {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vehicle-actions form {
    display: inline-flex;
}

.vehicle-pdf-help {
    margin: 14px 0 0;
    color: #94a3b8;
    font-size: 0.82rem;
    line-height: 1.55;
}

.vehicle-pdf-help strong {
    color: #64748b;
}

.no-qr-state {
    align-items: center;
    padding: 14px;
    border: 1px dashed var(--line);
    border-radius: 10px;
}

.no-qr-state > span {
    flex-basis: 100%;
    color: var(--muted);
}

.form-panel {
    max-width: 680px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.form-actions {
    display: flex;
    gap: 8px;
}

.template-fields {
    display: grid;
    gap: 14px;
}

.settings-tabs {
    gap: 4px;
}

.settings-tabs .nav-link {
    color: #475569;
    font-weight: 700;
}

.settings-tabs .nav-link.active {
    color: var(--teal);
}

.settings-tab-content {
    padding-top: 26px;
}

.settings-section-heading {
    margin-bottom: 22px;
}

.settings-section-heading h2 {
    margin: 0;
    font-size: 1.35rem;
}

.settings-section-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

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

.membership-info-grid > div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
}

.membership-info-grid > div:last-child {
    grid-column: 1 / -1;
}

.membership-info-grid span,
.membership-info-grid small {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
}

.membership-info-grid strong {
    display: block;
    margin-top: 5px;
}

.membership-info-grid small {
    margin-top: 4px;
}

.membership-delete-zone {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fff7f7;
}

.membership-delete-zone h3 {
    margin: 0 0 8px;
    color: #b91c1c;
    font-size: 1.15rem;
}

.membership-delete-zone p {
    color: #64748b;
    line-height: 1.6;
}

.account-delete-confirm,
.account-delete-result {
    width: min(680px, 100%);
    margin: 40px auto;
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.08);
    text-align: center;
}

.account-delete-confirm h1,
.account-delete-result h1 {
    margin: 8px 0 14px;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 800;
}

.account-delete-confirm p,
.account-delete-result p {
    color: var(--muted);
    line-height: 1.7;
}

.account-delete-confirm form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.account-delete-icon {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-size: 2rem;
    font-weight: 800;
}

.print-size-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.print-size-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 310px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    text-align: center;
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.print-size-card:hover {
    transform: translateY(-3px);
    border-color: var(--teal);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
}

.print-size-card.is-recommended {
    border: 2px solid var(--teal);
}

.recommended-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #ccfbf1;
    color: #115e59;
    font-size: 0.7rem;
    font-weight: 700;
}

.print-size-card strong {
    margin-top: 17px;
    font-size: 1.1rem;
}

.print-size-card > span:not(.print-size-preview):not(.recommended-badge) {
    margin-top: 3px;
    color: var(--teal);
    font-weight: 600;
}

.print-size-card small {
    margin-top: 8px;
    color: var(--muted);
}

.print-size-preview {
    display: grid;
    width: 126px;
    height: 166px;
    gap: 5px;
    padding: 9px;
    border: 1px solid #cbd5e1;
    background: #fff;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.08);
}

.print-size-preview i {
    display: block;
    border: 1px dashed #94a3b8;
    background: linear-gradient(to bottom, var(--teal) 0 25%, #fff 25% 100%);
}

.print-size-preview.is-small {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
}

.print-size-preview.is-medium {
    grid-template-rows: 1fr 1fr;
}

.print-size-preview.is-large {
    grid-template-rows: 1fr;
}

.print-all-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid #99f6e4;
    border-radius: 12px;
    background: #f0fdfa;
}

.print-all-panel strong,
.print-all-panel span {
    display: block;
}

.print-all-panel span {
    margin-top: 3px;
    color: #477d78;
}

.print-help {
    margin-top: 18px;
}

.print-help h2 {
    font-size: 1.1rem;
}

.print-help ol {
    margin: 12px 0 0;
    padding-left: 20px;
    color: var(--muted);
}

.print-help li + li {
    margin-top: 5px;
}

@media (max-width: 576px) {
    body {
        background: var(--soft);
    }

    main.container {
        padding: 12px !important;
    }

    .hero-panel,
    .panel,
    .auth-box,
    .vehicle-card,
    .public-contact,
    .call-screen {
        padding: 18px;
    }

    .public-contact {
        min-height: calc(100vh - 80px);
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: none;
        padding: 24px 16px 32px;
    }

    .quick-message-options {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .quick-message-option > span {
        min-height: 54px;
    }

    .owner-reply-select {
        max-width: none;
        width: 100%;
    }

    .response-next-actions > div {
        grid-template-columns: 1fr 0.55fr;
    }

    .dashboard-heading,
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-heading .btn {
        width: 100%;
    }

    .dashboard-metrics,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-metrics {
        gap: 10px;
    }

    .dashboard-metrics .metric {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .dashboard-metrics .metric strong {
        grid-row: span 2;
    }

    .message-filters {
        width: 100%;
        overflow-x: auto;
    }

    .message-filters a {
        flex: 1;
        min-width: max-content;
        text-align: center;
    }

    .owner-message-card {
        padding: 15px;
    }

    .owner-reply-controls {
        grid-template-columns: 1fr 1fr;
    }

    .owner-reply-controls .owner-reply-select {
        grid-column: 1 / -1;
    }

    .vehicle-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-actions .btn,
    .vehicle-actions form,
    .vehicle-actions form .btn {
        width: 100%;
    }

    .form-panel {
        padding: 20px 18px;
        border: 1px solid var(--line);
        border-radius: 12px;
    }

    .form-actions {
        flex-direction: column;
    }

    .membership-info-grid {
        grid-template-columns: 1fr;
    }

    .membership-info-grid > div:last-child {
        grid-column: auto;
    }

    .account-delete-confirm form .btn {
        width: 100%;
    }

    .blocked-list-item {
        align-items: stretch;
        flex-direction: column;
    }

    .blocked-list-item .btn {
        width: 100%;
    }

    .print-size-grid {
        grid-template-columns: 1fr;
    }

    .print-size-card {
        min-height: 270px;
    }

    .print-all-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .incoming-message-notice {
        top: 10px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .incoming-message-notice.is-urgent {
        inset: 12px;
        flex-direction: column;
        justify-content: center;
        padding: 28px;
        border-radius: 20px;
        text-align: center;
    }

    .incoming-message-notice.is-urgent .incoming-message-icon {
        width: 72px;
        height: 72px;
        padding: 18px;
    }

    .incoming-message-notice.is-urgent strong {
        font-size: 1.25rem;
    }

    .incoming-message-notice.is-urgent small {
        margin-top: 10px;
        font-size: 1rem;
        line-height: 1.45;
        white-space: normal;
    }

    .incoming-message-notice.is-urgent .incoming-message-copy b {
        margin-top: 18px;
        font-size: 0.9rem;
    }

    .home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 30px 18px;
        border-radius: 18px;
    }

    .home-hero-copy h1 {
        font-size: clamp(2.25rem, 13vw, 3.4rem);
    }

    .home-actions,
    .home-actions .btn {
        width: 100%;
    }

    .how-steps,
    .how-privacy {
        grid-template-columns: 1fr;
    }

    .how-step {
        padding: 24px;
    }

    .how-privacy {
        gap: 24px;
        padding: 24px 20px;
        border-radius: 18px;
    }

    .home-install-card {
        padding: 22px 18px;
        border-radius: 18px;
    }
}

@media (min-width: 577px) and (max-width: 991px) {
    .home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 48px;
    }

    .home-install-card {
        max-width: 560px;
    }
}
