:root {
    --bg: #f4f8ff;
    --card: #ffffff;
    --text: #182033;
    --muted: #758096;
    --line: #dce6f5;

    --blue: #4f7df3;
    --blue-soft: #eaf1ff;

    --green: #54c79f;
    --green-soft: #e9fbf5;

    --orange: #ff9c4a;
    --orange-soft: #fff1e4;

    --pink: #f5d9e8;
    --purple: #8b7cf6;
    --purple-soft: #f0edff;

    --red: #ef5b6c;
    --red-soft: #ffecef;

    --shadow: 0 12px 34px rgba(47, 71, 122, .10);
    --radius: 24px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, #e8f2ff 0, transparent 34%),
        linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: inherit;
}

.app-shell {
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
    background: rgba(244, 248, 255, .92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(220, 230, 245, .75);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    font-weight: 900;
    font-size: 21px;
    letter-spacing: -.3px;
}

.app-subtitle {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.topbar-exit {
    text-decoration: none;
    background: var(--red-soft);
    color: #a72b3d;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    padding: 9px 13px;
}

.main-with-nav {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 16px calc(92px + env(safe-area-inset-bottom));
}

.main-login {
    max-width: 460px;
    margin: 0 auto;
    padding: 38px 18px;
}

.page-head {
    margin: 6px 0 16px;
}

.page-title {
    font-size: 27px;
    line-height: 1.05;
    margin: 0;
    font-weight: 950;
    letter-spacing: -.7px;
}

.page-desc {
    color: var(--muted);
    margin: 8px 0 0;
    font-size: 14px;
}

.card {
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 17px;
    margin-bottom: 16px;
}

.card h2 {
    margin: 0 0 14px;
    font-size: 20px;
    letter-spacing: -.4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    border-radius: 22px;
    padding: 16px;
    border: 1px solid var(--line);
    background: white;
    box-shadow: var(--shadow);
}

.stat-card.blue {
    background: var(--blue-soft);
}

.stat-card.green {
    background: var(--green-soft);
}

.stat-card.orange {
    background: var(--orange-soft);
}

.stat-card.red {
    background: var(--red-soft);
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.stat-value {
    font-size: 31px;
    font-weight: 950;
    margin-top: 4px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.form-full {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 900;
    margin: 0 0 6px;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    background: white;
    border-radius: 17px;
    padding: 12px 13px;
    font-size: 16px;
    color: var(--text);
    outline: none;
}

textarea {
    min-height: 105px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #9bb7ff;
    box-shadow: 0 0 0 4px rgba(79, 125, 243, .12);
}

.btn-row {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    border: 0;
    border-radius: 16px;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    line-height: 1;
}

.btn-blue {
    background: linear-gradient(135deg, #6690ff, #3262e8);
    color: white;
}

.btn-green {
    background: linear-gradient(135deg, #6eddb7, #2daa82);
    color: white;
}

.btn-orange {
    background: linear-gradient(135deg, #ffb36d, #ff7a21);
    color: white;
}

.btn-red {
    background: linear-gradient(135deg, #ff7c8b, #dc344b);
    color: white;
}

.btn-gray {
    background: #e9edf5;
    color: #293247;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 9px;
    align-items: center;
}

.contact-list {
    display: grid;
    gap: 11px;
}

.contact-card {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 22px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.contact-name {
    font-size: 18px;
    font-weight: 950;
    margin-bottom: 5px;
}

.contact-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.contact-actions {
    display: flex;
    gap: 7px;
    align-items: start;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge {
    display: inline-flex;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
    padding: 6px 10px;
    margin-top: 7px;
}

.badge-active {
    background: var(--green-soft);
    color: #137255;
}

.badge-soon {
    background: var(--orange-soft);
    color: #aa5012;
}

.badge-expired {
    background: var(--red-soft);
    color: #a72b3d;
}

.flash {
    border-radius: 18px;
    padding: 13px 14px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 800;
}

.flash-success {
    background: var(--green-soft);
    color: #137255;
    border: 1px solid #bceee0;
}

.flash-error {
    background: var(--red-soft);
    color: #9f2335;
    border: 1px solid #ffc9d1;
}

.flash-info {
    background: var(--blue-soft);
    color: #244ebc;
    border: 1px solid #cbd9ff;
}

.empty {
    color: var(--muted);
    background: #f8fbff;
    border: 1px dashed var(--line);
    border-radius: 18px;
    padding: 18px;
    text-align: center;
}

.bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 30;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    border-radius: 25px;
    box-shadow: 0 18px 46px rgba(41, 59, 103, .20);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px;
    max-width: 720px;
    margin: 0 auto;
}

.bottom-nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border-radius: 18px;
    padding: 8px 3px;
}

.bottom-nav a.active {
    background: var(--blue-soft);
    color: #315fd4;
}

.nav-ico {
    font-size: 18px;
    line-height: 1;
}

.login-logo {
    width: 82px;
    height: 82px;
    border-radius: 27px;
    background: linear-gradient(135deg, #eaf1ff, #e9fbf5);
    display: grid;
    place-items: center;
    font-size: 36px;
    margin: 24px auto 16px;
    box-shadow: var(--shadow);
}

.login-title {
    text-align: center;
    font-size: 30px;
    font-weight: 950;
    margin: 0;
}

.login-desc {
    text-align: center;
    color: var(--muted);
    margin: 8px 0 22px;
}

.table-lite {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table-lite th,
.table-lite td {
    text-align: left;
    padding: 11px 9px;
    border-bottom: 1px solid var(--line);
}

.table-lite th {
    background: #eef4ff;
    color: #244ebc;
}

@media (max-width: 850px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .search-box {
        grid-template-columns: 1fr;
    }

    .search-box .btn {
        width: 100%;
    }
}

@media (max-width: 580px) {
    .main-with-nav {
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-title {
        font-size: 25px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .stat-card {
        padding: 13px;
        border-radius: 20px;
    }

    .stat-value {
        font-size: 27px;
    }

    .card {
        padding: 15px;
        border-radius: 23px;
    }

    .contact-card {
        grid-template-columns: 1fr;
    }

    .contact-actions {
        justify-content: stretch;
    }

    .contact-actions .btn {
        flex: 1;
        min-width: 94px;
    }

    .btn-row .btn {
        width: 100%;
    }

    input,
    textarea,
    select {
        font-size: 16px;
    }
}

/* Users page */
.bottom-nav-super {
    grid-template-columns: repeat(6, 1fr);
}

.user-card {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 22px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 11px;
}

.user-name {
    font-size: 18px;
    font-weight: 950;
    margin-bottom: 5px;
}

.user-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.user-actions {
    display: flex;
    gap: 7px;
    align-items: start;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge-admin {
    background: var(--purple-soft);
    color: #5745c8;
}

.badge-disabled {
    background: #e5e7eb;
    color: #4b5563;
}

@media (max-width: 580px) {
    .bottom-nav-super a {
        font-size: 10px;
        padding: 7px 2px;
    }

    .user-card {
        grid-template-columns: 1fr;
    }

    .user-actions {
        justify-content: stretch;
    }

    .user-actions .btn {
        flex: 1;
        min-width: 100px;
    }
}

.bottom-nav-admin-only {
    grid-template-columns: 1fr;
    max-width: 360px;
}


/* users-inline-pastel-20260610 */
.users-inline-head {
    display: grid;
    grid-template-columns: 1.1fr 1.5fr 0.7fr 0.8fr 0.8fr;
    gap: 12px;
    padding: 0 14px 10px 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

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

.user-inline-row {
    display: grid;
    grid-template-columns: 1.1fr 1.5fr 0.7fr 0.8fr 0.8fr;
    gap: 12px;
    align-items: center;
    border-radius: 22px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(47, 71, 122, .06);
}

.user-inline-row:nth-child(5n+1) {
    background: #eaf1ff;
}

.user-inline-row:nth-child(5n+2) {
    background: #e9fbf5;
}

.user-inline-row:nth-child(5n+3) {
    background: #fff1e4;
}

.user-inline-row:nth-child(5n+4) {
    background: #ffecef;
}

.user-inline-row:nth-child(5n+5) {
    background: #f0edff;
}

.user-inline-col {
    font-size: 14px;
    color: var(--text);
    line-height: 1.35;
    min-width: 0;
    word-break: break-word;
}

.user-inline-col strong {
    font-size: 15px;
}

.user-inline-label {
    display: none;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 4px;
}

@media (max-width: 900px) {
    .users-inline-head {
        display: none;
    }

    .user-inline-row {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .user-inline-label {
        display: block;
    }
}

@media (max-width: 580px) {
    .user-inline-row {
        grid-template-columns: 1fr;
        padding: 14px;
    }
}

/* user-view-and-avatar-20260610 */
.user-inline-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffffff, #dfe9ff);
    color: #315fd4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    box-shadow: 0 6px 18px rgba(47, 71, 122, .12);
    flex: 0 0 auto;
}

.contacts-count-badge {
    display: inline-flex;
    min-width: 36px;
    height: 30px;
    padding: 0 11px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ffffff;
    color: #315fd4;
    font-weight: 950;
    box-shadow: inset 0 0 0 1px rgba(79, 125, 243, .22);
}

.btn-small {
    padding: 8px 11px;
    border-radius: 13px;
    font-size: 12px;
}

.user-profile-head {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 18px;
}

.user-avatar-big {
    width: 72px;
    height: 72px;
    border-radius: 26px;
    background: linear-gradient(135deg, #eaf1ff, #e9fbf5);
    color: #315fd4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 950;
    box-shadow: var(--shadow);
}

.user-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 11px;
}

.user-info-box {
    border-radius: 20px;
    padding: 14px;
    border: 1px solid var(--line);
}

.user-info-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 6px;
}

.user-info-value {
    font-size: 18px;
    font-weight: 950;
}

.blue-soft {
    background: #eaf1ff;
}

.green-soft {
    background: #e9fbf5;
}

.orange-soft {
    background: #fff1e4;
}

.purple-soft {
    background: #f0edff;
}

@media (max-width: 900px) {
    .user-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .user-profile-head {
        align-items: flex-start;
    }

    .user-info-grid {
        grid-template-columns: 1fr;
    }
}

/* sms-email-settings-20260610 */
.history-line {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 18px;
    padding: 13px;
    margin-bottom: 10px;
}

.history-line span {
    display: inline-flex;
    margin-left: 8px;
    background: var(--blue-soft);
    color: #315fd4;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 900;
}

/* ==========================================================
   BEAUTIFUL PASTEL THEME - CONTACT SMS 10020
   ========================================================== */

body {
    background:
        radial-gradient(circle at 8% 8%, rgba(174, 203, 255, .48), transparent 28%),
        radial-gradient(circle at 94% 12%, rgba(255, 214, 236, .42), transparent 30%),
        radial-gradient(circle at 35% 100%, rgba(205, 247, 230, .55), transparent 34%),
        linear-gradient(180deg, #fbfdff 0%, #f3f7ff 100%) !important;
}

.topbar {
    background:
        linear-gradient(135deg, rgba(255,255,255,.92), rgba(239,246,255,.92)) !important;
    box-shadow: 0 10px 28px rgba(47, 71, 122, .08);
}

.app-title {
    background: linear-gradient(135deg, #315fd4, #37a782);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-head {
    background:
        linear-gradient(135deg, rgba(234,241,255,.92), rgba(233,251,245,.92));
    border: 1px solid rgba(220,230,245,.9);
    border-radius: 28px;
    padding: 18px;
    box-shadow: 0 14px 36px rgba(47, 71, 122, .08);
}

.page-title {
    background: linear-gradient(135deg, #244ebc, #22a374);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card {
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,252,255,.96)) !important;
    border: 1px solid rgba(211,224,245,.95) !important;
    box-shadow: 0 14px 36px rgba(47, 71, 122, .10) !important;
}

.card h2 {
    color: #172033;
}

.card:nth-of-type(3n+1) {
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(234,241,255,.82)) !important;
}

.card:nth-of-type(3n+2) {
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(233,251,245,.82)) !important;
}

.card:nth-of-type(3n+3) {
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,241,228,.82)) !important;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -28px;
    top: -28px;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(255,255,255,.48);
}

.stat-card.blue {
    background: linear-gradient(135deg, #eaf1ff, #dfeaff) !important;
}

.stat-card.green {
    background: linear-gradient(135deg, #e9fbf5, #d8f7ec) !important;
}

.stat-card.orange {
    background: linear-gradient(135deg, #fff1e4, #ffe4c7) !important;
}

.stat-card.red {
    background: linear-gradient(135deg, #ffecef, #ffdce3) !important;
}

.stat-label {
    color: #6b7891 !important;
}

.stat-value {
    color: #172033 !important;
}

input,
textarea,
select {
    background: rgba(255,255,255,.92) !important;
    border: 1px solid #d7e2f3 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

input:focus,
textarea:focus,
select:focus {
    border-color: #7da0ff !important;
    box-shadow: 0 0 0 4px rgba(79,125,243,.13), inset 0 1px 0 rgba(255,255,255,.9) !important;
}

.btn {
    box-shadow: 0 8px 20px rgba(47, 71, 122, .12);
}

.btn-blue {
    background: linear-gradient(135deg, #6d95ff, #315fd4) !important;
}

.btn-green {
    background: linear-gradient(135deg, #70dfba, #25a87c) !important;
}

.btn-orange {
    background: linear-gradient(135deg, #ffbc7a, #ff7f25) !important;
}

.btn-red {
    background: linear-gradient(135deg, #ff8fa0, #db3650) !important;
}

.btn-gray {
    background: linear-gradient(135deg, #f2f5fb, #e1e7f1) !important;
    color: #293247 !important;
}

.contact-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, #ffffff, #f8fbff) !important;
    box-shadow: 0 10px 28px rgba(47, 71, 122, .08);
}

.contact-card:nth-child(5n+1) {
    background: linear-gradient(135deg, #ffffff, #eaf1ff) !important;
}

.contact-card:nth-child(5n+2) {
    background: linear-gradient(135deg, #ffffff, #e9fbf5) !important;
}

.contact-card:nth-child(5n+3) {
    background: linear-gradient(135deg, #ffffff, #fff1e4) !important;
}

.contact-card:nth-child(5n+4) {
    background: linear-gradient(135deg, #ffffff, #ffecef) !important;
}

.contact-card:nth-child(5n+5) {
    background: linear-gradient(135deg, #ffffff, #f0edff) !important;
}

.contact-name {
    color: #172033;
}

.badge {
    box-shadow: 0 4px 14px rgba(47, 71, 122, .08);
}

.badge-active {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0) !important;
    color: #166534 !important;
}

.badge-soon {
    background: linear-gradient(135deg, #ffedd5, #fed7aa) !important;
    color: #9a3412 !important;
}

.badge-expired {
    background: linear-gradient(135deg, #fee2e2, #fecdd3) !important;
    color: #991b1b !important;
}

.badge-disabled {
    background: linear-gradient(135deg, #eef2f7, #dbe3ef) !important;
    color: #475569 !important;
}

.bottom-nav {
    background:
        linear-gradient(135deg, rgba(255,255,255,.97), rgba(241,247,255,.94)) !important;
    border: 1px solid rgba(211,224,245,.96) !important;
    box-shadow: 0 18px 48px rgba(47, 71, 122, .22) !important;
}

.bottom-nav a.active {
    background: linear-gradient(135deg, #eaf1ff, #dce8ff) !important;
    color: #315fd4 !important;
    box-shadow: inset 0 0 0 1px rgba(79,125,243,.10);
}

.bottom-nav a:nth-child(1).active {
    background: linear-gradient(135deg, #eaf1ff, #dce8ff) !important;
}

.bottom-nav a:nth-child(2).active {
    background: linear-gradient(135deg, #e9fbf5, #d7f6ec) !important;
    color: #16835f !important;
}

.bottom-nav a:nth-child(3).active {
    background: linear-gradient(135deg, #fff1e4, #ffe2bf) !important;
    color: #b85a16 !important;
}

.bottom-nav a:nth-child(4).active {
    background: linear-gradient(135deg, #f0edff, #e5ddff) !important;
    color: #5745c8 !important;
}

.bottom-nav a:nth-child(5).active {
    background: linear-gradient(135deg, #ffecef, #ffdce3) !important;
    color: #a72b3d !important;
}

.login-logo {
    background: linear-gradient(135deg, #eaf1ff, #e9fbf5, #fff1e4) !important;
}

.login-title {
    background: linear-gradient(135deg, #315fd4, #22a374);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empty {
    background:
        linear-gradient(135deg, rgba(255,255,255,.82), rgba(234,241,255,.72)) !important;
    border: 1px dashed #c9d8ee !important;
}

.flash-success {
    background: linear-gradient(135deg, #e9fbf5, #d8f7ec) !important;
}

.flash-error {
    background: linear-gradient(135deg, #ffecef, #ffdce3) !important;
}

.flash-info {
    background: linear-gradient(135deg, #eaf1ff, #dfeaff) !important;
}

.history-line:nth-child(5n+1) {
    background: #eaf1ff !important;
}

.history-line:nth-child(5n+2) {
    background: #e9fbf5 !important;
}

.history-line:nth-child(5n+3) {
    background: #fff1e4 !important;
}

.history-line:nth-child(5n+4) {
    background: #ffecef !important;
}

.history-line:nth-child(5n+5) {
    background: #f0edff !important;
}

.users-inline-head {
    background: #eef4ff;
    border-radius: 16px;
    padding: 10px 14px !important;
    margin-bottom: 10px;
}

.user-inline-row {
    border: 1px solid rgba(211,224,245,.95) !important;
    box-shadow: 0 10px 26px rgba(47,71,122,.08) !important;
}

.user-avatar,
.user-avatar-big {
    background: linear-gradient(135deg, #ffffff, #dce8ff) !important;
}

.user-info-box {
    box-shadow: 0 8px 22px rgba(47,71,122,.08);
}

.topbar-exit {
    background: linear-gradient(135deg, #ffecef, #ffdce3) !important;
    color: #a72b3d !important;
    box-shadow: 0 8px 20px rgba(167,43,61,.10);
}

/* Titres de pages par page */
body.page-dashboard .page-title {
    background: linear-gradient(135deg, #22a374, #315fd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.page-contact_form .page-title {
    background: linear-gradient(135deg, #ff7f25, #315fd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.page-sms .page-title {
    background: linear-gradient(135deg, #ff7f25, #b85a16);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.page-email .page-title {
    background: linear-gradient(135deg, #5745c8, #315fd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.page-settings .page-title {
    background: linear-gradient(135deg, #a72b3d, #ff7f25);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.page-users .page-title,
body.page-user_view .page-title {
    background: linear-gradient(135deg, #315fd4, #5745c8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Mobile plus doux */
@media (max-width: 580px) {
    .page-head {
        border-radius: 24px;
        padding: 16px;
    }

    .card {
        border-radius: 24px;
    }

    .bottom-nav {
        border-radius: 26px;
    }

    .btn {
        min-height: 44px;
    }
}

/* import-xui-20260610 */
.bottom-nav-user-xui {
    grid-template-columns: repeat(6, 1fr);
}

.import-help {
    display: grid;
    gap: 10px;
}

.import-help-item {
    border-radius: 18px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    background: #ffffff;
    font-size: 14px;
    color: var(--text);
}

.import-help-item:nth-child(1) {
    background: #eaf1ff;
}

.import-help-item:nth-child(2) {
    background: #e9fbf5;
}

.import-help-item:nth-child(3) {
    background: #fff1e4;
}

.import-result-row {
    border-radius: 18px;
    padding: 12px 13px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    background: #fff;
}

.import-result-row:nth-child(5n+1) {
    background: #eaf1ff;
}

.import-result-row:nth-child(5n+2) {
    background: #e9fbf5;
}

.import-result-row:nth-child(5n+3) {
    background: #fff1e4;
}

.import-result-row:nth-child(5n+4) {
    background: #ffecef;
}

.import-result-row:nth-child(5n+5) {
    background: #f0edff;
}

.import-result-title {
    font-weight: 950;
    font-size: 16px;
    margin-bottom: 4px;
}

.import-result-meta {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}

@media (max-width: 580px) {
    .bottom-nav-user-xui a {
        font-size: 10px;
        padding: 7px 2px;
    }
}

/* ==========================================================
   TABLEAUX PREMIUM STYLE ECOLE - CONTACT SMS
   ========================================================== */

.contacts-table-card {
    padding: 0 !important;
    overflow: hidden;
}

.contacts-table-card h2 {
    padding: 20px 22px 10px;
    margin: 0;
    font-size: 24px;
}

.premium-table-scroll {
    width: 100%;
    overflow-x: auto;
    padding: 0 0 8px;
}

.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    overflow: hidden;
}

.premium-table thead th {
    padding: 18px 16px;
    text-align: left;
    font-size: 16px;
    font-weight: 950;
    border-bottom: 2px solid rgba(216, 205, 185, .75);
}

.premium-table thead th:nth-child(1) {
    background: #e7f0ff;
    color: #2563eb;
}

.premium-table thead th:nth-child(2) {
    background: #e9fbf5;
    color: #16835f;
}

.premium-table thead th:nth-child(3) {
    background: #f0edff;
    color: #7c3aed;
}

.premium-table thead th:nth-child(4) {
    background: #fff1e4;
    color: #c45a12;
}

.premium-table thead th:nth-child(5) {
    background: #ffecef;
    color: #a72b3d;
}

.premium-table thead th:nth-child(6) {
    background: #e9fbf5;
    color: #16835f;
}

.premium-table thead th:nth-child(7) {
    background: #eaf1ff;
    color: #315fd4;
}

.premium-table thead th:first-child {
    border-top-left-radius: 24px;
}

.premium-table thead th:last-child {
    border-top-right-radius: 24px;
}

.premium-table tbody tr:nth-child(5n+1) {
    background: #eff8f2;
}

.premium-table tbody tr:nth-child(5n+2) {
    background: #edf5ff;
}

.premium-table tbody tr:nth-child(5n+3) {
    background: #fff8ef;
}

.premium-table tbody tr:nth-child(5n+4) {
    background: #f5f1ff;
}

.premium-table tbody tr:nth-child(5n+5) {
    background: #fff0f3;
}

.premium-table tbody td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 2px solid rgba(226, 216, 199, .75);
    color: #172033;
}

.table-contact-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
}

.table-avatar {
    width: 46px;
    height: 46px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    font-size: 20px;
    color: #2563eb;
    background: linear-gradient(135deg, #ffffff, #dce8ff);
    box-shadow: 0 8px 20px rgba(47, 71, 122, .12);
    flex: 0 0 auto;
}

.table-main-name {
    font-size: 17px;
    font-weight: 950;
    color: #172033;
}

.table-sub {
    margin-top: 3px;
    color: #6b7280;
    font-size: 13px;
}

.table-note {
    margin-top: 4px;
    color: #7c3aed;
    font-size: 12px;
    font-weight: 800;
}

.table-xui {
    margin-top: 5px;
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    color: #315fd4;
    font-size: 12px;
    font-weight: 900;
}

.table-pill {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    font-weight: 900;
    white-space: nowrap;
}

.table-pill-blue {
    background: #eaf1ff;
    color: #315fd4;
}

.table-email {
    font-weight: 800;
    color: #374151;
    word-break: break-word;
}

.table-muted {
    color: #9ca3af;
    font-weight: 800;
}

.table-date {
    display: inline-flex;
    background: rgba(255,255,255,.75);
    border-radius: 999px;
    padding: 7px 11px;
    font-weight: 900;
    white-space: nowrap;
    color: #374151;
}

.table-date-strong {
    color: #a14d12;
    background: #fff4db;
}

.table-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 340px;
}

.btn-mini {
    padding: 8px 10px !important;
    border-radius: 999px !important;
    min-height: 34px !important;
    font-size: 12px !important;
}

/* Rend aussi les historiques SMS/Email en lignes alignées */
.history-line {
    display: grid;
    grid-template-columns: 1.1fr .65fr 1.5fr;
    gap: 12px;
    align-items: start;
}

.history-line strong {
    font-size: 15px;
}

.history-line span {
    justify-self: start;
}

/* Version mobile : tableau transformé en cartes alignées */
@media (max-width: 760px) {
    .contacts-table-card {
        padding: 15px !important;
    }

    .contacts-table-card h2 {
        padding: 0 0 14px;
    }

    .premium-table-scroll {
        overflow: visible;
    }

    .premium-table,
    .premium-table thead,
    .premium-table tbody,
    .premium-table tr,
    .premium-table th,
    .premium-table td {
        display: block;
        width: 100%;
    }

    .premium-table thead {
        display: none;
    }

    .premium-table tbody tr {
        border-radius: 24px;
        margin-bottom: 14px;
        overflow: hidden;
        border: 1px solid rgba(211,224,245,.95);
        box-shadow: 0 10px 28px rgba(47,71,122,.08);
    }

    .premium-table tbody td {
        border-bottom: 1px solid rgba(226,216,199,.55);
        display: grid;
        grid-template-columns: 115px 1fr;
        gap: 10px;
        align-items: center;
        padding: 13px 14px;
    }

    .premium-table tbody td::before {
        content: attr(data-label);
        font-weight: 950;
        color: #315fd4;
        font-size: 13px;
    }

    .premium-table tbody td:first-child {
        grid-template-columns: 1fr;
        background: rgba(255,255,255,.45);
    }

    .premium-table tbody td:first-child::before {
        display: none;
    }

    .table-contact-cell {
        min-width: 0;
    }

    .table-actions {
        min-width: 0;
        justify-content: stretch;
    }

    .table-actions .btn-mini {
        flex: 1;
        min-width: 92px;
    }

    .history-line {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .premium-table tbody td {
        grid-template-columns: 98px 1fr;
        font-size: 14px;
    }

    .table-actions .btn-mini {
        min-width: 100%;
    }
}

/* ==========================================================
   ACTIONS DROPDOWN CONTACTS
   ========================================================== */

.premium-table tbody td[data-label="Actions"] {
    position: relative;
    overflow: visible;
}

.premium-table tbody tr {
    position: relative;
}

.actions-dropdown {
    position: relative;
    display: inline-flex;
    justify-content: flex-start;
    z-index: 5;
}

.actions-dropdown.open {
    z-index: 999;
}

.actions-toggle {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 950;
    cursor: pointer;
    color: #315fd4;
    background: linear-gradient(135deg, #ffffff, #eaf1ff);
    box-shadow: 0 8px 20px rgba(47, 71, 122, .14);
    white-space: nowrap;
}

.actions-dropdown.open .actions-toggle {
    background: linear-gradient(135deg, #6d95ff, #315fd4);
    color: white;
}

.actions-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 190px;
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(211,224,245,.98);
    border-radius: 22px;
    box-shadow: 0 18px 46px rgba(47, 71, 122, .22);
    padding: 8px;
    display: none;
    z-index: 1000;
}

.actions-dropdown.open .actions-menu {
    display: grid;
    gap: 6px;
}

.actions-menu::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 22px;
    width: 14px;
    height: 14px;
    background: white;
    border-left: 1px solid rgba(211,224,245,.98);
    border-top: 1px solid rgba(211,224,245,.98);
    transform: rotate(45deg);
}

.actions-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    border-radius: 15px;
    padding: 11px 12px;
    font-size: 13px;
    font-weight: 950;
    color: #172033;
    line-height: 1;
}

.actions-menu-item span {
    width: 22px;
    display: inline-flex;
    justify-content: center;
}

.actions-menu-item.green {
    background: #e9fbf5;
    color: #16835f;
}

.actions-menu-item.blue {
    background: #eaf1ff;
    color: #315fd4;
}

.actions-menu-item.orange {
    background: #fff1e4;
    color: #b85a16;
}

.actions-menu-item.purple {
    background: #f0edff;
    color: #5745c8;
}

.actions-menu-item.red {
    background: #ffecef;
    color: #a72b3d;
}

.actions-menu-item:hover {
    filter: brightness(.97);
}

/* Ancien espace actions plus large inutile */
.table-actions {
    min-width: auto !important;
}

/* Mobile : menu centré sous le bouton */
@media (max-width: 760px) {
    .premium-table tbody td[data-label="Actions"] {
        overflow: visible;
    }

    .actions-dropdown {
        width: 100%;
    }

    .actions-toggle {
        width: 100%;
        min-height: 44px;
    }

    .actions-menu {
        left: 0;
        right: 0;
        top: calc(100% + 8px);
        min-width: 100%;
    }

    .actions-menu::before {
        right: 50%;
        transform: translateX(50%) rotate(45deg);
    }
}

/* ==========================================================
   FIX MENU ACTIONS CACHÉ DERRIÈRE TABLEAU
   ========================================================== */

.contacts-table-card,
.premium-table-scroll,
.premium-table,
.premium-table tbody,
.premium-table tbody tr,
.premium-table tbody td {
    overflow: visible !important;
}

.contacts-table-card {
    position: relative;
    z-index: 10;
}

.premium-table tbody tr {
    position: relative;
    z-index: 1;
}

.premium-table tbody tr:has(.actions-dropdown.open) {
    z-index: 9999;
}

.actions-dropdown {
    position: relative;
    z-index: 10000 !important;
}

.actions-dropdown.open {
    z-index: 99999 !important;
}

.actions-menu {
    z-index: 999999 !important;
}

/* Si le menu est dans la dernière ligne, il s’ouvre vers le haut */
.premium-table tbody tr:last-child .actions-menu {
    top: auto !important;
    bottom: calc(100% + 8px) !important;
}

.premium-table tbody tr:last-child .actions-menu::before {
    top: auto !important;
    bottom: -7px !important;
    transform: rotate(225deg) !important;
}

/* Correction compatible mobile/tablette */
@media (max-width: 760px) {
    .contacts-table-card,
    .premium-table-scroll,
    .premium-table,
    .premium-table tbody,
    .premium-table tbody tr,
    .premium-table tbody td {
        overflow: visible !important;
    }

    .premium-table tbody tr:has(.actions-dropdown.open) {
        z-index: 9999;
    }
}

/* ==========================================================
   MULTI DATES EXPIRATION
   ========================================================== */

.multi-expiration-box {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #eaf1ff, #e9fbf5);
}

.multi-expiration-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.multi-expiration-head h2 {
    margin: 0;
}

.multi-expiration-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.expiration-row {
    display: grid;
    grid-template-columns: 1fr 190px 1fr auto;
    gap: 10px;
    align-items: end;
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(211,224,245,.95);
    border-radius: 20px;
    padding: 12px;
    margin-bottom: 10px;
}

.extra-exp-list {
    display: grid;
    gap: 5px;
    margin-top: 7px;
}

.extra-exp-pill {
    display: inline-flex;
    width: fit-content;
    background: #f0edff;
    color: #5745c8;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}

.view-extra-exp-list {
    display: grid;
    gap: 8px;
    margin-top: 9px;
}

.view-extra-exp-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    background: #f0edff;
    border-radius: 16px;
    padding: 10px 12px;
    align-items: center;
}

.view-extra-exp-row small {
    grid-column: 1 / -1;
    color: var(--muted);
}

@media (max-width: 800px) {
    .multi-expiration-head {
        flex-direction: column;
        align-items: stretch;
    }

    .expiration-row {
        grid-template-columns: 1fr;
    }
}

/* clickable-stat-cards-20260611 */
.stat-click {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform .12s ease, box-shadow .12s ease;
}

.stat-click:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(47, 71, 122, .16) !important;
}

.stat-selected {
    outline: 3px solid rgba(49, 95, 212, .22);
    box-shadow: 0 18px 44px rgba(47, 71, 122, .18) !important;
}

.stat-hint {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 900;
    color: rgba(23, 32, 51, .58);
}

.filter-indicator {
    display: inline-flex;
    margin-top: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
}

.filter-indicator.orange {
    background: #fff1e4;
    color: #b85a16;
}

.filter-indicator.red {
    background: #ffecef;
    color: #a72b3d;
}

.filter-indicator.green {
    background: #e9fbf5;
    color: #16835f;
}

/* ==========================================================
   MOBILE : TABLEAU SUR UNE SEULE LIGNE AVEC SCROLL HORIZONTAL
   ========================================================== */

@media (max-width: 760px) {
    .contacts-table-card {
        padding: 0 !important;
        overflow: hidden !important;
    }

    .contacts-table-card h2 {
        padding: 18px 16px 10px !important;
    }

    .premium-table-scroll {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 14px;
    }

    .premium-table,
    .premium-table thead,
    .premium-table tbody,
    .premium-table tr,
    .premium-table th,
    .premium-table td {
        display: revert !important;
        width: auto !important;
    }

    .premium-table {
        display: table !important;
        min-width: 1120px !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    .premium-table thead {
        display: table-header-group !important;
    }

    .premium-table tbody {
        display: table-row-group !important;
    }

    .premium-table tr {
        display: table-row !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .premium-table th,
    .premium-table td {
        display: table-cell !important;
        vertical-align: middle !important;
        padding: 13px 12px !important;
        white-space: nowrap !important;
    }

    .premium-table td::before {
        display: none !important;
        content: none !important;
    }

    .table-contact-cell {
        min-width: 220px !important;
        white-space: normal !important;
    }

    .table-main-name,
    .table-sub,
    .table-note,
    .table-xui {
        white-space: normal !important;
    }

    .table-actions {
        min-width: 150px !important;
    }

    .actions-dropdown {
        width: auto !important;
    }

    .actions-toggle {
        width: auto !important;
        min-width: 120px !important;
    }

    .actions-menu {
        min-width: 190px !important;
        left: auto !important;
        right: 0 !important;
    }

    .bottom-nav {
        z-index: 999999 !important;
    }
}

/* Encore plus compact sur petit iPhone */
@media (max-width: 430px) {
    .premium-table {
        min-width: 1050px !important;
        font-size: 13px !important;
    }

    .premium-table th,
    .premium-table td {
        padding: 11px 10px !important;
    }

    .table-avatar {
        width: 38px !important;
        height: 38px !important;
        border-radius: 15px !important;
        font-size: 17px !important;
    }

    .table-main-name {
        font-size: 15px !important;
    }

    .btn-mini,
    .actions-toggle {
        font-size: 12px !important;
    }
}

/* iphone-manual-sms-20260612 */
.btn-iphone-sms {
    background: linear-gradient(135deg, #34d399, #059669) !important;
    color: white !important;
}

.sms-manual-actions {
    align-items: stretch;
}

.sms-manual-actions .btn {
    min-width: 210px;
}

@media (max-width: 580px) {
    .sms-manual-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

/* calendar-ics-sync-20260612 */
.calendar-box {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 14px;
    align-items: center;
    background: linear-gradient(135deg, #eaf1ff, #e9fbf5);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 16px;
    margin-bottom: 16px;
}

.calendar-icon {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    font-size: 32px;
    box-shadow: var(--shadow);
}

.calendar-box p {
    margin: 6px 0 0;
    color: var(--muted);
}

.calendar-settings-card {
    background: linear-gradient(135deg, #f0edff, #e9fbf5) !important;
}

@media (max-width: 580px) {
    .calendar-box {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .calendar-icon {
        margin: 0 auto;
    }
}

/* beautiful-email-preview-20260613 */
.email-preview-card {
    margin-top: 16px;
    border-radius: 24px;
    padding: 15px;
    background: linear-gradient(135deg, #eaf1ff, #e9fbf5);
    border: 1px solid var(--line);
}

.email-preview-title {
    font-weight: 950;
    color: #315fd4;
    margin-bottom: 10px;
}

.email-preview-inner {
    background: white;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(47,71,122,.10);
}

.email-preview-header {
    background: linear-gradient(135deg, #6d95ff, #22a374);
    color: white;
    font-size: 22px;
    font-weight: 950;
    padding: 18px;
}

.email-preview-body {
    padding: 18px;
    line-height: 1.7;
    color: #172033;
}

.email-preview-body span {
    color: #9a3412;
    font-weight: 950;
}

/* premium-contact-iptv-email-preview-20260613 */
.email-preview-card {
    margin-top: 16px;
    border-radius: 24px;
    padding: 15px;
    background: linear-gradient(135deg, #eaf1ff, #e9fbf5);
    border: 1px solid var(--line);
}

.email-preview-title {
    font-weight: 950;
    color: #315fd4;
    margin-bottom: 10px;
}

.email-preview-inner {
    background: white;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(47,71,122,.10);
}

.email-preview-header {
    background: linear-gradient(135deg, #4f7df3, #22a374, #f7a35c);
    color: white;
    font-size: 22px;
    font-weight: 950;
    padding: 18px;
}

.email-preview-body {
    padding: 18px;
    line-height: 1.7;
    color: #172033;
}

.email-preview-body span {
    color: #9a3412;
    font-weight: 950;
}
