:root {
    --bg: #f5f6f8;
    --bg-deep: #eef2f6;
    --text: #0c0f14;
    --muted: #6b7280;
    --accent: #0a84ff;
    --accent-soft: rgba(10, 132, 255, 0.12);
    --card: rgba(255, 255, 255, 0.82);
    --border: #e3e7ec;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "SF Pro Display", "Avenir Next", "Helvetica Neue", "Noto Sans", sans-serif;
    color: var(--text);
    background: radial-gradient(1200px circle at top left, #f1f5ff 0%, var(--bg) 45%, #f7f8fb 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    z-index: -1;
}

body::before {
    top: -120px;
    right: -120px;
    background: #cfe4ff;
}

body::after {
    bottom: -160px;
    left: -120px;
    background: #dfe7f3;
}

a {
    text-decoration: none;
    color: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: var(--text);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    letter-spacing: 1px;
}

.brand-name {
    font-size: 18px;
    letter-spacing: 0.4px;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--text);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.primary-button:disabled,
.primary-button.disabled {
    opacity: 0.6;
    pointer-events: none;
    box-shadow: none;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}

.primary-button.full {
    width: 100%;
}

.button-loader {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: none;
    flex: 0 0 auto;
}

.button-loader.is-active {
    display: inline-block;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.secondary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.warning-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    background: #f97316;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
}

.warning-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.45);
}

.warning-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ghost-link {
    font-weight: 600;
    color: var(--text);
}

.muted {
    color: var(--muted);
}

.public-shell,
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 36px 56px 48px;
}

.public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 24px;
}

.public-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.public-main {
    flex: 1;
    display: flex;
    align-items: center;
}

.landing-page .public-main {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
}

.public-footer {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    padding-top: 32px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    align-items: start;
    width: 100%;
}

.hero.hero-simple {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
}

.hero.hero-simple .hero-card {
    max-width: 760px;
    width: 100%;
}

.hero-card {
    background: var(--card);
    border-radius: 28px;
    padding: 40px 44px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    animation: fadeUp 0.7s ease forwards;
}

.hero-card h1 {
    font-size: 38px;
    margin: 18px 0 16px;
    line-height: 1.1;
}

.hero-card p {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.6;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
}

.hero-actions {
    margin-top: 24px;
    display: flex;
    gap: 18px;
    align-items: center;
}

.hero-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeUp 0.7s ease forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.landing-hero .hero-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.landing-hero .hero-card p {
    margin: 0;
}

.hero-card .hero-lead {
    font-size: 17px;
    color: var(--text);
    margin: 0;
}

.hero-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.hero-list li {
    position: relative;
    padding-left: 18px;
    color: var(--muted);
}

.hero-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
}

.panel-item {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 20px 24px;
    border: 1px solid rgba(227, 231, 236, 0.7);
    backdrop-filter: blur(10px);
}

.panel-label {
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

.landing-section {
    margin-top: 48px;
    width: 100%;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.section-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.section-lead {
    margin: 0;
    color: var(--muted);
    max-width: 720px;
}

.landing-split {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 28px;
    align-items: start;
}

.landing-copy p {
    margin: 0 0 16px;
    color: var(--text);
    line-height: 1.6;
}

.landing-copy p.muted {
    color: var(--muted);
}

.steps-card {
    background: var(--card);
    border-radius: 22px;
    padding: 24px;
    border: 1px solid rgba(227, 231, 236, 0.8);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow);
}

.step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(227, 231, 236, 0.7);
}

.step h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.step p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: var(--text);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.video-card {
    background: var(--card);
    border-radius: 24px;
    padding: 16px;
    border: 1px solid rgba(227, 231, 236, 0.8);
    box-shadow: var(--shadow);
}

.video-card iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 18px;
    display: block;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.feature-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.feature-card h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

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

.faq-item {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 14px 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.cta-card {
    background: var(--card);
    border-radius: 26px;
    padding: 28px 32px;
    border: 1px solid rgba(227, 231, 236, 0.8);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cta-card h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.cta-card p {
    margin: 0;
    color: var(--muted);
}

.cta-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.auth-wrapper {
    width: 100%;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(420px, 100%);
    background: var(--card);
    border-radius: 26px;
    padding: 36px 40px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    animation: fadeUp 0.6s ease forwards;
}

.auth-card.wide {
    width: min(560px, 100%);
}

.form-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 24px;
}

.field,
.form-card > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-card label {
    font-size: 13px;
    font-weight: 600;
}

.form-card input {
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 12px 14px;
    font-size: 14px;
    background: #fff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-card input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-card input[aria-invalid="true"] {
    border-color: #d13438;
    box-shadow: 0 0 0 3px rgba(209, 52, 56, 0.18);
}

.form-card ul {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    color: #a61c2b;
    font-size: 12px;
}

.form-card li {
    margin-top: 4px;
}

.form-text {
    font-size: 12px;
    color: var(--muted);
}

.grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-footer {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 18px;
    font-size: 14px;
}

.alert {
    padding: 12px 16px;
    border-radius: 14px;
    background: #ffeef0;
    color: #a61c2b;
    font-size: 13px;
    margin-top: 16px;
}

.alert.success {
    background: #ecfdf3;
    color: #107d3f;
}

.settings {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-hero h1 {
    margin: 0 0 8px;
}

.settings-card {
    background: var(--card);
    border-radius: 24px;
    padding: 28px 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.superadmin-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.superadmin-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.superadmin-search input {
    min-width: 220px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.subscription-cell {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.carrosserie-name {
    font-weight: 600;
    color: var(--text);
}

.user-list {
    display: grid;
    gap: 8px;
}

.user-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border);
}

.user-pill-name {
    font-weight: 600;
    font-size: 13px;
}

.user-pill-email {
    font-size: 12px;
    color: var(--muted);
}

.tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tab-link {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 13px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.7);
}

.tab-link.active {
    color: var(--text);
    border-color: transparent;
    background: #fff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.warning {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff7ed;
    color: #b45309;
    font-size: 13px;
    margin: 12px 0 18px;
}

.warning.subtle {
    background: #f8fafc;
    color: var(--muted);
}

.form-note {
    margin-top: 12px;
    font-size: 12px;
}

.button-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.status-line {
    min-height: 18px;
    font-size: 12px;
    color: var(--muted);
}

.status-line.success {
    color: #107d3f;
}

.status-line.error {
    color: #a61c2b;
}

.section-kicker {
    margin: 6px 0 10px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

.section-kicker-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.section-kicker-action:hover {
    color: var(--text);
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 15, 20, 0.6);
    backdrop-filter: blur(3px);
}

.modal-card {
    position: relative;
    width: min(520px, 92vw);
    background: #fff;
    border-radius: 22px;
    padding: 22px 24px;
    box-shadow: var(--shadow);
}

.modal-card.modal-card-wide {
    width: min(880px, 94vw);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-header h3 {
    margin: 0;
    font-size: 19px;
}

.modal-body {
    margin-top: 12px;
    font-size: 15px;
    color: var(--text);
    line-height: 1.6;
}

.modal-body.modal-scroll {
    max-height: 70vh;
    overflow: auto;
    padding-right: 8px;
}

.modal-intro {
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 14px 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    margin-bottom: 20px;
}

.modal-lead {
    margin: 0 0 8px;
    font-weight: 600;
}

.modal-steps {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.modal-note {
    margin: 10px 0 0;
    font-size: 13px;
}

.modal-section {
    margin-bottom: 22px;
}

.modal-section + .modal-section {
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

.modal-section h4 {
    margin: 0 0 8px;
    font-size: 17px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-subsection {
    margin-top: 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 8px 12px 12px;
}

.modal-subsection summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text);
    font-weight: 600;
    padding: 6px 2px;
}

.modal-subsection summary::-webkit-details-marker {
    display: none;
}

.modal-subsection summary::after {
    content: '+';
    font-size: 16px;
    color: var(--muted);
}

.modal-subsection[open] summary::after {
    content: '–';
}

.modal-subsection-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.08);
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
}

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

.modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    margin-top: 8px;
    min-width: 520px;
}

.modal-table th,
.modal-table td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.4;
}

.modal-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    background: #f3f5f7;
}

.modal-table tbody tr:nth-child(even) {
    background: #f7f9fb;
}

.modal-table.compact td,
.modal-table.compact th {
    padding: 4px 6px;
}

.modal-body ol {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}

.modal-body .modal-steps {
    gap: 6px;
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.modal-actions.modal-actions-split {
    justify-content: space-between;
    gap: 16px;
}

.modal-actions-left,
.modal-actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-actions-left {
    flex: 1;
}

.icon-button {
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    color: var(--muted);
}

.modal-open {
    overflow: hidden;
}

.vehicles {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vehicule-delete {
    display: flex;
    justify-content: flex-end;
    margin-top: -12px;
}

.vehicles-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.vehicle-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.vehicle-card {
    background: var(--card);
    border-radius: 24px;
    padding: 24px 28px;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
    backdrop-filter: blur(14px);
}

.vehicle-card.missing {
    border-color: rgba(209, 52, 56, 0.4);
    background: #fff2f2;
}

.vehicle-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.vehicle-header h3 {
    margin: 0 0 8px;
}

.vehicle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
}

.vehicle-flag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(209, 52, 56, 0.12);
    color: #a61c2b;
    font-size: 12px;
    font-weight: 600;
}

.vehicle-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.table-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 170px;
    flex-wrap: nowrap;
}

.vehicle-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    margin-top: 18px;
}

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

.vehicle-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.vehicle-summary h4 {
    margin: 0 0 8px;
    font-size: 14px;
}

.vehicle-summary p {
    margin: 0 0 6px;
    font-size: 13px;
}

.vehicle-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.km-section h4,
.km-form h4 {
    margin: 0 0 8px;
    font-size: 14px;
}

.km-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.km-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.km-notes {
    color: var(--muted);
}

.service-section h4 {
    margin: 0 0 8px;
    font-size: 14px;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
}

.service-item {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: baseline;
}

.service-categories {
    width: 100%;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.service-categories h5 {
    margin: 0 0 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.category-group {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}

.category-group:last-child {
    margin-bottom: 0;
}

.category-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.category-list {
    margin: 0;
    padding-left: 16px;
    display: grid;
    gap: 4px;
    color: var(--muted);
}

.service-notes {
    color: var(--muted);
}

.form-card.compact {
    margin-top: 12px;
    gap: 12px;
}

.form-card.compact input {
    font-size: 13px;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    font-size: 13px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: none;
    vertical-align: top;
}

.data-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.data-table tbody tr {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.data-table tbody tr:hover {
    border-color: rgba(10, 132, 255, 0.3);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}

.data-table tbody tr td:first-child {
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.data-table tbody tr td:last-child {
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.data-table .status-cell {
    border-left: 4px solid transparent;
    padding-left: 12px;
}

.data-table tr.status-sent .status-cell {
    border-left-color: #16a34a;
}

.data-table tr.status-pending .status-cell {
    border-left-color: #f59e0b;
}

.data-table tr.status-failed .status-cell {
    border-left-color: #ef4444;
}

.data-table tr.status-missing .status-cell {
    border-left-color: #cbd5f5;
}

.data-table tr.status-deleted .status-cell {
    border-left-color: #94a3b8;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #f3f4f6;
    color: #0f172a;
}

.data-table tr.status-sent .status-pill {
    background: #dcfce7;
    color: #166534;
}

.data-table tr.status-pending .status-pill {
    background: #fffbeb;
    color: #b45309;
}

.data-table tr.status-failed .status-pill {
    background: #fee2e2;
    color: #b91c1c;
}

.data-table tr.status-missing .status-pill {
    background: #eef2ff;
    color: #3730a3;
}

.data-table tr.status-deleted .status-pill {
    background: #e2e8f0;
    color: #475569;
}

.status-detail {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

.status-detail.error {
    color: #b91c1c;
}

.table-actions .carpass-send {
    background: var(--text);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 12px 24px rgba(12, 15, 20, 0.2);
}

.table-actions .secondary-button,
.table-actions .warning-button {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
}

.table-actions .carpass-send:hover {
    box-shadow: 0 16px 32px rgba(12, 15, 20, 0.28);
}

.table-actions .warning-button {
    background: #fff7ed;
    color: #b45309;
    border: 1px solid #fed7aa;
    box-shadow: none;
}

.table-actions .warning-button:hover {
    box-shadow: none;
    background: #ffedd5;
}

.table-actions .warning-button:disabled,
.table-actions .warning-button.disabled {
    background: #f3f4f6;
    color: #94a3b8;
    border-color: #e2e8f0;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.pagination .page-info {
    font-size: 12px;
    color: var(--muted);
}

.secondary-button.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 24px;
}

.header-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 14px;
    padding: 6px 12px;
    font-size: 16px;
    gap: 6px;
    cursor: pointer;
    color: var(--text);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
    transition: background 0.2s ease;
}

.header-toggle:hover {
    background: rgba(255, 255, 255, 1);
}

.header-toggle-icon {
    font-size: 18px;
    display: inline-block;
}

.subscription-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid rgba(251, 113, 133, 0.4);
    margin-bottom: 16px;
    font-size: 14px;
}

.subscription-banner strong {
    font-weight: 700;
}

.superadmin-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 14px;
    background: #fff7ed;
    color: #b45309;
    font-size: 13px;
    border: 1px solid rgba(251, 191, 36, 0.4);
    margin-bottom: 18px;
}

.superadmin-banner strong {
    font-weight: 600;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-meta.is-open {
    display: flex;
}

@media (max-width: 768px) {
    .app-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .header-meta {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        display: none;
        padding: 12px 0;
        border-top: 1px solid rgba(15, 23, 42, 0.1);
    }

    .header-meta.is-open {
        display: flex;
    }

    .user-chip {
        align-items: flex-start;
        text-align: left;
    }

    .ghost-link {
        width: 100%;
        padding-left: 6px;
    }
}

.user-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 12px;
    color: var(--muted);
}

.user-name {
    color: var(--text);
    font-weight: 600;
}

.app-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
    flex: 1;
}

.app-main {
    background: var(--card);
    border-radius: 28px;
    padding: 36px 40px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    min-height: 520px;
    animation: fadeUp 0.6s ease forwards;
}

.app-aside {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.aside-desktop-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.aside-mobile-group {
    display: none;
}

.aside-card {
    background: rgba(255, 255, 255, 0.72);
    border-radius: 22px;
    padding: 22px 20px;
    border: 1px solid rgba(227, 231, 236, 0.8);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.aside-card.subtle {
    background: #f2f4f7;
}

.aside-link {
    display: block;
    margin-top: 12px;
    font-weight: 600;
    color: var(--text);
}

.aside-link.muted {
    color: var(--muted);
    font-weight: 500;
}

.app-footer {
    margin-top: 28px;
    font-size: 12px;
    color: var(--muted);
    display: grid;
    gap: 6px;
}

.dashboard-hero h1 {
    font-size: 32px;
    margin: 16px 0 10px;
}

.immatriculation-section {
    margin-top: 40px;
    display: grid;
    gap: 20px;
}

.dashboard-hero p {
    max-width: 560px;
    color: var(--muted);
}

.immatriculation-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

.immatriculation-card,
.analysis-result-card {
    flex: 1 1 320px;
}

.immatriculation-card {
    background: #fff;
    border-radius: 32px;
    padding: 28px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 22px;
}

.immatriculation-hero {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.immatriculation-icon {
    width: 56px;
    height: 56px;
    border-radius: 20px;
    background: rgba(10, 132, 255, 0.08);
    display: grid;
    place-items: center;
    font-size: 28px;
}

.immatriculation-title h2 {
    margin: 0;
    font-size: 24px;
}

.immatriculation-title p {
    margin: 6px 0 0;
    color: var(--muted);
    max-width: 400px;
}

.analysis-placeholder-card {
    flex: 1 1 320px;
    border-radius: 32px;
    padding: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
}

.analysis-result-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.status-timestamp {
    font-size: 13px;
    color: var(--muted);
}

.analysis-result-card p {
    margin: 6px 0;
    color: #0c0f14;
}

.analysis-result-card a {
    margin-top: 14px;
    display: inline-block;
    font-weight: 600;
}

.immatriculation-card,
.analysis-result {
    background: #fff;
    border-radius: 28px;
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.immatriculation-hero {
    display: flex;
    gap: 16px;
    align-items: center;
}

.immatriculation-icon {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: var(--accent-soft);
    display: grid;
    place-items: center;
    font-size: 30px;
}

.photo-upload-zone {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px dashed var(--border);
    cursor: pointer;
    transition: border 0.2s ease, background 0.2s ease;
    margin-top: 12px;
}

.photo-upload-zone input {
    display: none;
}

.photo-upload-zone:hover {
    border-color: var(--accent);
}

.photo-upload-zone strong {
    font-size: 16px;
}

.photo-upload-zone span {
    font-size: 14px;
    color: var(--muted);
}

.photo-preview {
    margin-top: 12px;
    min-height: 180px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--bg-deep);
    position: relative;
    overflow: hidden;
    display: none;
}

.photo-preview.is-visible {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    padding: 10px;
}

.photo-preview img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
}

.photo-preview span {
    color: var(--muted);
}

.uploader-actions {
    margin-top: 16px;
    display: flex;
    gap: 18px;
    align-items: center;
}

.loader {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 4px solid rgba(15, 23, 42, 0.1);
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
    display: none;
}

.loader.is-active {
    display: inline-block;
}

.analysis-message {
    min-height: 24px;
    font-size: 14px;
}

.analysis-message-hint {
    margin-left: 6px;
    color: #0a84ff;
    font-size: 12px;
    font-weight: 500;
}

.hidden {
    display: none !important;
}

.analysis-placeholder {
    margin-top: 32px;
    font-size: 14px;
    color: var(--muted);
}

.analysis-output {
    margin-top: 12px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    display: none;
    font-size: 14px;
    flex-direction: column;
    gap: 12px;
}

.analysis-output.is-visible {
    display: flex;
}

.analysis-output__title {
    margin: 0 0 8px;
    font-weight: 600;
}

.analysis-output span {
    font-weight: 600;
}

.analysis-output__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.analysis-output__field input {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    background: #f8fafc;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.analysis-output__field input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}

.analysis-output__field input::placeholder {
    color: var(--muted);
}

.analysis-output p {
    margin: 0 0 4px;
}

.analysis-cta {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.analysis-cta__button {
    align-self: flex-start;
}

.analysis-cta__button.flash {
    animation: pulse 1.4s ease-in-out infinite;
}

.analysis-cta__button.flash:disabled {
    animation: none;
    opacity: 0.6;
}

.analysis-cta__hint {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.analysis-cta__loader {
    align-self: center;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(10, 132, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(10, 132, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(10, 132, 255, 0);
    }
}

.analysis-message.success {
    color: #059669;
}

.analysis-message.error {
    color: #dc2626;
}

.analysis-result {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analysis-result__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.status-badge--success {
    background: rgba(16, 185, 129, 0.15);
    color: #16a34a;
}

.status-badge--error {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.status-badge--pending {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.analysis-result a {
    font-size: 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}

.pill-success {
    background: #dcfce7;
    color: #166534;
}

.pill-warning {
    background: #ffedd5;
    color: #9a3412;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .public-shell,
    .app-shell {
        padding: 28px;
    }

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

    .landing-split {
        grid-template-columns: 1fr;
    }

    .cta-card {
        align-items: flex-start;
    }

    .cta-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .superadmin-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .subscription-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .app-aside {
        order: 1;
    }

    .app-main {
        order: 2;
    }

    .app-main {
        padding: 24px 20px;
        border-radius: 22px;
        min-height: auto;
    }

    .dashboard-hero h1 {
        font-size: 28px;
        margin: 10px 0 8px;
        line-height: 1.15;
    }

    .dashboard-hero p {
        max-width: none;
        font-size: 15px;
        line-height: 1.55;
        margin: 0;
    }

    .immatriculation-section {
        margin-top: 22px;
        gap: 16px;
    }

    .immatriculation-card {
        border-radius: 24px;
        padding: 20px 16px;
        gap: 18px;
    }

    .immatriculation-hero {
        gap: 12px;
        align-items: flex-start;
    }

    .immatriculation-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 24px;
        flex: 0 0 auto;
    }

    .immatriculation-title h2 {
        font-size: 20px;
        line-height: 1.2;
    }

    .immatriculation-title p {
        margin-top: 6px;
        max-width: none;
        font-size: 14px;
        line-height: 1.5;
    }

    .photo-upload-zone {
        margin-top: 0;
        padding: 14px;
        border-radius: 14px;
        gap: 6px;
    }

    .photo-upload-zone strong {
        font-size: 15px;
    }

    .photo-upload-zone span {
        font-size: 13px;
        line-height: 1.45;
    }

    .photo-preview {
        min-height: 160px;
        border-radius: 14px;
    }

    .photo-preview.is-visible {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .photo-preview img {
        height: 250px;
    }

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

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

    .immatriculation-section {
        grid-template-columns: 1fr;
    }

    .uploader-actions {
        margin-top: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .loader {
        margin: 0 auto;
    }

    .status[data-upload-status] {
        margin: 0;
        font-size: 13px;
        line-height: 1.45;
    }

    .analysis-message {
        min-height: 0;
        margin: 0;
        font-size: 13px;
        line-height: 1.45;
    }

    .analysis-output {
        margin-top: 0;
        padding-top: 14px;
        gap: 10px;
    }

    .analysis-output__title {
        margin-bottom: 2px;
        font-size: 15px;
    }

    .analysis-output__field span {
        font-size: 12px;
        letter-spacing: 0.2px;
    }

    .analysis-output__field input {
        padding: 11px 12px;
        font-size: 15px;
        border-radius: 10px;
    }

    .analysis-cta {
        margin-top: 12px;
        gap: 8px;
    }

    .analysis-cta__button {
        width: 100%;
        min-height: 46px;
        border-radius: 14px;
        font-size: 15px;
    }

    .analysis-cta__hint {
        font-size: 12px;
        line-height: 1.45;
    }

    .aside-desktop-group {
        display: none;
    }

    .aside-mobile-group {
        display: grid;
        gap: 10px;
    }

    .aside-mobile-card {
        border-radius: 14px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
        overflow: hidden;
    }

    .aside-mobile-card summary {
        list-style: none;
        cursor: pointer;
        padding: 12px 14px;
        font-weight: 700;
        font-size: 13px;
        letter-spacing: 0.6px;
        text-transform: uppercase;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #f8fafc;
    }

    .aside-mobile-card summary::-webkit-details-marker {
        display: none;
    }

    .aside-mobile-card summary::after {
        content: '+';
        font-size: 17px;
        color: var(--muted);
    }

    .aside-mobile-card[open] summary::after {
        content: '-';
    }

    .aside-mobile-card__content {
        padding: 10px 14px 14px;
    }

    .aside-mobile-card .aside-link {
        margin-top: 10px;
    }

    .aside-mobile-card p {
        margin: 0;
        font-size: 13px;
        color: var(--muted);
    }

    .app-footer {
        margin-top: 18px;
        padding-top: 6px;
        gap: 8px;
        font-size: 11px;
        line-height: 1.45;
    }

    .app-footer span {
        max-width: 100%;
        word-break: break-word;
    }

    .carpass-table {
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    .carpass-table thead {
        display: none;
    }

    .carpass-table tbody {
        display: block;
    }

    .carpass-table tbody tr {
        display: block;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
        margin-bottom: 10px;
        padding: 12px;
        overflow: hidden;
    }

    .carpass-table tbody tr td {
        display: block;
        padding: 7px 0;
        border: none;
        border-radius: 0;
        background: transparent;
        font-size: 13px;
        min-height: 0;
    }

    .carpass-table tbody tr td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--muted);
        font-weight: 700;
    }

    .carpass-table tbody tr td > * {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .carpass-table tbody tr td:not([data-label="Statut"]):not([data-label="Action"]) {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .carpass-table .status-cell {
        border-left: none;
        padding-left: 0;
    }

    .carpass-table .status-pill {
        width: 100%;
        min-height: 30px;
    }

    .carpass-table .status-detail {
        margin-top: 8px;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .carpass-table .table-actions {
        width: 100%;
        display: grid;
        gap: 8px;
    }

    .carpass-table .table-actions .secondary-button,
    .carpass-table .table-actions .warning-button {
        width: 100%;
        min-height: 42px;
        border-radius: 12px;
        white-space: normal;
        text-align: center;
        line-height: 1.25;
        padding-inline: 12px;
    }
}

@media (max-width: 640px) {
    [data-carpass-modal] {
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px;
    }

    [data-carpass-modal] .modal-card {
        width: min(520px, calc(100vw - 24px));
        max-height: calc(100dvh - 24px);
        overflow: auto;
        margin: 0;
    }

    [data-carpass-modal] .modal-actions {
        justify-content: stretch;
        gap: 8px;
    }

    [data-carpass-modal] .modal-actions .secondary-button,
    [data-carpass-modal] .modal-actions .primary-button {
        flex: 1 1 0;
        min-height: 42px;
    }

    .app-shell,
    .public-shell {
        padding: 14px 12px 22px;
    }

    .app-header {
        padding: 8px 0 12px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 11px;
        font-size: 12px;
    }

    .brand-name {
        font-size: 16px;
    }

    .header-toggle {
        padding: 7px 10px;
        border-radius: 10px;
    }

    .header-meta {
        padding: 10px 0 2px;
        gap: 9px;
    }

    .user-chip {
        gap: 2px;
    }

    .subscription-banner,
    .superadmin-banner {
        margin-bottom: 12px;
        padding: 10px 12px;
        border-radius: 12px;
        font-size: 12px;
    }

    .dashboard-hero h1 {
        font-size: 25px;
    }

    .immatriculation-title h2 {
        font-size: 19px;
    }

    .photo-preview img {
        height: 220px;
    }
}
