﻿:root {
    --bg: #f3f5fb;
    --ink: #13213a;
    --muted: #6b7894;
    --muted-strong: #4b5a78;
    --brand: #5b67f0;
    --brand-deep: #4956da;
    --danger: #dc2626;
    --line: #dbe3f1;
    --panel: #ffffff;
    --shadow: 0 18px 36px rgba(19, 33, 58, 0.08);
}

* { box-sizing: border-box; }

html,
body {
    max-width: 100%;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--ink);
    background: var(--bg);
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(1200px 500px at -10% -10%, rgba(13, 148, 136, 0.3), transparent 65%),
        radial-gradient(1200px 500px at 110% 110%, rgba(59, 130, 246, 0.2), transparent 60%),
        linear-gradient(135deg, #f5f9ff 0%, #eef6f3 100%);
    display: grid;
    place-items: center;
    padding: 1.5rem;
    min-width: 0;
}

.login-shell {
    width: min(1050px, 100%);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: var(--panel);
    border-radius: 24px;
    min-width: 0;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.brand-panel,
.login-panel { padding: 2.2rem; }

.brand-panel {
    background: linear-gradient(145deg, #0f766e, #164e63);
    color: #e6fffb;
}

.brand-panel h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin: 0.3rem 0 0.8rem;
    }

.brand-panel ul {
    margin-top: 1.2rem;
    padding-left: 1.2rem;
    line-height: 1.8;
}

.kicker {
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.73rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
}

.login-panel h2 { margin-top: 0; margin-bottom: 0.4rem; }
.helper { margin-top: 0; color: var(--muted); }

.login-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.3rem;
}

.login-form label {
    display: grid;
    gap: 0.45rem;
    font-size: 0.94rem;
    font-weight: 500;
}

input, select, button { font: inherit; }

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    background: #fff;
}

textarea {
    resize: vertical;
}

button {
    border: 0;
    margin-bottom: 5px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    padding: 0.7rem 1rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

button:hover { background: var(--brand-deep); }

button:focus,
button:active,
.btn-ghost:focus,
.btn-ghost:active,
.nav-item:focus,
.topbar-view-btn:focus,
.refresh-icon-btn:focus {
    outline: none;
    box-shadow: none;
}

button:focus:not(:focus-visible),
.btn-ghost:focus:not(:focus-visible),
.nav-item:focus:not(:focus-visible),
.topbar-view-btn:focus:not(:focus-visible),
.refresh-icon-btn:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.error-msg {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #7f1d1d;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
}

.demo-accounts {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: 1rem;
}

/* APP LAYOUT */
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px 1fr;
    background: linear-gradient(180deg, #f7f8fd 0%, #f2f4fb 100%);
}

.sidebar {
    border-right: 1px solid #e6ebf5;
    background: #ffffff;
    padding: 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.sidebar-brand h1 {
    margin: 0;
    font-size: 1.55rem;
    letter-spacing: 0.01em;
}

.sidebar-brand p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.sidebar-nav {
    display: grid;
    gap: 0.32rem;
}

.nav-item {
    text-align: left;
    background: transparent;
    color: #4f5d79;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.62rem 0.72rem;
    font-weight: 600;
}

.nav-item.active {
    border-color: #dbe4ff;
    background: linear-gradient(90deg, #eef2ff 0%, #f4f6ff 100%);
    color: #4356cb;
    font-weight: 700;
    box-shadow: inset 3px 0 0 #5b67f0;
}

.nav-item:hover {
    border-color: #e2e9fb;
    background: #f6f8ff;
    color: #4356cb;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid #e9eef7;
    padding-top: 0.9rem;
    color: #6b7894;
    font-size: 0.88rem;
}

.main-content {
    padding: 1rem 1.25rem 1.4rem;
    min-width: 0;
}

.topbar h2 {
    margin: 0.05rem 0 0;
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    letter-spacing: -0.01em;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    margin-bottom: 0.95rem;
    padding: 0.85rem 0.95rem;
    background: #ffffff;
    border: 1px solid #e0e8f5;
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(19, 33, 58, 0.05);
}

.topbar-views {
    display: inline-flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    min-width: 0;
}

.topbar-view-btn.active {
    border-color: #d7e0ff;
    background: linear-gradient(180deg, #e8edff 0%, #f0f3ff 100%);
    color: #3749be;
    font-weight: 700;
}

.topbar .kicker { color: #4f62d4; }

.sidebar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0.55rem;
    border: 1px solid #d7e3f3;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    flex-direction: column;
    justify-content: center;
    gap: 0.24rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.sidebar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: #1f2937;
    transform-origin: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

body.sidebar-open .sidebar-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

body.sidebar-open .sidebar-toggle span:nth-child(2) {
    opacity: 0;
}

body.sidebar-open .sidebar-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.sidebar-overlay {
    display: none;
}

.panel {
    background: #ffffff;
    border: 1px solid #dfe7f3;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(19, 33, 58, 0.06);
    padding: 1rem;
    margin-bottom: 1rem;
    min-width: 0;
    overflow-x: clip;
}

.panel h3,
.panel h4 {
    color: #0d1a33;
}

.panel .helper,
.panel .muted {
    color: var(--muted-strong);
}

.view { display: none; }
.view.active { display: block; }

.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 0.8rem;
}

.stats-cards.stats-cards-top {
    grid-template-columns: minmax(220px, 320px);
}

.stats-cards.stats-cards-bottom {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.overview-bottom-indicators {
    margin-top: 1rem;
}

.stats-cards article {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    padding: 0.95rem 0.95rem 1rem;
    background: #ffffff;
    border: 1px solid #dfe7f3;
    box-shadow: 0 8px 18px rgba(19, 33, 58, 0.05);
}

.stats-cards article::after {
    content: '';
    position: absolute;
    top: 0.8rem;
    right: 0.75rem;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(91, 103, 240, 0.18);
    background: radial-gradient(circle at 30% 30%, rgba(91, 103, 240, 0.26), rgba(91, 103, 240, 0.08));
}

.stats-cards article:nth-child(2)::after {
    border-color: rgba(16, 185, 129, 0.2);
    background: radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.24), rgba(16, 185, 129, 0.08));
}

.stats-cards article:nth-child(3)::after {
    border-color: rgba(244, 114, 182, 0.2);
    background: radial-gradient(circle at 30% 30%, rgba(244, 114, 182, 0.24), rgba(244, 114, 182, 0.08));
}

.stats-cards article:nth-child(4)::after {
    border-color: rgba(14, 165, 233, 0.2);
    background: radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.24), rgba(14, 165, 233, 0.08));
}

.stats-cards p {
    margin: 0;
    color: #60708f;
    font-size: 0.84rem;
    font-weight: 600;
}

.stats-cards strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 2rem;
    color: #1d2f4f;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.panel-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.view[data-view="interventions"] .panel-head-actions {
    max-width: 100%;
}

.view[data-view="interventions"] .panel-head-actions .btn-ghost {
    min-width: 0;
}

.inline-form {
    margin: 0.9rem 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr auto;
    gap: 0.6rem;
    min-width: 0;
}

.type-form {
    grid-template-columns: 1.15fr 0.95fr 0.95fr 1.2fr auto;
}

.intervention-form {
    grid-template-columns: 1fr 1fr 1fr 1.4fr auto auto;
}

.view[data-view="interventions"] .intervention-form {
    align-items: center;
}

.view[data-view="interventions"] .intervention-form input,
.view[data-view="interventions"] .intervention-form select {
    min-width: 0;
}

.view[data-view="interventions"] .intervention-actions {
    grid-template-columns: minmax(140px, 1fr) auto auto;
    align-items: center;
}

.view[data-view="interventions"] .intervention-actions button {
    white-space: nowrap;
}

.provider-form {
    grid-template-columns: 1fr 1fr 1fr 1.25fr auto;
}

.asset-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    padding: 0.8rem;
    border: 1px solid #d7e2ef;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f9ff 100%);
}

.asset-field {
    display: grid;
    gap: 0.36rem;
    min-width: 0;
}

.asset-field > span {
    font-size: 0.82rem;
    font-weight: 700;
    color: #2f4568;
}

.asset-form-actions {
    display: flex;
    align-items: flex-end;
}

.asset-form-feedback {
    grid-column: 1 / -1;
    margin: 0;
    min-height: 1.2rem;
}

.asset-create-form input[type="file"],
.asset-edit-form input[type="file"] {
    border: 1px dashed #bfcfe6;
    background: #f9fbff;
}

.asset-edit-form {
    gap: 0.62rem;
}

.asset-edit-form label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #2f4568;
}

.asset-documents-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.35rem;
}

.asset-documents-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.asset-documents-list a {
    color: #1f4aa8;
    font-weight: 600;
    text-decoration: none;
}

.asset-documents-list a:hover {
    text-decoration: underline;
}

.asset-doc-delete-btn {
    padding: 0.2rem 0.45rem;
    font-size: 0.72rem;
    border-radius: 8px;
    margin: 0;
    line-height: 1.2;
}

.asset-documents-existing {
    border: 1px solid #dfe8f5;
    border-radius: 10px;
    background: #fbfdff;
    padding: 0.45rem;
}

.intervention-doc-pictos {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.intervention-doc-picto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid #d9e6f4;
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    font-size: 0.95rem;
}

.intervention-doc-thumb-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #d9e6f4;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    text-decoration: none;
}

.intervention-doc-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.intervention-doc-picto:hover {
    border-color: #b8cbe6;
    background: #f4f9ff;
}

.intervention-doc-thumb-link:hover {
    border-color: #b8cbe6;
    background: #f4f9ff;
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.86rem;
    color: var(--muted);
}

.inline-check input {
    width: auto;
}

.intervention-date-kind {
    margin-top: 0.2rem;
    font-size: 0.74rem;
    line-height: 1.25;
}

.intervention-programme-date {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.intervention-programme-date > span {
    font-size: 0.82rem;
    font-weight: 700;
    color: #2f4568;
}

.intervention-programme-date input {
    min-width: 0;
}

#interventionTypePeriodMonths:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.subpanel {
    margin-top: 1rem;
    border-top: 1px solid #edf1f8;
    padding-top: 0.9rem;
}

.subpanel h4 {
    margin: 0 0 0.6rem;
}

.view[data-view="interventions"].active {
    display: grid;
    gap: 1rem;
}

.view[data-view="interventions"] > .panel-head {
    margin-bottom: -0.15rem;
}

.view[data-view="interventions"] .intervention-section {
    margin-top: 0;
    border-top: 0;
    padding: 0.95rem;
    border: 1px solid #d7e2ef;
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f9ff 100%);
    min-width: 0;
    max-width: 100%;
}

.view[data-view="interventions"] .intervention-section + .intervention-section {
    margin-top: 0.4rem;
}

.view[data-view="interventions"] .intervention-section h4 {
    margin: 0 0 0.7rem;
    font-size: 1rem;
    color: #0f2948;
}

.view[data-view="interventions"] .intervention-section .panel-head {
    margin-bottom: 0.6rem;
}

.view[data-view="interventions"] .intervention-types-section {
    border-left: 4px solid #0d9488;
}

.view[data-view="interventions"] .intervention-create-section {
    border-left: 4px solid #3b82f6;
}

.view[data-view="interventions"] .intervention-list-section {
    border-left: 4px solid #64748b;
}

.view[data-view="interventions"] .intervention-closed-section {
    border-left: 4px solid #065f46;
}

.view[data-view="interventions"] .intervention-list-section .table-responsive {
    margin-top: 0.1rem;
    background: #ffffff;
    border-color: #cfdceb;
}

.view[data-view="interventions"] .intervention-types-section .inline-form,
.view[data-view="interventions"] .intervention-create-section .inline-form {
    margin-top: 0.4rem;
    margin-bottom: 0;
}

.calendar-toolbar {
    margin-left: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    width: min(100%, 460px);
}

.calendar-toolbar .btn-ghost {
    width: 100%;
    white-space: nowrap;
    border-color: #b9d3ea;
    background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
    color: #123356;
    font-weight: 600;
}

.calendar-toolbar .btn-ghost:hover {
    border-color: #7bb5e8;
    background: linear-gradient(180deg, #f9fcff 0%, #e3f0ff 100%);
}

.calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 1rem;
    align-items: start;
    min-width: 0;
}

.calendar-main {
    min-width: 0;
    border: 1px solid #d8e6f5;
    border-radius: 14px;
    padding: 0.85rem;
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(59, 130, 246, 0.1), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 24px rgba(15, 23, 42, 0.06);
}

.calendar-side {
    min-width: 0;
    border: 1px solid #d5e2f1;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
    padding: 0.75rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.calendar-side-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.45rem;
}

.calendar-side-head h4 {
    margin: 0;
    font-size: 0.97rem;
    color: #102a43;
}

.calendar-month-list {
    max-height: 540px;
    overflow-y: auto;
    padding-right: 0.25rem;
    display: grid;
    gap: 0.5rem;
}

.calendar-month-item {
    border: 1px solid #d9e6f4;
    border-radius: 12px;
    padding: 0.62rem;
    background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.04);
}

.calendar-month-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.calendar-month-item-head strong {
    font-size: 0.88rem;
}

.calendar-month-item p {
    margin: 0.18rem 0;
    font-size: 0.84rem;
    color: #2f3f55;
}

.calendar-month-item-asset {
    margin-top: 0.3rem;
}

.calendar-month-item-asset-name {
    display: inline-block;
    font-size: 1.03rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.calendar-month-item-asset-name.status.pending {
    color: #7c2d12;
}

.calendar-month-item-asset-name.status.scheduled {
    color: #0f766e;
}

.calendar-month-item-asset-name.status.waiting_parts {
    color: #92400e;
}

.calendar-month-item-asset-name.status.in_progress {
    color: #1e3a8a;
}

.calendar-month-item-asset-name.status.completed,
.calendar-month-item-asset-name.status.active {
    color: #065f46;
}

.calendar-month-item-asset-name.status.cancelled,
.calendar-month-item-asset-name.status.inactive {
    color: #7f1d1d;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.45rem;
    margin-bottom: 0.45rem;
}

.calendar-weekdays span {
    font-size: 0.76rem;
    color: #2a4f77;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.45rem;
}

.calendar-day {
    min-height: 80px;
    border: 1px solid #d6e4f2;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    padding: 0.45rem;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0.35rem;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.calendar-day.has-items {
    cursor: pointer;
}

.calendar-day.has-items:hover {
    border-color: #6fb6e6;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.calendar-day.other-month {
    opacity: 0.6;
    background: linear-gradient(180deg, #fbfdff 0%, #f1f6fb 100%);
}

.calendar-day.today {
    border-color: #0ea5e9;
    box-shadow: inset 0 0 0 1px #7dd3fc, 0 0 0 3px rgba(14, 165, 233, 0.13);
}

.calendar-day.selected {
    border-color: #2563eb;
    box-shadow: inset 0 0 0 1px #2563eb, 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.calendar-day-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;
}

.calendar-day-head strong {
    font-size: 0.9rem;
    color: #0f2948;
}

.calendar-day-statuses {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    max-width: 100%;
}

.calendar-day-status-row {
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
}

.calendar-day-status-row .calendar-dot {
    width: 7px;
    height: 7px;
}

.calendar-count {
    font-size: 0.72rem;
    border-radius: 999px;
    padding: 0.12rem 0.42rem;
    background: linear-gradient(180deg, #eef6ff 0%, #dcecff 100%);
    color: #1e3a8a;
    font-weight: 700;
    border: 1px solid #bfd8f6;
}

.calendar-count.pending {
    background: #ffedd5;
    color: #7c2d12;
    border-color: #f6c89a;
}

.calendar-count.scheduled {
    background: #ccfbf1;
    color: #0f766e;
    border-color: #99f6e4;
}

.calendar-count.in_progress {
    background: #dbeafe;
    color: #1e3a8a;
    border-color: #bfdbfe;
}

.calendar-count.waiting_parts {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.calendar-count.completed {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.calendar-count.cancelled {
    background: #fee2e2;
    color: #7f1d1d;
    border-color: #fecaca;
}

.calendar-count.mixed {
    background: linear-gradient(90deg, var(--calendar-count-color-a) 0 50%, var(--calendar-count-color-b) 50% 100%);
    color: var(--calendar-count-text, #1e3a8a);
    border-color: var(--calendar-count-border, #bfd8f6);
}

.calendar-dot,
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}

.calendar-dot.pending,
.status-dot.pending { background: #f59e0b; }
.calendar-dot.scheduled,
.status-dot.scheduled { background: #0d9488; }
.calendar-dot.in_progress,
.status-dot.in_progress { background: #3b82f6; }
.calendar-dot.waiting_parts,
.status-dot.waiting_parts { background: #d97706; }
.calendar-dot.completed,
.status-dot.completed { background: #10b981; }
.calendar-dot.cancelled,
.status-dot.cancelled { background: #ef4444; }

.calendar-more {
    font-size: 0.72rem;
    color: #35506f;
    font-weight: 600;
}

.calendar-legend {
    margin-top: 0.7rem;
    display: flex;
    gap: 0.55rem 0.85rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #3b4f67;
}

.calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    border: 1px solid #d8e4f2;
    background: #f8fbff;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
}

.calendar-day-list {
    display: grid;
    gap: 0.6rem;
    max-height: min(58vh, 520px);
    overflow: auto;
    padding-right: 0.2rem;
}

.calendar-day-filter-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 0 0.55rem;
}

.calendar-day-filter-row label {
    font-size: 0.86rem;
    color: var(--muted);
}

.calendar-day-filter-row select {
    width: auto;
    min-width: 160px;
    padding: 0.5rem 0.7rem;
}

.calendar-day-item {
    border: 1px solid #d7e4f2;
    border-radius: 12px;
    padding: 0.68rem;
    background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
}

.calendar-day-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.calendar-day-item h5 {
    margin: 0;
    font-size: 0.94rem;
}

.calendar-day-item p {
    margin: 0.2rem 0;
    font-size: 0.86rem;
    color: #2f3f55;
}

.calendar-day-item-actions {
    margin-top: 0.55rem;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #d7e2ef;
    border-radius: 12px;
    background: #fdfefe;
    min-width: 0;
}

.table-responsive table {
    margin: 0;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.table-responsive.table-mid table {
    min-width: 0;
}

.table-responsive.table-wide table {
    min-width: 1080px;
    table-layout: auto;
}

.view[data-view="interventions"] .intervention-list-section .table-responsive.table-wide table {
    min-width: 0;
    table-layout: fixed;
}

.view[data-view="interventions"] .intervention-list-section th:first-child,
.view[data-view="interventions"] .intervention-list-section td:first-child {
    width: 9.5rem;
    white-space: nowrap;
}

th, td {
    text-align: left;
    padding: 0.7rem 0.4rem;
    border-bottom: 1px solid #e3ebf5;
    font-size: 0.92rem;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chip {
    border-radius: 999px;
    background: #e8f2ff;
    color: #1e3a8a;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.status {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
}

.status.pending { color: #7c2d12; background: #ffedd5; }
.status.scheduled { color: #0f766e; background: #ccfbf1; }
.status.waiting_parts { color: #92400e; background: #fef3c7; }
.status.in_progress { color: #1e3a8a; background: #dbeafe; }
.status.completed { color: #065f46; background: #d1fae5; }
.status.cancelled { color: #7f1d1d; background: #fee2e2; }
.status.active { color: #065f46; background: #d1fae5; }
.status.inactive { color: #7f1d1d; background: #fee2e2; }

.row-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.row-actions .danger { background: var(--danger); }

.panel-title-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.refresh-icon-btn {
    border: 0;
    background: transparent;
    color: #334ec7;
.view[data-view="interventions"] .intervention-closed-section .table-responsive.table-wide table {
    min-width: 0;
    table-layout: fixed;
}
    font-size: 1.48rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.08rem;
    line-height: 1;
.view[data-view="interventions"] .intervention-closed-section th:first-child,
.view[data-view="interventions"] .intervention-closed-section td:first-child {
    width: 9.5rem;
    white-space: nowrap;
}
}

.refresh-icon-btn:hover {
    color: #263fb2;
}
.view[data-view="interventions"] .intervention-closed-section .table-responsive {
    margin-top: 0.1rem;
    background: #ffffff;
    border-color: #cfdceb;
}

.asset-status-row {
    display: inline-flex;
    align-items: center;
    .view[data-view="interventions"] .intervention-closed-section .table-responsive {
        max-width: 100%;
        overflow-x: auto;
    }
    gap: 0.4rem;
}

.status-toggle-btn {
    .view[data-view="interventions"] .intervention-closed-section .table-responsive {
        max-width: 100%;
        overflow-x: auto;
    }
    border-radius: 8px;
    border: 1px solid #cbd9ef;
    background: #f7faff;
.view[data-view="interventions"] .intervention-closed-section .table-cards {
        overflow-x: visible;
    }
    color: #334ec7;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.34rem 0.52rem;
    margin: 0.18rem 0;
}

.asset-action-main {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.provider-action-main {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-block: 0.3rem;
}

.provider-action-main button {
    margin-block: 0.15rem;
}

/* ---- Assets section emphasis ---- */
.view[data-view="assets"] {
    border: 1px solid #ccd9ee;
    box-shadow: 0 14px 28px rgba(20, 37, 68, 0.08);
}

.view[data-view="assets"] .panel-head {
    border-bottom: 1px solid #e3ebf7;
    padding-bottom: 0.55rem;
    margin-bottom: 0.3rem;
}

.view[data-view="assets"] .panel-head-actions button,
.view[data-view="assets"] .row-actions button,
.view[data-view="assets"] .asset-action-main button {
    margin-top: 0.18rem;
    margin-bottom: 0.18rem;
}

/* ---- Asset form mobile toggle ---- */
#toggleAssetFormBtn {
    display: none; /* hidden on desktop, shown on mobile via breakpoint */
}

/* ---- Asset accordion button: hidden on desktop ---- */
.asset-accordion-btn {
    display: none;
}

/* ---- Provider/intervention accordion buttons: hidden on desktop ---- */
.provider-accordion-btn,
.intervention-accordion-btn,
#toggleProviderFormBtn,
#toggleInterventionFormBtn {
    display: none;
}

.qr-cell {
    display: grid;
    gap: 0.35rem;
    align-items: start;
}

.qr-thumb {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    border: 1px solid #e2e8f5;
    background: #fff;
}

.qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.intervention-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
}

.intervention-status-group {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
}

.intervention-complete-group {
    border-top: 1px dashed #dce7f5;
    padding-top: 0.45rem;
}

.intervention-complete-group button {
    width: 100%;
}

.muted { color: var(--muted); font-size: 0.85rem; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2d4264;
    text-decoration: none;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
    border: 1px solid #d8e2f3;
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
    font-weight: 600;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn-ghost:hover {
    border-color: #b8c9ee;
    background: linear-gradient(180deg, #f9fbff 0%, #edf3ff 100%);
    color: #334ec7;
}

@media (min-width: 769px) {
    .asset-accordion-btn,
    .provider-accordion-btn,
    .intervention-accordion-btn {
        display: none;
    }
}

/* Role-based visibility */
body[data-role="prestataire"] .role-admin,
body[data-role="prestataire"] .role-entreprise {
    display: none;
}

.public-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 10%, rgba(13, 148, 136, 0.16), transparent 38%),
        radial-gradient(circle at 85% 15%, rgba(14, 165, 233, 0.14), transparent 34%),
        linear-gradient(170deg, #f7fbff 0%, #f4fbf7 100%);
    padding: 1rem;
}

.public-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.public-header {
    margin-bottom: 1rem;
}

.public-header h1 {
    margin: 0.25rem 0;
    font-size: 1.7rem;
}

.public-request-form {
    grid-template-columns: 1fr 1fr 1.5fr auto;
}

.public-complete-form {
    grid-template-columns: minmax(220px, 1.1fr) minmax(260px, 1.8fr) auto;
    align-items: start;
}

.public-complete-form textarea {
    min-height: 52px;
}

.public-page .table-responsive.table-wide table {
    min-width: 0;
    table-layout: fixed;
}

.public-page .table-responsive.table-wide th:first-child,
.public-page .table-responsive.table-wide td:first-child {
    width: 9rem;
    white-space: nowrap;
}

.account-form {
    margin-bottom: 0.75rem;
}

.account-sections {
    display: grid;
    gap: 0.8rem;
}

.account-section {
    border: 1px solid #e7edf8;
    border-radius: 12px;
    padding: 0.85rem;
    background: #fbfdff;
}

.account-section h4 {
    margin: 0;
    font-size: 1rem;
}

.account-inline {
    margin-bottom: 0;
}

.account-inline-passwords {
    grid-template-columns: 1fr 1fr auto;
}

.account-inline-qr {
    grid-template-columns: 1fr auto;
}

.password-field {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

.password-field input {
    min-width: 0;
}

.password-toggle {
    min-width: 44px;
    padding: 0.6rem;
    font-size: 1rem;
    line-height: 1;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
}

.password-toggle[aria-pressed="true"] {
    background: #e9f8f6;
    border-color: #9de7dc;
    color: #0f766e;
}

.hidden-block {
    display: none;
}

.public-unlock-form {
    max-width: 28rem;
    grid-template-columns: 1fr auto;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(15, 23, 42, 0.45);
    display: grid;
    place-items: center;
    padding: 1rem;
}

.modal-backdrop.hidden-block {
    display: none;
}

.modal-card {
    width: min(640px, 100%);
    background: #fff;
    border: 1px solid #dfe8f5;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.22);
    padding: 1rem;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}

.modal-head h4 {
    margin: 0;
}

.modal-form {
    display: grid;
    gap: 0.7rem;
}

.intervention-detail-grid {
    display: grid;
    gap: 0.45rem;
}

.intervention-detail-grid p {
    margin: 0;
}

.image-preview-modal-card {
    width: min(980px, 96vw);
}

.image-preview-wrap {
    margin-top: 0.55rem;
    border: 1px solid #dfe8f5;
    border-radius: 12px;
    background: #f8fbff;
    min-height: 320px;
    max-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0.5rem;
}

.image-preview-modal-img {
    max-width: 100%;
    max-height: 68vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

#publicInterventionMeta {
    display: grid;
    gap: 0.45rem;
    margin: 0.45rem 0 0.7rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid #d9e6f4;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
}

.public-intervention-meta-head {
    font-weight: 700;
    color: #1f3a68;
}

.public-intervention-meta-docs {
    display: grid;
    gap: 0.35rem;
}

.public-intervention-meta-docs > strong {
    font-size: 0.84rem;
    color: #2f4568;
}

#publicInterventionMeta .asset-documents-list {
    gap: 0.45rem;
}

#publicInterventionMeta .asset-documents-list li {
    padding: 0.3rem 0.4rem;
    border: 1px solid #e2eaf6;
    border-radius: 10px;
    background: #fff;
}

.public-intervention-meta-empty {
    margin: 0;
}

.public-doc-preview-wrap {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.3rem;
}

.public-doc-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.public-doc-preview-item {
    border: 1px solid #e2eaf6;
    border-radius: 10px;
    padding: 0.45rem;
    background: #fff;
    display: grid;
    gap: 0.4rem;
}

.public-doc-preview-item p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.35;
}

.public-doc-preview-image-link {
    display: block;
    border: 1px solid #d9e6f4;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fbff;
}

.public-doc-preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.public-doc-preview-pdf {
    width: 100%;
    height: 180px;
    border: 1px solid #d9e6f4;
    border-radius: 8px;
    background: #fff;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .modal-backdrop {
        overflow-y: auto;
        place-items: start center;
        padding: 0.65rem;
    }

    .modal-card {
        width: min(100%, 680px);
        max-height: calc(100dvh - 1.3rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .image-preview-modal-card {
        width: min(100%, 980px);
    }
}

@media (max-width: 1024px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(86vw, 320px);
        height: 100vh;
        border-right: 1px solid #e2e8f5;
        border-bottom: 0;
        z-index: 50;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2);
        overflow-y: auto;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.35);
        z-index: 40;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-toggle {
        display: inline-flex;
        position: fixed;
        top: 0.85rem;
        left: 0.85rem;
        z-index: 60;
    }

    body.sidebar-open .sidebar-toggle {
        left: auto;
        right: 0.85rem;
    }

    .main-content {
        padding-top: 4.6rem;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    /* masquer la topbar sur mobile sauf dans la vue overview */
    body:not(.view-overview) .topbar {
        display: none;
    }

    .topbar-views {
        width: 100%;
    }

    .sidebar-nav {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .sidebar-footer {
        position: sticky;
        bottom: 0;
        margin-top: auto;
        padding: 0.9rem 0 0.85rem;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #ffffff 28%);
    }

    .sidebar-footer .btn-ghost {
        display: flex;
        width: 100%;
        justify-content: center;
        margin-top: 0.55rem;
    }

    .stats-cards {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .stats-cards.stats-cards-top {
        grid-template-columns: 1fr;
    }

    .stats-cards.stats-cards-bottom {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .calendar-layout {
        grid-template-columns: 1fr;
    }

    .calendar-main,
    .calendar-side {
        padding: 0.7rem;
    }

    .calendar-month-list {
        max-height: 320px;
    }

    .inline-form,
    .intervention-actions,
    .public-request-form,
    .public-complete-form {
        grid-template-columns: 1fr;
    }

    #interventionForm {
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
    }

    #interventionForm select:nth-of-type(3),
    #interventionScheduledForWrap,
    #interventionForm input[name="requestDescription"],
    #interventionForm .inline-check,
    #interventionForm button[type="submit"] {
        grid-column: 1 / -1;
    }

    .view[data-view="interventions"] .panel-head-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .asset-create-form {
        grid-template-columns: 1fr;
        padding: 0.7rem;
    }

    .asset-form-actions {
        align-items: stretch;
    }

    .view[data-view="interventions"] .intervention-section {
        padding: 0.85rem;
        border-radius: 12px;
    }

    .view[data-view="interventions"] .intervention-list-section .table-responsive {
        max-width: 100%;
        overflow-x: auto;
    }

    .view[data-view="interventions"] .intervention-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .view[data-view="interventions"] .intervention-actions button,
    .view[data-view="interventions"] .intervention-actions select {
        width: 100%;
        min-width: 0;
    }

    .intervention-status-group {
        grid-template-columns: 1fr auto;
    }

    th, td {
        padding: 0.58rem 0.42rem;
        font-size: 0.86rem;
    }

    .table-responsive {
        border-radius: 10px;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 4.6rem 0.8rem 1rem;
    }

    .panel {
        padding: 0.85rem;
    }

    .panel-head {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .panel-head .btn-ghost {
        width: 100%;
    }

    .panel-head-actions {
        width: 100%;
    }

    .view[data-view="interventions"] .panel-head-actions {
        grid-template-columns: 1fr;
    }

    .topbar-views .topbar-view-btn {
        flex: 1 1 calc(50% - 0.45rem);
    }

    .inline-form button,
    .calendar-toolbar .btn-ghost,
    .modal-actions button,
    .row-actions button {
        width: 100%;
    }

    .row-actions {
        gap: 0.5rem;
    }

    .account-inline-passwords,
    .account-inline-qr {
        grid-template-columns: 1fr;
    }

    .password-field {
        grid-template-columns: 1fr auto;
    }

    #interventionForm {
        grid-template-columns: 1fr;
    }

    .view[data-view="interventions"] .panel-head {
        gap: 0.5rem;
    }

    .view[data-view="interventions"].active {
        gap: 0.75rem;
    }

    .view[data-view="interventions"] .intervention-section {
        padding: 0.75rem;
    }

    .view[data-view="interventions"] .intervention-section + .intervention-section {
        margin-top: 0.3rem;
    }

    .view[data-view="interventions"] .intervention-section h4 {
        font-size: 0.94rem;
    }

    .view[data-view="interventions"] .intervention-list-section .table-responsive {
        max-width: 100%;
        overflow-x: auto;
    }

    .view[data-view="interventions"] .table-cards table td[data-label="Actions"] {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .view[data-view="interventions"] .table-cards table td[data-label="Actions"]::before {
        margin-bottom: 0.15rem;
    }

    .view[data-view="interventions"] .intervention-actions {
        grid-template-columns: 1fr;
    }

    .intervention-status-group {
        grid-template-columns: 1fr;
    }

    .intervention-complete-group {
        margin-top: 0.1rem;
        padding-top: 0.5rem;
    }

    .view[data-view="interventions"] .intervention-actions button,
    .view[data-view="interventions"] .intervention-actions select {
        width: 100%;
    }

    .calendar-toolbar {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "prev next"
            "today today";
    }

    #calendarPrevBtn {
        grid-area: prev;
    }

    #calendarNextBtn {
        grid-area: next;
    }

    #calendarTodayBtn {
        grid-area: today;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 0.25rem;
    }

    .calendar-main,
    .calendar-side {
        padding: 0.62rem;
        border-radius: 12px;
    }

    .calendar-weekdays {
        display: grid;
        gap: 0.25rem;
        margin-bottom: 0.3rem;
    }

    .calendar-weekdays span {
        font-size: 0.68rem;
    }

    .calendar-day {
        min-height: 0;
        aspect-ratio: 1 / 1;
        border-radius: 8px;
        padding: 0.22rem;
        gap: 0.1rem;
        box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    }

    .calendar-day-head {
        justify-content: center;
    }

    .calendar-day-head strong {
        font-size: 0.76rem;
    }

    .calendar-count {
        display: none;
    }

    .calendar-events {
        display: none;
    }

    .calendar-day.has-items .calendar-day-head::after {
        content: '';
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: #3b82f6;
    }

    .calendar-day.has-items.today .calendar-day-head::after {
        background: #0ea5e9;
    }

    .calendar-month-list {
        max-height: 250px;
    }

    .table-cards {
        border: 0;
        background: transparent;
        overflow: visible;
    }

    .view[data-view="interventions"] .intervention-list-section .table-cards {
        overflow-x: visible;
    }

    .table-cards table,
    .table-cards table thead,
    .table-cards table tbody,
    .table-cards table tr,
    .table-cards table td {
        display: block;
        width: 100%;
    }

    .table-cards table {
        min-width: 0;
    }

    .table-cards table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
    }

    .table-cards table tr {
        margin: 0 0 0.75rem;
        border: 1px solid #e7edf8;
        border-radius: 12px;
        background: #fff;
        padding: 0.35rem 0.15rem;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    }

    .table-cards table td {
        border-bottom: 1px dashed #eef3fb;
        padding: 0.48rem 0.55rem;
        font-size: 0.85rem;
        display: block;
    }

    .table-cards table td > * {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .table-cards table td::before {
        display: block;
        margin-bottom: 0.28rem;
        line-height: 1.2;
    }

    .table-cards table td:last-child {
        border-bottom: 0;
    }

    .table-cards table td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: #5c647a;
        font-weight: 700;
    }

    .table-cards table td[colspan] {
        display: block;
    }

    .table-cards table td[colspan]::before {
        content: none;
    }

    .table-cards .row-actions {
        justify-content: flex-start;
    }

    .table-cards .intervention-actions {
        grid-template-columns: 1fr;
    }

    /* Mobile: toggle form asset + accordéon */
    #toggleAssetFormBtn {
        display: inline-flex;
    }

    #toggleProviderFormBtn,
    #toggleInterventionFormBtn {
        display: inline-flex;
    }

    #assetForm {
        display: none;
    }

    #providerForm,
    #interventionForm {
        display: none;
    }

    #assetForm.form-visible {
        display: grid;
    }

    #providerForm.form-visible,
    #interventionForm.form-visible {
        display: grid;
    }

    .asset-accordion-btn {
        display: inline-flex;
    }

    .provider-accordion-btn,
    .intervention-accordion-btn {
        display: inline-flex;
    }

    .table-cards table td[data-label="Actions"] {
        overflow-x: visible;
    }

    .table-cards table td[data-label="Actions"] > .asset-accordion-btn,
    .table-cards table td[data-label="Actions"] > .provider-accordion-btn,
    .table-cards table td[data-label="Actions"] > .intervention-accordion-btn {
        width: auto;
        max-width: 100%;
        align-self: flex-start;
        white-space: nowrap;
        padding: 0.3rem 0.5rem;
        font-size: 0.74rem;
        line-height: 1.15;
        margin-bottom: 0.25rem;
    }

    .refresh-icon-btn {
        width: 36px;
        height: 36px;
    }

    .table-cards .asset-action-main {
        display: inline-flex;
        gap: 0.35rem;
    }

    .table-cards .provider-action-main {
        display: inline-flex;
        gap: 0.35rem;
        margin-block: 0.35rem;
    }

    .table-cards .asset-action-main button {
        width: auto;
    }

    .table-cards .provider-action-main button {
        width: auto;
    }

    .table-cards table td.asset-detail {
        display: none;
    }

    .table-cards table tr.accordion-open td.asset-detail {
        display: block;
    }

    .table-cards table td.provider-detail,
    .table-cards table td.intervention-detail {
        display: none;
    }

    .table-cards table tr.accordion-open td.provider-detail,
    .table-cards table tr.accordion-open td.intervention-detail {
        display: block;
    }

    #interventionForm.form-visible {
        display: grid !important;
    }
}
