/* public/css/app.css — Fichier CSS unique DocConverter */

/* ── Variables & Reset ──────────────────────────────────────── */
:root {
  --primary: #258beb;
  --primary-dark: #1162ae;
  --secondary: #1b5ded;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --transition: .2s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Layout ─────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 800px; }
.container-xs { max-width: 520px; }

/* ── Navbar ─────────────────────────────────────────────────── */
/* ══════════════════════════════════════════
   NAVBAR OVERRIDES — modern responsive nav
══════════════════════════════════════════ */

/* Base navbar */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 8px rgba(0,0,0,.05);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

/* Brand */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -.4px;
  flex-shrink: 0;
}
.navbar-brand i {
  -webkit-text-fill-color: var(--primary);
  font-size: 1.1rem;
}

/* Desktop nav links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navbar-nav > li > a,
.navbar-nav > li > button.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .75rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .15s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.navbar-nav > li > a:hover,
.navbar-nav > li > button.nav-link-btn:hover { color: var(--primary); background: #eff6ff; }
.navbar-nav > li > a.active { color: var(--primary); background: #eff6ff; font-weight: 600; }

/* CTA buttons in nav */
.navbar-nav .btn { white-space: nowrap; }

/* ── User dropdown ── */
.nav-user {
  position: relative;
}
.nav-user-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .65rem .35rem .35rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
}
.nav-user-btn:hover { border-color: var(--primary); background: #eff6ff; }
.nav-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  flex-shrink: 0;
}
.nav-user-chevron {
  font-size: .65rem;
  color: var(--text-muted);
  transition: transform .2s;
}
.nav-user.open .nav-user-chevron { transform: rotate(180deg); }

/* Dropdown menu */
.nav-dropdown {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  padding: .4rem;
  display: none;
  z-index: 300;
  animation: dropIn .15s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-user.open .nav-dropdown { display: block; }

.nav-dropdown-header {
  padding: .6rem .75rem .5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .3rem;
}
.nav-dropdown-header .dd-name  { font-size: .875rem; font-weight: 700; color: var(--text); }
.nav-dropdown-header .dd-email { font-size: .75rem; color: var(--text-muted); margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 175px; }

.nav-dropdown a,
.nav-dropdown button.dd-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .55rem .75rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all .12s;
}
.nav-dropdown a:hover, .nav-dropdown button.dd-btn:hover { background: #f1f5f9; color: var(--text); }
.nav-dropdown a .dd-icon, .nav-dropdown button.dd-btn .dd-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  flex-shrink: 0;
  transition: background .12s;
}
.nav-dropdown a:hover .dd-icon, .nav-dropdown button.dd-btn:hover .dd-icon { background: #dbeafe; color: var(--primary); }
.nav-dropdown .dd-divider { border: none; border-top: 1px solid var(--border); margin: .3rem 0; }
.nav-dropdown .dd-danger:hover { background: #fef2f2; color: var(--danger); }
.nav-dropdown .dd-danger:hover .dd-icon { background: #fee2e2; color: var(--danger); }

/* ── Hamburger ── */
.navbar-toggle {
  display: none;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 7px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .15s;
}
.navbar-toggle:hover { border-color: var(--primary); }
.navbar-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s;
  flex-shrink: 0;
}
.navbar-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle.open span:nth-child(2) { opacity: 0; }
.navbar-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Fullscreen mobile menu — slides in from left ── */
.mobile-overlay { display: none; }

.navbar-mobile {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 195;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .27s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.navbar-mobile.open {
  transform: translateX(0);
  pointer-events: all;
}

/* Header bar — same height as navbar */
.mobile-header {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mobile-close {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px; border: 1.5px solid var(--border);
  background: none; cursor: pointer;
  font-size: 1rem; color: var(--text-muted); transition: all .15s;
}
.mobile-close:hover { border-color: var(--danger); color: var(--danger); background: #fef2f2; }

/* User strip */
.mobile-user-card {
  display: flex; align-items: center; gap: .65rem;
  padding: .85rem 1.25rem;
  background: #f8fafc; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mobile-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .78rem; font-weight: 800; flex-shrink: 0;
}
.mobile-user-name  { font-size: .875rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.mobile-user-email { font-size: .72rem; color: var(--text-muted); }

/* Nav list */
.mobile-section { flex: 1; padding: .5rem .75rem; }

.mobile-nav-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .62rem .75rem; border-radius: 8px;
  font-size: .9rem; font-weight: 500; color: var(--text);
  text-decoration: none; transition: background .12s, color .12s;
  width: 100%; background: none; border: none;
  cursor: pointer; font-family: inherit; text-align: left;
}
.mobile-nav-link i {
  width: 16px; text-align: center;
  font-size: .82rem; color: var(--text-muted); flex-shrink: 0;
}
.mobile-nav-link:hover         { background: #f1f5f9; color: var(--primary); }
.mobile-nav-link:hover i       { color: var(--primary); }
.mobile-nav-link.active        { background: #eff6ff; color: var(--primary); font-weight: 600; }
.mobile-nav-link.active i      { color: var(--primary); }
.mobile-nav-link.danger        { color: var(--danger); }
.mobile-nav-link.danger i      { color: var(--danger); }
.mobile-nav-link.danger:hover  { background: #fef2f2; }

.mobile-divider { border: none; border-top: 1px solid var(--border); margin: .4rem 0; }

/* Guest CTA footer */
.mobile-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .5rem; flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .navbar-nav    { display: none; }
  .navbar-toggle { display: flex; }
}
@media (min-width: 769px) {
  .navbar-mobile { display: none !important; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%); padding: 4rem 0; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.2; color: var(--text); margin-bottom: 1rem; }
.hero h1 span { background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 2rem; }
.hero-badge { display: inline-flex; align-items: center; gap: .4rem; background: #dbeafe; color: var(--primary); font-size: .8rem; font-weight: 600; padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1rem; }

/* ── Cards & Grid ───────────────────────────────────────────── */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); transition: box-shadow var(--transition), transform var(--transition); }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1rem; }
.card-icon-blue   { background: #dbeafe; }
.card-icon-purple { background: #ede9fe; }
.card-icon-green  { background: #dcfce7; }
.card-icon-orange { background: #ffedd5; }
.card-icon-red    { background: #fee2e2; }
.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .4rem; }
.card p  { font-size: .875rem; color: var(--text-muted); }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover .card { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* ── Conversion Tool Card ───────────────────────────────────── */
.tool-card { border: 2px solid transparent; cursor: pointer; }
.tool-card:hover { border-color: var(--primary); }
.tool-card .badge-free { background: #dcfce7; color: var(--success); font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.1rem; border-radius: var(--radius);
  font-size: .85rem; font-weight: 600; cursor: pointer;
  border: none; transition: all .18s; text-decoration: none;
  font-family: 'Inter', sans-serif;
}
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.btn-primary { background: var(--primary); color: var(--card-bg); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { opacity: .9; color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover  { background: #b91c1c; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { opacity: .9; color: #fff; }
.btn-sm   { padding: .32rem .75rem; font-size: .78rem; }
.btn-lg   { padding: .75rem 1.75rem; font-size: .95rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: .5rem; width: 36px; height: 36px; justify-content: center; }


/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .4rem; color: var(--text); }
.form-control { width: 100%; padding: .65rem .9rem; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: .9rem; background: #fff; color: var(--text); transition: border-color var(--transition); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-control.is-invalid { border-color: var(--danger); }
.form-hint  { font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: .3rem; }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%2364748b' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.5rem; }

/* ── File Upload ────────────────────────────────────────────── */
.file-upload { border: 2px dashed var(--border); border-radius: var(--radius); padding: 2.5rem; text-align: center; cursor: pointer; transition: all var(--transition); background: #fafbff; }
.file-upload:hover, .file-upload.drag-over { border-color: var(--primary); background: #eff6ff; }
.file-upload-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.file-upload p { color: var(--text-muted); font-size: .875rem; }
.file-upload strong { color: var(--primary); }
.file-preview { display: flex; align-items: center; gap: .75rem; background: #f0f4ff; border-radius: var(--radius); padding: .75rem 1rem; margin-top: .75rem; }
.file-preview-name { font-size: .875rem; font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-preview-size { font-size: .78rem; color: var(--text-muted); }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert { padding: .85rem 1.1rem; border-radius: var(--radius); font-size: .875rem; margin-bottom: 1rem; display: flex; align-items: flex-start; gap: .6rem; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge-success { background: #dcfce7; color: var(--success); }
.badge-danger  { background: #fee2e2; color: var(--danger); }
.badge-warning { background: #fef3c7; color: var(--warning); }
.badge-primary { background: #dbeafe; color: var(--primary); }
.badge-muted   { background: #f1f5f9; color: var(--text-muted); }

/* ── Pack Cards (pricing) ───────────────────────────────────── */
.pack-card { border: 2px solid var(--border); border-radius: 16px; padding: 2rem; text-align: center; position: relative; transition: all var(--transition); }
.pack-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pack-card.popular { border-color: var(--primary); }
.pack-badge-popular { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: .25rem .9rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pack-price { font-size: 2.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.pack-price sup { font-size: 1rem; vertical-align: top; margin-top: .4rem; }
.pack-period { color: var(--text-muted); font-size: .875rem; margin-bottom: 1.5rem; }
.pack-features { text-align: left; margin: 1.5rem 0; }
.pack-features li { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; font-size: .875rem; }
.pack-features li::before { content: '✓'; color: var(--success); font-weight: 700; }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead { background: #f8fafc; }
th { padding: .75rem 1rem; text-align: left; font-weight: 600; color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbff; }

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
.stat-change { font-size: .75rem; font-weight: 600; margin-top: .4rem; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── Sidebar Admin ──────────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }
.admin-sidebar { background: #fff; border-right: 1px solid var(--border); padding: 1.5rem 0; }
.admin-sidebar-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); padding: .6rem 1.5rem; }
.admin-sidebar a { display: flex; align-items: center; gap: .75rem; padding: .65rem 1.5rem; font-size: .875rem; font-weight: 500; color: var(--text-muted); transition: all var(--transition); }
.admin-sidebar a:hover, .admin-sidebar a.active { color: var(--primary); background: #eff6ff; }
.admin-sidebar a .icon { width: 20px; text-align: center; }
.admin-content { padding: 2rem; background: var(--bg); }

/* ── Payment Card ───────────────────────────────────────────── */
.payment-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; }
.card-number-preview { background: linear-gradient(135deg, #1e3a8a, #312e81); border-radius: 12px; padding: 1.5rem; color: #fff; margin-bottom: 1.5rem; }
.card-number-dots { font-size: 1.2rem; letter-spacing: .2em; margin: .5rem 0; }
.summary-row { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.summary-row:last-child { border-bottom: none; font-weight: 700; font-size: 1rem; }

/* ── Thank You / Receipt ────────────────────────────────────── */
.success-icon { width: 80px; height: 80px; background: #dcfce7; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 1.5rem; }
.receipt-header { background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 16px 16px 0 0; padding: 2rem; color: #fff; text-align: center; }
.receipt-body { border: 1px solid var(--border); border-top: none; border-radius: 0 0 16px 16px; padding: 2rem; }

/* ── Section ────────────────────────────────────────────────── */
.section { padding: 3rem 0; }
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: .4rem; }
.section-subtitle { color: var(--text-muted); margin-bottom: 2rem; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer { background: #1e293b; color: #94a3b8; padding: 2rem 0; text-align: center; font-size: .875rem; margin-top: auto; }
.footer a { color: #94a3b8; }
.footer a:hover { color: #fff; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .4rem .75rem; border-radius: 6px; font-size: .85rem; border: 1px solid var(--border); color: var(--text-muted); }
.pagination .active span { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }

/* ── Utilities ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-primary{ color: var(--primary); }
.text-success{ color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm     { font-size: .875rem; }
.text-xs     { font-size: .78rem; }
.font-bold   { font-weight: 700; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1  { gap: .5rem; }
.gap-2  { gap: 1rem; }
.gap-3  { gap: 1.5rem; }
.mt-1   { margin-top: .5rem; }
.mt-2   { margin-top: 1rem; }
.mt-3   { margin-top: 1.5rem; }
.mb-1   { margin-bottom: .5rem; }
.mb-2   { margin-bottom: 1rem; }
.mb-3   { margin-bottom: 1.5rem; }
.p-2    { padding: 1rem; }
.p-3    { padding: 1.5rem; }
.w-100  { width: 100%; }
.divider{ border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.hidden { display: none !important; }
.sr-only{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded { border-radius: var(--radius); }
.shadow  { box-shadow: var(--shadow); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 200px 1fr; }
}
@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .navbar-nav { display: none; }
  .navbar-toggle { display: block; }
  .navbar-mobile.open { display: block; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-sidebar.open { display: block; }
  .hero { padding: 2.5rem 0; }
  .pack-card { padding: 1.5rem; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .btn-lg { padding: .7rem 1.4rem; font-size: .9rem; }
  .pack-price { font-size: 2rem; }
  .stat-value { font-size: 1.5rem; }
}




/* ── Footer ─────────────────────────────────────────────── */
    .site-footer {
      background: #0f172a;
      color: #94a3b8;
      padding: 3rem 0 0;
      margin-top: auto;
      font-size: .82rem;
    }
    .footer-inner {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 1.5rem;
    }
    .footer-grid {
      display: grid;
      grid-template-columns: 1.6fr 1fr 1fr 1fr;
      gap: 2.5rem;
      padding-bottom: 2.5rem;
      border-bottom: 1px solid #1e293b;
    }
    .footer-brand-logo {
      display: flex;
      align-items: center;
      gap: .5rem;
      font-size: 1.15rem;
      font-weight: 800;
      color: #f8fafc;
      margin-bottom: .85rem;
      text-decoration: none;
    }
    .footer-brand-logo i { color: #2563eb; }
    .footer-brand-desc {
      font-size: .8rem;
      line-height: 1.75;
      color: #64748b;
      margin-bottom: 1.25rem;
    }
    .footer-social {
      display: flex;
      gap: .5rem;
    }
    .footer-social a {
      width: 34px;
      height: 34px;
      border-radius: 8px;
      background: #1e293b;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #64748b;
      font-size: .85rem;
      text-decoration: none;
      transition: all .18s;
    }
    .footer-social a:hover { background: #2563eb; color: #fff; }
    .footer-status {
      display: inline-flex;
      align-items: center;
      gap: .4rem;
      background: #1e293b;
      border-radius: 8px;
      padding: .45rem .8rem;
      margin-top: .75rem;
      font-size: .75rem;
      color: #64748b;
    }
    .status-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #16a34a;
      flex-shrink: 0;
      box-shadow: 0 0 6px rgba(22,163,74,.5);
      animation: fpulse 2s infinite;
    }
    @keyframes fpulse { 0%,100%{opacity:1} 50%{opacity:.45} }
    .footer-col-title {
      font-size: .7rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .08em;
      color: #f8fafc;
      margin-bottom: .85rem;
    }
    .footer-links {
      display: flex;
      flex-direction: column;
      gap: .4rem;
    }
    .footer-links a {
      color: #64748b;
      text-decoration: none;
      font-size: .8rem;
      transition: color .15s;
      display: flex;
      align-items: center;
      gap: .4rem;
    }
    .footer-links a:hover { color: #e2e8f0; }
    .footer-links a i { font-size: .62rem; color: #475569; }
    .footer-badge {
      display: inline-flex;
      align-items: center;
      gap: .35rem;
      background: #1e293b;
      color: #64748b;
      font-size: .68rem;
      font-weight: 600;
      padding: .2rem .6rem;
      border-radius: 6px;
      margin-top: .5rem;
    }
    .footer-formats {
      display: flex;
      flex-wrap: wrap;
      gap: .3rem;
      margin-top: .35rem;
    }
    .fmt-tag {
      background: #1e293b;
      color: #64748b;
      font-size: .63rem;
      font-weight: 700;
      padding: .15rem .45rem;
      border-radius: 4px;
      letter-spacing: .04em;
    }
    .footer-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.25rem 0;
      gap: 1rem;
      flex-wrap: wrap;
    }
    .footer-bottom-left {
      display: flex;
      align-items: center;
      gap: 1rem;
      flex-wrap: wrap;
    }
    .footer-copyright { font-size: .72rem; color: #475569; }
    .footer-legal-links { display: flex; gap: .75rem; flex-wrap: wrap; }
    .footer-legal-links a {
      font-size: .72rem;
      color: #475569;
      text-decoration: none;
      transition: color .15s;
    }
    .footer-legal-links a:hover { color: #94a3b8; }
    .footer-legal-sep { color: #1e293b; font-size: .72rem; }
    .footer-bottom-right {
      display: flex;
      align-items: center;
      gap: .45rem;
      font-size: .72rem;
      color: #475569;
    }
    .footer-bottom-right i { color: #dc2626; }
    @media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
    @media (max-width: 640px)  { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } .footer-bottom { flex-direction: column; align-items: flex-start; } }
    




    /*------------home--------------*/

   
/* ── Hero compact ────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  padding: 2rem 0 0;
}
.hero h1 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .5rem;
}
.hero h1 span {
  background: linear-gradient(135deg, #257beb, #3a99ed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #dbeafe;
  color: #1d8dd8;
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .7rem;
  border-radius: 999px;
  margin-bottom: .6rem;
}
.hero-sub {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.features-strip {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  color: var(--text-muted);
}
.feature-item i { color: #258beb; font-size: .7rem; }
.hero-converter {
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 1.25rem 1.5rem 0;
  box-shadow: 0 -4px 30px rgba(37,99,235,.08);
  border: 1.5px solid var(--border);
  border-bottom: none;
  margin-top: .5rem;
}
.conv-tabs-wrapper {
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1.5px solid var(--border);
}
.conv-tabs {
  display: flex;
  gap: .3rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.conv-tabs::-webkit-scrollbar { display: none; }
.conv-tab {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .75rem;
  border-radius: 7px;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: #f8fafc;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all .18s;
  flex-shrink: 0;
}
.conv-tab:hover  { background: #eff6ff; color: #3793de; border-color: #bfdbfe; }
.conv-tab.active { background: #259feb; color: #fff; border-color: #25a9eb; }
.conv-tab i { font-size: .78rem; }
.conv-tabs-select {
  display: none;
  width: 100%;
  padding: .55rem .85rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%2364748b' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.5rem;
}
.conv-tabs-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.drop-zone {
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  cursor: pointer;
  transition: all .18s;
  background: #fafbff;
  width: 100%;
  min-height: 90px;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: #259feb;
  background: #eff6ff;
  border-style: solid;
}
.drop-zone-left {
  display: flex; align-items: center; justify-content: center;
  width: 52px; flex-shrink: 0;
}
.drop-zone-left i { font-size: 2rem; color: #93c5fd; transition: transform .2s; }
.drop-zone:hover .drop-zone-left i { transform: translateY(-4px); }
.drop-zone-right { flex: 1; min-width: 0; }
.drop-zone-right h5 { font-size: .9rem; font-weight: 700; margin: 0 0 .2rem; }
.drop-zone-right p  { font-size: .75rem; color: var(--text-muted); margin: 0; }
.drop-zone-right span { color: #2599eb; font-weight: 600; }
.drop-zone-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #259feb; color: #fff; border: none;
  padding: .5rem 1.1rem; border-radius: 8px;
  font-size: .78rem; font-weight: 600;
  flex-shrink: 0; transition: all .18s; pointer-events: none;
}
.drop-zone:hover .drop-zone-btn { background: #1d9dd8; }
.conv-upload-area { display: none; }
.conv-upload-area.active { display: block; }
.conv-upload-wrapper { display: flex; flex-direction: column; align-items: center; width: 100%; }
.conv-upload-inner { width: 50%; }
.files-preview { width: 100%; margin-top: .5rem; display: flex; flex-direction: column; gap: .3rem; }
.file-chip {
  display: flex; align-items: center; gap: .5rem;
  background: #f0f4ff; border: 1px solid #bfdbfe;
  border-radius: 7px; padding: .35rem .75rem; font-size: .78rem;
}
.file-chip-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip-size { color: var(--text-muted); font-size: .7rem; flex-shrink: 0; }
.file-chip-remove {
  color: #94a3b8; cursor: pointer; border: none; background: none;
  font-size: .75rem; padding: 2px 4px; border-radius: 4px;
  transition: color .18s; flex-shrink: 0;
}
.file-chip-remove:hover { color: #dc2626; }
.conv-options { width: 100%; margin-top: .5rem; }
.conv-options .form-control { font-size: .8rem; padding: .4rem .7rem; }
.conv-action {
  display: flex; flex-direction: column; align-items: center;
  gap: .5rem; padding: .9rem 0 1rem; margin-top: .5rem; width: 100%;
}
.btn-convert {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: linear-gradient(135deg, #062c02, #216a86);
  color: #fff; padding: .65rem 2.5rem; border-radius: 10px;
  font-size: .875rem; font-weight: 700; border: none; cursor: pointer;
  transition: all .2s; width: auto;
}
.btn-convert:hover    { opacity:.9; transform:translateY(-1px); box-shadow:0 5px 16px rgba(37,99,235,.3); }
.btn-convert:disabled { opacity:.55; cursor:not-allowed; transform:none; box-shadow:none; }
.stats-row {
  display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap;
  padding: 1.75rem 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); margin: 2rem 0;
}
.stat-item { text-align: center; }
.stat-num  { font-size: 1.6rem; font-weight: 800; color: #25a2eb; line-height: 1; }
.stat-lbl  { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; }
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem; }
.tool-mini-card {
  background: #fff; border: 1.5px solid var(--border); border-radius: 11px;
  padding: 1rem .85rem; text-align: center; text-decoration: none;
  color: var(--text); transition: all .18s; display: flex;
  flex-direction: column; align-items: center; gap: .4rem;
  cursor: pointer; position: relative;
}
.tool-mini-card:hover {
  border-color: #259ceb; transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(37,99,235,.1); color: var(--text);
}
.tool-icon { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; }
.tool-mini-card h4 { font-size: .76rem; font-weight: 700; margin: 0; }
.tool-mini-card p  { font-size: .67rem; color: var(--text-muted); margin: 0; }
.free-tag {
  position: absolute; top: 5px; right: 5px;
  background: #dcfce7; color: #15803d;
  font-size: .56rem; font-weight: 800;
  padding: .1rem .35rem; border-radius: 999px;
}
.step-circle { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto .6rem; }
.cta-banner { background: linear-gradient(135deg, #64bbec 0%, #216eb6 100%); border-radius: 14px; padding: 2rem; text-align: center; color: #fff; margin-top: 1.5rem; }
.cta-banner h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: .35rem; }
.cta-banner p  { opacity: .85; font-size: .875rem; margin-bottom: 1.25rem; }
.btn-white { background: #fff; color: #1e8daf; padding: .6rem 1.75rem; border-radius: 8px; font-weight: 700; font-size: .875rem; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.btn-white:hover { opacity: .92; color: #1e77af; }
.progress-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 999; align-items: center; justify-content: center; }
.progress-overlay.active { display: flex; }
.progress-box { background: #fff; border-radius: 18px; padding: 2rem 2.5rem; text-align: center; min-width: 320px; max-width: 90vw; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.progress-icon { width: 60px; height: 60px; border-radius: 50%; background: #eff6ff; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.5rem; color: #2563eb; }
.progress-bar-wrap { background: #e2e8f0; border-radius: 999px; height: 8px; overflow: hidden; margin: .85rem 0 .4rem; }
.progress-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #25aceb, #3a99ed); width: 0%; transition: width .4s ease; }
.p-step-list { margin-top: .85rem; text-align: left; }
.p-step { display: flex; align-items: center; gap: .5rem; font-size: .78rem; padding: .22rem 0; color: var(--text-muted); transition: color .3s; }
.p-step.done   { color: #16a34a; }
.p-step.active { color: #2592eb; font-weight: 600; }
.p-step-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: .55rem; flex-shrink: 0; }
.p-step.done .p-step-dot   { background: #16a34a; border-color: #16a34a; color: #fff; }
.p-step.active .p-step-dot { background: #25aceb; border-color: #25a9eb; color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinning { animation: spin 1s linear infinite; }
@media (max-width: 1024px) { .tools-grid { grid-template-columns: repeat(3, 1fr); } .conv-upload-inner { width: 60%; } }
@media (max-width: 768px) {
  .conv-tabs { display: none; } .conv-tabs-select { display: block; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .conv-upload-inner { width: 100%; }
  .drop-zone { flex-direction: column; align-items: center; text-align: center; padding: 1.5rem 1rem; min-height: 130px; gap: .6rem; }
  .drop-zone-left { width: auto; flex-shrink: unset; }
  .drop-zone-left i { font-size: 2.2rem; }
  .drop-zone-right { flex: unset; width: 100%; }
  .drop-zone-right h5 { font-size: .82rem; text-align: center; white-space: normal; }
  .drop-zone-right p { text-align: center; }
  .drop-zone-btn { display: none; }
  .btn-convert { width: 100%; padding: .65rem 1rem; }
  .features-strip { gap: .75rem; }
  .hero-converter { padding: 1rem 1rem 0; }
}
@media (max-width: 480px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } .conv-upload-inner { width: 100%; } .btn-convert { width: 100%; } }




/* ── Layout dashboard ────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  min-height: calc(100vh - 64px);
  align-items: start;
}
.dashboard-sidebar {
  position: sticky;
  top: 80px;
}
.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Avatar */
.sidebar-avatar {
  background: linear-gradient(135deg, #2b68eb, #3a8bed);
  padding: 1.75rem 1.25rem;
  text-align: center;
}
.avatar-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}
.sidebar-name {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .2rem;
}
.sidebar-email {
  font-size: .72rem;
  color: rgba(255,255,255,.75);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sub badge */
.sub-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .68rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 999px;
  margin-top: .5rem;
}
.sub-badge.active { background: #dcfce7; color: #15803d; }
.sub-badge.free   { background: #dbeafe; color: #1d4ed8; }
.sub-badge.expired{ background: #fee2e2; color: #b91c1c; }

/* Nav sidebar */
.sidebar-nav { padding: .5rem 0; }
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem 1.25rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .18s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}
.sidebar-nav-item:hover  { background: #f8fafc; color: #2563eb; }
.sidebar-nav-item.active { background: #eff6ff; color: #2563eb; font-weight: 600; border-right: 3px solid #2563eb; }
.sidebar-nav-item i { width: 16px; text-align: center; font-size: .85rem; }
.sidebar-divider { height: 1px; background: var(--border); margin: .4rem 0; }

/* ── Sections ────────────────────────────────────────────── */
.dash-section { display: none; }
.dash-section.active { display: block; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.section-title-lg {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-title-lg i { color: #2563eb; }

/* ── Stat cards ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
}
.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.stat-card-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
}
.stat-card-value {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: .2rem;
}
.stat-card-label {
  font-size: .75rem;
  color: var(--text-muted);
}

/* ── Cards génériques ────────────────────────────────────── */
.dash-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}
.dash-card-title {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.dash-card-title i { color: #2563eb; font-size: .85rem; }

/* ── Table ───────────────────────────────────────────────── */
.dash-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.dash-table th {
  padding: .55rem .85rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  white-space: nowrap;
}
.dash-table td {
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: #fafbff; }

/* ── Badge ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .6rem; border-radius: 999px;
  font-size: .7rem; font-weight: 700;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-primary { background: #dbeafe; color: #1d4ed8; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-muted   { background: #f1f5f9; color: var(--text-muted); }

/* ── Abonnement card ─────────────────────────────────────── */
.sub-card {
  background: linear-gradient(135deg,  #2b68eb, #3a8bed);
  border-radius: 16px;
  padding: 1.5rem;
  color: #fff;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.sub-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.sub-card::after {
  content: '';
  position: absolute;
  bottom: -40px; right: 40px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.sub-card-label {
  font-size: .72rem;
  font-weight: 700;
  opacity: .75;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .4rem;
}
.sub-card-name  { font-size: 1.5rem; font-weight: 800; margin-bottom: .25rem; }
.sub-card-dates { font-size: .78rem; opacity: .8; margin-bottom: 1rem; }
.sub-card-progress-wrap {
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  height: 6px;
  margin-bottom: .4rem;
}
.sub-card-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: #fff;
}
.sub-card-days { font-size: .72rem; opacity: .8; }

.no-sub-card {
  background: #f8fafc;
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.25rem;
}
.no-sub-card i  { font-size: 2rem; color: #cbd5e1; margin-bottom: .75rem; display: block; }
.no-sub-card h4 { font-weight: 700; margin-bottom: .4rem; }
.no-sub-card p  { font-size: .875rem; color: var(--text-muted); margin-bottom: 1rem; }

/* ── Type conversion chart ───────────────────────────────── */
.type-bars { display: flex; flex-direction: column; gap: .6rem; }
.type-bar-row {
  display: flex; align-items: center; gap: .75rem; font-size: .8rem;
}
.type-bar-label { width: 110px; flex-shrink: 0; color: var(--text-muted); }
.type-bar-track {
  flex: 1; height: 8px; border-radius: 999px; background: #f1f5f9; overflow: hidden;
}
.type-bar-fill  { height: 100%; border-radius: 999px; background: linear-gradient(90deg,  #2b68eb, #3a8bed); transition: width .6s ease; }
.type-bar-count { width: 28px; text-align: right; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }

/* ── Profile form ────────────────────────────────────────── */
.profile-avatar-big {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800; color: #fff;
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.form-group-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}
.empty-state i  { font-size: 2.5rem; margin-bottom: .75rem; display: block; color: #cbd5e1; }
.empty-state p  { font-size: .875rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { position: static; }
  .sidebar-nav { display: flex; overflow-x: auto; padding: .5rem; gap: .3rem; }
  .sidebar-nav-item {
    white-space: nowrap; border-radius: 8px; padding: .5rem .85rem;
    border-right: none !important;
  }
  .sidebar-divider { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-group-inline { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}


/* ── Fin  Layout dashboard ────────────────────────────────────── */
/*--------Login-------------------------*/

.login-wrapper {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  position: relative;
  overflow: hidden;
}
.login-wrapper::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(37,139,235,.06);
  top: -150px; right: -150px;
  pointer-events: none;
}
.login-wrapper::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(27,93,237,.05);
  bottom: -80px; left: -80px;
  pointer-events: none;
}
.login-box {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

/* Header */
.login-header { text-align: center; margin-bottom: 2rem; }
.login-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-size: 1.4rem; color: #fff; margin-bottom: 1rem;
  box-shadow: 0 6px 20px rgba(37,139,235,.3);
}
.login-header h1 { font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: .35rem; }
.login-header p  { font-size: .9rem; color: var(--text-muted); }

/* Card */
.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

/* Session status */
.session-status {
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d;
  padding: .75rem 1rem; border-radius: var(--radius);
  font-size: .875rem; margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: .5rem;
}

/* Form overrides scoped to login */
.login-card .form-group { margin-bottom: 1.25rem; }
.login-card .form-label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .4rem; color: var(--text); }
.login-card .form-control {
  width: 100%; padding: .65rem .9rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .9rem; background: #fff; color: var(--text);
  transition: border-color .2s ease; font-family: inherit;
}
.login-card .form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,139,235,.12); }
.login-card .form-control.is-invalid { border-color: var(--danger); }

/* Password eye toggle */
.pwd-group { position: relative; }
.pwd-group .form-control { padding-right: 2.75rem; }
.pwd-toggle {
  position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: .2rem; font-size: .95rem;
  transition: color .2s; line-height: 1;
}
.pwd-toggle:hover { color: var(--primary); }

/* Field error */
.field-error { font-size: .78rem; color: var(--danger); margin-top: .35rem; display: flex; align-items: center; gap: .3rem; }

/* Remember me */
.check-row {
  display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; color: var(--text-muted);
  cursor: pointer; user-select: none;
}
.check-row input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--primary); cursor: pointer; flex-shrink: 0;
}

/* Forgot link */
.forgot-link { font-size: .8rem; font-weight: 600; color: var(--primary); text-decoration: none; transition: color .2s; }
.forgot-link:hover { color: var(--primary-dark); }

/* Bottom row */
.login-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* Submit button */
.login-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .65rem 1.5rem; background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: all .18s; font-family: inherit;
}
.login-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(37,139,235,.35); }
.login-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.login-btn .spinner {
  display: none; width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.login-btn.loading .spinner   { display: block; }
.login-btn.loading .btn-label { display: none; }

/* Register link */
.login-register { text-align: center; margin-top: 1.25rem; font-size: .875rem; color: var(--text-muted); }
.login-register a { font-weight: 700; color: var(--primary); text-decoration: none; }
.login-register a:hover { color: var(--primary-dark); }

/* Exhausted banner */
.exhausted-banner {
  width: 100%; max-width: 1240px;
  display: flex; gap: 1rem;
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius); padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.exhausted-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: .1rem; }
.exhausted-title { font-weight: 700; font-size: .9rem; color: #92400e; margin-bottom: .35rem; display: flex; align-items: center; gap: .4rem; }
.exhausted-desc  { font-size: .82rem; color: #92400e; line-height: 1.5; }

@media (max-width: 480px) {
  .login-box  { max-width: 100%; }
  .login-card { padding: 1.25rem; }
  .login-header h1 { font-size: 1.3rem; }
  .login-bottom { flex-direction: column; align-items: stretch; }
  .login-btn  { justify-content: center; }
}
/* ── Tools mega menu (layout) ── */
.tools-mega-layout {
  display: none;
  position: fixed;
  top: 58px; left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 9000;
  padding: 20px 0;
}
.tools-mega-layout.open { display: block; }
.tools-mega-layout-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 24px;
}
.tml-cat-title {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: #64748b; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.tml-cat-icon {
  width: 20px; height: 20px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center; font-size: .6rem;
}
.tml-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 7px;
  cursor: pointer; text-decoration: none; color: #1e293b;
  transition: background .12s; font-size: .81rem; font-weight: 500;
}
.tml-item:hover { background: #f8fafc; color: #2563eb; text-decoration: none; }
.tml-item-icon {
  width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: .7rem; flex-shrink: 0;
}
.tml-overlay {
  display: none; position: fixed; inset: 0; z-index: 8999; background: rgba(0,0,0,.25);
}
.tml-overlay.open { display: block; }
/* Mobile tools drawer */
.tml-drawer {
  display: none; position: fixed; inset: 0; z-index: 9500; background: rgba(0,0,0,.45);
}
.tml-drawer.open { display: flex; }
.tml-drawer-panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: 290px;
  background: #fff; overflow-y: auto; padding: 0 0 32px;
  box-shadow: 4px 0 24px rgba(0,0,0,.15);
}
.tml-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #e2e8f0;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.tml-drawer-title { font-size: .9rem; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.tml-drawer-close {
  width: 30px; height: 30px; border: none; background: #f8fafc;
  border-radius: 7px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: .85rem; color: #64748b;
}
.tml-drawer-cat {
  padding: 10px 16px 3px; font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: #64748b; margin-top: 4px;
}
.tml-drawer-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 16px; text-decoration: none; color: #1e293b;
  font-size: .82rem; font-weight: 500; transition: background .12s;
}
.tml-drawer-item:hover { background: #f8fafc; color: #2563eb; text-decoration: none; }
.tml-drawer-item-icon {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: .72rem; flex-shrink: 0;
}
/* Mobile tools btn */
.navbar-tools-mobile-btn {
  display: none; width: 36px; height: 36px;
  flex-direction: column; align-items: center; justify-content: center;
  border: 1.5px solid #e2e8f0; border-radius: 8px; background: #fff;
  cursor: pointer; flex-shrink: 0; padding: 0; margin-right: 4px;
}
.navbar-tools-mobile-btn span { display: block; width: 15px; height: 1.5px; background: #1e293b; border-radius: 2px; margin: 2px 0; }
@media (max-width: 768px) {
  .navbar-tools-mobile-btn { display: flex; }
  .tools-mega-layout-inner { grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 480px) { .tools-mega-layout-inner { grid-template-columns: 1fr; } }