/* ============================================================
   ZIPPY IPTV — Indigo Pro Theme
   Sidebar: deep indigo gradient | Accent: #6366f1 | Bg: #f1f5f9
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --sidebar-bg-from:  #1e1b4b;
    --sidebar-bg-to:    #0f172a;
    --sidebar-w:        210px;
    --accent:           #6366f1;
    --accent-dark:      #4f46e5;
    --accent-light:     rgba(99,102,241,0.12);
    --bg:               #f1f5f9;
    --surface:          #ffffff;
    --surface-2:        #f8fafc;
    --border:           #e2e8f0;
    --text:             #334155;
    --text-dark:        #0f172a;
    --text-muted:       #94a3b8;
    --green:            #10b981;
    --red:              #ef4444;
    --orange:           #f59e0b;
    --blue:             #3b82f6;
    --purple:           #8b5cf6;
    --pink:             #ec4899;
    --cyan:             #06b6d4;
    --shadow-sm:        0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:           0 4px 16px rgba(99,102,241,.08), 0 1px 4px rgba(0,0,0,.05);
    --shadow-lg:        0 10px 40px rgba(99,102,241,.15);
    --r:                10px;
    --r-sm:             6px;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    width: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a, a:link, a:visited { text-decoration: none; color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1,h2,h3,h4,h5,h6 { font-weight: 600; color: var(--text-dark); margin-top: 0; line-height: 1.3; }
hr { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ---- PAGE LAYOUT ---- */
#page-wrapper { width: 100%; }
#page-content {
    padding: 28px 28px 0;
    min-height: 100vh;
    margin-left: var(--sidebar-w);
    background: var(--bg);
    transition: margin-left .25s ease;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.navbar-static-side {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, var(--sidebar-bg-from) 0%, var(--sidebar-bg-to) 100%);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}
.navbar-static-side::-webkit-scrollbar { width: 3px; }
.navbar-static-side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }

#logo-element {
    height: 68px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
#logo-element img { max-height: 40px; max-width: 150px; object-fit: contain; }

/* NAV */
#side-menu ul.nav { margin: 8px 12px; padding: 0; list-style: none; }

.sidebar-header {
    color: rgba(148,163,184,.5);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 18px 8px 6px;
}

#sidebar-collapse .nav > li { margin-bottom: 1px; }
#sidebar-collapse .nav > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(203,213,225,.6);
    font-weight: 500;
    transition: all .15s ease;
}
#sidebar-collapse .nav > li > a > i {
    width: 18px;
    text-align: center;
    font-size: 13px;
    color: rgba(148,163,184,.5);
    flex-shrink: 0;
    transition: color .15s;
}
#sidebar-collapse .nav > li > a:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
    text-decoration: none;
}
#sidebar-collapse .nav > li > a:hover > i { color: rgba(255,255,255,.8); }
#sidebar-collapse .nav > li > a:focus { text-decoration: none; outline: none; }
/* active = sous-menu ouvert par MetisMenu — annule tous les styles Bootstrap/thème */
#sidebar-collapse .nav > li.active,
#sidebar-collapse .nav > li.active > a,
#sidebar-collapse .nav > li.active > a:hover,
#sidebar-collapse .nav > li.active > a:focus,
#sidebar-collapse .nav > li.open,
#sidebar-collapse .nav > li.open > a,
#sidebar-collapse .nav > li.open > a:hover,
#sidebar-collapse .nav > li.open > a:focus {
    background: transparent !important;
    background-color: transparent !important;
    color: rgba(255,255,255,.7) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
}
/* active + selected = sous-menu ouvert ET page courante → garde l'accent */
#sidebar-collapse .nav > li.active.selected > a,
#sidebar-collapse .nav > li.active.selected > a:hover,
#sidebar-collapse .nav > li.active.selected > a:focus {
    background: rgba(99,102,241,.25) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 0 var(--accent) !important;
    border-radius: 0 !important;
}
/* selected = page courante (PHP) → highlight accent */
#sidebar-collapse .nav > li.selected > a {
    background: rgba(99,102,241,.25) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent) !important;
}
#sidebar-collapse .nav > li.selected > a > i { color: #a5b4fc; }

nav .fa-angle-double-right { margin-left: auto; font-size: 10px; color: rgba(255,255,255,.2); }
.active > a > .fa-angle-double-right:before { content: '\f103'; }

/* Sub-menu */
body:not(.mini-navbar) #sidebar-collapse .nav .nav-second-level {
    background: rgba(0,0,0,.15);
    border-radius: 0 0 8px 8px;
    margin-bottom: 4px;
    overflow: hidden;
}
#sidebar-collapse .nav > li > ul.nav-second-level > li > a {
    padding: 7px 12px 7px 42px;
    color: rgba(148,163,184,.65);
    display: block;
    font-size: 12px;
    border-radius: 0;
    transition: all .15s;
}
#sidebar-collapse .nav > li > ul.nav-second-level > li > a:hover { color: #fff; text-decoration: none; }
#sidebar-collapse .nav > li > ul.nav-second-level > li.active > a { color: #a5b4fc; }

/* ============================================================
   TOP NAVBAR
   ============================================================ */
.navbar.navbar-static-top {
    background: var(--surface);
    border: none;
    border-bottom: 1px solid var(--border);
    margin-left: var(--sidebar-w);
    margin-top: 0;
    margin-bottom: 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 24px;
    gap: 6px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.navbar .btn-main {
    background: var(--surface-2);
    border: 1px solid #7c3aed;
    color: var(--text-muted);
    border-radius: var(--r-sm);
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
}
.navbar .btn-main:hover { background: var(--accent-light); color: var(--accent); border-color: rgba(99,102,241,.3); }

span.navbar-item-id {
    background-color: #7c3aed !important;
    border: 1px solid #7c3aed !important; color: #fff !important;
    border-radius: var(--r-sm) !important; padding: 5px 13px !important;
    font-size: 12px !important; font-weight: 600 !important;
}
.navbar-item-telegram span {
    background: #0088cc !important; border: none !important; color: #fff !important;
    border-radius: var(--r-sm) !important; padding: 5px 11px !important;
}
#span-solde {
    background: #000 !important; border: 1px solid #333 !important;
    color: #ffff00 !important; border-radius: var(--r-sm) !important;
    padding: 5px 13px !important; font-weight: 700 !important;
}

.profile-dropdown {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r); box-shadow: var(--shadow-lg);
    min-width: 190px; padding: 6px 0;
}
.profile-dropdown li > a {
    color: var(--text) !important; padding: 8px 16px !important;
    display: flex !important; align-items: center !important; gap: 8px !important;
}
.profile-dropdown li > a:hover { background: var(--surface-2) !important; color: var(--accent) !important; text-decoration: none !important; }
.profile-dropdown .dropdown-header { color: var(--accent); font-weight: 600; padding: 8px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.panel:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.panel-body { padding: 22px; position: relative; }
.panel-body h4 { font-size: 22px; font-weight: 700; margin: 0; }
.panel-body p { margin: 0; font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }

.icon-bg {
    position: absolute; right: -8px; bottom: -8px;
    font-size: 72px; opacity: .07;
    color: var(--text-dark);
    pointer-events: none;
}

.text-center { text-align: center; }

.panel-footer {
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    padding: 10px 22px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.panel-footer a { color: var(--text-muted); font-weight: 500; }
.panel-footer a:hover { color: var(--accent); }

/* ---- STAT CARDS — fond coloré, icône filigrane, texte blanc ---- */

/* Base commune */
.yellow-bg, .purple-bg, .warm-blue-bg, .gray-bg, .green-bg, .red-bg {
    border: none !important;
    overflow: hidden;
}
.yellow-bg .panel-body,
.purple-bg .panel-body,
.warm-blue-bg .panel-body,
.gray-bg .panel-body,
.green-bg .panel-body,
.red-bg .panel-body {
    min-height: 90px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.yellow-bg h4, .purple-bg h4, .warm-blue-bg h4,
.gray-bg h4, .green-bg h4, .red-bg h4 {
    color: #fff !important;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}
.yellow-bg p, .purple-bg p, .warm-blue-bg p,
.gray-bg p, .green-bg p, .red-bg p {
    color: rgba(255,255,255,.75) !important;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 600;
}

/* Icône filigrane géante à droite — sélecteur spécifique pour sortir du flux flex */
.yellow-bg .panel-body .icon-bg,
.purple-bg .panel-body .icon-bg,
.warm-blue-bg .panel-body .icon-bg,
.gray-bg .panel-body .icon-bg,
.green-bg .panel-body .icon-bg,
.red-bg .panel-body .icon-bg {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 40px !important;
    opacity: .22 !important;
    color: #fff !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    display: block !important;
    line-height: 1 !important;
    pointer-events: none !important;
    z-index: 0;
}

/* Texte pleine largeur pour centrage correct dans le flex */
.yellow-bg .panel-body .text-center,
.purple-bg .panel-body .text-center,
.warm-blue-bg .panel-body .text-center,
.gray-bg .panel-body .text-center,
.green-bg .panel-body .text-center,
.red-bg .panel-body .text-center {
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Footer coloré (version sombre de la couleur) */
.yellow-bg .panel-footer,
.purple-bg .panel-footer,
.warm-blue-bg .panel-footer,
.gray-bg .panel-footer,
.green-bg .panel-footer,
.red-bg .panel-footer {
    background: rgba(0,0,0,.15) !important;
    border-top: 1px solid rgba(255,255,255,.1) !important;
    color: rgba(255,255,255,.85) !important;
    font-size: 12px;
}
.yellow-bg .panel-footer a,
.purple-bg .panel-footer a,
.warm-blue-bg .panel-footer a,
.gray-bg .panel-footer a,
.green-bg .panel-footer a,
.red-bg .panel-footer a { color: rgba(255,255,255,.85) !important; }

/* Couleurs individuelles */
.yellow-bg    { background: linear-gradient(135deg, #f59e0b, #d97706) !important; box-shadow: 0 6px 20px rgba(245,158,11,.35) !important; }
.purple-bg    { background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important; box-shadow: 0 6px 20px rgba(139,92,246,.35) !important; }
.warm-blue-bg { background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important; box-shadow: 0 6px 20px rgba(59,130,246,.35) !important; }
.gray-bg      { background: linear-gradient(135deg, #64748b, #475569) !important; box-shadow: 0 6px 20px rgba(100,116,139,.3) !important; }
.green-bg     { background: linear-gradient(135deg, #10b981, #059669) !important; box-shadow: 0 6px 20px rgba(16,185,129,.35) !important; }
.red-bg       { background: linear-gradient(135deg, #ef4444, #dc2626) !important; box-shadow: 0 6px 20px rgba(239,68,68,.35) !important; }

/* ============================================================
   PANEL HEADING (table/section header)
   ============================================================ */
.panel-heading {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.panel-heading-flex {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
}
.panel-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.panel-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
    border-radius: 2px;
}
/* Pages redessinées — barre violette entre icône et texte */
.subs-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}
.subs-panel-title i { order: -1; color: var(--accent); font-size: 17px; }
.subs-panel-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
    border-radius: 2px;
    order: 0;
}
.panel-options { order: 2; margin-left: auto; display: flex; gap: 6px; }
.panel-options .btn { font-size: 11px; padding: 4px 10px; }

/* Bouton Afficher dans les tableaux */
.btn-view {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background: rgba(99,102,241,.08);
    border: 1px solid rgba(99,102,241,.25);
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, transform .12s;
    white-space: nowrap;
    cursor: pointer;
}
.btn-view:hover, .btn-view:focus {
    background: rgba(99,102,241,.18);
    border-color: var(--accent);
    color: var(--accent-dark);
    text-decoration: none;
    transform: translateY(-1px);
}
.btn-view:active { transform: translateY(0); }

/* ============================================================
   MODERN TABLES
   ============================================================ */
.table {
    color: var(--text);
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 0;
}
.table thead th {
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 12px 18px;
    border-bottom: 2px solid var(--border);
    border-top: none;
    white-space: nowrap;
}
.table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .12s;
}
.table tbody tr:last-child { border-bottom: none; }
.table tbody td {
    padding: 12px 18px;
    vertical-align: middle;
    font-size: 13px;
}
.table-hover tbody tr:hover { background: #f8f7ff; }
.table-striped tbody tr:nth-of-type(odd) { background: rgba(99,102,241,.02); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 0 0 var(--r) var(--r); }

/* ============================================================
   PROFESSIONAL BADGES WITH ICONS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
    line-height: 1;
}
.badge i { font-size: 9px; }

/* Active / Online */
.badge-success, .label-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.badge-success::before { content: '\f058'; font-family: 'Font Awesome 5 Free'; font-weight: 900; margin-right: 3px; font-size: 9px; }

/* Danger / Expired */
.badge-danger, .label-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.badge-danger::before { content: '\f057'; font-family: 'Font Awesome 5 Free'; font-weight: 900; margin-right: 3px; font-size: 9px; }

/* Warning / Pending */
.badge-warning, .label-warning {
    background: #fef9c3;
    color: #a16207;
    border: 1px solid #fef08a;
}
.badge-warning::before { content: '\f017'; font-family: 'Font Awesome 5 Free'; font-weight: 900; margin-right: 3px; font-size: 9px; }

/* Info */
.badge-info, .label-info {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
.badge-info::before { content: '\f05a'; font-family: 'Font Awesome 5 Free'; font-weight: 900; margin-right: 3px; font-size: 9px; }

/* Primary / Accent */
.badge-primary, .label-primary {
    background: rgba(99,102,241,.12);
    color: var(--accent);
    border: 1px solid rgba(99,102,241,.25);
}
.badge-primary::before { content: '\f005'; font-family: 'Font Awesome 5 Free'; font-weight: 900; margin-right: 3px; font-size: 9px; }

/* Default */
.badge-default, .label-default {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.badge-pill { border-radius: 50px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s ease;
    line-height: 1;
    font-family: inherit;
    white-space: nowrap;
}
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; box-shadow: 0 4px 14px rgba(99,102,241,.4); }
.btn-default   { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-default:hover { background: var(--surface-2); color: var(--accent); border-color: rgba(99,102,241,.3); }
.btn-success   { background: var(--green); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger    { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-warning   { background: var(--orange); color: #fff; }
.btn-warning:hover { background: #d97706; color: #fff; }
.btn-info      { background: var(--cyan); color: #fff; }
.btn-info:hover { background: #0891b2; color: #fff; }
.btn-light     { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-sm { padding: 5px 11px; font-size: 11.5px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-group { display: inline-flex; gap: 3px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-control {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    padding: 8px 12px;
    font-size: 13px;
    width: 100%;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); outline: none; }
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: var(--surface); }
label { font-weight: 500; color: var(--text); margin-bottom: 5px; display: block; font-size: 12.5px; }
.help-block { color: var(--red); font-size: 11.5px; margin-top: 4px; }
.form-group { margin-bottom: 16px; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-content { background: var(--surface); border: none; border-radius: 14px; box-shadow: 0 24px 80px rgba(15,23,42,.2); }
.modal-header { background: var(--surface); border-bottom: 1px solid var(--border); border-radius: 14px 14px 0 0; padding: 18px 22px; }
.modal-title { font-weight: 600; color: var(--text-dark); font-size: 15px; }
.modal-body { padding: 22px; }
.modal-footer { background: var(--surface-2); border-top: 1px solid var(--border); border-radius: 0 0 14px 14px; padding: 14px 22px; }
.modal-backdrop.in { opacity: .5; }
.close { color: var(--text-muted); opacity: 1; text-shadow: none; font-size: 18px; }
.close:hover { color: var(--text-dark); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { border-radius: var(--r-sm); padding: 12px 16px; font-size: 13px; border: none; display: flex; align-items: flex-start; gap: 10px; }
.alert::before { font-family: 'Font Awesome 5 Free'; font-weight: 900; font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #dcfce7; color: #15803d; border-left: 4px solid var(--green); }
.alert-success::before { content: '\f058'; color: var(--green); }
.alert-danger  { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--red); }
.alert-danger::before  { content: '\f057'; color: var(--red); }
.alert-warning { background: #fef9c3; color: #92400e; border-left: 4px solid var(--orange); }
.alert-warning::before { content: '\f071'; color: var(--orange); }
.alert-info    { background: #e0f2fe; color: #0c4a6e; border-left: 4px solid var(--cyan); }
.alert-info::before    { content: '\f05a'; color: var(--cyan); }

/* ============================================================
   DROPDOWNS
   ============================================================ */
.dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    min-width: 180px;
}
.dropdown-menu > li > a {
    color: var(--text);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--r-sm);
    font-size: 13px;
}
.dropdown-menu > li > a:hover { background: var(--accent-light); color: var(--accent); text-decoration: none; }
.divider { background: var(--border); margin: 4px 0; height: 1px; }

/* ============================================================
   MINI NAVBAR
   ============================================================ */
body.mini-navbar .navbar-static-side {
    width: 58px;
    overflow: visible !important;
}
body.mini-navbar #sidebar-collapse {
    overflow: visible !important;
}
body.mini-navbar #page-content,
body.mini-navbar .navbar.navbar-static-top { margin-left: 58px; }
body.mini-navbar #logo-element { padding: 0 12px; justify-content: center; }
body.mini-navbar #logo-element img { max-width: 30px; max-height: 30px; }

body.mini-navbar #sidebar-collapse .nav > li > a {
    padding: 9px 0;
    justify-content: center;
    width: 100%;
    border-radius: 0;
    box-shadow: none !important;
}
body.mini-navbar #sidebar-collapse .nav > li > a > i,
body.mini-navbar #sidebar-collapse .nav > li > a i { font-size: 15px !important; margin: 0 !important; }
body.mini-navbar #sidebar-collapse .nav > li > a > .nav-label { display: none; }
body.mini-navbar #sidebar-collapse .nav > li > a > .fa-angle-double-right { display: none !important; }

/* Actif en mini : page courante uniquement (selected = PHP, active = MetisMenu ignoré) */
body.mini-navbar #sidebar-collapse .nav > li.selected > a {
    background: rgba(99,102,241,.25) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Telegram en mini : même style que les autres items */
body.mini-navbar #sidebar-collapse .nav > li.nav-item-telegram > a,
body.mini-navbar #sidebar-collapse .nav > li.nav-item-telegram > a:hover {
    background: transparent !important;
    box-shadow: none !important;
    padding: 9px 0 !important;
}

body.mini-navbar .sidebar-header { display: none; }
body.mini-navbar .nav-item-telegram { text-align: center; padding: 0; }
body.mini-navbar #sidebar-collapse .nav { margin: 4px 0 !important; }

/* Mini-mode : bloquer MetisMenu/Bootstrap pendant le bref instant avant que le JS déplace les <ul> */
body.mini-navbar #sidebar-collapse .nav-second-level {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}
/* Flyout dans <body> : JS gère position/display, CSS gère le style des liens */
.mini-flyout-sub > li > a {
    color: rgba(148,163,184,.85);
    padding: 8px 14px;
    font-size: 12.5px;
    display: block;
    border-radius: 6px;
    transition: background .12s, color .12s;
    white-space: nowrap;
}
.mini-flyout-sub > li > a:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
    text-decoration: none;
}
.mini-flyout-sub > li:empty { display: none; }

/* ============================================================
   UTILITIES
   ============================================================ */
.pull-right { float: right; }
.pull-left  { float: left; }
.clearfix::after { content: ''; display: table; clear: both; }
.mar-top-10 { margin-top: 10px; }
.mar-btm-10 { margin-bottom: 10px; }
.padding-10 { padding: 10px; }
.text-muted { color: var(--text-muted) !important; }
.animated.fadeIn { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:none; } }
.navbar-row-break { display: none; }

/* ---- Google Translate : masquer la barre du haut ---- */
.goog-te-banner-frame, .skiptranslate { display: none !important; }
body { top: 0 !important; }

/* ---- Bouton langue personnalisé ---- */
.navbar-lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    min-width: 150px;
    padding: 6px;
}
.navbar-lang-menu a {
    display: block;
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    border-radius: var(--r-sm);
    text-decoration: none;
}
.navbar-lang-menu a:hover {
    background: var(--accent-light);
    color: var(--accent);
    text-decoration: none;
}

/* ---- Canal Telegram nav item — bleu, sans style actif ---- */
#sidebar-collapse .nav > li.nav-item-telegram > a,
#sidebar-collapse .nav > li.nav-item-telegram > a:link,
#sidebar-collapse .nav > li.nav-item-telegram > a:visited,
#sidebar-collapse .nav > li.nav-item-telegram > a:hover,
#sidebar-collapse .nav > li.nav-item-telegram > a:active,
#sidebar-collapse .nav > li.nav-item-telegram > a:focus {
    color: #0088cc !important;
    background: transparent !important;
    box-shadow: none !important;
    font-weight: 500 !important;
    outline: none !important;
}
#sidebar-collapse .nav > li.nav-item-telegram > a > i {
    color: #0088cc !important;
}

/* ---- FOOTER ---- */
footer {
    margin-top: auto;
    padding: 14px 0 14px;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
    text-align: center;
    flex-shrink: 0;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }

/* ---- SCROLL TO TOP ---- */
#to-top { position: fixed; bottom: 24px; right: 24px; background: var(--accent); color: #fff; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 15px; box-shadow: 0 4px 16px rgba(99,102,241,.45); transition: all .2s; z-index: 999; }
#to-top:hover { background: var(--accent-dark); transform: translateY(-3px); color: #fff; text-decoration: none; }

/* ============================================================
   LOGIN PAGE — Indigo Pro
   ============================================================ */
body:has(.module.form-module) {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
    position: relative;
    overflow: hidden;
}
body:has(.module.form-module)::before {
    content: '';
    position: fixed;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,.3) 0%, transparent 70%);
    top: -150px; right: -150px;
    pointer-events: none;
}
body:has(.module.form-module)::after {
    content: '';
    position: fixed;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(139,92,246,.25) 0%, transparent 70%);
    bottom: -100px; left: -100px;
    pointer-events: none;
}
.pen-title { display: none; }

.module.form-module {
    width: 100%;
    max-width: 410px;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 18px;
    padding: 36px 32px;
    box-shadow: 0 30px 80px rgba(0,0,0,.35);
    margin: 20px auto;
    position: relative;
    z-index: 1;
}
.module.form-module img { max-width: 170px; height: auto; display: block; margin: 0 auto; }
.module.form-module .form { padding-top: 22px !important; }

.input-login-group {
    position: relative;
    margin-bottom: 14px;
}
.input-login-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6366f1;
    font-size: 13px;
    pointer-events: none;
    z-index: 2;
}
.module.form-module input[type="text"],
.module.form-module input[type="email"],
.module.form-module input[type="password"] {
    width: 100%;
    background: #f1f5ff;
    border: 1.5px solid #4440b8;
    border-radius: 10px;
    color: #1e293b;
    padding: 13px 14px;
    font-size: 13.5px;
    margin-bottom: 12px;
    transition: border-color .2s, box-shadow .2s, background .2s;
    font-family: inherit;
    display: block;
    box-shadow: 0 2px 6px rgba(99,102,241,.06);
}
.module.form-module .input-login-group input[type="text"],
.module.form-module .input-login-group input[type="password"] {
    padding-left: 42px;
    margin-bottom: 0;
}
.module.form-module input:focus { background: #fff; border-color: #4440b8; box-shadow: 0 0 0 3px rgba(68,64,184,.15); outline: none; }
.module.form-module input::placeholder { color: #94a3b8; font-size: 13px; }

.module.form-module button {
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: all .2s;
    font-family: inherit;
    letter-spacing: .02em;
    box-shadow: 0 4px 16px rgba(99,102,241,.45);
}
.module.form-module button:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(99,102,241,.55); }
.module.form-module h2 { color: var(--text-dark); font-size: 19px; font-weight: 700; margin-bottom: 4px; }

.toggle { position: absolute; top: 16px; right: 16px; color: var(--accent); cursor: pointer; font-size: 12px; }
.cta { margin-top: 14px; text-align: center; }
.cta a { color: var(--text-muted); font-size: 12px; }
.cta a:hover { color: var(--accent); }

#login-footer { margin-top: 18px; color: rgba(255,255,255,.5); font-size: 12px; text-align: center; position: relative; z-index: 1; }
#login-footer a { color: rgba(255,255,255,.5); }
#login-footer a:hover { color: #fff; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .navbar.navbar-static-top {
        margin-left: 0;
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
    }
    .navbar-item-menu    { width: 44px; height: 44px; padding: 0 !important; display: flex !important; align-items: center; justify-content: center; flex-shrink: 0; }
    .navbar-spacer       { flex: 1; }
    .navbar-row-break-1,
    .navbar-row-break-2,
    #btn-fullscreen      { display: none !important; }
    #page-content { margin-left: 0; padding: 14px; }
    body:has(.module.form-module) { justify-content: flex-start; padding-top: 110px; }
    .module.form-module { width: calc(100% - 48px); margin: 0 auto; padding: 24px 20px; }
    .panel-heading-flex { flex-direction: column; align-items: flex-start !important; gap: 8px; }

    /* Sidebar cachée hors-écran par défaut */
    .navbar-static-side {
        transform: translateX(-100%);
        transition: transform .28s cubic-bezier(.4,0,.2,1);
        z-index: 1100;
    }
    /* Sidebar visible quand ouverte */
    body.sidebar-open .navbar-static-side {
        transform: translateX(0);
        box-shadow: 6px 0 24px rgba(0,0,0,.45);
    }
    /* Overlay sombre derrière la sidebar */
    #sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 1090;
        cursor: pointer;
    }
    body.sidebar-open #sidebar-overlay {
        display: block;
    }
    /* Pas de mini-navbar sur mobile */
    body.mini-navbar .navbar-static-side { width: var(--sidebar-w); }
    body.mini-navbar #page-content,
    body.mini-navbar .navbar.navbar-static-top { margin-left: 0; }

    /* new-subscription.php — réduire espacement formulaire */
    .nf-body        { padding: 14px 16px; }
    .nf-section     { margin-bottom: 10px; }
    .nf-field       { margin-bottom: 12px; }
    .nf-col .nf-field:last-child { margin-bottom: 0; }
    .nf-grid        { gap: 8px; }
    .nf-header      { margin-bottom: 16px; padding-bottom: 14px; gap: 12px; }
    .nf-bouquets-panel { margin-top: 14px; padding: 12px; }
}

/* ---- reCAPTCHA ---- */
.captchsize {
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 12px;
    box-sizing: border-box;
}

/* ============================================================
   FORMULAIRE NOUVEAU CLIENT (new-subscription.php)
   ============================================================ */
.nf-body { padding: 28px 32px; }

.nf-section { margin-bottom: 20px; }

.nf-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .7px;
    margin-bottom: 8px;
}

/* Pill radio (nombre d'abonnements) */
.nf-pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.nf-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 18px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: var(--surface-2);
    transition: border-color .15s, background .15s, color .15s;
    user-select: none;
}
.nf-pill input[type="radio"] { display: none; }
.nf-pill:has(input:checked) {
    border-color: var(--accent);
    background: rgba(99,102,241,.1);
    color: var(--accent);
}

/* Grille 2 colonnes */
.nf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 8px; }
@media (max-width: 900px) {
    .nf-grid { grid-template-columns: 1fr; gap: 0; }
    .nf-col .nf-field:last-child { margin-bottom: 0; }
}

.nf-field { margin-bottom: 22px; }

/* Inputs */
.nf-input {
    display: block;
    width: 100%;
    padding: 9px 13px;
    font-size: 13px;
    color: var(--text);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 9px;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.nf-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.nf-select {
    appearance: auto;
    cursor: pointer;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .01em;
}
.nf-select option {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 400;
    padding: 6px 10px;
}
.nf-textarea { resize: vertical; min-height: 84px; }

/* Input group (Active Code + bouton) */
.nf-input-group { display: flex; gap: 0; }
.nf-input-group .nf-input {
    border-radius: 9px 0 0 9px;
    flex: 1;
}
.nf-btn-gen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0 9px 9px 0;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.nf-btn-gen:hover { background: var(--accent-dark); }

/* Messages d'erreur de validation */
.nf-error {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-left: 3px solid #ef4444;
    border-radius: 7px;
    color: #b91c1c;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    animation: nfErrIn .2s ease;
}
.nf-error::before {
    content: '\f06a';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 13px;
    color: #ef4444;
    flex-shrink: 0;
}
@keyframes nfErrIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.nf-error-bouquet {
    justify-content: center;
    font-size: 13.5px;
    padding: 12px 18px;
}
.nf-field-error .nf-input,
.nf-field-error .nf-textarea {
    border-color: #ef4444 !important;
    background: #fff8f8 !important;
}
.nf-field-error .nf-label { color: #b91c1c; }

/* Cartes plans d'abonnement */
.nf-plans {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.nf-plan-trial { grid-column: 1 / -1; }
.nf-field .nf-plans + .nf-error,
.nf-field > .nf-error { margin-top: 10px; }
.nf-plan {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 14px 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    background: var(--surface);
    transition: border-color .15s, background .15s, transform .12s, box-shadow .15s;
    position: relative;
    user-select: none;
}
.nf-plan:hover:not(.nf-plan-disabled) {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(99,102,241,.15);
}
.nf-plan input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.nf-plan:has(input:checked) {
    border-color: var(--accent);
    background: rgba(99,102,241,.07);
    box-shadow: 0 4px 14px rgba(99,102,241,.15);
}
.nf-plan:has(input:checked)::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 9px; right: 11px;
    font-size: 10px;
    color: var(--accent);
}
.nf-plan-duration {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}
.nf-plan-duration small { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.nf-plan-price { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.nf-plan-free { color: var(--green) !important; font-weight: 600 !important; }
.nf-plan-disabled { opacity: .45; cursor: not-allowed; }
.nf-plan-disabled:hover { transform: none !important; box-shadow: none !important; border-color: var(--border) !important; }
.nf-trial-info { font-size: 11px; margin-top: 6px; line-height: 1.4; display: block; }
.nf-trial-ok   { color: var(--green); }
.nf-trial-limit { color: #ef4444; }
.nf-trial-warn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    background: #ef4444; color: #fff;
    font-size: 10px; font-weight: 700;
    cursor: help; margin-left: 4px; vertical-align: middle;
}

/* Barre d'actions */
.nf-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.nf-btn-cancel {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 20px;
    border-radius: 9px;
    border: 1.5px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.nf-btn-cancel:hover { background: var(--border); color: var(--text); }
.nf-btn-save {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 24px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .12s;
    box-shadow: 0 2px 8px rgba(99,102,241,.3);
}
.nf-btn-save:hover { background: var(--accent-dark); transform: translateY(-1px); }
.nf-btn-save:active { transform: translateY(0); }

/* === HERO CODE === */
.nf-hero-code {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
    border-radius: 14px;
    padding: 22px 24px 24px;
    margin-bottom: 4px;
}
.nf-hero-code__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: rgba(255,255,255,.55);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.nf-hero-code__header i { font-size: 13px; color: rgba(165,180,252,.7); }
.nf-hero-input {
    background: rgba(255,255,255,.1) !important;
    border-color: rgba(255,255,255,.2) !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-align: center !important;
}
.nf-hero-input::placeholder { color: rgba(255,255,255,.25) !important; font-size: 13px !important; font-weight: 400 !important; letter-spacing: 0 !important; }
.nf-hero-input:focus { border-color: rgba(255,255,255,.45) !important; box-shadow: 0 0 0 3px rgba(255,255,255,.08) !important; }

/* Plans en ligne (4 colonnes) */
.nf-plans-row { grid-template-columns: repeat(4, 1fr); }

/* nf-* — header, columns, error state, bouquets panel */
.nf-header { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.nf-icon { font-size: 26px; color: var(--accent); background: rgba(99,102,241,.12); width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 14px; flex-shrink: 0; }
.nf-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.nf-subtitle { font-size: 13px; color: var(--text-muted); margin: 0; }
.nf-col { min-width: 0; }
.nf-input--error { border-color: #ef4444 !important; }
.nf-bouquets-panel { margin-top: 24px; padding: 20px; background: rgba(99,102,241,.04); border: 1px solid var(--border); border-radius: 12px; }
