:root {
    --page: #f4f6f8;
    --panel: #ffffff;
    --text: #17212b;
    --muted: #627080;
    --brand: #1b81c0;
    --brand-dark: #0f5f92;
    --border: #d9e1e8;
}

* {
    box-sizing: border-box;
}
[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--page);
    font-family: Arial, Helvetica, sans-serif;
}

.page-shell {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0;
}

.intro-panel {
    max-width: 760px;
    padding: 32px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(23, 33, 43, 0.08);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 36px;
    line-height: 1.1;
}

.lead {
    max-width: 640px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.status-grid article {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfd;
}

.status-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.status-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 18px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    color: var(--brand-dark);
    border: 1px solid var(--brand);
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
}

.button-primary {
    color: #ffffff;
    background: var(--brand);
}

@media (max-width: 720px) {
    .page-shell {
        padding: 24px 0;
    }

    .intro-panel {
        padding: 22px;
    }

    h1 {
        font-size: 30px;
    }

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

.login-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(440px, 100%);
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(23, 33, 43, 0.08);
}

.login-logo {
    display: block;
    width: min(260px, 100%);
    height: auto;
    margin: 0 0 24px;
}

.login-form-v2 {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.login-form-v2 label {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.login-form-v2 input {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
}

.login-note {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.alert-error {
    padding: 12px 14px;
    color: #7a1f14;
    background: #fff1ed;
    border: 1px solid #f3b5a8;
    border-radius: 6px;
}

.button-full {
    width: 100%;
    margin-top: 8px;
}

.wide-panel {
    max-width: 1180px;
}

.table-wrap {
    width: 100%;
    margin-top: 24px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.data-table form {
    margin: 0;
}

.data-table .button {
    min-height: 34px;
    padding: 0 12px;
    background: #ffffff;
}

/* Header commun : navigation persistante desktop, tablette et mobile. */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 68px;
    padding: 0 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 22px rgba(23, 33, 43, 0.06);
}
.brand-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}
.brand-link img {
    display: block;
    width: 118px;
    max-height: 48px;
    object-fit: contain;
}
.main-nav {
    flex: 1 1 auto;
}
.main-nav ul,
.user-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.main-nav > ul {
    display: flex;
    align-items: center;
    gap: 4px;
}
.main-nav li,
.user-menu {
    position: relative;
}
.main-nav a,
.user-menu button,
.user-menu a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.main-nav a:hover,
.main-nav a:focus,
.user-menu button:hover,
.user-menu button:focus,
.user-menu a:hover,
.user-menu a:focus {
    color: var(--brand-dark);
    background: #edf6fc;
}
.main-nav li ul,
.user-menu ul {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    min-width: 210px;
    padding: 6px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(23, 33, 43, 0.14);
}
.main-nav li ul ul {
    top: -7px;
    left: 100%;
}
.main-nav .menu-separator {
    height: 1px;
    margin: 6px 8px;
    background: var(--border);
}
.main-nav li:hover > ul,
.main-nav li:focus-within > ul,
.user-menu:hover > ul,
.user-menu:focus-within > ul {
    display: block;
}
.user-menu {
    margin-left: auto;
}
.user-menu button::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: 8px;
    border-top: 5px solid var(--muted);
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
}
.user-menu ul {
    right: 0;
    left: auto;
}
.nav-toggle,
.nav-toggle-label {
    display: none;
}
.app-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}
.app-main .intro-panel {
    margin: 0;
}
/* Navigation compacte pour les ecrans tactiles et les petites largeurs. */
@media (max-width: 920px) {
    /* Header commun : navigation persistante desktop, tablette et mobile. */
.app-header {
        flex-wrap: wrap;
        min-height: 64px;
        padding: 8px 16px;
    }
    .nav-toggle-label {
        display: inline-grid;
        gap: 5px;
        margin-left: auto;
        padding: 10px;
        cursor: pointer;
    }
    .nav-toggle-label span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--text);
    }
    .main-nav,
    .user-menu {
        display: none;
        flex: 1 0 100%;
        width: 100%;
        margin-left: 0;
    }
    .nav-toggle:checked ~ .main-nav,
    .nav-toggle:checked ~ .user-menu {
        display: block;
    }
    .main-nav > ul {
        display: grid;
        gap: 4px;
    }
    .main-nav li ul,
    .main-nav li ul ul,
    .user-menu ul {
        position: static;
        display: block;
        min-width: 0;
        margin-left: 14px;
        padding: 0 0 0 10px;
        border: 0;
        border-left: 1px solid var(--border);
        border-radius: 0;
        box-shadow: none;
    }
    .main-nav .menu-separator {
        height: 1px;
        margin: 8px 0 8px 4px;
        background: var(--border);
    }
    .main-nav a,
    .user-menu button,
    .user-menu a {
        min-height: 38px;
        white-space: normal;
    }
    .app-main {
        padding-top: 20px;
    }
}


.permissions-form {
    display: grid;
    gap: 8px;
    min-width: 260px;
}
.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
}
.check-row input {
    width: 18px;
    height: 18px;
}

.page-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}
.list-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, auto));
    gap: 12px;
    align-items: end;
    margin-top: 20px;
}
.list-toolbar label,
.entity-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.list-toolbar input,
.list-toolbar select,
.entity-form input,
.entity-form select,
.form-section input,
.form-section select,
.form-section textarea,
.visitor-person-row input,
.visitor-person-row select {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
}
.form-section textarea {
    min-height: 92px;
    padding-top: 10px;
    padding-bottom: 10px;
    resize: vertical;
}
.form-section input[type="file"] {
    padding: 8px 12px;
}
.form-section select,
.list-toolbar select,
.entity-form select,
.visitor-person-row select {
    padding-right: 38px;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 18px, calc(100% - 12px) 18px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}
.form-section input:focus,
.form-section select:focus,
.form-section textarea:focus,
.list-toolbar input:focus,
.list-toolbar select:focus,
.entity-form input:focus,
.entity-form select:focus,
.visitor-person-row input:focus,
.visitor-person-row select:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(27, 129, 192, 0.18);
    outline-offset: 0;
}
.form-section label,
.form-grid label {
    min-width: 0;
}
.form-section label > span,
.form-grid label > span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.ajax-table th button {
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 700;
    text-transform: inherit;
    cursor: pointer;
}
.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}
.entity-form {
    display: grid;
    gap: 24px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.form-section {
    display: grid;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.form-section h2 {
    margin: 0;
    font-size: 20px;
}
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
}
button:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
@media (max-width: 820px) {
    .page-title-row,
    .list-footer {
        display: grid;
    }
    .list-toolbar,
    .form-grid,
    .permissions-grid {
        grid-template-columns: 1fr;
    }
}

/* Switchs de type Bootstrap pour les droits et consentements. */
.switch-card {
    position: relative;
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 68px;
    padding: 12px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}
.switch-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.switch-ui {
    position: relative;
    width: 44px;
    height: 24px;
    background: #c7d2dc;
    border-radius: 999px;
    transition: background 0.2s ease;
}
.switch-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(23, 33, 43, 0.25);
    transition: transform 0.2s ease;
}
.switch-card input:checked + .switch-ui {
    background: var(--brand);
}
.switch-card input:checked + .switch-ui::after {
    transform: translateX(20px);
}
.switch-card input:focus + .switch-ui {
    outline: 3px solid rgba(27, 129, 192, 0.25);
    outline-offset: 2px;
}
.switch-card input:disabled + .switch-ui,
.switch-card input:disabled ~ span {
    opacity: 0.55;
}
.switch-card strong,
.switch-card small {
    display: block;
}
.switch-card strong {
    font-size: 14px;
}
.switch-card small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}
.switch-card-important {
    border-color: rgba(27, 129, 192, 0.45);
    background: #f5fbff;
}
.switch-card-danger {
    border-color: rgba(180, 52, 36, 0.35);
    background: #fff8f6;
}
.permissions-grid {
    align-items: stretch;
}
@media (max-width: 560px) {
    .switch-card {
        grid-template-columns: 42px 1fr;
        padding: 10px;
    }
    .switch-ui {
        width: 40px;
        height: 22px;
    }
    .switch-ui::after {
        width: 16px;
        height: 16px;
    }
    .switch-card input:checked + .switch-ui::after {
        transform: translateX(18px);
    }
}

.switch-card-danger input:checked + .switch-ui {
    background: #c0392b;
}
.switch-card-danger input:focus + .switch-ui {
    outline-color: rgba(192, 57, 43, 0.25);
}
.compact-switch {
    min-height: 46px;
}
.phone-list {
    display: grid;
    gap: 12px;
}
.phone-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(160px, 1fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfd;
}
.mini-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-left: 6px;
    padding: 0 8px;
    color: #0f5f2c;
    background: #e6f7ec;
    border: 1px solid #a9dfbd;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
@media (max-width: 980px) {
    .phone-row {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 640px) {
    .phone-row {
        grid-template-columns: 1fr;
    }
}

/* Indicateur agence commun a toutes les listes metier. */
.agency-badge {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    overflow: hidden;
    background: var(--agency-color, var(--brand));
    border: 3px solid var(--agency-color, var(--brand));
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(23, 33, 43, 0.12);
}
.agency-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    border-radius: 50%;
}
.agency-preview {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 18px;
    color: var(--muted);
    font-weight: 700;
}
input[type="color"] {
    min-width: 72px;
    padding: 4px;
}


/* Pictogramme Font Awesome commun aux categories du parc. */
.category-icon {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--brand-dark);
    background: #edf6fc;
    border: 1px solid #c9e4f4;
    border-radius: 50%;
    font-size: 18px;
}
.category-preview {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-weight: 700;
}
.full-field {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.full-field textarea {
    padding: 12px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
    resize: vertical;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* Lisibilite globale des listes longues : alternance et survol. */
.data-table tbody tr:nth-child(even) {
    background: #f8fafc;
}
.data-table tbody tr:hover,
.data-table tbody tr:focus-within {
    background: #e8f4fb;
    outline: 2px solid rgba(27, 129, 192, 0.18);
    outline-offset: -2px;
}
.data-table tbody tr:hover td,
.data-table tbody tr:focus-within td {
    border-bottom-color: #b9dcef;
}


.inline-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.inline-icon i {
    width: 18px;
    color: var(--brand-dark);
    text-align: center;
}


.audit-list {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}
.audit-card {
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.audit-card header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.audit-card header span {
    color: var(--muted);
    font-size: 13px;
}
.audit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.audit-grid h2 {
    margin: 0 0 8px;
    font-size: 15px;
}
.audit-grid pre {
    max-height: 360px;
    overflow: auto;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    white-space: pre-wrap;
}
@media (max-width: 820px) {
    .audit-grid {
        grid-template-columns: 1fr;
    }
}

/* Fiche parc avec onglets metier conserves depuis la V1. */
.tabs-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}
.tabs-nav {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 8px;
}
.tabs-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.tabs-nav a.active,
.tabs-nav a:hover {
    color: var(--brand-dark);
    background: #edf6fc;
    border-color: #c9e4f4;
}
.tabs-nav i {
    width: 20px;
    text-align: center;
}
.tabs-content {
    min-width: 0;
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}
.compact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.compact-form {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.image-upload-form {
    margin-bottom: 22px;
}
.upload-dropzone {
    position: relative;
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 96px;
    padding: 18px;
    color: var(--text);
    background: #f8fbfd;
    border: 2px dashed #b9dcef;
    border-radius: 8px;
    cursor: pointer;
}
.upload-dropzone > i {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: var(--brand-dark);
    background: #edf6fc;
    border-radius: 50%;
    font-size: 22px;
}
.upload-dropzone strong,
.upload-dropzone small {
    display: block;
}
.upload-dropzone small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 500;
}
.upload-dropzone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.image-preview-card {
    min-width: 0;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.image-preview-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #f3f6f8;
    border-radius: 6px;
}
.image-preview-card span,
.image-preview-card small {
    display: block;
    overflow: hidden;
    margin-top: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.image-preview-card small {
    color: var(--muted);
}
.document-upload-form {
    margin-bottom: 22px;
}
.document-preview {
    margin-top: 12px;
}
.document-preview-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
    max-width: 520px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.document-preview-card i {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--brand-dark);
    background: #edf6fc;
    border-radius: 8px;
    font-size: 20px;
}
.document-preview-card span,
.document-preview-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.document-preview-card small {
    color: var(--muted);
}
.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.document-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.document-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: var(--brand-dark);
    background: #edf6fc;
    border-radius: 8px;
    font-size: 24px;
}
.document-body {
    display: grid;
    gap: 7px;
    min-width: 0;
}
.document-body strong,
.document-body p,
.document-body small {
    overflow: hidden;
    text-overflow: ellipsis;
}
.document-body strong {
    white-space: nowrap;
}
.document-body p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.document-body small {
    color: var(--muted);
    font-weight: 800;
}
.document-card .media-actions {
    grid-column: 1 / -1;
}
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}
.media-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.photo-batch-form {
    display: grid;
    gap: 1rem;
}
.photo-batch-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem;
    background: #f8fbff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.photo-select-all {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 800;
}
.photo-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 0.75rem;
    background: #f8fbff;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 800;
}
.photo-check input,
.photo-select-all input {
    width: 1.05rem;
    height: 1.05rem;
}
.memo-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}
.memo-form {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.memo-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.memo-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.memo-card-header strong,
.memo-card-header small {
    display: block;
}
.memo-card-header small,
.memo-card p,
.memo-meta {
    color: var(--muted);
}
.memo-card p {
    margin: 0;
    line-height: 1.5;
}
.memo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.86rem;
}
.memo-meta span {
    padding: 0.25rem 0.5rem;
    background: #f4f7fa;
    border-radius: 999px;
}
.media-link img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #f3f6f8;
    border-radius: 6px;
}
.media-card-body {
    display: grid;
    gap: 7px;
    min-width: 0;
}
.media-card-body strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.media-card-body p {
    margin: 10px 0;
    color: var(--muted);
    font-size: 13px;
}
.media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.file-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}
.file-badge-secure {
    color: #145a32;
    background: #eaf7ee;
}
.file-badge-legacy {
    color: #6d4c16;
    background: #fff4da;
}
.native-enhanced-select,
.rich-editor-source {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
.select2-lite {
    position: relative;
}
.select2-lite-button {
    width: 100%;
    min-height: 43px;
    padding: 10px 40px 10px 12px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.select2-lite-button::after {
    content: "\f078";
    position: absolute;
    right: 14px;
    top: 13px;
    color: var(--muted);
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    font-size: 12px;
}
.select2-lite.open .select2-lite-button {
    border-color: var(--brand);
    outline: 3px solid rgba(27, 129, 192, 0.18);
}
.select2-lite-panel {
    position: absolute;
    z-index: 30;
    display: none;
    width: 100%;
    margin-top: 6px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 16px 35px rgba(23, 33, 43, 0.18);
}
.select2-lite.open .select2-lite-panel {
    display: block;
}
.select2-lite-panel input {
    width: 100%;
    margin-bottom: 8px;
}
.select2-lite-list {
    max-height: 260px;
    overflow: auto;
}
.select2-lite-list button {
    display: block;
    width: 100%;
    padding: 9px 10px;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 6px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.select2-lite-list button:hover,
.select2-lite-list button.selected {
    color: var(--brand-dark);
    background: #edf6fc;
}
.select2-lite-list p {
    margin: 8px;
    color: var(--muted);
}
.rich-editor {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid var(--border);
}
.rich-toolbar-button {
    display: inline-grid;
    width: 38px;
    height: 36px;
    place-items: center;
    padding: 0;
    color: var(--text);
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}
.rich-toolbar-button:hover,
.rich-toolbar-button:focus {
    color: var(--brand-dark);
    background: #edf6fc;
    border-color: #c9e4f4;
    outline: 3px solid rgba(27, 129, 192, 0.14);
}
.rich-editor-surface {
    min-height: 190px;
    padding: 14px;
    color: var(--text);
    outline: none;
}
.rich-editor-surface:focus {
    box-shadow: inset 0 0 0 3px rgba(27, 129, 192, 0.15);
}
.rich-content {
    margin-top: 6px;
    line-height: 1.45;
}
.rich-content p,
.rich-content ul,
.rich-content ol {
    margin: 6px 0;
}
.rich-content ul,
.rich-content ol {
    padding-left: 22px;
}
.rich-content-muted {
    color: var(--muted);
}
.button-danger {
    color: #ffffff !important;
    background: #c0392b !important;
    border-color: #c0392b !important;
}
.button-danger:hover,
.button-danger:focus {
    color: #ffffff !important;
    background: #a93226 !important;
    border-color: #a93226 !important;
}
.alert-success {
    margin: 0 0 18px;
    padding: 12px 14px;
    color: #145a32;
    background: #eaf7ee;
    border: 1px solid #b8e2c4;
    border-radius: 8px;
    font-weight: 700;
}
.alert-info {
    margin: 0 0 18px;
    padding: 12px 14px;
    color: #0f4d68;
    background: #e8f4fb;
    border: 1px solid #b9dcef;
    border-radius: 8px;
    font-weight: 700;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.status-open {
    color: #7a4b00;
    background: #fff4da;
}
.status-done {
    color: #145a32;
    background: #eaf7ee;
}
.status-active {
    color: #145a32;
    background: #eaf7ee;
}
.status-inactive {
    color: #6b2b2b;
    background: #fdecec;
}
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--brand-blue);
    background: #fff;
    cursor: pointer;
}
.icon-button:hover,
.icon-button:focus {
    border-color: var(--brand-blue);
    background: #eef7fd;
}
.expandable-table .details-row td {
    background: #f8fbff;
}
.expandable-table .details-row.is-hidden {
    display: none;
}
.expand-button {
    width: 2rem;
    height: 2rem;
    justify-content: center;
    padding: 0;
}
.details-panel {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 0.8fr) minmax(180px, 1fr);
    gap: 1rem;
    padding: 1rem;
    border-left: 4px solid var(--brand-blue);
}
.details-panel span {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}
.details-panel strong {
    font-weight: 700;
}
.address-search {
    position: relative;
    display: grid;
    gap: 0.45rem;
}
.address-suggestions {
    position: static;
    z-index: 30;
    display: grid;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 18px 34px rgba(11, 30, 45, 0.12);
}
.address-suggestions:empty {
    display: none;
}
.address-suggestions button {
    padding: 0.8rem 1rem;
    border: 0;
    color: var(--text);
    background: #fff;
    text-align: left;
    cursor: pointer;
}
.address-suggestions button:hover,
.address-suggestions button:focus {
    background: #eef7fd;
}
.chantier-map {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #e8eef3;
    cursor: grab;
    touch-action: none;
}
.chantier-map img {
    position: absolute;
    width: 256px;
    height: 256px;
    user-select: none;
    pointer-events: none;
}
.map-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    transform: translate(-50%, -100%);
    border: 0;
    color: #d62828;
    background: transparent;
    font-size: 2rem;
    cursor: grab;
    touch-action: none;
}
.map-marker:active {
    cursor: grabbing;
}
.chantier-map.is-dragging-marker {
    cursor: grabbing;
}
.chantier-map.is-dragging-map {
    cursor: grabbing;
}
.map-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 12;
    display: grid;
    gap: 6px;
}
.map-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--brand-blue);
    background: #fff;
    box-shadow: 0 8px 18px rgba(11, 30, 45, 0.12);
    cursor: pointer;
}
.map-controls button:hover,
.map-controls button:focus {
    background: #eef7fd;
}
.chantier-map:fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border-radius: 0;
}
.map-credit {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 11;
    padding: 2px 6px;
    color: #425466;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 6px;
    font-size: 0.72rem;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 760px) {
    .details-panel {
        grid-template-columns: 1fr;
    }
}
.rich-toolbar-button:disabled,
.select2-lite-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
@media (max-width: 900px) {
    .tabs-layout {
        grid-template-columns: 1fr;
    }
    .tabs-nav {
        position: static;
        grid-template-columns: repeat(5, minmax(120px, 1fr));
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .tabs-nav a {
        justify-content: center;
        white-space: nowrap;
    }
}
@media (max-width: 560px) {
    .tabs-nav {
        grid-template-columns: repeat(5, minmax(98px, 1fr));
    }
    .tabs-nav a {
        min-height: 42px;
        padding: 8px;
        font-size: 13px;
    }
    .tabs-nav a span {
        display: none;
    }
}
.muted {
    color: var(--muted);
}
.tv-dashboard-grid,
.tv-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.tv-dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tv-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.tv-card > i {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: var(--brand-dark);
    background: #edf6fc;
    border-radius: 50%;
    font-size: 24px;
}
.tv-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
}
.tv-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.45;
}
.tv-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 22px;
}
.tv-media-grid .media-card {
    overflow: hidden;
}
.tv-media-grid img,
.tv-media-grid video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #eef2f5;
}
.tv-news-thumb {
    display: block;
    width: 96px;
    height: 62px;
    object-fit: cover;
    background: #eef2f5;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}
.status-pill.good {
    color: #145a32;
    background: #eaf7ee;
}
.status-pill.danger {
    color: #7a1f14;
    background: #fff1ed;
}
@media (max-width: 900px) {
    .tv-dashboard-grid,
    .tv-admin-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 560px) {
    .tv-card {
        grid-template-columns: 1fr;
    }
}
.visitor-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.35fr);
    gap: 18px;
    align-items: start;
    margin-top: 24px;
}
.visitor-people {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.visitor-people h3 {
    margin: 0;
    font-size: 16px;
}
.visitor-person-row {
    display: grid;
    grid-template-columns: 120px 1fr 1fr;
    gap: 8px;
}
.visitor-logo-preview {
    margin: 12px 0;
}
.visitor-logo-preview img,
.visitor-list-logo {
    display: inline-block;
    width: 56px;
    height: 42px;
    margin-right: 8px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 6px;
    vertical-align: middle;
}
@media (max-width: 980px) {
    .visitor-layout {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 560px) {
    .visitor-person-row {
        grid-template-columns: 1fr;
    }
}
.messaging-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(220px, 0.65fr) minmax(0, 1.45fr);
    gap: 16px;
    align-items: start;
    margin-top: 24px;
}
.message-contact-list,
.message-user-list,
.thread-list,
.message-list {
    display: grid;
    gap: 8px;
}
.message-contact-list,
.message-user-list {
    max-height: 280px;
    overflow: auto;
}
.message-contact-list h3 {
    margin: 12px 0 4px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}
.message-contact-list a,
.message-user-list div {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
}
.menu-button-link {
    width: 100%;
    border: 0;
    text-align: left;
    cursor: pointer;
}
.menu-button-link[hidden] {
    display: none;
}
.message-contact-list a:hover,
.message-contact-list a:focus {
    border-color: #b9dcef;
    background: #edf6fc;
}
.message-contact-list a i {
    width: 18px;
    color: var(--brand-dark);
}
.message-contact-list strong,
.message-contact-list small {
    display: block;
}
.message-contact-list small {
    color: var(--muted);
    font-size: 12px;
}
.message-sidebar-title {
    align-items: center;
    margin-bottom: 4px;
}
.message-sidebar-title h2 {
    margin: 0;
}
.presence-dot {
    display: inline-block;
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    background: #aeb8c2;
    border-radius: 50%;
}
.presence-dot.online {
    background: #1f9d55;
    box-shadow: 0 0 0 4px rgba(31, 157, 85, 0.12);
}
.thread-list a {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 12px;
    color: var(--text);
    text-decoration: none;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.thread-list a.active,
.thread-list a:hover {
    border-color: #b9dcef;
    background: #edf6fc;
}
.thread-list span {
    color: var(--muted);
    font-size: 12px;
}
.thread-list em {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 22px;
    padding: 3px 6px;
    color: #ffffff;
    background: var(--brand);
    border-radius: 999px;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    text-align: center;
}
.message-panel {
    min-height: 520px;
}
.message-list {
    max-height: 560px;
    overflow: auto;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.message-bubble {
    width: min(78%, 620px);
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.message-bubble.mine {
    justify-self: end;
    color: #ffffff;
    background: var(--brand);
    border-color: var(--brand);
}
.message-bubble header {
    margin-bottom: 6px;
    color: inherit;
    font-size: 12px;
    font-weight: 800;
    opacity: 0.78;
}
.message-bubble footer {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 700;
    opacity: 0.72;
}
.message-bubble p {
    margin: 0;
    line-height: 1.45;
}
.message-reply-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}
.message-reply-form textarea {
    min-height: 70px;
}
.broadcast-form {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.modal-backdrop-v2 {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(11, 30, 45, 0.45);
}
.modal-backdrop-v2[hidden] {
    display: none;
}
.modal-panel-v2 {
    width: min(620px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    padding: 22px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(11, 30, 45, 0.24);
}
.modal-panel-v2 form {
    display: grid;
    gap: 12px;
}
.dashboard-shell {
    display: grid;
    gap: 24px;
}
.dashboard-chart-section {
    display: grid;
    gap: 16px;
}
.dashboard-chart-section h2 {
    margin: 0;
    font-size: 22px;
}
.dashboard-bars {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    min-height: 0;
    align-items: stretch;
}
.dashboard-bar-card {
    display: grid;
    grid-template-columns: 1fr 34px;
    grid-template-rows: auto auto;
    gap: 8px 10px;
    min-height: 92px;
    padding: 12px;
    color: var(--text);
    text-decoration: none;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.dashboard-bar-card:hover,
.dashboard-bar-card:focus {
    border-color: #b9dcef;
    background: #f5fbff;
}
.dashboard-bar-value {
    color: var(--brand-dark);
    font-size: 24px;
    font-weight: 900;
}
.dashboard-bar-track {
    position: relative;
    display: flex;
    align-items: end;
    grid-row: 1 / 3;
    grid-column: 2;
    min-height: 68px;
    overflow: hidden;
    background: #eef4f8;
    border-radius: 6px;
}
.dashboard-bar-track span {
    display: block;
    width: 100%;
    min-height: 10%;
    background: linear-gradient(180deg, #1b81c0, #0f5f92);
    border-radius: 8px 8px 0 0;
}
.dashboard-bar-card strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 13px;
    line-height: 1.25;
}
.dashboard-panels {
    display: grid;
    gap: 12px;
}
.dashboard-detail {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.dashboard-detail summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 58px;
    padding: 14px 16px;
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}
.dashboard-detail summary::-webkit-details-marker {
    display: none;
}
.dashboard-detail summary::before {
    content: "+";
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: var(--brand-dark);
    background: #edf6fc;
    border-radius: 50%;
    font-weight: 900;
}
.dashboard-detail[open] summary::before {
    content: "-";
}
.dashboard-detail summary span {
    flex: 1 1 auto;
}
.dashboard-detail summary strong {
    display: inline-grid;
    min-width: 34px;
    height: 28px;
    place-items: center;
    color: #ffffff;
    background: var(--brand);
    border-radius: 999px;
    font-size: 13px;
}
.dashboard-detail > .dashboard-panel-content,
.dashboard-detail > .button {
    margin: 0 16px 16px;
}
.dashboard-panel-content > .button {
    margin-top: 12px;
}
.dashboard-alert summary strong {
    background: #c0392b;
}
.dashboard-thumb {
    display: block;
    width: 72px;
    height: 52px;
    object-fit: cover;
    background: #eef2f5;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.push-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.push-status-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.push-status-card strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}
.push-status-card span {
    color: var(--brand-dark);
    font-size: 20px;
    font-weight: 900;
}
.push-status-card.is-ok {
    border-color: #a8d8ba;
    background: #f1fbf5;
}
.push-status-card.is-alert {
    border-color: #f0c36b;
    background: #fff8e8;
}
.push-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin: 12px 0;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    color: #ffffff;
    background: var(--brand);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}
.status-pill.success {
    background: #198754;
}
.status-pill.danger {
    background: #c0392b;
}
.connection-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 4px 10px;
    color: #5f6872;
    background: #eef2f5;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.connection-badge i {
    font-size: 8px;
}
.connection-badge.is-online {
    color: #ffffff;
    background: #198754;
}
.migration-summary {
    min-width: 160px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfd;
    text-align: right;
}
.migration-summary strong {
    display: block;
    color: var(--brand-dark);
    font-size: 24px;
}
.migration-summary span {
    color: var(--muted);
    font-size: 13px;
}
.migration-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 22px;
    align-items: start;
}
.migration-list,
.migration-detail {
    min-width: 0;
}
.migration-detail {
    position: sticky;
    top: 88px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}
.migration-table tr.is-selected {
    background: #eaf5fc;
}
.migration-user-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}
.migration-user-link small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}
.agency-dot {
    display: inline-flex;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: var(--agency-color, var(--brand));
    box-shadow: 0 0 0 1px var(--border);
}
.empty-state {
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 36px 16px;
    color: var(--muted);
    text-align: center;
}
.empty-state i {
    color: var(--brand);
    font-size: 28px;
}
.empty-state strong {
    color: var(--text);
}
.compact-table-wrap {
    margin-top: 10px;
    max-height: 360px;
}
.compact-table {
    font-size: 13px;
}
@media (max-width: 900px) {
    .dashboard-bars {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}
@media (max-width: 980px) {
    .migration-layout {
        grid-template-columns: 1fr;
    }
    .migration-detail {
        position: static;
    }
}
@media (max-width: 560px) {
    .dashboard-bars {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-bar-card {
        min-height: 88px;
    }
}
@media (max-width: 1120px) {
    .messaging-layout {
        grid-template-columns: 1fr 1fr;
    }
    .message-panel {
        grid-column: 1 / -1;
    }
}
@media (max-width: 720px) {
    .messaging-layout,
    .message-reply-form {
        grid-template-columns: 1fr;
    }
    .message-bubble {
        width: 100%;
    }
}
