/* ==========================================================================
   KMGED - Mairie de Keur Moussa
   Thème : vert / blanc + couleurs du drapeau du Sénégal
   ========================================================================== */
:root {
    --vert: #00853F;
    --vert-fonce: #006B32;
    --vert-clair: #E8F5EE;
    --jaune: #FDEF42;
    --jaune-fonce: #D4A017;
    --rouge: #E31B23;
    --encre: #0F1F17;
    --gris: #6B7280;
    --fond: #F4F7F5;
    --bord: #E5ECE8;
    --radius: 16px;
    --ombre: 0 1px 2px rgba(16, 40, 28, .04), 0 8px 24px rgba(16, 40, 28, .06);
    --ombre-forte: 0 20px 50px rgba(0, 80, 40, .18);
    --sidebar-w: 260px;
    --bs-success: var(--vert);
    --bs-success-rgb: 0, 133, 63;
    --bs-link-color: var(--vert);
    --bs-body-font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { font-family: var(--bs-body-font-family); color: var(--encre); background: var(--fond); font-size: .94rem; }
a { color: var(--vert); }
.min-w-0 { min-width: 0; }
.text-yellow { color: var(--jaune); }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Bootstrap : surcharges au thème ---------- */
.btn { border-radius: 12px; font-weight: 500; transition: all .2s ease; }
.btn-success { background: linear-gradient(135deg, #00A651, var(--vert)); border: 0; }
.btn-success:hover, .btn-success:focus { background: linear-gradient(135deg, var(--vert), var(--vert-fonce)); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 133, 63, .3); }
.btn-outline-success { color: var(--vert); border-color: var(--vert); }
.btn-outline-success:hover, .btn-check:checked + .btn-outline-success { background: var(--vert); border-color: var(--vert); color: #fff; }
.btn-light { background: #F3F6F4; border-color: transparent; }
.btn-light:hover { background: var(--vert-clair); color: var(--vert); }
.btn-glow { box-shadow: 0 10px 25px rgba(0, 133, 63, .35); padding-top: .8rem; padding-bottom: .8rem; }
.btn-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; border-radius: 12px; }
.form-control, .form-select { border-radius: 12px; border-color: var(--bord); padding: .6rem .9rem; }
.form-control-sm, .form-select-sm { border-radius: 10px; padding: .35rem .7rem; }
.form-control:focus, .form-select:focus { border-color: var(--vert); box-shadow: 0 0 0 .2rem rgba(0, 133, 63, .15); }
.form-check-input:checked { background-color: var(--vert); border-color: var(--vert); }
.form-floating > .form-control { height: 3.6rem; }
.form-label { font-weight: 500; font-size: .85rem; }
.input-group-text { border-radius: 12px; background: var(--vert-clair); border-color: var(--bord); color: var(--vert); }
.page-link { color: var(--vert); border-radius: 8px !important; margin: 0 2px; border: 0; }
.page-item.active .page-link { background: var(--vert); }
.text-success { color: var(--vert) !important; }
.bg-success-subtle { background: var(--vert-clair) !important; }
.modal-content { border-radius: 20px; overflow: hidden; }
.dropdown-menu { border-radius: 14px; padding: .5rem; }
.dropdown-item { border-radius: 10px; padding: .5rem .8rem; }

/* ---------- Bande drapeau ---------- */
.flag-bar { display: flex; height: 5px; position: fixed; top: 0; left: 0; right: 0; z-index: 1100; }
.flag-bar span { flex: 1; }
.flag-bar span:nth-child(1), .mini-flag span:nth-child(1) { background: var(--vert); }
.flag-bar span:nth-child(2), .mini-flag span:nth-child(2) { background: var(--jaune); }
.flag-bar span:nth-child(3), .mini-flag span:nth-child(3) { background: var(--rouge); }
.mini-flag { display: inline-flex; width: 36px; height: 24px; border-radius: 4px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.mini-flag span { flex: 1; display: flex; align-items: center; justify-content: center; }
.mini-flag i { color: var(--vert); font-size: 8px; }
.mini-flag.big { width: 72px; height: 48px; } .mini-flag.big i { font-size: 16px; }

/* ---------- Marque ---------- */
.brand-logo { width: 44px; height: 44px; border-radius: 12px; }
.brand-logo.lg { width: 64px; height: 64px; }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: .5px; line-height: 1; }
.brand-sub { font-size: .72rem; }

/* ==========================================================================
   PORTAIL PUBLIC
   ========================================================================== */
.public-body { background: #fff; display: flex; flex-direction: column; min-height: 100vh; padding-top: 5px; }
.public-header { background: rgba(255,255,255,.9); backdrop-filter: blur(10px); position: sticky; top: 5px; z-index: 1000; border-bottom: 1px solid var(--bord); }
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 10% -10%, #00A651 0%, var(--vert) 35%, #004D25 100%); }
.hero-shape { position: absolute; inset: 0; background:
    radial-gradient(circle at 85% 20%, rgba(253, 239, 66, .25), transparent 35%),
    radial-gradient(circle at 95% 90%, rgba(227, 27, 35, .25), transparent 35%);
    pointer-events: none; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 60px; background: #fff; clip-path: ellipse(70% 100% at 50% 100%); }
.hero .container { z-index: 2; padding-bottom: 50px; }
.badge-pill { display: inline-flex; gap: .4rem; align-items: center; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); padding: .4rem .9rem; border-radius: 50px; font-size: .8rem; backdrop-filter: blur(6px); }
.hero-title { font-weight: 800; font-size: clamp(1.8rem, 4.5vw, 3rem); line-height: 1.15; }
.hero-text { opacity: .9; font-size: 1.02rem; max-width: 540px; margin: 1.2rem 0 2rem; }
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.8rem; font-weight: 800; color: var(--jaune); }
.hero-stats span { font-size: .8rem; opacity: .85; }
.search-card { background: #fff; border-radius: 24px; padding: 2rem; box-shadow: var(--ombre-forte); position: relative; }
.search-card::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 4px; border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--vert) 33%, var(--jaune) 33% 66%, var(--rouge) 66%); }
.search-card-head { display: flex; gap: 1rem; align-items: center; }
.icon-circle { width: 54px; height: 54px; border-radius: 16px; background: var(--vert-clair); color: var(--vert); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0; }
.secure-note { margin-top: 1.2rem; text-align: center; font-size: .78rem; color: var(--gris); }
.secure-note i { color: var(--vert); }
.section-title { font-weight: 800; position: relative; display: inline-block; padding-bottom: .6rem; }
.section-title::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 60px; height: 4px; border-radius: 4px;
    background: linear-gradient(90deg, var(--vert) 33%, var(--jaune) 33% 66%, var(--rouge) 66%); }
.step-card { background: #fff; border: 1px solid var(--bord); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; height: 100%; position: relative; transition: all .3s ease; }
.step-card:hover { transform: translateY(-6px); box-shadow: var(--ombre-forte); border-color: transparent; }
.step-num { position: absolute; top: 1rem; right: 1rem; width: 30px; height: 30px; border-radius: 50%; background: var(--jaune); color: var(--encre); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.step-icon { font-size: 2.6rem; color: var(--vert); display: block; margin-bottom: 1rem; }
.public-footer { margin-top: auto; background: var(--encre); color: rgba(255,255,255,.75); padding: 1.4rem 0; font-size: .85rem; }

.page-banner { background: linear-gradient(135deg, var(--vert), #004D25); padding: 2.2rem 0; position: relative; overflow: hidden; }
.page-banner::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(253, 239, 66, .15); }
.page-banner .container { position: relative; z-index: 1; }
.dossier-avatar { width: 64px; height: 64px; border-radius: 20px; background: var(--jaune); color: var(--encre); font-weight: 800; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.numero-badge { display: inline-flex; align-items: center; gap: .3rem; background: rgba(255,255,255,.18); color: #fff; padding: .25rem .8rem; border-radius: 50px; font-weight: 600; font-size: .85rem; letter-spacing: .5px; }
.timer-chip { background: rgba(0,0,0,.2); color: #fff; padding: .35rem .8rem; border-radius: 50px; font-size: .82rem; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   CONNEXION
   ========================================================================== */
.login-body { background: var(--fond); }
.login-wrap { display: flex; min-height: 100vh; }
.login-side { flex: 1; background: radial-gradient(circle at 20% 20%, #00A651, var(--vert) 40%, #00391C); color: #fff; align-items: center; justify-content: center; padding: 3rem; position: relative; overflow: hidden; }
.login-side::before { content: ""; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: rgba(253, 239, 66, .12); bottom: -120px; right: -120px; }
.login-side::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(227, 27, 35, .14); top: -80px; left: -80px; }
.login-side-inner { position: relative; z-index: 1; max-width: 440px; }
.login-logo { width: 90px; height: 90px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.login-features { list-style: none; padding: 0; }
.login-features li { padding: .55rem 0; display: flex; gap: .7rem; align-items: center; opacity: .95; }
.login-features i { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.15); display: inline-flex; align-items: center; justify-content: center; }
.login-form-side { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 24px; padding: 2.5rem 2rem; box-shadow: var(--ombre); }
.btn-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--gris); font-size: 1.1rem; z-index: 5; }

/* ==========================================================================
   ADMINISTRATION
   ========================================================================== */
.admin-body { padding-top: 5px; }
.sidebar { position: fixed; top: 5px; bottom: 0; left: 0; width: var(--sidebar-w); background: linear-gradient(180deg, #003D1E 0%, #00562A 100%); color: #fff; display: flex; flex-direction: column; z-index: 1040; transition: transform .3s ease; }
.sidebar-brand { display: flex; align-items: center; gap: .8rem; padding: 1.4rem 1.3rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand .brand-sub { color: rgba(255,255,255,.6); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem .8rem; }
.nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.45); padding: 1rem .8rem .4rem; }
.sidebar .nav-link { display: flex; align-items: center; gap: .8rem; color: rgba(255,255,255,.78); padding: .7rem .9rem; border-radius: 12px; margin-bottom: 2px; font-size: .9rem; transition: all .2s; }
.sidebar .nav-link i { font-size: 1.1rem; width: 22px; text-align: center; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar .nav-link.active { background: #fff; color: var(--vert); font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.sidebar .nav-link.active i { color: var(--vert); }
.sidebar-footer { padding: 1rem 1.3rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .6rem; color: rgba(255,255,255,.6); }
.sidebar-backdrop { display: none; }
.main-wrap { margin-left: var(--sidebar-w); min-height: calc(100vh - 5px); display: flex; flex-direction: column; }
.topbar { position: sticky; top: 5px; z-index: 1030; display: flex; align-items: center; gap: 1rem; padding: .8rem 1.5rem; background: rgba(244, 247, 245, .85); backdrop-filter: blur(12px); }
.topbar-search { flex: 1; max-width: 520px; align-items: center; background: #fff; border-radius: 14px; padding: 0 1rem; border: 1px solid var(--bord); }
.topbar-search i { color: var(--gris); }
.topbar-search input { border: 0; outline: 0; padding: .65rem .7rem; width: 100%; background: transparent; }
.user-chip { display: flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid var(--bord); padding: .3rem .8rem .3rem .3rem; border-radius: 50px; font-size: .85rem; }
.user-chip::after { margin-left: .2rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #00A651, var(--vert)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; font-size: .9rem; }
.avatar.sm { width: 34px; height: 34px; font-size: .78rem; border-radius: 10px; }
.avatar.lg { width: 54px; height: 54px; font-size: 1.3rem; border-radius: 16px; }
.avatar.xl { width: 84px; height: 84px; font-size: 2rem; border-radius: 24px; }
.avatar.red { background: linear-gradient(135deg, #F04B52, var(--rouge)); }
.content { padding: .5rem 1.5rem 2rem; flex: 1; }
.admin-footer { display: flex; justify-content: space-between; padding: 1rem 1.5rem; font-size: .78rem; color: var(--gris); border-top: 1px solid var(--bord); }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-title { font-weight: 700; font-size: 1.5rem; margin: 0; }
.card-modern { background: #fff; border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--ombre); border: 1px solid rgba(229, 236, 232, .6); }
.card-title-sm { font-size: 1rem; font-weight: 600; margin-bottom: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.card-title-sm i { color: var(--vert); }

.welcome-banner { background: linear-gradient(120deg, var(--vert) 0%, #00562A 100%); color: #fff; border-radius: 20px; padding: 1.6rem 1.8rem; display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; flex-wrap: wrap; position: relative; overflow: hidden; }
.welcome-banner::after { content: ""; position: absolute; right: -40px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; background: rgba(253, 239, 66, .18); }
.welcome-search { position: relative; z-index: 1; display: flex; align-items: center; background: #fff; border-radius: 14px; padding: .3rem .3rem .3rem 1rem; flex: 1; max-width: 460px; min-width: 260px; }
.welcome-search i { color: var(--gris); }
.welcome-search input { flex: 1; border: 0; outline: 0; padding: .45rem .6rem; min-width: 0; }

.stat-card { background: #fff; border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--ombre); display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; position: relative; overflow: hidden; height: 100%; }
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.stat-icon { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: .8rem; color: var(--gris); }
.stat-foot { width: 100%; font-size: .75rem; color: var(--gris); text-decoration: none; border-top: 1px dashed var(--bord); padding-top: .6rem; }
.stat-card.green::before { background: var(--vert); } .stat-card.green .stat-icon { background: var(--vert-clair); color: var(--vert); }
.stat-card.yellow::before { background: var(--jaune-fonce); } .stat-card.yellow .stat-icon { background: #FEF9C3; color: var(--jaune-fonce); }
.stat-card.red::before { background: var(--rouge); } .stat-card.red .stat-icon { background: #FEE2E2; color: var(--rouge); }
.stat-card.red .stat-foot { color: var(--rouge); font-weight: 500; }
.stat-card.dark::before { background: var(--encre); } .stat-card.dark .stat-icon { background: #E5E7EB; color: var(--encre); }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 260px; }

.list-modern { display: flex; flex-direction: column; gap: .3rem; }
.list-row { display: flex; align-items: center; gap: .8rem; padding: .65rem .7rem; border-radius: 12px; text-decoration: none; color: inherit; transition: background .2s; }
.list-row:hover { background: var(--vert-clair); }
.numero-tag { display: inline-block; background: var(--vert-clair); color: var(--vert); font-weight: 700; font-size: .8rem; letter-spacing: .5px; padding: .25rem .6rem; border-radius: 8px; text-decoration: none; white-space: nowrap; }
a.numero-tag:hover { background: var(--vert); color: #fff; }
.numero-tag.lg { font-size: 1rem; padding: .3rem .8rem; }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--bord); }
.timeline li { display: flex; gap: .9rem; padding: .45rem 0; position: relative; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--vert); flex-shrink: 0; margin-top: 4px; z-index: 1; }
.tl-dot.yellow { border-color: var(--jaune-fonce); }
.tl-dot.red { border-color: var(--rouge); }

.table-modern thead th { background: #F8FAF9; font-size: .74rem; text-transform: uppercase; letter-spacing: .6px; color: var(--gris); font-weight: 600; border-bottom: 1px solid var(--bord); padding: .9rem 1rem; white-space: nowrap; }
.table-modern td { padding: .8rem 1rem; border-color: #F1F5F3; }
.table-modern tbody tr { transition: background .15s; }
.table-modern tbody tr:hover { background: #FAFDFB; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--gris); }
.input-icon .form-control { padding-left: 2.4rem; }

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--bord); font-size: .87rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list span { color: var(--gris); }
.info-list strong { text-align: right; font-weight: 600; word-break: break-word; }
.obs-box { margin-top: 1rem; background: #FFFBEB; border-left: 3px solid var(--jaune-fonce); padding: .8rem; border-radius: 10px; font-size: .85rem; }

/* ---------- Téléversement ---------- */
.dropzone { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; border: 2px dashed #B7DCC6; border-radius: 16px; padding: 1.6rem 1rem; background: #F7FCF9; cursor: pointer; transition: all .2s; margin-bottom: .8rem; width: 100%; }
.dropzone i { font-size: 2.4rem; color: var(--vert); }
.dropzone strong { font-size: .9rem; }
.dropzone span, .dropzone small { font-size: .78rem; color: var(--gris); }
.dropzone:hover, .dropzone.drag { border-color: var(--vert); background: var(--vert-clair); transform: scale(1.01); }
.file-list { list-style: none; padding: 0; margin: 0 0 .8rem; max-height: 200px; overflow-y: auto; }
.file-list li { display: flex; align-items: center; gap: .5rem; background: #F8FAF9; border-radius: 10px; padding: .45rem .6rem; margin-bottom: .3rem; font-size: .8rem; }
.file-list li.bad { background: #FEF2F2; color: var(--rouge); }
.file-list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list button { border: 0; background: none; color: var(--gris); padding: 0 .2rem; }

/* ---------- Cartes documents ---------- */
.doc-card { background: #fff; border: 1px solid var(--bord); border-radius: 14px; overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: all .25s ease; }
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--ombre-forte); border-color: transparent; }
.doc-thumb { height: 150px; background: linear-gradient(135deg, #F7FAF8, #EEF4F0); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.doc-thumb[role=button] { cursor: zoom-in; }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.doc-card:hover .doc-thumb img { transform: scale(1.06); }
.doc-thumb > i { font-size: 3.6rem; }
.ext-badge { position: absolute; bottom: 10px; right: 10px; background: #fff; font-size: .68rem; font-weight: 700; padding: .15rem .5rem; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.doc-body { padding: .9rem 1rem .5rem; flex: 1; }
.doc-title { font-size: .9rem; font-weight: 600; margin: .4rem 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta { display: flex; gap: .8rem; font-size: .74rem; color: var(--gris); flex-wrap: wrap; }
.doc-actions { display: flex; gap: .3rem; padding: .6rem 1rem .9rem; }
.doc-actions .btn { flex: 1; }
.cat-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .7rem; font-weight: 600; padding: .2rem .6rem; border-radius: 50px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); }
.cat-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.preview-body { background: #1F2937; min-height: 70vh; display: flex; align-items: center; justify-content: center; }
.preview-body img { max-width: 100%; max-height: 80vh; object-fit: contain; }
.preview-body iframe { width: 100%; height: 80vh; border: 0; background: #fff; }

.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state > i { font-size: 3.4rem; color: #C5D9CD; display: block; margin-bottom: .6rem; }

.user-card { background: #fff; border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--ombre); height: 100%; display: flex; flex-direction: column; gap: 1rem; border-top: 4px solid var(--vert); }
.user-card.inactive { opacity: .6; border-top-color: var(--gris); }
.user-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: #F8FAF9; border-radius: 12px; padding: .6rem; text-align: center; }
.user-stats div { display: flex; flex-direction: column; }
.user-stats small { font-size: .68rem; color: var(--gris); }
.strength { height: 6px; background: #EEF2F0; border-radius: 6px; overflow: hidden; }
.strength-bar { height: 100%; width: 0; transition: all .3s; border-radius: 6px; }

/* ---------- SweetAlert2 ---------- */
.swal2-popup { border-radius: 20px !important; font-family: var(--bs-body-font-family) !important; }
.swal2-styled.swal2-confirm { border-radius: 12px !important; }
.swal2-styled.swal2-cancel, .swal2-styled.swal2-deny { border-radius: 12px !important; }
.swal2-html-container { white-space: pre-line; }

/* ---------- Animations ---------- */
.fade-up { animation: fadeUp .6s ease both; }
.delay-1 { animation-delay: .15s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: none; box-shadow: 10px 0 40px rgba(0,0,0,.3); }
    .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; }
    .main-wrap { margin-left: 0; }
    .topbar { padding: .7rem 1rem; }
    .content { padding: .5rem 1rem 1.5rem; }
}
@media (max-width: 575.98px) {
    body { font-size: .9rem; }
    .search-card { padding: 1.5rem 1.2rem; }
    .page-title { font-size: 1.25rem; }
    .card-modern { padding: 1.1rem; }
    .stat-value { font-size: 1.3rem; }
    .stat-icon { width: 42px; height: 42px; font-size: 1.15rem; }
    .welcome-banner { padding: 1.3rem; }
    .hero-stats { gap: 1.2rem; }
    .doc-thumb { height: 130px; }
    .admin-footer { justify-content: center; }
}
@media print {
    .sidebar, .topbar, .admin-footer, .flag-bar { display: none !important; }
    .main-wrap { margin: 0; }
}
