@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* --- DESIGN SYSTEM & SYSTEM VARIABLES --- */
:root {
    --bg-gradient: linear-gradient(135deg, #090e1a 0%, #0e172a 100%);
    --card-bg: rgba(20, 30, 54, 0.6);
    --card-border: rgba(255, 255, 255, 0.05);
    --card-hover-border: rgba(36, 197, 179, 0.3);
    
    --accent-gold: #e5a93b;
    --accent-gold-hover: #f1bb5b;
    --accent-teal: #24c5b3;
    --accent-teal-hover: #3be2cf;
    --lass-blue: #0b63e5;
    --lass-green: #18a875;
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] {
    --bg-gradient: linear-gradient(135deg, #edf6f8 0%, #dce8f1 100%);
    --card-bg: rgba(255, 255, 255, 0.86);
    --card-border: rgba(15, 23, 42, 0.13);
    --card-hover-border: rgba(13, 148, 136, 0.45);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
}

html[data-theme="light"] aside { background: rgba(239, 246, 250, 0.94); }
html[data-theme="light"] .login-overlay-backdrop { background: linear-gradient(135deg, #e5f4f5, #dbe7f1); }
html[data-theme="light"] .login-card { background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(235,244,248,.98)); border-color: rgba(15,23,42,.14); box-shadow: 0 28px 70px rgba(15,23,42,.16); }
html[data-theme="light"] .form-control,
html[data-theme="light"] .auth-form-group-loyer input,
html[data-theme="light"] .auth-form-group-loyer select { background: rgba(255,255,255,.9); color: #0f172a; border-color: rgba(15,23,42,.18); }
html[data-theme="light"] .logo-text { background: linear-gradient(135deg, #0f172a, #475569); -webkit-background-clip: text; }
html[data-theme="light"] .btn-auth-loyer.secondary { color: #0f172a; background: rgba(15,23,42,.055); border-color: rgba(15,23,42,.16); }
html[data-theme="light"] .auth-form-group-loyer label { color: #334155; }
html[data-theme="light"] .loyer-auth-back:hover,
html[data-theme="light"] .loyer-auth-existing-agency,
html[data-theme="light"] .loyer-auth-existing-agency:hover { color: #0f172a; }
html[data-theme="light"] .loyer-setup-progress > div.active { color: #0f172a; }
html[data-theme="light"] .loyer-setup-progress > div > span { background: rgba(15,23,42,.06); border-color: rgba(15,23,42,.16); }
html[data-theme="light"] .loyer-setup-progress-line { background: rgba(15,23,42,.16); }
html[data-theme="light"] .loyer-trust-note { color: #334155; background: rgba(13,148,136,.075); }
html[data-theme="light"] .loyer-trust-note strong { color: #0f766e; }
html[data-theme="light"] .loyer-preauth-fullscreen { color: #0f4c5c; background: rgba(255,255,255,.74); border-color: rgba(15,76,92,.24); }
html[data-theme="light"] .loyer-preauth-fullscreen:hover { color: #0f172a; background: rgba(204,251,241,.9); }

.loyer-license-reminder {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99990;
    display: flex;
    width: min(420px, calc(100vw - 36px));
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(36, 197, 179, .35);
    border-radius: 14px;
    background: rgba(9, 14, 26, .96);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .35);
}
.loyer-license-reminder div { display: grid; gap: 2px; }
.loyer-license-reminder strong { color: var(--accent-gold); font-size: .84rem; }
.loyer-license-reminder span { color: var(--text-secondary); font-size: .74rem; line-height: 1.3; }
.loyer-license-reminder button { flex: 0 0 auto; padding: 8px 11px; border: 0; border-radius: 9px; background: var(--accent-teal); color: #04111d; font-weight: 800; cursor: pointer; }
.loyer-license-reminder.expired { border-color: rgba(239, 68, 68, .45); }
.loyer-license-reminder.expired strong { color: #f87171; }
@media (max-width: 620px) { .loyer-license-reminder { right: 10px; bottom: 10px; left: 10px; width: auto; } }

/* --- BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

body {
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #090e1a;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-teal);
}

/* --- APP CONTAINER --- */
#app-container {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
aside {
    width: 280px;
    /* Fond quasi opaque sans flou : le flou fixe sur toute la hauteur coutait
       une recomposition GPU a chaque image de defilement (flashs blancs/noirs). */
    background: rgba(10, 15, 30, 0.96);
    border-right: 1px solid var(--card-border);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

/* Le menu d'agence montre sept rubriques; les suivantes restent accessibles par défilement. */
body:not(.direction-mode) aside > nav:not(#direction-sidebar-nav) {
    flex: 0 1 auto;
    max-height: calc(7 * 48px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: .35rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-teal) transparent;
}
body:not(.direction-mode) aside > nav:not(#direction-sidebar-nav)::-webkit-scrollbar { width: 7px; }
body:not(.direction-mode) aside > nav:not(#direction-sidebar-nav)::-webkit-scrollbar-thumb { background: var(--accent-teal); border-radius: 999px; }

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.logo-icon {
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-badge {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.62rem;
    color: var(--accent-teal);
    font-weight: 700;
    line-height: 1.25;
}

.logo-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
}

/* NAVIGATION */
nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    border-left: 3px solid var(--accent-teal);
    background: rgba(36, 197, 179, 0.1);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

/* GOOGLE PROFILE SECTION */
.user-profile {
    margin-top: auto;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    object-fit: cover;
    background: #1e293b;
}

.profile-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.profile-role {
    font-size: 0.75rem;
    color: var(--accent-teal);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: auto;
}

.btn-primary {
    background: var(--accent-gold);
    color: #111;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-gold-hover);
    box-shadow: 0 0 15px rgba(229, 169, 59, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.btn-teal {
    background: var(--accent-teal);
    color: #111;
}

.btn-teal:hover:not(:disabled) {
    background: var(--accent-teal-hover);
    box-shadow: 0 0 15px rgba(36, 197, 179, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* --- MAIN CONTENT AREA --- */
main {
    margin-left: 280px;
    flex-grow: 1;
    padding: 1.25rem;
    min-height: 100vh;
    min-width: 0;        /* permet aux enfants (tables/grids) de rétrécir sans déborder */
    overflow-x: hidden;  /* évite la barre de scroll horizontale parasite */
    position: relative;
    background: var(--bg-gradient);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

/* TOP STATUS BAR */
.top-status {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 0.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
}
.header-agency-badge{display:none!important}
.top-status{gap:.75rem}
.top-status .sync-status{flex:1;min-width:280px;white-space:normal;line-height:1.35}
.agency-detail-connection{margin:1rem 0}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.sync-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.sync-dot.offline {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
}
.sync-dot.state-good{background:#10b981;box-shadow:0 0 8px #10b981}
.sync-dot.state-connected{background:#3b82f6;box-shadow:0 0 8px #3b82f6}
.sync-dot.state-unsynced{background:#f59e0b;box-shadow:0 0 8px #f59e0b}

.profile-photo-control{position:relative;flex:0 0 auto}
.profile-photo-button{position:relative;display:block;width:58px;height:58px;padding:0;border:2px solid var(--warning);border-radius:50%;overflow:hidden;background:#132038;cursor:pointer}
.profile-photo-button .profile-pic{display:block;width:100%;height:100%;object-fit:cover;border:0;border-radius:50%}
.profile-photo-camera{position:absolute;right:0;bottom:0;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--accent-teal);color:#051525}
.profile-photo-camera svg{width:13px;height:13px}
.profile-photo-button.photo-disabled{cursor:not-allowed;opacity:.92}
.profile-photo-button.photo-disabled .profile-photo-camera{display:none}
.landlord-list-item{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.45rem .55rem;border:1px solid transparent;border-radius:10px;cursor:pointer}
.landlord-creation-layout{grid-template-columns:minmax(0,1fr)!important}
.landlord-directory-intro{margin:0 0 1.25rem}
.landlords-directory-modal-card{--landlord-directory-column-width:400px;width:calc(100vw - 24px);min-width:1288px;max-width:none;max-height:92vh;overflow:hidden;display:flex;flex-direction:column;padding:1.5rem}
.landlords-directory-columns{display:grid;grid-template-columns:repeat(3,var(--landlord-directory-column-width));justify-content:center;gap:1.25rem;overflow-x:hidden;overflow-y:hidden;flex:1;padding:0}
.landlord-directory-group{width:var(--landlord-directory-column-width);min-width:var(--landlord-directory-column-width);background:var(--card-bg);border:1px solid var(--card-border);border-radius:var(--radius-lg);padding:1rem;display:flex;flex-direction:column;max-height:100%;overflow-y:auto;overflow-x:hidden}
.landlord-directory-group h4{display:flex;align-items:center;gap:.45rem;margin:0 0 .75rem;padding-bottom:.65rem;border-bottom:1px solid var(--card-border)}
.landlord-directory-group.ladies h4{color:var(--accent-teal)}
.landlord-directory-group.men h4{color:var(--accent-gold)}
.landlord-directory-group.organizations h4{color:#a7f3d0}
.landlord-directory-list{list-style:none;margin:.75rem 0 0;padding:0 .35rem 0 0;display:flex;flex-direction:column;gap:.5rem;max-height:56vh;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--accent-teal) transparent}
.landlord-directory-list::-webkit-scrollbar{width:8px}.landlord-directory-list::-webkit-scrollbar-thumb{background:var(--accent-teal);border-radius:10px}
.landlord-directory-list .landlord-list-item{min-height:58px;padding:.65rem .8rem}.landlord-directory-list .landlord-list-item>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;font-size:.92rem;font-weight:650}.landlord-directory-list .landlord-list-item .btn{min-width:112px;justify-content:center}
.bilan-section-action{margin-bottom:.6rem}.btn-bilan-section{width:100%;justify-content:flex-start;min-height:48px;border:1px solid rgba(45,212,191,.44);background:linear-gradient(90deg,rgba(20,184,166,.18),rgba(15,23,42,.82));color:#f8fafc;font-weight:750}.btn-bilan-section:hover,.btn-bilan-section.is-active{background:linear-gradient(90deg,var(--accent-teal),#159c8f);color:#071827}.btn-bilan-section.mandatory{border-color:rgba(245,158,11,.55)}.btn-bilan-section.mandatory:hover,.btn-bilan-section.mandatory.is-active{background:linear-gradient(90deg,#f3b431,#d97706);color:#1b1303}
.vacancy-publication-config h3{margin-top:0}.vacancy-publication-settings{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:1rem}.publication-destination-grid{display:flex;flex-wrap:wrap;gap:.65rem;margin:0 0 1rem}.publication-destination-grid label,.publication-auto-toggle{display:flex;align-items:center;gap:.45rem;padding:.65rem .8rem;border:1px solid var(--card-border);background:rgba(15,23,42,.56);border-radius:10px;font-weight:650}.publication-destination-grid input,.publication-auto-toggle input{accent-color:var(--accent-teal);width:17px;height:17px}.vacancy-publication-config-actions{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}.vacancy-publication-search{display:flex;align-items:center;gap:.5rem;min-width:min(100%,420px);flex:1;padding:.15rem .65rem;border:1px solid var(--card-border);border-radius:12px;background:rgba(15,23,42,.56);color:var(--accent-teal)}.vacancy-publication-search .form-control{border:0;background:transparent;padding:.55rem .2rem;min-width:0}.vacancy-publication-search .form-control:focus{box-shadow:none}.vacancy-publication-list{display:grid;gap:.75rem}.vacancy-publication-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1rem;align-items:center;border:1px solid var(--card-border);background:rgba(15,23,42,.62);border-radius:14px;padding:1rem}.vacancy-publication-item h4{margin:0 0 .25rem}.vacancy-publication-item p{margin:0;color:var(--text-secondary)}.vacancy-publication-modal-card{max-width:1120px;width:min(1120px,96vw);max-height:88vh;display:flex;flex-direction:column;overflow:hidden}.vacancy-publication-modal-card .modal-header{flex:0 0 auto}.vacancy-publication-modal-body{flex:1;overflow-y:auto;overflow-x:hidden;padding-right:.35rem;display:flex;flex-direction:column;gap:.75rem;scrollbar-width:thin;scrollbar-color:var(--accent-teal) transparent}.vacancy-publication-modal-body::-webkit-scrollbar{width:8px}.vacancy-publication-modal-body::-webkit-scrollbar-thumb{background:var(--accent-teal);border-radius:10px}.vacancy-publication-modal-card > .publication-mode-actions,.vacancy-publication-modal-card > .publication-auto-toggle,.vacancy-publication-modal-card > .text-secondary{flex:0 0 auto}.vacancy-publication-modal-card::-webkit-scrollbar{width:10px}.vacancy-publication-modal-card::-webkit-scrollbar-thumb{background:var(--accent-teal);border-radius:999px}.vacancy-publication-room-context{padding:.8rem 1rem;border:1px solid rgba(45,212,191,.38);background:rgba(20,184,166,.1);border-radius:12px;margin-bottom:1rem}.publication-mode-actions{display:flex;gap:.75rem;flex-wrap:wrap;margin:1rem 0}.publication-mode-actions .btn{flex:1;min-width:220px}
.vacancy-browser-card .vacancy-publication-search{margin-bottom:1rem}.vacancy-owner-card{border:1px solid var(--card-border);border-radius:14px;background:rgba(15,23,42,.52);overflow:hidden}.vacancy-owner-button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border:0;background:transparent;color:var(--text-primary);font:inherit;font-weight:800;text-align:left;cursor:pointer}.vacancy-owner-button:hover,.vacancy-owner-card.is-open .vacancy-owner-button{background:rgba(36,197,179,.1)}.vacancy-owner-houses{display:none;padding:0 .8rem .8rem;gap:.55rem}.vacancy-owner-card.is-open .vacancy-owner-houses{display:grid}.vacancy-house-button{display:flex;align-items:center;justify-content:space-between;gap:1rem;width:100%;padding:.8rem 1rem;border:1px solid var(--card-border);border-radius:11px;background:rgba(2,6,23,.34);color:var(--text-primary);font:inherit;text-align:left;cursor:pointer}.vacancy-house-button:hover{border-color:var(--accent-teal);background:rgba(36,197,179,.09)}.vacancy-count-badge{flex:none;padding:.25rem .55rem;border-radius:999px;background:rgba(36,197,179,.16);color:var(--accent-teal);font-size:.76rem;font-weight:800}.vacancy-house-rooms-modal-card{width:80vw;max-width:1400px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden}.vacancy-house-rooms-list{overflow-y:auto;padding-right:.35rem;max-height:calc(7 * 92px);scrollbar-width:thin;scrollbar-color:var(--accent-teal) transparent}
.landlord-list-item:hover{border-color:var(--card-border);background:rgba(36,197,179,.07)}
.landlord-list-item>span{min-width:0;overflow-wrap:anywhere}
.landlord-list-item .btn{flex:0 0 auto}

/* --- DASHBOARD VIEW --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    border-color: var(--card-hover-border);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
}

.stat-icon.gold { color: var(--accent-gold); background: rgba(229, 169, 59, 0.08); }
.stat-icon.teal { color: var(--accent-teal); background: rgba(36, 197, 179, 0.08); }
.stat-icon.danger { color: var(--danger); background: rgba(239, 68, 68, 0.08); }
.stat-icon.success { color: var(--success); background: rgba(16, 185, 129, 0.08); }

.stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    margin: 1rem 0 0.25rem 0;
    letter-spacing: -0.5px;
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* SECTION HEADERS */
.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--accent-teal);
}

/* PANELS / VIEWS */
.app-panel {
    display: none;
}

.app-panel.active {
    display: block;
}

.panel-loading-overlay{position:fixed;inset:0 0 0 280px;z-index:950;display:grid;place-items:center;background:linear-gradient(135deg,rgba(9,14,26,.96),rgba(14,23,42,.96));backdrop-filter:blur(4px)}.panel-loading-overlay[hidden]{display:none}.panel-loading-card{display:flex;align-items:center;gap:.8rem;padding:1rem 1.25rem;border:1px solid rgba(45,212,191,.34);border-radius:16px;background:#111d31;color:#f8fafc;box-shadow:0 18px 45px rgba(0,0,0,.3)}.panel-loading-spinner{width:24px;height:24px;border:3px solid rgba(45,212,191,.24);border-top-color:var(--accent-teal);border-radius:50%;animation:panel-loading-spin .7s linear infinite}@keyframes panel-loading-spin{to{transform:rotate(360deg)}}@media(max-width:1024px){.panel-loading-overlay{inset:0}}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- FORMS --- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-grid-full {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-group label span.required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 10px rgba(36, 197, 179, 0.1);
}

.form-control:disabled {
    background: rgba(15, 23, 42, 0.3);
    color: var(--text-muted);
    cursor: not-allowed;
}
.dashboard-period-toolbar{display:flex;gap:.55rem;align-items:center;flex-wrap:wrap}.dashboard-period-toolbar label{font-size:.72rem;font-weight:800;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.06em}.dashboard-period-toolbar .date-badge{min-width:220px;text-align:center}.dashboard-period-control{display:block!important;width:170px!important;min-width:120px!important;min-height:48px!important;padding:.65rem 2.4rem .65rem .9rem!important;background-color:#111d32!important;color:#edf5ff!important;border:1px solid #4b6384!important;color-scheme:dark;opacity:1!important;-webkit-text-fill-color:#edf5ff!important}.dashboard-year-control{width:125px!important}.dashboard-period-control option{background:#111d32!important;color:#edf5ff!important}.dashboard-period-control:focus{border-color:var(--accent-teal)!important;box-shadow:0 0 0 3px rgba(36,197,179,.16)!important}html[data-theme="light"] .dashboard-period-control{background-color:#fff!important;color:#0f172a!important;-webkit-text-fill-color:#0f172a!important;color-scheme:light}
.agency-organization-banner{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;margin-bottom:1rem;padding:1rem 1.2rem;border:1px solid rgba(36,197,179,.3);border-radius:18px;background:linear-gradient(110deg,rgba(13,42,67,.88),rgba(10,58,56,.72))}.agency-organization-banner[hidden]{display:none!important}.agency-organization-banner strong,.agency-organization-banner small{display:block}.agency-organization-banner strong{font-size:1.05rem}.agency-organization-banner small{color:var(--text-secondary);margin-top:.2rem}.agency-organization-logo-frame{width:58px;height:58px;border:1px dashed rgba(94,234,212,.48);border-radius:14px;display:grid;place-items:center;color:var(--accent-teal);overflow:hidden}.agency-organization-logo-frame img{display:none;width:100%;height:100%;object-fit:contain;padding:.3rem}.agency-organization-logo-frame.has-logo img{display:block}.agency-organization-logo-frame.has-logo svg{display:none}

.tenant-form-grid {
    display: grid;
    gap: 1rem;
}

.tenant-form-row {
    display: grid;
    gap: 1rem;
    align-items: end;
}

.tenant-form-row-1 {
    grid-template-columns: 1fr;
}

.tenant-form-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tenant-form-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tenant-form-row-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tenant-form-row-5 {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 0.78fr) minmax(0, 0.78fr);
}

.tenant-search-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.tenant-form-divider {
    border-top: 1px solid var(--card-border);
    padding-top: 0.75rem;
}

.payment-form-row {
    display: grid;
    gap: 1rem;
    align-items: end;
}

.payment-form-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payment-form-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-section-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.payment-section-card h4 {
    font-size: 0.9rem;
    color: var(--accent-teal);
    margin-bottom: 0.75rem;
}

.payment-section-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.payment-tenant-summary {
    border: 1px solid rgba(36, 197, 179, 0.28);
    background: rgba(36, 197, 179, 0.06);
    border-radius: var(--radius-md);
    padding: 0.85rem;
}

.payment-summary-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--accent-teal);
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.payment-summary-title svg,
.payment-summary-title i {
    width: 17px;
    height: 17px;
}

.payment-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.payment-summary-item {
    min-width: 0;
    border: 1px solid var(--card-border);
    background: rgba(15, 23, 42, 0.55);
    border-radius: var(--radius-sm);
    padding: 0.6rem;
}

.payment-summary-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-bottom: 0.25rem;
}

.payment-summary-value {
    display: block;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.payment-tenant-info-card .payment-summary-grid {
    grid-template-columns: 1fr;
}

.payment-summary-placeholder {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.5;
}

.payment-visibility-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.75rem;
    color: var(--accent-gold);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.payment-visibility-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-teal);
}

.payment-secret-note {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.payment-calculated-display {
    border: 1px solid var(--card-border);
    background: rgba(15, 23, 42, 0.42);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
}

.payment-calculated-display span {
    display: block;
    color: var(--text-muted);
    font-size: 0.76rem;
    margin-bottom: 0.35rem;
}

.payment-calculated-display strong {
    display: block;
    color: var(--accent-teal);
    font-size: 1rem;
    font-weight: 800;
    white-space: nowrap;
}

.tenant-rent-compact {
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-teal);
}

.tenant-info-action-row td {
    padding-top: 0;
    border-bottom: 1px solid var(--card-border);
    background: rgba(15, 23, 42, 0.22);
}

.tenant-info-bottom-btn {
    width: 100%;
    justify-content: center;
    font-weight: 700;
    color: #07111d;
}

#panel-billing .form-grid,
#panel-billing .payment-form-row,
#panel-billing .payment-section-card,
#panel-billing .payment-section-fields,
#panel-billing .form-group,
#panel-billing .form-control {
    width: 100%;
    min-width: 0;
}

#panel-billing .form-grid {
    grid-template-columns: 1fr !important;
}

#panel-billing .payment-form-row {
    grid-column: 1 / -1;
}

#panel-billing .payment-form-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#panel-billing .payment-section-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Radio groups */
.radio-tile-group {
    display: flex;
    gap: 1rem;
}

.radio-tile-label {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-tile-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.4);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    color: var(--text-secondary);
}

.radio-tile-input:checked + .radio-tile {
    border-color: var(--accent-teal);
    background: rgba(36, 197, 179, 0.08);
    color: var(--accent-teal);
}

.radio-tile-group {
    margin-top: 0;
}

.rental-type-block {
    max-width: 560px;
    width: 100%;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-top: 1px dashed var(--card-border);
    padding-top: 0.75rem;
}

.rental-type-block > label {
    width: 100%;
    text-align: center !important;
}

.rental-type-block .radio-tile-group {
    justify-content: center;
}

.limited-table-scroll {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

.limited-table-scroll-15 {
    max-height: 690px;
}

.limited-table-scroll-10 {
    max-height: 475px;
}

.limited-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #111b2d;
}

.limited-table-scroll tfoot td {
    position: sticky;
    bottom: 0;
    z-index: 2;
}

/* Warning & Alerts */
.alert-box {
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.alert-danger {
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fde68a;
}

/* --- TABLES & GRID DATA --- */
.data-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th {
    background: rgba(10, 15, 30, 0.5);
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--card-border);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-primary);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-muted { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }

/* --- ACCOUNTING COMPONENT C1 / C2 --- */
.accounting-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
    min-width: 0; /* permet aux colonnes de rétrécir et aux tables de scroller */
}
.accounting-layout > * {
    min-width: 0; /* empêche le débordement des tables/grids internes */
}

/* La création et la liste sont deux vues distinctes qui utilisent toute la largeur. */
.accounting-layout.accounting-layout-tenants {
    grid-template-columns: 1fr;
}

/* Variant: Accounting C1/C2 panel — C1 (règlement propriétaires) occupe 2/3,
   C2 (trésorerie & réconciliation) occupe 1/3. Chaque colonne peut scroller
   horizontalement via min-width:0 pour rester lisible. */
.accounting-layout.accounting-layout-c2 {
    grid-template-columns: 2fr 1fr;
}

.accounting-layout.accounting-layout-billing {
    grid-template-columns: 2fr 1fr;
}

.accounting-layout-billing > .reconciliation-card {
    width: 100%;
}

@media(max-width: 1024px) {
    .accounting-layout,
    .accounting-layout.accounting-layout-tenants,
    .accounting-layout.accounting-layout-c2,
    .accounting-layout.accounting-layout-billing {
        grid-template-columns: 1fr;
    }
}

/* Les sous-grilles inline (grid-template-columns: 1fr 1fr / repeat(3,1fr))
   dans les formulaires d'encaissement et de fiche admin doivent pouvoir
   s'adapter et scroller horizontalement plutôt que de déborder l'écran.
   On leur impose min-width:0 et un comportement auto-fit. */
.reconciliation-card [style*="grid-template-columns: 1fr 1fr"],
.reconciliation-card [style*="grid-template-columns:1fr 1fr"],
.reconciliation-card [style*="grid-template-columns: repeat(2, 1fr)"],
.reconciliation-card [style*="grid-template-columns:repeat(2,1fr)"],
.reconciliation-card [style*="grid-template-columns: repeat(3, 1fr)"],
.reconciliation-card [style*="grid-template-columns:repeat(3,1fr)"] {
    min-width: 0;
}

.reconciliation-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-plus-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    width: 100%;
    grid-column: 1 / -1;
    align-items: start;
    box-sizing: border-box;
}

.settings-card-slot {
    min-width: 0;
    width: 100%;
}

.settings-card-slot > .reconciliation-card,
#google-integration-slot > .reconciliation-card {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.settings-plus-main,
.settings-plus-side {
    min-width: 0;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.settings-plus-main .table-responsive,
.settings-plus-side .table-responsive,
.settings-plus-main input,
.settings-plus-main textarea,
.settings-plus-side input,
.settings-plus-side textarea {
    max-width: 100%;
    box-sizing: border-box;
}

.settings-plus-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-plus-side {
    justify-self: stretch;
}

/* --- DIRECTION & AGENCIES --- */
.agencies-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1rem;
}

.agency-page-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, rgba(25,39,65,0.92), rgba(14,25,43,0.92));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 35px rgba(0,0,0,0.18);
}

.agency-page-card.main-agency {
    grid-column: 1 / -1;
    min-height: 190px;
    background: linear-gradient(125deg, rgba(13,70,67,0.92), rgba(18,38,59,0.94) 65%, rgba(96,65,13,0.82));
    border-color: rgba(36,197,179,0.35);
}

.agency-page-card::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -55px;
    bottom: -70px;
    border-radius: 50%;
    background: rgba(36,197,179,0.08);
}

.agency-card-top { display:flex; align-items:flex-start; justify-content:space-between; gap:0.75rem; }
.agency-icon-box { width:46px; height:46px; display:grid; place-items:center; border-radius:14px; color:#07111d; background:var(--accent-teal); }
.agency-icon-box svg { width:23px; height:23px; }
.agency-page-card h3 { margin: 1rem 0 0.3rem; font-size:1.15rem; }
.agency-page-card p { color:var(--text-secondary); font-size:0.82rem; }
.agency-page-meta { display:flex; flex-wrap:wrap; gap:0.45rem 0.8rem; margin:0.9rem 0 1rem; color:#cbd5e1; font-size:0.76rem; }
.agency-page-meta span { display:flex; align-items:center; gap:0.3rem; }
.agency-page-meta svg { width:14px; height:14px; color:var(--accent-gold); }
.agency-page-card .btn { margin-top:auto; position:relative; z-index:1; }
.agency-card-actions { display:flex; flex-wrap:wrap; gap:0.55rem; margin-top:auto; position:relative; z-index:1; }
.agency-card-actions .btn { margin-top:0; }
.agency-card-managers {
    display:grid;
    gap:0.55rem;
    margin:0 0 1rem;
    padding:0.9rem;
    position:relative;
    z-index:1;
    border:1px solid var(--card-border);
    border-radius:var(--radius-md);
    background:rgba(5,15,30,0.24);
}
.agency-card-managers > strong { font-size:0.88rem; }
.agency-card-managers > small { color:var(--text-secondary); font-size:0.74rem; }
.agency-card-manager {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:0.75rem;
    padding-top:0.55rem;
    border-top:1px solid rgba(255,255,255,0.07);
}
.agency-card-manager strong,
.agency-card-manager small { display:block; }
.agency-card-manager small { color:var(--text-secondary); font-size:0.72rem; line-height:1.4; }
.agency-page-card.main-agency .agency-card-actions .btn { flex:0 1 auto; }
.agency-eyebrow { display:block; color:var(--accent-teal); font-size:0.68rem; font-weight:800; letter-spacing:0.12em; text-transform:uppercase; }
.agency-card-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.agency-create-card { border-color:rgba(36,197,179,0.22); }
.agency-detail-hero { margin-bottom:1rem; padding:1.5rem; border-radius:var(--radius-lg); background:linear-gradient(120deg, rgba(13,70,67,0.9), rgba(19,34,56,0.95)); border:1px solid rgba(36,197,179,0.28); }
.agency-detail-hero h2 { margin:0.35rem 0; font-size:1.7rem; }
.agency-detail-layout { display:grid; grid-template-columns:minmax(0,2fr) minmax(290px,1fr); gap:1rem; align-items:start; }
.agency-managers-list { display:grid; gap:0.65rem; }
.agency-manager-row { display:flex; align-items:center; justify-content:space-between; gap:0.8rem; padding:0.8rem; background:rgba(255,255,255,0.035); border:1px solid var(--card-border); border-radius:var(--radius-md); }
.agency-manager-row strong { display:block; }
.agency-manager-row small { color:var(--text-secondary); }
.agency-list-section-title { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:0.4rem; padding-bottom:0.6rem; border-bottom:1px solid var(--card-border); }
.agency-list-section-title h3 { margin:0; }
.direction-access-card { grid-column:1/-1; min-height:175px; background:linear-gradient(120deg,rgba(79,57,18,0.92),rgba(18,34,55,0.96)); border-color:rgba(229,169,59,0.35); }
.direction-stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:0.75rem; margin-bottom:1rem; }
.direction-stat-card { padding:1rem; border:1px solid var(--card-border); border-radius:var(--radius-md); background:rgba(255,255,255,0.035); }
.direction-stat-card strong { display:block; margin-top:0.25rem; color:var(--accent-teal); font-size:1.35rem; }
.direction-mother-code { padding:1rem; border-radius:var(--radius-md); background:rgba(229,169,59,0.1); border:1px solid rgba(229,169,59,0.28); }
.direction-code-value { display:flex; align-items:center; justify-content:space-between; gap:0.7rem; margin-top:0.35rem; }
.direction-code-value code { color:#fff; font-size:0.95rem; letter-spacing:0.07em; word-break:break-all; }
.direction-agency-key-card{display:grid;gap:1rem;margin-top:1rem;padding:1.35rem;border:1px solid rgba(8,214,181,.35);border-radius:22px;background:linear-gradient(120deg,rgba(7,61,59,.58),rgba(15,31,55,.96))}
.direction-agency-key-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.direction-agency-key-heading strong{display:block;margin:.35rem 0 .15rem;font-size:1.15rem;color:#fff}
.direction-agency-key-heading small,.direction-agency-key-status{display:block;color:var(--text-secondary)}
.direction-agency-key-badge{display:grid;place-items:center;min-width:50px;height:50px;padding:0 .75rem;border:1px solid rgba(8,214,181,.35);border-radius:14px;background:rgba(8,214,181,.12);color:#08d6b5;font-weight:800}
.direction-agency-key-value{min-height:74px;padding:1rem 1.25rem;border:1px solid rgba(143,164,196,.14);border-radius:17px;background:rgba(4,13,29,.72)}
.direction-agency-key-value code{width:100%;text-align:center;font-size:1rem;letter-spacing:.13em}
.direction-agency-key-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem}
.direction-agency-key-actions .btn{min-height:42px}
.direction-agency-key-actions .direction-key-google-button{margin-left:auto}
.direction-agency-key-status{min-height:1.25em}
@media(max-width:760px){.direction-agency-key-actions{display:grid;grid-template-columns:1fr}.direction-agency-key-actions .direction-key-google-button{margin-left:0}.direction-agency-key-actions .btn{width:100%}}
.direction-users-group { margin-bottom:1rem; border:1px solid var(--card-border); border-radius:var(--radius-md); overflow:hidden; }
.direction-users-group h4 { padding:0.75rem 0.9rem; margin:0; background:rgba(255,255,255,0.045); color:var(--accent-gold); }
.direction-user-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:0.35rem; }
.recovery-account-actions {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:0.55rem;
    margin-top:0.65rem;
}
.agency-direction-key-row {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:0.75rem;
    align-items:center;
}
.recovery-success {
    border-color:rgba(36,197,179,0.45);
    background:rgba(36,197,179,0.1);
}

@media (max-width: 900px) {
    .agency-detail-layout { grid-template-columns:1fr; }
    .recovery-account-actions { grid-template-columns:1fr; }
    .agency-direction-key-row { grid-template-columns:1fr; }
}

@media (max-width: 820px) {
    .settings-plus-layout {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .settings-plus-layout .reconciliation-card {
        padding: 1rem;
    }
}

/* --- VIRTUAL DRIVE TREE (Simulation Dossier Virtuel Google Drive) --- */
.virtual-drive-tree {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    line-height: 1.5;
}
.virtual-drive-tree .tree-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a7f3d0;
    cursor: default;
}
.virtual-drive-tree .tree-item[ondblclick] {
    cursor: pointer;
    border-radius: 4px;
}
.virtual-drive-tree .tree-item[ondblclick]:hover {
    background: rgba(36, 197, 179, 0.12);
}
.virtual-drive-tree .tree-item i,
.virtual-drive-tree .tree-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--accent-teal);
}
.virtual-drive-tree .tree-item-l1 { padding-left: 18px; }
.virtual-drive-tree .tree-item-l2 { padding-left: 36px; }
.virtual-drive-tree .tree-item-leaf { padding-left: 54px; color: var(--text-secondary); }
.virtual-drive-tree .tree-item-leaf i,
.virtual-drive-tree .tree-item-leaf svg { color: var(--accent-gold); }
.virtual-drive-years-scroll {
    max-height: 62px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    padding-right: 4px;
    border-left: 1px dashed rgba(229, 169, 59, 0.35);
}

.reconciliation-formula {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1.5rem;
}

.formula-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.formula-row.total {
    border-top: 1px solid var(--card-border);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.formula-row.total.balanced {
    color: var(--success);
}

.formula-row.total.unbalanced {
    color: var(--danger);
}

/* --- RECENT ACTIVITY & ALERTS --- */
.alert-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--danger-bg);
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.alert-strip-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-strip-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.alert-strip-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- PREVIEW AND PRINT MODAL --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Fondlegerement plus opaque sans flou : moins de recomposition GPU
       pendant le defilement du contenu derriere les fenetres. */
    background: rgba(0, 0, 0, 0.86);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Reçu & aperçu bilan : z-index supérieur pour qu'ils s'affichent AU-DESSUS
   des autres modales (ex. fiche locataire) lorsqu'ils sont ouverts depuis
   celles-ci. Corrige le bug du reçu qui apparaissait en arrière-plan. */
#receipt-modal.modal-backdrop,
#bilan-preview-modal.modal-backdrop,
#virtual-folder-modal.modal-backdrop {
    z-index: 1100;
}

#legal-letter-draft-modal.modal-backdrop {
    z-index: 1300;
}

#professional-message-modal.modal-backdrop {
    /* Cette fenêtre sert aussi à demander la clé de récupération pendant la
       connexion distante. Elle doit donc rester au-dessus de l'écran de
       connexion (z-index 99999), sinon le parcours paraît figé. */
    z-index: 1000010;
}

.professional-message-card {
    width: min(520px, calc(100vw - 2rem));
    max-width: 520px;
    max-height: calc(100dvh - 2rem);
    padding: clamp(1.35rem, 3vw, 2rem);
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    overflow-y: auto;
}

.professional-message-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--accent-teal);
    background: rgba(36, 197, 179, 0.12);
    border: 1px solid rgba(36, 197, 179, 0.35);
}

.professional-message-icon.error {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

.professional-message-icon.success {
    color: var(--accent-teal);
}

.professional-message-card h3,
.professional-message-card p {
    margin: 0;
}

.professional-message-card p {
    color: var(--text-secondary);
    line-height: 1.55;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.professional-message-card > #professional-message-legal {
    display: none;
}

.legal-letter-draft-card {
    width: min(920px, 96vw);
    max-width: 920px;
}

.legal-letter-editor {
    overflow-y: auto;
}

#legal-letter-body {
    min-height: 360px;
    resize: vertical;
    line-height: 1.55;
    font-family: Georgia, "Times New Roman", serif;
}

.legal-letter-save-status {
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 700;
}

.legal-letter-save-status.pending {
    color: var(--accent-gold);
    background: rgba(229, 169, 59, 0.1);
}

.legal-letter-save-status.saved {
    color: var(--accent-teal);
    background: rgba(36, 197, 179, 0.1);
}

.legal-letter-actions {
    flex-wrap: wrap;
    gap: 0.6rem;
}

.modal-content {
    background: #0f172a;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: rgba(10, 15, 30, 0.4);
}

.locals-plus-toolbar{display:flex;align-items:center;gap:.85rem;flex-wrap:wrap;margin:.35rem 0 1rem;padding:.8rem;border:1px dashed rgba(36,197,179,.55);border-radius:14px;background:rgba(36,197,179,.06)}
.locals-plus-toolbar .text-secondary{font-size:.82rem}
.locals-plus-modal-content{max-width:760px}
#house-locals-plus-modal.modal-backdrop{z-index:12100}
.locals-plus-form-grid{display:grid;grid-template-columns:1.25fr 1fr .7fr;gap:1rem}
.locals-plus-list{display:grid;gap:.65rem;margin-top:1rem}
.locals-plus-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.8rem;padding:.8rem 1rem;border:1px solid var(--card-border);border-radius:12px;background:rgba(255,255,255,.025)}
.locals-plus-item small{display:block;color:var(--text-secondary);margin-top:.2rem}
.local-type-create-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,.4fr) auto;gap:.5rem;margin-bottom:1.5rem}
.house-create-modal-card{display:none;position:fixed;z-index:12050;left:50%;top:50%;transform:translate(-50%,-50%);width:min(920px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow-y:auto;margin:0;box-shadow:0 0 0 100vmax rgba(2,6,23,.82),0 28px 80px rgba(0,0,0,.55)}
.house-create-modal-card.active{display:block}
.house-create-main-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:1rem}
.house-city-field,.house-address-field,.house-standard-locals-field,.house-locals-plus-bottom{grid-column:1/-1}
.house-city-field .form-control{width:100%}
.house-locals-plus-bottom{margin-top:.35rem}
.tenant-directory-actions{display:grid;grid-template-columns:repeat(4,max-content);gap:.42rem;align-items:center;justify-content:end;overflow-x:auto;max-width:100%}
.tenant-directory-actions .btn{font-size:.65rem;line-height:1.1;padding:.58rem .66rem;white-space:nowrap}
.tenant-directory-actions .btn svg{width:16px;height:16px}
.locals-plus-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.locals-plus-config-entry{display:grid;grid-template-columns:minmax(0,1fr) 100px auto;gap:.5rem;margin:.8rem 0}
.locals-plus-config-list{display:flex;flex-direction:column;gap:.45rem;max-height:330px;overflow-y:auto}
.locals-plus-config-row{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.65rem;border:1px solid var(--card-border);border-radius:var(--radius-sm)}
.locals-plus-config-row span{display:flex;flex-direction:column;gap:.15rem}.locals-plus-config-row small{color:var(--accent-teal);font-weight:700}
body.house-create-modal-open{overflow:hidden}
.receipt-actions-row{display:flex;flex-wrap:nowrap!important;gap:.5rem;overflow-x:auto;justify-content:flex-start;scrollbar-width:thin}
.receipt-actions-row .btn{flex:0 0 auto;white-space:nowrap;padding:.65rem .8rem;font-size:.82rem}
@media(max-width:700px){.locals-plus-form-grid,.local-type-create-grid{grid-template-columns:1fr}}
@media(max-width:640px){.house-create-modal-card{width:calc(100vw - 16px);max-height:calc(100vh - 16px);padding:1rem}.house-create-main-grid{grid-template-columns:1fr!important}.tenant-directory-actions{justify-content:start}.locals-plus-settings-grid{grid-template-columns:1fr}.locals-plus-config-entry{grid-template-columns:1fr 90px}.locals-plus-config-entry .btn{grid-column:1/-1}}

/* A6 Receipt Preview styling (for window preview) */
.receipt-card {
    --receipt-fit: 1;
    background: white;
    color: black;
    padding: calc(7mm * var(--receipt-fit));
    font-family: 'Courier New', Courier, monospace;
    font-size: calc(0.72rem * var(--receipt-fit));
    border: 1px solid #ddd;
    border-radius: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 105mm;
    height: 148mm;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    margin: 0 auto;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #000;
    padding-bottom: calc(0.75rem * var(--receipt-fit));
    margin-bottom: calc(0.75rem * var(--receipt-fit));
}

.receipt-title {
    font-weight: bold;
    font-size: calc(1.2rem * var(--receipt-fit));
    letter-spacing: calc(1px * var(--receipt-fit));
}

.receipt-logo-sub {
    font-size: calc(0.7rem * var(--receipt-fit));
    text-transform: uppercase;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin: calc(0.2rem * var(--receipt-fit)) 0;
    gap: calc(0.45rem * var(--receipt-fit));
}
.receipt-row > *{min-width:0;overflow-wrap:anywhere}

.receipt-row.bold {
    font-weight: bold;
    font-size: calc(0.95rem * var(--receipt-fit));
}

.receipt-divider {
    border-top: 1px dashed #000;
    margin: calc(0.5rem * var(--receipt-fit)) 0;
}

.receipt-footer {
    text-align: center;
    margin-top: calc(0.55rem * var(--receipt-fit));
    font-size: calc(0.7rem * var(--receipt-fit));
    border-top: 2px dashed #000;
    padding-top: calc(0.5rem * var(--receipt-fit));
}

.receipt-card #receipt-dynamic-logo {
    max-height: calc(35px * var(--receipt-fit)) !important;
    margin-bottom: calc(5px * var(--receipt-fit));
}

.receipt-card #r-amount {
    font-size: calc(1.05rem * var(--receipt-fit)) !important;
}

.receipt-card .document-output-stamp {
    max-height: calc(52px * var(--receipt-fit));
    max-width: calc(120px * var(--receipt-fit));
}

@media (max-width: 520px) {
    .receipt-print-area {
        overflow-x: auto;
    }
}

/* Custom Owners list styling */
.landlord-list li {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.landlord-list li:hover {
    background: rgba(36, 197, 179, 0.1);
    border-color: var(--accent-teal);
    transform: translateX(3px);
}

/* Red Highlight status */
.status-unpaid {
    color: var(--danger) !important;
    font-weight: 700;
}

.status-paid {
    color: var(--success) !important;
    font-weight: 700;
}

.status-warning {
    color: var(--accent-gold) !important;
    font-weight: 700;
}

/* --- PRINT & EXPORT MEDIA CSS --- */
@media print {
    body * {
        visibility: hidden;
    }
    .receipt-print-area, .receipt-print-area * {
        visibility: visible;
    }
    .receipt-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

/* Collapse animation states */
.collapsed-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    margin-top: 0 !important;
}

.expanded-body {
    max-height: 2000px;
    overflow: visible;
    transition: max-height 0.3s ease-in, opacity 0.3s ease-in;
    opacity: 1;
}

.optional {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: normal;
    margin-left: 4px;
}

/* --- LOGIN OVERLAY STYLING --- */
.login-overlay-backdrop {
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100vh;
    padding: 2rem 1rem;
    background:
        linear-gradient(rgba(6, 13, 24, 0.82), rgba(6, 13, 24, 0.94)),
        radial-gradient(circle at 18% 16%, rgba(36, 197, 179, 0.24), transparent 34%),
        radial-gradient(circle at 82% 84%, rgba(229, 169, 59, 0.18), transparent 30%),
        #08111f;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    overflow-y: auto;
    isolation: isolate;
}

.login-overlay-backdrop::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    pointer-events: none;
    z-index: -2;
}

.loyer-auth-orb {
    position: fixed;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
}

.loyer-auth-orb-one { top: -60px; left: 8%; background: var(--accent-teal); }
.loyer-auth-orb-two { right: 6%; bottom: -80px; background: var(--accent-gold); }

.login-card {
    background: linear-gradient(145deg, rgba(22, 35, 58, 0.9), rgba(12, 22, 39, 0.94));
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 2.25rem;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 28px 70px rgba(0,0,0,0.48), inset 0 1px 0 rgba(255,255,255,0.04);
    backdrop-filter: blur(22px);
    text-align: left;
    animation: loyerAuthEnter 0.45s ease both;
}

.login-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-header.compact { margin-bottom: 1.35rem; }
.login-header h1 { font-size: 1.85rem; margin: 0.35rem 0 0.4rem; letter-spacing: -0.04em; }
.login-header p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; max-width: 420px; margin: 0 auto; }

.loyer-auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin-bottom: 0.8rem;
    border-radius: 20px;
    color: #07111d;
    background: linear-gradient(135deg, var(--accent-teal), #78eadc);
    box-shadow: 0 14px 35px rgba(36,197,179,0.28);
    transform: rotate(-4deg);
}

.loyer-auth-logo svg { width: 32px; height: 32px; }
.loyer-auth-kicker { display: block; color: var(--accent-gold); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.loyer-auth-actions { display: grid; gap: 0.75rem; }

.btn-auth-loyer {
    width: 100%;
    min-height: 50px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border: 0;
    border-radius: 13px;
    color: #07111d;
    background: linear-gradient(135deg, var(--accent-teal), #5be0d0);
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-auth-loyer.secondary { color: #fff; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); }
.btn-auth-loyer.remote { color: #07111d; background: linear-gradient(135deg, #60a5fa, #5eead4); box-shadow: 0 10px 28px rgba(59,130,246,0.18); }
.btn-auth-loyer.developer { color:#fff; background:linear-gradient(135deg,#f59e0b,#ea580c); box-shadow:0 10px 28px rgba(245,158,11,0.2); }
.loyer-developer-access-dock {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000001;
    width: auto;
    min-width: 300px;
    border: 1px solid rgba(255,255,255,0.3);
}
.btn-auth-loyer:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 10px 28px rgba(36,197,179,0.2); }
.btn-auth-loyer svg { width: 19px; height: 19px; }

@media (max-width: 600px) {
    .loyer-developer-access-dock { top:0.65rem; right:0.65rem; left:0.65rem; width:auto; min-width:0; }
}

.auth-form-group-loyer { margin-bottom: 1rem; }
.auth-form-group-loyer label { display: block; color: #cbd5e1; margin-bottom: 0.45rem; font-size: 0.75rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
.auth-form-group-loyer input {
    width: 100%;
    min-height: 46px;
    padding: 0.75rem 0.9rem;
    color: #fff;
    background: rgba(255,255,255,0.065);
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.auth-form-group-loyer input:focus { border-color: var(--accent-teal); background: rgba(36,197,179,0.08); box-shadow: 0 0 0 3px rgba(36,197,179,0.13); }
.auth-form-group-loyer input::placeholder { color: #64748b; }
.loyer-auth-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.loyer-recovery-options { display:grid; gap:.75rem; margin:1rem 0; }
.loyer-recovery-option { width:100%; display:flex; flex-direction:column; align-items:flex-start; gap:.35rem; padding:1rem 1.1rem; border:1px solid rgba(45,212,191,.35); border-radius:16px; background:rgba(30,41,59,.9); color:var(--text-primary); text-align:left; cursor:pointer; }
.loyer-recovery-option:hover,.loyer-recovery-option:focus-visible { border-color:var(--accent-teal); transform:translateY(-1px); }
.loyer-recovery-option strong { font-size:1.02rem; }
.loyer-recovery-option small { color:var(--text-secondary); line-height:1.45; }
.loyer-recovery-flow { margin:1rem 0; padding:1rem; border:1px solid rgba(45,212,191,.38); border-radius:18px; background:rgba(8,47,73,.35); }
.loyer-recovery-flow[hidden],.loyer-recovery-found[hidden] { display:none !important; }
.loyer-recovery-found { margin:.85rem 0; padding:.85rem 1rem; border-radius:12px; background:rgba(16,185,129,.12); color:#5eead4; line-height:1.45; }
.loyer-connectivity-states.compact { margin:.35rem 0 .75rem; }
.loyer-connectivity-states.compact > div { min-height:auto; }
.btn-auth-loyer.recovery { border-color:rgba(45,212,191,.5); }
.loyer-auth-password-wrap { position: relative; }
.loyer-auth-password-wrap input { padding-right: 3rem; }
.loyer-auth-password-wrap button { position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%); display: flex; padding: 0.35rem; color: var(--text-secondary); border: 0; background: transparent; cursor: pointer; }
.loyer-auth-password-wrap button svg { width: 18px; height: 18px; }
.loyer-auth-checkbox { display: flex; align-items: center; gap: 0.5rem; margin: -0.25rem 0 1rem; color: var(--text-secondary); font-size: 0.8rem; cursor: pointer; }
.loyer-auth-checkbox input { width: auto; accent-color: var(--accent-teal); }
.password-visibility-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.45rem 0 0.8rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
}
.password-visibility-toggle input {
    width: auto;
    min-height: 0;
    accent-color: var(--accent-teal);
}
.professional-prompt-password-toggle {
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 0.2rem;
}
#loyer-auth-setup {
    max-width: 760px;
}
#loyer-company-setup-form .loyer-auth-form-grid > .auth-form-group-loyer > label {
    min-height: 2.1em;
    display: flex;
    align-items: flex-end;
}
.loyer-setup-progress { display: flex; align-items: flex-start; margin: 0 0 1.4rem; }
.loyer-setup-progress > div:not(.loyer-setup-progress-line) { width: 118px; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; color: var(--text-muted); text-align: center; }
.loyer-setup-progress > div > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: var(--text-secondary); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.13); font-size: 0.78rem; font-weight: 800; }
.loyer-setup-progress > div > small { font-size: 0.66rem; font-weight: 700; line-height: 1.2; }
.loyer-setup-progress > div.active { color: #fff; }
.loyer-setup-progress > div.active > span { color: #07111d; background: var(--accent-teal); border-color: var(--accent-teal); box-shadow: 0 0 0 4px rgba(36,197,179,0.12); }
.loyer-setup-progress > div.completed > span { color: #07111d; background: var(--accent-gold); border-color: var(--accent-gold); }
.loyer-setup-progress-line { flex: 1; height: 1px; margin-top: 15px; background: rgba(255,255,255,0.13); }
.loyer-auth-error { display: none; margin-bottom: 0.8rem; padding: 0.7rem 0.8rem; color: #fecaca; background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); border-radius: 10px; font-size: 0.82rem; }
.loyer-auth-error.show { display: block; }
.loyer-auth-back { width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.4rem; margin-top: 0.75rem; padding: 0.6rem; color: var(--text-secondary); background: transparent; border: 0; cursor: pointer; font-weight: 650; }
.loyer-auth-back:hover { color: #fff; }
.loyer-auth-back svg { width: 16px; height: 16px; }
.loyer-auth-existing-agency { width: 100%; justify-content: center; margin-top: 0.85rem; padding: 0.7rem; border: 1px solid rgba(94, 234, 212, 0.25); border-radius: 10px; background: rgba(15, 118, 110, 0.08); color: #99f6e4; }
.loyer-auth-existing-agency:hover { background: rgba(15, 118, 110, 0.18); color: #fff; }
.loyer-preauth-fullscreen { display: flex; width: max-content; align-items: center; justify-content: center; gap: 0.45rem; margin: 0.75rem 0 1rem auto; padding: 0.55rem 0.8rem; border: 1px solid rgba(94, 234, 212, 0.3); border-radius: 10px; background: rgba(15, 118, 110, 0.12); color: #99f6e4; font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.loyer-preauth-fullscreen:hover { background: rgba(15, 118, 110, 0.25); color: #fff; }
.loyer-preauth-fullscreen svg { width: 16px; height: 16px; }
.loyer-auth-global-tools { position: fixed; top: 1rem; left: 1rem; z-index: 1000001; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.loyer-auth-global-tools .loyer-preauth-fullscreen { margin: 0; }
.loyer-auth-separator { display: flex; align-items: center; gap: 0.65rem; margin: 1.1rem 0 0.8rem; color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.loyer-auth-separator::before, .loyer-auth-separator::after { content: ""; height: 1px; flex: 1; background: rgba(255,255,255,0.1); }
.loyer-google-login { display: flex; justify-content: center; min-height: 42px; }
.loyer-auth-default-hint { margin-top: 0.75rem; color: var(--text-muted); font-size: 0.72rem; text-align: center; }
.loyer-auth-field-hint { display: block; margin-top: 0.45rem; color: var(--text-muted); font-size: 0.72rem; line-height: 1.45; }
.auth-signature { margin-top: 1.5rem; color: var(--text-muted); font-size: 0.72rem; text-align: center; }
.auth-signature a { color: #5eead4; text-decoration: none; }
.auth-signature a:hover { text-decoration: underline; }
.loyer-trust-note { display: grid; gap: 0.3rem; margin: 0 0 1rem; padding: 0.8rem 0.9rem; border: 1px solid rgba(45, 212, 191, 0.3); border-radius: 12px; background: rgba(13, 148, 136, 0.1); color: #cbd5e1; font-size: 0.75rem; line-height: 1.45; }
.loyer-trust-note strong { color: #5eead4; font-size: 0.78rem; }
.loyer-trust-note.compact { margin: 0.85rem 0 0; padding: 0.65rem 0.75rem; font-size: 0.7rem; }
.loyer-login-remote-shortcut { margin-top: 0.85rem; }

.loyer-connectivity-states,
.loyer-install-guide {
    display: grid;
    gap: 0.65rem;
    margin: 0 0 1rem;
}
.loyer-connectivity-states > div,
.loyer-install-guide > div {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(148,163,184,0.2);
    border-radius: 12px;
    background: rgba(15,23,42,0.46);
}
.loyer-connectivity-states > div > svg,
.loyer-install-guide > div > svg {
    width: 21px;
    min-width: 21px;
    color: #94a3b8;
}
.loyer-connectivity-states > div.done {
    border-color: rgba(45,212,191,0.35);
    background: rgba(13,148,136,0.1);
}
.loyer-connectivity-states > div.done > svg { color: #5eead4; }
.loyer-connectivity-states span,
.loyer-install-guide span { display: grid; gap: 0.18rem; }
.loyer-connectivity-states strong,
.loyer-install-guide strong { color: #f8fafc; font-size: 0.8rem; }
.loyer-connectivity-states small,
.loyer-install-guide small { color: #94a3b8; font-size: 0.72rem; line-height: 1.4; }

.loyer-auth-online { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1.1rem; padding: 0.8rem; border: 1px solid rgba(229,169,59,0.22); border-radius: 13px; background: rgba(229,169,59,0.07); }
.loyer-auth-online > div { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.loyer-auth-online > div > svg { width: 21px; color: var(--accent-gold); flex-shrink: 0; }
.loyer-auth-online span { display: flex; min-width: 0; flex-direction: column; }
.loyer-auth-online strong { font-size: 0.8rem; }
.loyer-auth-online small { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.loyer-auth-online button { padding: 0.45rem 0.75rem; border: 1px solid rgba(229,169,59,0.35); border-radius: 9px; color: var(--accent-gold); background: rgba(229,169,59,0.1); cursor: pointer; }
.loyer-auth-online button:disabled { opacity: 0.4; cursor: not-allowed; }

@keyframes loyerAuthEnter {
    from { opacity: 0; transform: translateY(22px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
    .login-overlay-backdrop { align-items: flex-start; padding: 1rem 0.75rem calc(6rem + env(safe-area-inset-bottom)); }
    .login-card { padding: 1.35rem; border-radius: 19px; margin: 3.2rem 0 0; }
    .loyer-auth-global-tools { top: 0.55rem; left: 0.55rem; right: 0.55rem; }
    .login-header h1 { font-size: 1.55rem; }
    .loyer-auth-form-grid { grid-template-columns: 1fr; gap: 0; }
    .loyer-auth-online small { max-width: 175px; }
}

@media (min-width: 601px) and (max-height: 950px) {
    .login-overlay-backdrop {
        align-items: flex-start;
        padding: 0.65rem 1rem;
    }
    #loyer-auth-setup {
        margin: auto 0;
        padding: 1rem 1.25rem;
        border-radius: 18px;
    }
    #loyer-auth-setup .login-header.compact {
        margin-bottom: 0.45rem;
    }
    #loyer-auth-setup .loyer-auth-logo {
        width: 42px;
        height: 42px;
        margin-bottom: 0.3rem;
        border-radius: 13px;
    }
    #loyer-auth-setup .loyer-auth-logo svg {
        width: 22px;
        height: 22px;
    }
    #loyer-auth-setup .login-header h1 {
        margin: 0.15rem 0;
        font-size: 1.4rem;
    }
    #loyer-auth-setup .login-header p {
        font-size: 0.75rem;
        line-height: 1.25;
    }
    #loyer-auth-setup .loyer-setup-progress {
        margin-bottom: 0.55rem;
    }
    #loyer-auth-setup .loyer-setup-progress > div > span {
        width: 25px;
        height: 25px;
    }
    #loyer-auth-setup .loyer-setup-progress-line {
        margin-top: 12px;
    }
    #loyer-auth-setup .auth-form-group-loyer {
        margin-bottom: 0.45rem;
    }
    #loyer-auth-setup .auth-form-group-loyer label {
        margin-bottom: 0.25rem;
        font-size: 0.68rem;
    }
    #loyer-auth-setup .auth-form-group-loyer input {
        min-height: 39px;
        padding: 0.55rem 0.75rem;
    }
    #loyer-auth-setup .loyer-auth-field-hint {
        margin-top: 0.2rem;
        font-size: 0.62rem;
        line-height: 1.25;
    }
    #loyer-auth-setup .loyer-auth-checkbox {
        margin: -0.05rem 0 0.45rem;
    }
    #loyer-auth-setup .loyer-connectivity-states.compact {
        margin-bottom: 0.35rem;
    }
    #loyer-auth-setup .loyer-connectivity-states.compact > div {
        padding: 0.45rem 0.65rem;
    }
    #loyer-auth-setup .btn-auth-loyer {
        min-height: 40px;
        padding: 0.55rem 0.8rem;
    }
    #loyer-auth-setup .loyer-auth-back {
        margin-top: 0.25rem;
        padding: 0.35rem;
    }
}

@media (min-width: 601px) and (max-height: 800px) {
    #loyer-auth-setup {
        padding: 0.65rem 1rem;
    }
    #loyer-auth-setup .loyer-auth-logo {
        width: 34px;
        height: 34px;
        margin-bottom: 0.15rem;
    }
    #loyer-auth-setup .loyer-auth-logo svg {
        width: 18px;
        height: 18px;
    }
    #loyer-auth-setup .login-header h1 {
        font-size: 1.2rem;
    }
    #loyer-auth-setup .login-header p,
    #loyer-auth-setup .loyer-setup-progress > div > small {
        font-size: 0.58rem;
    }
    #loyer-auth-setup .loyer-setup-progress {
        margin-bottom: 0.3rem;
    }
    #loyer-auth-setup .auth-form-group-loyer {
        margin-bottom: 0.3rem;
    }
    #loyer-auth-setup .auth-form-group-loyer input {
        min-height: 34px;
        padding: 0.42rem 0.65rem;
    }
    #loyer-auth-setup .loyer-auth-field-hint {
        font-size: 0.56rem;
        line-height: 1.15;
    }
    #loyer-auth-setup .loyer-connectivity-states.compact > div {
        padding: 0.32rem 0.55rem;
    }
    #loyer-auth-setup .btn-auth-loyer {
        min-height: 34px;
        padding: 0.4rem 0.7rem;
        font-size: 0.78rem;
    }
    #loyer-auth-setup .loyer-auth-back {
        font-size: 0.7rem;
        padding: 0.25rem;
    }
}

/* Tenant form distinction styles */
#tenant-form-card.habitation-style {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.10), rgba(59, 130, 246, 0.04)) !important;
    border: 1px solid rgba(37, 99, 235, 0.35) !important;
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.15);
}
#tenant-form-card.professionnel-style {
    background: linear-gradient(180deg, rgba(180, 83, 9, 0.12), rgba(251, 146, 60, 0.05)) !important;
    border: 1px solid rgba(180, 83, 9, 0.35) !important;
    box-shadow: inset 0 0 0 1px rgba(253, 186, 116, 0.15);
}

/* =====================================================================
   ACTIONS 6 & 7 — Fiche d'Administration : 16 fixed rows + modern tables
   Aerated, high-contrast layout that renders perfectly on screen AND in
   the PDF export sent to owners (print-safe, no white pages).
   ===================================================================== */

/* The PDF element is rendered on a white background; the on-screen inline
   fiche is injected inside #bilan-sheet-inline-container which itself sits
   on a dark card, so we scope the table styling to .admin-sheet explicitly. */
table.admin-sheet {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 18px 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    line-height: 1.35;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Header row "Local / Rubrique" + local columns */
table.admin-sheet thead th {
    background: #0f766e;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 9px;
    padding: 8px 6px;
    border: 1px solid #0f766e;
    text-align: center;
}
table.admin-sheet thead th.col-rubrique {
    text-align: left;
    width: 150px;
    background: #134e4a;
}

/* Body cells (base) — generous padding for an aerated, modern feel */
table.admin-sheet tbody td {
    padding: 7px 6px;
    border: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}
table.admin-sheet tbody tr:nth-child(even) td {
    background: #f8fafc;
}

/* Left rubrique label column */
table.admin-sheet .fat-row-label {
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    background: #f1f5f9 !important;
    border-right: 2px solid #cbd5e1;
}

/* Row 1 — Nom et Prénom (highlighted) */
table.admin-sheet tbody tr.row-name td {
    background: #ecfdf5;
    font-weight: 700;
    color: #064e3b;
    border-bottom: 2px solid #14b8a6;
}
table.admin-sheet tbody tr.row-name td.cell-name.vacant {
    color: #94a3b8;
    font-weight: 600;
}
table.admin-sheet tbody tr.row-name td.fat-row-label {
    background: #d1fae5 !important;
    color: #064e3b;
}

/* Rows 2-4 — Cautions */
table.admin-sheet tbody tr.row-caution td.cell-amount.paid {
    color: #0f766e;
    font-weight: 700;
}
table.admin-sheet tbody tr.row-caution td.cell-amount.empty {
    color: #cbd5e1;
}

/* Rows 5-16 — Monthly status badges */
table.admin-sheet tbody tr.row-month td.cell-status.paid {
    background: #dcfce7;
    color: #15803d;
    font-weight: 700;
    border: 1px solid #bbf7d0;
}
table.admin-sheet tbody tr.row-month td.cell-status.unpaid {
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 700;
    border: 1px solid #fecaca;
}
table.admin-sheet tbody tr.row-month td.cell-status.vacant-cell {
    color: #cbd5e1;
}
/* Tâche 1 — months strictly after the current date: neutral, not unpaid. */
table.admin-sheet tbody tr.row-month td.cell-status.future-cell {
    color: #94a3b8;
    background: #f1f5f9;
    font-style: italic;
    border: 1px solid #e2e8f0;
}

/* Single-column variant (no locals configured) */
table.admin-sheet.single .fat-row-value.empty {
    color: #cbd5e1;
    font-style: italic;
}

/* Level title above each per-level table */
.admin-level-title {
    margin: 14px 0 6px 0;
    font-size: 12px;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding-bottom: 4px;
    border-bottom: 2px solid #14b8a6;
}

.admin-sheet-note {
    font-size: 10px;
    color: #64748b;
    font-style: italic;
    margin-bottom: 20px;
}

/* Responsive: on narrow screens, allow horizontal scroll so the 16-row
   structure is never broken. The wrapping container handles overflow. */
@media (max-width: 768px) {
    table.admin-sheet {
        font-size: 9px;
    }
    table.admin-sheet tbody td,
    table.admin-sheet thead th {
        padding: 5px 4px;
    }
    table.admin-sheet thead th.col-rubrique {
        width: 110px;
    }
}

/* Print hardening: ensure the administrative sheet always prints with full
   borders and contrasting colours, avoiding the "white page" PDF bug. */
@media print {
    table.admin-sheet,
    table.admin-sheet thead th,
    table.admin-sheet tbody td {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        border: 1px solid #94a3b8 !important;
    }
    table.admin-sheet {
        page-break-inside: auto;
    }
    table.admin-sheet tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    table.admin-sheet thead {
        display: table-header-group;
    }
}

/* ACTIONS 1 & 2 — A/B receipt tab switcher in the receipt modal */
.receipt-tab {
    opacity: 0.55;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.receipt-tab.active-tab {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px var(--accent-teal);
}

/* Virtual folder modal items (double-clic Simulation Drive). */
.vd-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,0,0,0.25);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}
.vd-item svg,
.vd-item i {
    width: 16px;
    height: 16px;
    color: var(--accent-teal);
    flex-shrink: 0;
}

/* ===================================================================== */
/* Tâche 4 — AFFICHAGE RESPONSIF COMPLET (PC / tablettes / mobiles)      */
/* ===================================================================== */

/* Hamburger button — hidden on desktop, visible on small screens. */
.btn-toggle-sidebar {
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--accent-teal);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    cursor: pointer;
    flex-shrink: 0;
}
.btn-toggle-sidebar svg,
.btn-toggle-sidebar i {
    width: 22px;
    height: 22px;
}

/* Overlay shown when the mobile drawer is open. */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
}
#app-container.sidebar-open .sidebar-overlay {
    display: block;
}

/* --- Responsive form grids: make fixed multi-column grids auto-collapse --- */
/* Convert the hardcoded inline 2/3-column grids to a flexible auto-fit grid
   so they collapse gracefully on narrow screens. */
.form-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}
.form-grid-full {
    grid-column: 1 / -1;
}
.rental-type-block {
    max-width: min(560px, 100%);
}

/* Header becomes wrap-friendly. */
header {
    flex-wrap: wrap;
    gap: 0.75rem;
}
.top-status {
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===== BREAKPOINT: TABLET & MOBILE (≤ 1024px) ===== */
@media (max-width: 1024px) {
    /* Sidebar becomes an off-canvas drawer. */
    aside {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.4);
    }
    #app-container.sidebar-open aside {
        transform: translateX(0);
    }
    main {
        margin-left: 0;
        padding: 1.25rem;
    }
    .btn-toggle-sidebar {
        display: inline-flex;
    }

    /* Dashboard / house admin two-column summary collapses. */
    .dashboard-grid[style*="grid-template-columns: 1fr 1fr"],
    #house-details-view .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    /* Modal widths adapt. */
    .modal-content {
        width: 95% !important;
        max-width: 95vw !important;
    }
}

/* ===== BREAKPOINT: LARGE MOBILE (≤ 768px) ===== */
@media (max-width: 768px) {
    main {
        padding: 1rem;
    }

    .tenant-form-row-2,
    .tenant-form-row-3,
    .tenant-form-row-4,
    .tenant-form-row-5,
    .tenant-search-grid,
    .payment-form-row-2,
    .payment-form-row-3,
    .payment-section-fields,
    .payment-summary-grid {
        grid-template-columns: 1fr;
    }

    /* The internal 2-column grid of the tenant fiche collapses to 1 column. */
    #tenant-fiche-modal .modal-body > div[style*="grid-template-columns: 180px 1fr"],
    #tenant-fiche-modal .modal-body > div[style*="grid-template-columns:180px 1fr"] {
        grid-template-columns: 1fr !important;
    }
    #tenant-fiche-id-card {
        margin: 0 auto;
        max-width: 180px;
    }

    /* Section title bars stack vertically. */
    .section-title-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .section-title-bar > div {
        width: 100%;
    }

    /* Stat values slightly smaller to avoid overflow. */
    .stat-value {
        font-size: 1.4rem;
    }

    /* Reconciliation cards less padding. */
    .reconciliation-card {
        padding: 1rem;
    }

}

/* ===== BREAKPOINT: SMALL MOBILE (≤ 480px) ===== */
@media (max-width: 480px) {
    main {
        padding: 0.75rem;
    }
    header {
        gap: 0.5rem;
    }
    .top-status .sync-status,
    #btn-fullscreen,
    #active-agency-badge {
        font-size: 0.72rem;
    }
    /* Buttons in title bars go full-width stacked. */
    .section-title-bar > div[style*="display: flex"],
    .section-title-bar > div[style*="display:flex"] {
        flex-direction: column;
    }
    .section-title-bar > div[style*="display: flex"] > *,
    .section-title-bar > div[style*="display:flex"] > * {
        width: 100%;
    }
    .stat-value {
        font-size: 1.2rem;
    }
    /* Modals nearly full-screen on small phones. */
    .modal-content {
        width: 98% !important;
        max-height: 94vh !important;
    }
    .modal-body {
        padding: 1rem !important;
    }
}
.global-floating-tools{position:fixed;top:12px;right:14px;z-index:1000002;display:flex;flex-direction:column;gap:8px}.global-tool-button{width:44px;height:44px;border:1px solid rgba(255,255,255,.22);border-radius:999px;background:#0b1730;color:#fff;box-shadow:0 8px 24px rgba(0,0,0,.24);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .2s ease,background .2s ease,border-color .2s ease}.global-tool-button:hover{transform:translateY(-1px);background:#12305a;border-color:rgba(94,234,212,.55)}.global-tool-button:disabled{opacity:.55;cursor:wait}.global-tool-button svg{width:19px;height:19px}.global-tool-button.is-syncing svg{animation:global-tool-spin .85s linear infinite}@keyframes global-tool-spin{to{transform:rotate(360deg)}}html[data-theme="light"] .global-tool-button{background:#fff;color:#0f172a;border-color:rgba(15,23,42,.18);box-shadow:0 8px 24px rgba(15,23,42,.17)}html[data-theme="light"] .global-tool-button:hover{background:#e6fffb}.direction-secret-actions,.direction-cloud-actions{display:flex;flex-direction:column;align-items:flex-end;gap:.35rem}.secret-masked{filter:blur(7px);user-select:none}@media(max-width:700px){body{padding-bottom:66px}.global-floating-tools{top:auto;right:50%;bottom:10px;transform:translateX(50%);flex-direction:row;padding:6px;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:rgba(5,15,31,.82);backdrop-filter:blur(14px)}html[data-theme="light"] .global-floating-tools{background:rgba(241,248,250,.9);border-color:rgba(15,23,42,.14)}.global-tool-button{width:42px;height:42px}}

/* Centre de commandement Direction — structure fidèle au modèle multi-unités. */
.direction-sidebar-nav{display:none!important;min-height:0;overflow-y:auto;padding-right:.35rem;gap:.45rem}
body.direction-mode aside>nav:not(#direction-sidebar-nav){display:none}
body.direction-mode .direction-sidebar-nav{display:flex!important;flex-direction:column}
.direction-nav-label{padding:.4rem .75rem;color:#8fa4c4;font-size:.72rem;font-weight:800;letter-spacing:.15em;text-transform:uppercase}
.direction-sidebar-nav button{display:flex;align-items:center;gap:.75rem;width:100%;padding:.78rem .85rem;border:0;border-left:3px solid transparent;border-radius:12px;background:transparent;color:#aebdd4;font:inherit;font-size:.84rem;font-weight:700;text-align:left;cursor:pointer}
.direction-sidebar-nav button:hover,.direction-sidebar-nav button.active{border-left-color:#08d6b5;background:rgba(8,214,181,.13);color:#fff}
.direction-sidebar-nav button svg{width:19px;height:19px;color:#08d6b5;flex:none}
.direction-command-center{max-width:1280px;margin:0 auto;padding-bottom:2rem}
.direction-command-hero{display:grid;grid-template-columns:1fr;gap:1.25rem;padding:2rem;border:1px solid rgba(61,105,225,.58);border-radius:30px;background:linear-gradient(118deg,#101d73 0%,#0c2d4b 56%,#0b403f 100%);overflow:hidden;position:relative}
.direction-command-hero:after{content:"";position:absolute;right:-65px;bottom:-110px;width:300px;height:260px;border-radius:50%;background:rgba(19,208,174,.12);pointer-events:none}
.direction-command-hero h2{margin:.35rem 0;font-size:clamp(2rem,3.3vw,2.8rem);line-height:1.05;color:#fff;overflow-wrap:anywhere}
.direction-command-hero p{color:#aebdd4;max-width:680px}
.direction-command-identity{display:grid;grid-template-columns:150px minmax(0,1fr);align-items:center;gap:1.35rem;position:relative;z-index:1}.direction-company-logo-frame{width:150px;height:150px;border:1px dashed rgba(94,234,212,.5);border-radius:24px;background:rgba(4,16,34,.38);display:grid;place-items:center;overflow:hidden}.direction-command-logo{display:block;width:100%;height:100%;object-fit:contain;padding:.65rem}.direction-command-logo[hidden],.direction-company-logo-placeholder[hidden]{display:none!important}.direction-company-logo-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.55rem;text-align:center;color:#9fb0c9;font-size:.75rem;line-height:1.35;padding:1rem}.direction-company-logo-placeholder svg{width:34px;height:34px;color:#5eead4}.direction-command-actions{display:none}.direction-central-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.45rem}.direction-central-actions .btn{padding:.62rem .8rem}
.backup-action-grid{display:grid!important;grid-template-columns:repeat(2,minmax(125px,1fr));gap:.45rem;align-items:stretch}.backup-action-grid .btn{white-space:normal;line-height:1.2;justify-content:center}.agency-manager-row .direction-user-actions{max-width:640px}
.direction-central-connection .direction-live-card{grid-template-columns:auto minmax(250px,1fr) minmax(210px,.75fr) auto}
.direction-central-connection{grid-column:1/-1;position:relative;z-index:1}
.direction-central-connection .direction-live-card{background:rgba(5,15,31,.44)}
.direction-command-center .direction-stats-grid{grid-template-columns:repeat(4,minmax(140px,1fr));margin:1.25rem 0}
.direction-command-center .direction-stat-card{min-height:125px;padding:1.35rem;border-color:#263b62;border-radius:22px;background:#121f35}
.direction-command-center .direction-stat-card span{color:#aebdd4;font-size:.95rem}
.direction-command-center .direction-stat-card strong{font-size:2rem;color:#08d6b5}
.direction-section{margin:1.05rem 0;border:1px solid #263b62;border-radius:28px;background:#111e33;overflow:hidden}
.direction-section-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:108px;padding:1.35rem 1.75rem}
.direction-section-heading h3{margin:.25rem 0 0;font-size:clamp(1.2rem,2vw,1.65rem);color:#fff}
.direction-section-heading>button{width:54px;height:54px;border:1px solid #40506d;border-radius:15px;background:#101a2b;color:#fff;font-size:1.8rem;cursor:pointer;flex:none}
.direction-section-heading>button:hover{border-color:#08d6b5;color:#08d6b5}
.direction-section .collapsible-body{padding:0 2.2rem 2rem;border-top:1px solid rgba(143,164,196,.15)}
.direction-section .collapsible-body.is-collapsed{display:none}
.direction-live-grid{display:grid;gap:.75rem;margin-top:1rem}
.direction-live-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;padding:1rem 1.1rem;border:1px solid #31445f;border-radius:18px;background:#0d192b}
.direction-live-dot{width:14px;height:14px;border-radius:50%;background:#f59e0b;box-shadow:0 0 0 7px rgba(245,158,11,.12)}
.direction-live-dot.online{background:#08d6b5;box-shadow:0 0 0 7px rgba(8,214,181,.12)}
.direction-live-dot.error{background:#ef4444;box-shadow:0 0 0 7px rgba(239,68,68,.12)}
.direction-live-card.state-good{border-color:rgba(16,185,129,.75);background:linear-gradient(90deg,rgba(16,185,129,.11),#0d192b 42%)}
.direction-live-card.state-connected{border-color:rgba(59,130,246,.78);background:linear-gradient(90deg,rgba(59,130,246,.12),#0d192b 42%)}
.direction-live-card.state-unsynced{border-color:rgba(245,158,11,.82);background:linear-gradient(90deg,rgba(245,158,11,.12),#0d192b 42%)}
.direction-live-dot.state-good{background:#10b981;box-shadow:0 0 0 7px rgba(16,185,129,.14)}
.direction-live-dot.state-connected{background:#3b82f6;box-shadow:0 0 0 7px rgba(59,130,246,.14)}
.direction-live-dot.state-unsynced{background:#f59e0b;box-shadow:0 0 0 7px rgba(245,158,11,.14)}
.direction-live-card strong,.direction-live-card small{display:block}.direction-live-card small{margin-top:.22rem;color:#9fb0c9}
.direction-live-meta{text-align:right;color:#9fb0c9;font-size:.75rem;line-height:1.45}
.direction-inline-actions{display:flex;flex-wrap:wrap;gap:.7rem;margin:1rem 0}
.company-configuration-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.company-configuration-grid .form-grid-full{grid-column:1/-1}.company-logo-preview{margin-top:.65rem;padding:.65rem;border:1px solid var(--card-border);border-radius:12px;background:rgba(5,15,31,.3)}.company-logo-preview img{display:block;max-width:220px;max-height:90px;object-fit:contain}
html[data-theme="light"] .direction-section,html[data-theme="light"] .direction-command-center .direction-stat-card{background:#fff;border-color:#cad8e6}
html[data-theme="light"] .direction-section-heading h3{color:#0f172a}
html[data-theme="light"] .direction-section-heading>button{background:#f3f7fa;color:#0f172a;border-color:#cbd5e1}
html[data-theme="light"] .direction-live-card{background:#f8fbfd;border-color:#d2dee8}
@media(max-width:1050px){.direction-command-hero{grid-template-columns:1fr}.direction-command-center .direction-stats-grid{grid-template-columns:1fr 1fr}.direction-section-heading{min-height:118px;padding:1.35rem}.direction-section .collapsible-body{padding:0 1.35rem 1.35rem}.direction-live-card,.direction-central-connection .direction-live-card{grid-template-columns:auto 1fr}.direction-live-meta,.direction-central-actions{grid-column:2;text-align:left;justify-content:flex-start}}
@media(max-width:700px){.direction-command-identity{grid-template-columns:1fr}.direction-company-logo-frame{width:120px;height:120px}.company-configuration-grid{grid-template-columns:1fr}.company-configuration-grid .form-grid-full{grid-column:auto}.dashboard-period-toolbar{align-items:stretch}.dashboard-period-toolbar .date-badge{width:100%;min-width:0}.dashboard-period-control,.dashboard-year-control{width:100%!important;min-width:0!important}}
[data-fullscreen-toggle]:not(.global-tool-button){display:none!important}
.renewal-sheet table thead tr,.renewal-sheet table th{background:#050505!important;color:#fff!important;border-color:#334155!important}
.renewal-sheet table th{padding:.65rem!important;font-weight:900!important}
.renewal-sheet table th *{color:#fff!important}
.renewal-sheet table{width:100%!important;table-layout:auto!important;font-size:7px!important;line-height:1.05!important}
.renewal-sheet table th,.renewal-sheet table td{padding:3px 4px!important;white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;vertical-align:middle!important}
.renewal-sheet{width:1123px!important;max-width:100%!important;overflow:auto!important;box-sizing:border-box!important}
.renewal-sheet table{border-collapse:collapse!important}
.renewal-sheet tbody tr{break-inside:avoid!important;page-break-inside:avoid!important}
.renewal-sheet .renewal-status{padding:2px 4px!important;font-size:6.7px!important;white-space:nowrap!important}
.renewal-sheet .renewal-money{font-size:7px!important;white-space:nowrap!important}
#tenant-dernier-mois-paye[readonly]{background:#e5e7eb;color:#111827;font-weight:800;cursor:not-allowed}
.collapsible-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}.collapsible-heading>button{width:34px;height:34px;border-radius:9px;border:1px solid var(--card-border);background:rgba(15,23,42,.68);color:#fff;font-size:1.25rem;cursor:pointer}.collapsible-body.is-collapsed{display:none}
.renewal-toolbar{display:flex;gap:.75rem;margin-bottom:1rem}.renewal-toolbar input,.renewal-toolbar select{border:1px solid #334155;border-radius:10px;background:#fff;color:#0f172a;padding:.7rem .85rem}.renewal-toolbar input{flex:1}.renewal-sheet{background:#fff;color:#0f172a;padding:1rem;border-radius:14px;font-family:"Trebuchet MS",sans-serif}.renewal-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:.65rem;margin:1rem 0}.renewal-summary>div{padding:.7rem;border-radius:10px;background:#e8f7f1;border:1px solid #b7e4d1}.renewal-summary span{display:block;font-size:.7rem;color:#475569}.renewal-summary strong{display:block;margin-top:.2rem}.renewal-sheet table th{padding:.55rem;border:1px solid #cbd5e1;background:#0f766e;color:#fff;white-space:nowrap}.renewal-sheet table td{padding:.5rem;border:1px solid #dbe3ea;color:#0f172a!important;background:#fff!important}.renewal-status{display:inline-block;border-radius:999px;padding:.28rem .5rem;font-size:.72rem;font-weight:800}.renewal-status.late{background:#fee2e2;color:#b91c1c}.renewal-status.upcoming{background:#fef3c7;color:#92400e}.renewal-status.covered{background:#dcfce7;color:#166534}.renewal-money{white-space:nowrap;font-weight:700}.renewal-empty{text-align:center;padding:1.5rem!important;color:#64748b}@media(max-width:760px){.renewal-toolbar{flex-direction:column}.renewal-summary{grid-template-columns:1fr 1fr}}

/* Configuration documentaire réellement reliée aux trois sorties imprimées. */
.document-config-card{margin:1rem 0!important;padding:1rem 1.15rem!important;border:1px solid #31445f!important;border-radius:18px!important;background:rgba(5,15,31,.32)!important}
.document-config-card h4{margin:.2rem 0;color:var(--text-primary);font-size:1.05rem}
.document-config-card>.collapsible-body{padding-top:1rem}
.document-inherit-toggle{display:flex;align-items:center;gap:.65rem;margin:.35rem 0 1rem;padding:.75rem;border:1px solid var(--card-border);border-radius:12px;background:rgba(36,197,179,.08);font-weight:700}
.document-stamp-manager{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--card-border)}
.document-stamp-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.7rem;margin-top:.8rem}
.document-stamp-item{display:grid;grid-template-columns:64px minmax(0,1fr) auto auto;align-items:center;gap:.65rem;padding:.65rem;border:1px solid var(--card-border);border-radius:12px;background:rgba(15,23,42,.42)}
.document-stamp-item img{width:64px;height:52px;object-fit:contain;background:#fff;border-radius:6px}
.document-stamp-item .btn{grid-column:auto}
@media(max-width:720px){.document-stamp-item{grid-template-columns:64px minmax(0,1fr)}.document-stamp-item .btn{grid-column:1/-1}}
.agency-stamp-preferences{display:grid;gap:.8rem;padding-top:1rem}
.agency-stamp-preference{display:grid;grid-template-columns:minmax(210px,.8fr) minmax(220px,1fr);gap:1rem;align-items:center}
.agency-stamp-preference label{display:flex;align-items:center;gap:.6rem;font-weight:700}
.document-output-stamp{display:block;max-width:105px;max-height:78px;object-fit:contain;margin:7px auto 0}.document-output-stamp[hidden]{display:none!important}
.document-output-footer{text-align:center;margin-top:8px;padding-top:7px;border-top:1px solid #cbd5e1;font-size:8px;color:#475569}

/* Quatre commandes horizontales et date réellement centrée. */
.global-floating-tools{flex-direction:row;flex-wrap:nowrap;right:18px;max-width:calc(100vw - 20px)}
.global-floating-tools .global-tool-button{flex:0 0 auto}
header{position:relative;display:flex;align-items:center;justify-content:flex-start;min-height:76px;padding-right:210px}
header .top-status{position:absolute;left:64px;right:210px;top:50%;transform:translateY(-50%);z-index:2;display:flex;align-items:center;justify-content:center;flex-wrap:nowrap}
header .top-status .sync-status{min-width:0;max-width:900px;justify-content:flex-start}
header .top-status #sync-text{overflow-wrap:anywhere}
#app-clock{white-space:nowrap}

.professional-choice-backdrop{z-index:1000010!important;display:flex!important;align-items:center;justify-content:center}
.professional-choice-card{width:min(720px,94vw)!important;max-height:88vh!important;padding:1.25rem!important}
.professional-choice-heading{display:flex;align-items:flex-start;gap:1rem;margin-bottom:1rem}
.professional-choice-heading h3{margin:0 0 .25rem}.professional-choice-heading p{margin:0;color:var(--text-secondary)}
.professional-choice-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;max-height:56vh;overflow:auto;padding:.2rem}
.professional-choice-item{display:flex;align-items:flex-start;gap:.7rem;padding:.9rem;border:1px solid var(--card-border);border-radius:12px;background:rgba(15,23,42,.72);color:#f8fafc;font:inherit;line-height:1.35;cursor:pointer;transition:border-color .18s ease,background .18s ease,transform .18s ease}
.professional-choice-item:hover,.professional-choice-item:focus-visible{border-color:var(--accent-teal);background:rgba(36,197,179,.13);transform:translateY(-1px);outline:none}
.professional-choice-item:has(input:checked){border-color:var(--accent-teal);background:rgba(36,197,179,.12)}
.professional-choice-item>i{flex:0 0 auto;color:var(--accent-teal);margin-top:.12rem}.professional-choice-item input{margin-top:.2rem}.professional-choice-item strong,.professional-choice-item small{display:block}.professional-choice-item strong{color:#fff;font-size:1rem;font-weight:800}.professional-choice-item small{margin-top:.28rem;color:#cbd5e1;font-size:.86rem;line-height:1.4}
.professional-choice-actions{display:flex;justify-content:flex-end;gap:.7rem;margin-top:1rem}
@media(max-width:900px){header{min-height:124px;padding-right:0}header .top-status{left:58px;right:8px;display:grid;grid-template-columns:1fr;gap:.45rem;transform:translateY(-50%)}header .top-status .sync-status{width:100%;font-size:.74rem}header .top-status #app-clock{justify-self:center}.global-floating-tools{top:auto;right:50%;bottom:10px;transform:translateX(50%);padding:6px;border-radius:999px}.agency-stamp-preference{grid-template-columns:1fr}}
@media(max-width:620px){.professional-choice-list{grid-template-columns:1fr}.professional-message-card{width:calc(100vw - 1.25rem);max-height:calc(100dvh - 1.25rem)}}

/* Sélection professionnelle des propriétaires */
.owner-directory-choice-card{width:min(1500px,96vw)!important;max-width:none!important;max-height:92vh!important;padding:1.35rem!important;display:flex;flex-direction:column;overflow:hidden}
.owner-directory-choice-heading{flex:none}.owner-directory-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;min-height:0;flex:1}
.owner-directory-choice-column{min-width:0;min-height:0;padding:1rem;border:1px solid var(--card-border);border-radius:18px;background:rgba(15,23,42,.54);display:flex;flex-direction:column}
.owner-directory-choice-column h4{display:flex;align-items:center;gap:.55rem;margin:0 0 .8rem;padding-bottom:.7rem;border-bottom:1px solid var(--card-border);color:var(--accent-teal);font-size:1rem}
.owner-directory-choice-column:nth-child(2) h4{color:var(--accent-gold)}.owner-directory-choice-column:nth-child(3) h4{color:#a7f3d0}
.owner-directory-search{flex:none;margin-bottom:.75rem}.owner-directory-choice-list{min-height:170px;max-height:56vh;overflow-y:auto;padding-right:.35rem;scrollbar-width:thin;scrollbar-color:var(--accent-teal) transparent}
.owner-directory-choice-item{display:flex;align-items:center;gap:.7rem;padding:.85rem .75rem;border-bottom:1px dashed var(--card-border);color:var(--text-primary);font-weight:750;cursor:pointer;border-radius:10px}
.owner-directory-choice-item:hover,.owner-directory-choice-item:has(input:checked){background:rgba(36,197,179,.1);color:#fff}.owner-directory-choice-item input{accent-color:var(--accent-teal)}
.owner-directory-choice-empty{padding:1rem;text-align:center;color:var(--text-muted)}.owner-directory-choice-actions{flex:none}

/* Documents de prise de fonction */
.handover-documents-card{width:min(1480px,96vw)!important;max-width:none!important;max-height:92vh!important;padding:1.3rem!important;display:flex;flex-direction:column;overflow:hidden}
.handover-editor-card{width:min(1080px,94vw)!important;max-width:none!important;max-height:92vh!important;padding:1.3rem!important;overflow:auto}
.handover-modal-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:1px solid var(--card-border)}
.handover-modal-heading h3{margin:.15rem 0;color:var(--accent-teal)}.handover-modal-heading p{margin:0;color:var(--text-secondary)}
.handover-documents-list{min-height:0;overflow-y:auto;display:grid;gap:.75rem;padding-right:.35rem;scrollbar-width:thin;scrollbar-color:var(--accent-teal) transparent}
.handover-local-row{display:grid;grid-template-columns:minmax(230px,.78fr) minmax(520px,2.2fr);gap:1rem;align-items:center;padding:1rem;border:1px solid var(--card-border);border-radius:15px;background:rgba(15,23,42,.56)}
.handover-local-info{display:flex;flex-direction:column;gap:.18rem}.handover-local-info strong{font-size:1.05rem;color:var(--accent-gold)}.handover-local-info span{color:var(--text-primary)}.handover-local-info small{color:var(--text-secondary)}
.handover-local-info em{font-style:normal;font-size:.72rem;color:var(--text-muted);margin-top:.25rem}.handover-local-info em.is-saved{color:var(--accent-teal);font-weight:700}
.handover-local-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.42rem}.handover-local-actions .btn{font-size:.7rem;padding:.58rem .68rem;white-space:nowrap}.handover-local-actions svg{width:16px;height:16px}.handover-upload-btn{margin:0;cursor:pointer}
.handover-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.9rem}.handover-editor-field{display:flex;flex-direction:column;gap:.35rem}.handover-editor-field span{font-size:.78rem;color:var(--text-secondary);font-weight:700}.handover-editor-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:.65rem;margin-top:.4rem;padding-top:1rem;border-top:1px solid var(--card-border)}

.handover-pdf{box-sizing:border-box;width:794px;height:1123px;position:relative;overflow:hidden;background:#fff;color:#111;font-family:"Times New Roman",serif;padding:20px 25px 74px}
.handover-pdf *{box-sizing:border-box}.handover-pdf-header{height:112px;display:grid;grid-template-columns:205px 1fr;align-items:center;gap:25px;padding:0 15px}.handover-pdf-header img{width:180px;height:96px;object-fit:contain}.handover-pdf-header h1{font-family:Impact,"Arial Black",sans-serif;font-size:40px;line-height:1;margin:0 0 12px;letter-spacing:.4px}.handover-pdf-header p{font-size:20px;font-weight:700;font-style:italic;text-align:center;line-height:1.08;margin:0}
.handover-pdf-rule{height:16px;border-top:3px solid #3e638f;margin:6px 0 34px;position:relative}.handover-pdf-rule span{position:absolute;width:120px;height:14px;left:50%;top:-8px;transform:translateX(-50%);background:#d34c42;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);border:3px solid #3e638f}
.handover-info-body{padding:18px 50px}.handover-info-body p{font-size:24px;line-height:1.28;margin:0}.handover-info-body strong{font-weight:400}
.handover-letter-body{padding:0 50px 60px}.handover-letter-body h2{text-align:center;font-size:18px;margin:0}.handover-stars{text-align:center;font-weight:800;font-size:17px;margin:9px 0}.handover-letter-body h3{text-align:center;text-decoration:underline;font-size:20px;margin:0 0 15px}.handover-letter-body p{font-size:16px;line-height:1.18;text-align:justify;margin:0 0 13px}.handover-letter-body h4{font-size:16px;text-decoration:underline;margin:0 0 7px}.handover-letter-body .handover-warning{font-weight:800;font-style:italic}.handover-letter-body .handover-place{text-align:right;margin-top:5px}.handover-signatures{display:flex;justify-content:space-between;padding:0 60px;margin-top:10px;font-size:17px}
.handover-pdf-footer{position:absolute;left:0;right:0;bottom:0;min-height:61px;border-top:1px solid #111;padding:5px 75px 7px;display:flex;align-items:flex-start;justify-content:space-between;font-size:13px;font-weight:700;font-style:italic;line-height:1.28}.handover-pdf-footer div:last-child{text-align:left}.handover-pdf-footer a{color:#00e;text-decoration:underline}

@media(max-width:980px){.owner-directory-choice-grid{grid-template-columns:1fr}.owner-directory-choice-card{overflow:auto}.owner-directory-choice-list{max-height:260px}.handover-local-row{grid-template-columns:1fr}.handover-local-actions{justify-content:flex-start}}
@media(max-width:680px){.handover-editor-grid{grid-template-columns:1fr}.handover-editor-actions{grid-column:1}.handover-editor-actions .btn{flex:1}.handover-local-actions .btn{flex:1 1 44%;justify-content:center}.handover-documents-card{padding:.85rem!important}.handover-modal-heading{align-items:stretch;flex-direction:column}}

/* Continuité, clôtures, personnel et assistant autonome. */
.closure-form-grid,.personnel-form-grid,.audit-filter-grid,.recovery-action-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:.75rem;margin:1rem 0}
.closure-form-grid textarea{grid-column:span 2}.closure-form-grid .btn{min-height:48px}
.recovery-warning{margin:1rem 0;padding:1rem 1.1rem;border:1px solid rgba(245,158,11,.55);border-radius:16px;background:rgba(245,158,11,.1)}
.recovery-warning strong{color:#fbbf24}.recovery-warning p{margin:.35rem 0 0;color:var(--text-secondary)}
.recovery-count-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:.6rem;margin:1rem 0}.recovery-count{padding:.8rem;border:1px solid var(--card-border);border-radius:12px;background:rgba(15,23,42,.35)}.recovery-count strong,.recovery-count span{display:block}.recovery-count strong{font-size:1.25rem;color:var(--accent-teal)}
.recovery-install-action{margin:1rem 0;padding:1rem;border:1px solid rgba(45,212,191,.45);border-radius:14px;background:rgba(20,184,166,.08)}.recovery-install-action .btn{width:100%;min-height:50px}.recovery-install-action p{margin:.7rem 0 0;text-align:center;font-size:.88rem}
.recovery-point-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 0;border-bottom:1px solid var(--card-border)}
.billing-calculator{width:min(360px,100%);margin:0 0 1rem auto;padding:1rem;border:1px solid var(--card-border);border-radius:16px;background:var(--card-bg);box-shadow:0 16px 36px rgba(0,0,0,.2)}
.calculator-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.65rem}.calculator-head button{border:0;background:transparent;color:var(--text-primary);font-size:1.5rem;cursor:pointer}.calculator-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.45rem;margin-top:.55rem}.calculator-grid button{min-height:44px;border:1px solid var(--card-border);border-radius:10px;background:rgba(36,197,179,.12);color:var(--text-primary);font:inherit;font-weight:800;cursor:pointer}.calculator-grid button:hover{border-color:var(--accent-teal)}
.offline-assistant-launcher{position:fixed;right:18px;bottom:18px;z-index:10040;display:flex;align-items:center;gap:.45rem;padding:.72rem 1rem;border:0;border-radius:999px;background:#12a85c;color:#fff;font:inherit;font-weight:800;box-shadow:0 12px 32px rgba(0,0,0,.28);cursor:pointer}
.offline-assistant{position:fixed;right:18px;bottom:78px;z-index:10041;width:min(390px,calc(100vw - 28px));padding:1rem;border:1px solid #2c4763;border-radius:20px;background:#0d192b;color:#fff;box-shadow:0 24px 60px rgba(0,0,0,.45)}.offline-assistant[hidden]{display:none}.offline-assistant-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.offline-assistant-head strong,.offline-assistant-head small{display:block}.offline-assistant-head small{color:#9fb0c9}.offline-assistant-head button{border:0;background:transparent;color:#fff;font-size:1.6rem;cursor:pointer}.offline-assistant-actions{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin:1rem 0}.offline-assistant-actions button{padding:.65rem;border:1px solid #31445f;border-radius:10px;background:#13243b;color:#fff;cursor:pointer}.offline-assistant-answer{padding:.85rem;border-radius:12px;background:rgba(8,214,181,.09);color:#dbeafe;line-height:1.5}
.profile-meta{display:block;color:var(--text-secondary);font-size:.68rem;line-height:1.35}
@media(max-width:700px){.closure-form-grid textarea{grid-column:auto}.offline-assistant-launcher{bottom:76px}.offline-assistant{bottom:132px}.recovery-point-row{align-items:flex-start;flex-direction:column}}
.tenant-row-actions{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}.tenant-row-actions .btn{white-space:nowrap}
/* Points propriétaires — interface professionnelle, compacte et responsive */
.landlord-profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem;margin-bottom:1.25rem}
.owner-point-status-card{margin:0!important;padding:1rem!important;background:linear-gradient(145deg,rgba(15,118,110,.14),rgba(15,23,42,.92))!important}
.owner-point-status-card h4{display:flex;align-items:center;gap:.45rem;color:var(--accent-teal);margin:0 0 .7rem;font-size:.88rem}
.owner-point-status-list{display:grid;gap:.42rem}
.owner-point-status-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.42rem .55rem;border:1px solid rgba(148,163,184,.16);border-radius:10px;background:rgba(15,23,42,.38);font-size:.72rem;color:var(--text-secondary)}
.owner-point-status-row strong{font-size:.78rem;color:#fff}
.owner-point-status-row.ready strong{color:#34d399}.owner-point-status-row.pending strong{color:#fbbf24}.owner-point-status-row.sent strong{color:#60a5fa}
.btn-owner-point{background:linear-gradient(135deg,#2563eb,#14b8a6)!important;color:#fff!important;border:0!important;box-shadow:0 8px 20px rgba(37,99,235,.2)}
.btn-owner-point:hover{transform:translateY(-1px);filter:brightness(1.08)}
.btn-deposit-status{width:100%;display:flex;align-items:center;justify-content:center;gap:.65rem;margin-top:.8rem;padding:.75rem 1rem;border-radius:14px;border:1px solid transparent;font-weight:800}
.btn-deposit-status.is-empty{background:var(--accent-gold);color:var(--bg-primary)}
.btn-deposit-status.has-files{background:linear-gradient(135deg,#059669,#2dd4bf);color:#052e2b}
.btn-deposit-status strong{display:inline-flex;min-width:28px;height:28px;align-items:center;justify-content:center;border-radius:999px;background:rgba(255,255,255,.24)}
.section-collapse-toggle{width:34px;height:34px;border-radius:10px;border:1px solid var(--card-border);background:var(--bg-secondary);color:var(--text-primary);font-size:1.35rem;line-height:1;cursor:pointer}
.house-detail-section-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:1.15rem 0 1rem}.house-detail-section-heading h4{display:flex;align-items:center;gap:.45rem;color:var(--accent-teal);margin:0}
.direction-danger-zone{margin-top:1rem;padding-top:1rem;border-top:1px solid rgba(239,68,68,.35)}
.direction-danger-zone .direction-section-heading{margin-bottom:.75rem}
.agency-card-delete-zone{margin-top:1rem;padding-top:1rem;border-top:1px solid rgba(239,68,68,.25);display:flex;flex-wrap:wrap;gap:.75rem}
.proof-action-row{display:grid;grid-template-columns:1fr 1fr;gap:.55rem;margin-top:.7rem}
.btn-proof-action{justify-content:center;background:#1e293b!important;border:1px solid #334155!important;color:#e2e8f0!important;min-height:44px}
.btn-proof-action:hover{border-color:#2dd4bf!important;color:#5eead4!important}
.proof-list{font-size:.72rem;color:var(--text-secondary);margin-top:6px}
.proof-file-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.35rem .45rem;margin-top:.3rem;border-radius:9px;background:rgba(15,23,42,.5)}
.proof-file-row a{display:flex;align-items:center;gap:.35rem;min-width:0;color:#5eead4;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.proof-file-row svg{width:14px;height:14px;flex:0 0 auto}
.monthly-point-validation{margin-top:1rem;padding:1rem;border:1px solid rgba(45,212,191,.3);border-radius:18px;background:linear-gradient(135deg,rgba(15,23,42,.98),rgba(8,47,73,.7))}
.monthly-point-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem}
.monthly-point-heading>div:first-child>span,.modal-eyebrow{display:block;color:#2dd4bf;font-weight:900;font-size:.68rem;letter-spacing:.15em;margin-bottom:.25rem}
.monthly-point-heading h3{display:flex;align-items:center;gap:.45rem;margin:0;color:#f8fafc;font-size:1.12rem}
.monthly-period-controls{display:grid!important;grid-template-columns:180px 130px!important;gap:.6rem!important;margin:0!important}
.monthly-period-controls .form-group{margin:0}.monthly-period-controls label{font-size:.68rem}
.bilan-period-top-controls{display:grid;grid-template-columns:minmax(180px,1fr) minmax(130px,.65fr);gap:.75rem;margin-top:.8rem;padding:.85rem;border:1px solid rgba(45,212,191,.35);border-radius:14px;background:rgba(8,47,73,.34)}
.bilan-period-top-controls .form-group{margin:0}.bilan-period-top-controls label{font-size:.72rem}
.bilan-sheets-scroll-container{background:#fff;border:1px solid #ddd;margin-top:1.5rem;border-radius:var(--radius-md);box-shadow:inset 0 2px 4px rgba(0,0,0,.05);overflow-x:auto;color:#000;padding:.75rem}
.bilan-sheets-scroll-container.has-multiple-bilans{max-height:78vh;overflow-y:scroll;scrollbar-gutter:stable}
.bilan-section-one-year{scroll-margin-top:.75rem}
@media(max-width:680px){.bilan-period-top-controls{grid-template-columns:1fr 1fr}.bilan-sheets-scroll-container.has-multiple-bilans{max-height:72vh}}
.monthly-point-state{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;min-height:46px;margin:.8rem 0;padding:.65rem .8rem .65rem 1rem;box-sizing:border-box;border-radius:11px;background:rgba(15,23,42,.55);color:#cbd5e1;font-size:.78rem;line-height:1.4;overflow:hidden;isolation:isolate}
.monthly-point-state::before{content:"";position:absolute;z-index:-1;left:0;top:0;bottom:0;width:4px;border-radius:0;background:#64748b}.monthly-point-state.ready{color:#a7f3d0}.monthly-point-state.ready::before{background:#34d399}.monthly-point-state.pending{color:#fde68a}.monthly-point-state.pending::before{background:#f59e0b}.monthly-point-state svg{width:17px;height:17px;flex:0 0 auto}
.legal-owner-group{display:grid;gap:.8rem;padding:1rem;border:1px solid rgba(45,212,191,.26);border-radius:16px;background:rgba(15,23,42,.4)}
.legal-owner-group-title{display:flex;align-items:center;gap:.55rem;margin:0;color:var(--accent-teal);font-size:1rem}.legal-house-group{display:grid;gap:.65rem;padding:.85rem;border:1px solid rgba(148,163,184,.18);border-radius:13px;background:rgba(2,6,23,.25)}
.legal-house-group-title{display:flex;justify-content:space-between;gap:.75rem;margin:0;color:#f8fafc;font-size:.88rem}.legal-house-group-title small{color:#94a3b8;font-weight:600}.legal-house-group .alert-strip{margin-bottom:0!important}
.settings-device-card{margin-bottom:1.5rem;border-color:rgba(45,212,191,.34)}
.settings-device-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.settings-device-grid label{display:flex;align-items:center;gap:.45rem}.settings-device-grid label svg{width:18px;height:18px;color:var(--accent-teal)}
.settings-device-status{margin:.25rem 0 1rem;padding:.7rem .8rem;border-radius:10px;background:rgba(15,23,42,.45)}.settings-device-actions{display:flex;justify-content:flex-end;gap:.75rem;flex-wrap:wrap}
@media(max-width:700px){.settings-device-grid{grid-template-columns:1fr}.settings-device-actions .btn{width:100%}}
.legacy-tenant-entry-row{display:flex;align-items:center;gap:1rem;margin:.85rem 0;padding:.85rem 1rem;border:1px dashed rgba(229,169,59,.55);border-radius:13px;background:rgba(229,169,59,.06)}.legacy-tenant-entry-row .btn{flex:0 0 auto}.legacy-tenant-entry-row.is-configured{border-style:solid;border-color:rgba(45,212,191,.6);background:rgba(45,212,191,.07)}.legacy-tenant-entry-row.is-configured .btn{background:var(--accent-teal);color:var(--bg-primary)}
.legacy-tenant-entry-row #tenant-legacy-history-summary{display:flex;flex-wrap:wrap;gap:.35rem .85rem;line-height:1.45}.legacy-tenant-entry-row #tenant-legacy-history-summary strong{color:var(--accent-teal);width:100%}.legacy-tenant-entry-row #tenant-legacy-history-summary span{color:var(--text-primary);font-size:.78rem}
.legacy-tenant-history-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-bottom:1rem}@media(max-width:700px){.legacy-tenant-entry-row{align-items:flex-start;flex-direction:column}.legacy-tenant-entry-row .btn{width:100%}.legacy-tenant-history-grid{grid-template-columns:1fr}}
/* Section « Ancien locataire » : orange tant que tout est vide, vert dès qu'un champ est rempli. */
.legacy-tenant-section.legacy-empty{border:1px solid rgba(229,169,59,.65);background:rgba(229,169,59,.10)}
.legacy-tenant-section.legacy-empty .legacy-tenant-header{background:rgba(229,169,59,.16);color:#f1bb5b}
.legacy-tenant-section.legacy-filled{border:1px solid rgba(45,212,191,.65);background:rgba(45,212,191,.10)}
.legacy-tenant-section.legacy-filled .legacy-tenant-header{background:rgba(45,212,191,.18);color:#3be2cf}
.legacy-tenant-section .legacy-tenant-header small{opacity:.8}
.document-action-bar{display:flex;align-items:center;justify-content:flex-end;gap:.55rem;flex-wrap:wrap}.document-section-header>h3{min-width:0}.document-print-copy{background:#fff!important;color:#0f172a!important;padding:18px!important;box-sizing:border-box!important}.document-print-copy .document-action-bar,.document-print-copy .document-screen-only,.document-print-copy button{display:none!important}.document-print-copy .table-responsive,.document-print-copy .limited-table-scroll{max-height:none!important;overflow:visible!important}.document-print-copy table{width:100%!important;table-layout:auto!important;border-collapse:collapse!important}.document-print-copy th,.document-print-copy td{color:#0f172a!important;border:1px solid #cbd5e1!important;background:#fff!important;overflow-wrap:anywhere}.document-print-copy h1,.document-print-copy h2,.document-print-copy h3{color:#0f766e!important}.document-print-copy .text-secondary{color:#475569!important}
.document-print-copy.renewal-sheet{width:100%!important;min-width:0!important;max-width:100%!important;overflow:visible!important;padding:14px!important;border-radius:0!important}
.document-print-copy.renewal-sheet .table-responsive{width:100%!important;max-width:100%!important;overflow:visible!important}
.document-print-copy.renewal-sheet table{width:100%!important;max-width:100%!important;table-layout:fixed!important;font-size:6.8px!important}
.document-print-copy.renewal-sheet th,.document-print-copy.renewal-sheet td{padding:3px!important;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important}
.document-print-copy.renewal-sheet thead tr,.document-print-copy.renewal-sheet thead th{background:#050505!important;color:#fff!important;border-color:#334155!important}
.document-print-copy.renewal-sheet th:nth-child(1){width:11%}.document-print-copy.renewal-sheet th:nth-child(2){width:10%}.document-print-copy.renewal-sheet th:nth-child(3){width:7%}.document-print-copy.renewal-sheet th:nth-child(4){width:11%}.document-print-copy.renewal-sheet th:nth-child(5){width:10%}.document-print-copy.renewal-sheet th:nth-child(6){width:8%}.document-print-copy.renewal-sheet th:nth-child(7){width:11%}.document-print-copy.renewal-sheet th:nth-child(8){width:11%}.document-print-copy.renewal-sheet th:nth-child(9){width:12%}.document-print-copy.renewal-sheet th:nth-child(10){width:9%}
@media(max-width:900px){.document-section-header{align-items:flex-start!important;flex-direction:column}.document-action-bar{width:100%;justify-content:flex-start}.document-action-bar .btn{flex:1;min-width:105px}}
.btn-validate-monthly-point{width:100%;justify-content:center;gap:.7rem;padding:.8rem;background:linear-gradient(135deg,#0f766e,#2dd4bf)!important;color:#042f2e!important;border:0!important}
.btn-validate-monthly-point span{display:flex;flex-direction:column;text-align:left}.btn-validate-monthly-point small{font-weight:600;opacity:.72}
.compact-choice-modal{max-width:620px;padding:1.35rem}
.source-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:.8rem;margin-top:1rem}
.source-choice-card{display:flex;flex-direction:column;align-items:center;gap:.45rem;padding:1.25rem;border-radius:16px;border:1px solid #334155;background:#162136;color:#fff;cursor:pointer}
.source-choice-card svg{width:30px;height:30px;color:#2dd4bf}.source-choice-card small{color:#94a3b8;text-align:center}.source-choice-card:hover{border-color:#2dd4bf;transform:translateY(-2px)}
.owner-point-modal-card{max-width:980px;padding:1.35rem;max-height:92vh;overflow:auto}
.owner-point-tabs{display:grid;grid-template-columns:1fr 1fr;gap:.55rem;margin:1rem 0}
.owner-point-tabs button{padding:.8rem;border-radius:12px;border:1px solid #334155;background:#172033;color:#94a3b8;font-weight:800;cursor:pointer}
.owner-point-tabs button.active{background:linear-gradient(135deg,#0f766e,#14b8a6);border-color:#2dd4bf;color:#fff}
.owner-point-filters{display:grid;grid-template-columns:1fr 1fr;gap:.7rem}.owner-point-filters .form-group{margin:0}
.owner-point-content{display:grid;gap:.55rem;margin:1rem 0;min-height:110px}
.owner-point-house-row{display:grid;grid-template-columns:minmax(160px,1fr) auto auto;align-items:center;gap:.75rem;padding:.8rem;border:1px solid #29364d;border-radius:13px;background:rgba(15,23,42,.58)}
.owner-point-house-row small{display:block;color:#94a3b8}.owner-point-house-row .badge{white-space:nowrap}
.owner-point-house-selected{border-color:var(--accent-teal);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent-teal) 35%,transparent)}
.owner-point-documents{display:grid;gap:.7rem;margin-top:.25rem;padding:1rem;border:1px solid rgba(45,212,191,.32);border-radius:14px;background:linear-gradient(135deg,rgba(13,148,136,.10),rgba(15,23,42,.72))}
.owner-point-documents-heading{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.owner-point-documents-heading h4{margin:.15rem 0;color:#fff}.owner-point-documents-heading p{margin:0;color:#94a3b8;font-size:.85rem}
.owner-point-document-group{padding:.75rem;border-radius:10px;background:rgba(2,6,23,.35);border:1px solid rgba(148,163,184,.18)}.owner-point-document-group h4{margin:0 0 .55rem;color:var(--accent-teal);font-size:.9rem}.owner-point-document-group p{margin:0;font-size:.84rem}
.owner-point-document-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.4rem 0;border-top:1px solid rgba(148,163,184,.14)}.owner-point-document-row span{font-size:.84rem;overflow-wrap:anywhere}
.owner-point-document-actions{display:flex;align-items:center;gap:.45rem;flex:0 0 auto}
.owner-point-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:.55rem;margin-top:.75rem;padding-top:.85rem;border-top:1px solid rgba(148,163,184,.24)}
.owner-point-actions .btn{justify-content:center;min-height:48px}.btn-whatsapp{background:#16a34a!important;color:#fff!important}.btn-email{background:#2563eb!important;color:#fff!important}.btn-client-space{background:#7c3aed!important;color:#fff!important}
.owner-point-order{display:flex;align-items:center;justify-content:center;gap:.4rem;margin:.8rem 0 0;color:#94a3b8;font-size:.7rem}
@media(max-width:1000px){.landlord-profile-grid{grid-template-columns:1fr 1fr}.owner-point-status-card{grid-column:1/-1}.owner-point-actions{grid-template-columns:1fr 1fr}}
@media(max-width:1000px){.landlords-directory-modal-card{--landlord-directory-column-width:400px}.landlords-directory-columns{grid-template-columns:repeat(3,var(--landlord-directory-column-width))}.landlord-directory-list{max-height:300px}}
@media(max-width:680px){.landlord-profile-grid,.source-choice-grid,.owner-point-filters,.owner-point-actions{grid-template-columns:1fr}.monthly-point-heading{align-items:stretch;flex-direction:column}.monthly-period-controls{grid-template-columns:1fr 1fr!important;width:100%}.proof-action-row{grid-template-columns:1fr}.owner-point-house-row{grid-template-columns:1fr}.owner-point-document-row{align-items:stretch;flex-direction:column}.owner-point-document-row .btn{width:100%}.owner-point-modal-card{padding:1rem}}
.pdf-document-preview-card{width:min(1180px,96vw);max-width:1180px;height:94vh;max-height:94vh;overflow:hidden;display:flex;flex-direction:column;background:#111827}.pdf-document-preview-status{padding:.65rem 1.25rem;color:#cbd5e1;border-bottom:1px solid var(--card-border)}.pdf-document-preview-pages{flex:1;overflow:auto;display:grid;justify-items:center;align-content:start;gap:1rem;padding:1rem;background:#262626}.pdf-document-preview-page{display:block;max-width:100%;height:auto;background:#fff;box-shadow:0 8px 30px rgba(0,0,0,.4)}.pdf-document-preview-actions{display:flex;justify-content:flex-end;gap:.65rem;padding:.8rem 1rem;border-top:1px solid var(--card-border)}#pdf-document-preview-modal{z-index:1250}.pdf-render-mask{position:fixed;inset:0;z-index:2147483647;display:grid;place-items:center;background:rgba(2,6,23,.94);color:#fff;font-weight:800}.pdf-render-mask>div{padding:1rem 1.4rem;border:1px solid rgba(45,212,191,.45);border-radius:14px;background:#0f172a}
/* Locaux +, scanner Windows et cachetage universel */
.tenant-locals-plus-step { border: 1px solid rgba(45,212,191,.45); border-radius: 16px; padding: 1rem; background: rgba(13,148,136,.08); }
.tenant-locals-plus-step[hidden] { display: none !important; }
.scanner-device-picker { margin: 1rem 0; padding: 1rem; border: 1px solid var(--card-border); border-radius: 16px; background: rgba(15,23,42,.35); }
.scanner-device-picker > label { display: block; font-weight: 800; margin-bottom: .55rem; }
.scanner-device-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .75rem; align-items: center; }
.scanner-workbench{background:linear-gradient(135deg,rgba(13,148,136,.12),rgba(15,23,42,.55));border-color:rgba(45,212,191,.35)}.scanner-workbench-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.85rem}.scanner-workbench-heading h4{margin:.2rem 0 0;color:#fff}.scanner-settings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem;margin-top:.85rem}.scanner-settings-grid label{display:grid;gap:.32rem;font-size:.76rem;font-weight:800;color:#cbd5e1}.scanner-settings-grid .form-control{min-width:0;padding:.6rem .7rem;font-size:.82rem}.scanned-proof-preview{margin-top:1rem;padding:1rem;border:1px solid rgba(45,212,191,.45);border-radius:14px;background:rgba(2,6,23,.48)}.scanned-proof-preview h4{margin:0 0 .6rem;color:var(--accent-teal)}.scanned-proof-preview img{display:block;max-width:100%;max-height:280px;margin:.65rem auto;border-radius:8px;background:#fff}.scanned-proof-preview iframe{width:100%;height:280px;border:0;border-radius:8px;background:#fff}.scanned-proof-preview-actions{display:flex;justify-content:flex-end;gap:.6rem;margin-top:.85rem;flex-wrap:wrap}
@media(max-width:680px){.scanner-device-row,.scanner-settings-grid{grid-template-columns:1fr}.scanner-workbench-heading{align-items:flex-start;flex-direction:column}.scanned-proof-preview-actions .btn{width:100%}}
.scanner-device-picker small { display: block; margin-top: .5rem; }
.universal-stamp-action { align-items: center; border-top: 1px solid var(--card-border); margin-top: .75rem; padding-top: 1rem; }
.universal-stamp-action p { margin: .25rem 0 0; }
@media (max-width: 640px) { .scanner-device-row { grid-template-columns: 1fr; } }

/* Recovery security diagnostic: same card surface as dated local copies. */
.recovery-security-card[hidden] { display: none; }
.recovery-security-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--card-border); }
.recovery-security-heading h3 { color: #38bdf8; margin: 0; font-size: 1.15rem; line-height: 1.5; }
.recovery-security-details { margin: 0; }
.recovery-security-row { display: flex; flex-wrap: wrap; gap: .3rem .45rem; margin: .7rem 0; line-height: 1.65; }
.recovery-security-row dt { color: var(--text-secondary); font-weight: 600; }
.recovery-security-row dt::before { content: "• "; }
.recovery-security-row dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.recovery-security-key-row { display: block; }
.recovery-security-key { display: block; padding: .65rem .8rem; margin: .4rem 0; border-radius: .45rem; background: rgba(56,189,248,.12); color: #38bdf8; overflow-wrap: anywhere; white-space: pre-wrap; font-family: inherit; font-weight: 600; user-select: all; }
.recovery-security-caption { color: var(--text-secondary); font-size: .8rem; line-height: 1.5; margin: .4rem 0 1rem; }
.recovery-security-value.security-info { color: #38bdf8; }
.recovery-security-value.security-success { color: var(--accent-teal, #2dd4bf); }
.recovery-security-value.security-pending { color: #fbbf24; }
.recovery-security-value.security-error { color: #f87171; }
#recovery-security-copy-status { display: inline-block; margin-left: .5rem; font-size: .85rem; }
@media (max-width: 600px) { .recovery-security-heading { align-items: flex-start; } .recovery-security-heading h3 { font-size: 1rem; } .recovery-security-row { font-size: .9rem; } }

.recovery-security-value.security-success::before { content: ""; display: inline-block; width: .65em; height: .65em; margin-right: .45em; border-radius: 50%; background: currentColor; }
html[data-theme="light"] .recovery-security-heading h3,
html[data-theme="light"] .recovery-security-key,
html[data-theme="light"] .recovery-security-value.security-info { color: #0369a1; }
html[data-theme="light"] .recovery-security-value.security-success { color: #0f766e; }
html[data-theme="light"] .recovery-security-value.security-pending { color: #92400e; }
html[data-theme="light"] .recovery-security-value.security-error { color: #b91c1c; }

.auth-version-card { margin-top: 1.25rem; padding: 1rem 1.25rem; border: 1px solid var(--card-border); border-radius: var(--radius-lg); background: rgba(9,14,26,.16); text-align: left; }
.auth-version-columns { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; }
.auth-version-columns span { display: block; color: var(--text-secondary); font-size: .78rem; text-transform: uppercase; }
.auth-version-columns strong { display: block; color: var(--text-primary); font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.auth-version-status { margin: .75rem 0 0; padding-top: .65rem; border-top: 1px solid var(--card-border); color: var(--text-secondary); text-align: center; font-size: .85rem; font-weight: 600; }
.auth-version-status[data-state="current"] { color: var(--accent-teal); }
.auth-version-status[data-state="different"] { color: var(--accent-gold); }
.auth-publisher { margin-top: 1rem; font-size: .9rem; }
.auth-publisher a { color: var(--text-secondary); text-decoration: underline; }
.auth-legal { margin-top: .5rem; }
html[data-theme="light"] .auth-version-card { background: rgba(255,255,255,.4); }
html[data-theme="light"] .auth-version-status[data-state="current"] { color: #0f766e; }
html[data-theme="light"] .auth-version-status[data-state="different"] { color: #92400e; }
