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

:root {
  --orange: #ff7317;
  --orange-dark: #db5700;
  --blue: #1976d2;
  --blue-dark: #115aa3;
  --brown: #6d4c41;
  --brown-dark: #4e342e;
  --white: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --surface: #f6f7f9;
  --line: #e5e7eb;
  --danger: #d92d20;
  --success: #16834b;
  --warning: #ad6800;
  --shadow: 0 8px 24px rgba(16, 24, 40, .12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px clamp(14px, 3vw, 38px);
  background: var(--white);
  box-shadow: 0 5px 18px rgba(16, 24, 40, .14);
}
.brand-logo { width: 142px; height: 45px; object-fit: contain; object-position: left center; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-link, .icon-button {
  border: 0;
  padding: 4px;
  background: transparent;
  color: var(--orange);
  font-size: 1.48rem;
  line-height: 1;
}
.balance-link {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}
.balance-link .bi { color: var(--orange); font-size: 1.28rem; }

.desktop-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  z-index: 1400;
  width: min(330px, 90vw);
  height: 100vh;
  padding: 24px;
  background: var(--white);
  box-shadow: -12px 0 32px rgba(16, 24, 40, .18);
  transition: right .2s ease;
}
.desktop-drawer.open { right: 0; }
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  background: rgba(10, 18, 30, .44);
}
.drawer-backdrop.open { display: block; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer-nav { display: grid; gap: 6px; }
.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-weight: 750;
}
.drawer-nav .bi { color: var(--orange); font-size: 1.2rem; }

.bottom-nav {
  display: none;
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 8px;
  z-index: 1200;
  height: 61px;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 8px 28px rgba(16, 24, 40, .2);
}
.bottom-nav a { position: relative; display: grid; place-items: center; gap: 1px; font-size: .69rem; font-weight: 750; color: #52606f; }
.bottom-nav .bi { color: var(--orange); font-size: 1.25rem; }
.bottom-nav a.active { color: var(--blue); }
.bottom-nav a.active .bi { color: var(--blue); }
.badge-dot {
  position: absolute;
  top: -4px;
  right: calc(50% - 20px);
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  background: #e11d48;
  font-size: .65rem;
  font-weight: 850;
}
.badge-dot.show { display: flex; }

.page { width: min(1180px, calc(100% - 28px)); margin: 28px auto 90px; }
.page-narrow { width: min(720px, calc(100% - 28px)); margin: 32px auto 90px; }
.hero {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 32px;
  align-items: center;
  padding: clamp(28px, 5vw, 68px);
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.hero h1 { margin: 0 0 14px; font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: 1.04; }
.hero h1 span, .section-title span { color: var(--orange); }
.hero p { max-width: 650px; color: var(--muted); font-size: 1.08rem; }
.hero-visual {
  min-height: 310px;
  display: grid;
  place-items: center;
  border-radius: 25px;
  background: var(--brown);
  overflow: hidden;
}
.domino-stack { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 82%; transform: rotate(-4deg); }
.domino-demo { width: 78px; height: 148px; padding: 11px; border: 3px solid #222; border-radius: 12px; background: white; display: grid; grid-template-rows: 1fr 2px 1fr; box-shadow: 0 8px 16px rgba(0,0,0,.2); }
.domino-demo .line { background: #222; }
.domino-demo .half { display: grid; place-items: center; font-size: 1.8rem; font-weight: 900; }

.section { margin-top: 28px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section-title { margin: 0; font-size: clamp(1.55rem, 3vw, 2.25rem); }
.section-subtitle { margin: 5px 0 0; color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 20px;
  box-shadow: 0 4px 14px rgba(16, 24, 40, .06);
}
.card h2, .card h3 { margin-top: 0; }
.card-icon { color: var(--orange); font-size: 2rem; margin-bottom: 10px; }
.metric { font-size: 1.65rem; font-weight: 900; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { color: var(--blue); background: #eaf3ff; }
.btn-orange { color: white; background: var(--orange); }
.btn-danger { color: white; background: var(--danger); }
.btn-outline { color: var(--ink); background: white; border: 1px solid var(--line); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 11px; border-radius: 9px; font-size: .84rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.form-card { padding: clamp(20px, 4vw, 36px); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-group { display: grid; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 750; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cfd5dd;
  border-radius: 11px;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25,118,210,.12); }
textarea { min-height: 110px; resize: vertical; }
.checkbox-line { display: flex; align-items: flex-start; gap: 9px; font-size: .9rem; }
.checkbox-line input { width: auto; margin-top: 4px; }
.field-help { color: var(--muted); font-size: .78rem; }
.error-text { color: var(--danger); font-weight: 700; min-height: 22px; margin: 8px 0; }
.success-text { color: var(--success); font-weight: 700; min-height: 22px; margin: 8px 0; }

.auth-shell { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 28px 14px 90px; }
.auth-card { width: min(560px, 100%); padding: clamp(22px, 5vw, 40px); border-radius: 24px; background: white; box-shadow: var(--shadow); }
.auth-logo { display: block; width: 190px; margin: 0 auto 18px; }
.auth-card h1 { text-align: center; margin-bottom: 6px; }
.auth-card > p { text-align: center; color: var(--muted); }

.alert { border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.alert-warning { color: #714400; background: #fff5db; border: 1px solid #f4d58a; }
.alert-danger { color: #8c1d18; background: #fff0ef; border: 1px solid #f2b8b5; }
.alert-success { color: #0f663c; background: #eaf8f0; border: 1px solid #a7dfbf; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 18, 30, .55);
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(620px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 22px;
  padding: 24px;
  background: white;
  box-shadow: var(--shadow);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.modal-head h2 { margin: 0; }

.room-card { display: grid; gap: 12px; }
.room-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.room-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; color: #344054; background: #f0f2f5; font-size: .78rem; font-weight: 750; }
.chip.orange { color: #8e3d00; background: #fff0e5; }
.chip.blue { color: #0d4f8e; background: #e9f3ff; }
.status { font-size: .77rem; font-weight: 850; text-transform: uppercase; letter-spacing: .03em; }
.status-pending, .status-waiting { color: var(--warning); }
.status-approved, .status-active, .status-finished { color: var(--success); }
.status-rejected, .status-suspended { color: var(--danger); }

.game-layout { display: grid; grid-template-columns: 1fr 290px; gap: 18px; }
.game-table {
  min-height: 520px;
  position: relative;
  overflow: hidden;
  border: 10px solid var(--brown-dark);
  border-radius: 30px;
  background: var(--brown);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.1), var(--shadow);
}
.game-status { color: white; text-align: center; padding: 15px; font-weight: 800; }
.opponents { display: flex; justify-content: space-around; gap: 16px; padding: 16px; color: white; }
.player-seat { text-align: center; }
.player-avatar { width: 48px; height: 48px; margin: auto; border: 2px solid white; border-radius: 50%; display: grid; place-items: center; background: var(--orange); font-weight: 900; }
.board { min-height: 190px; padding: 22px; display: flex; align-items: center; justify-content: center; gap: 4px; overflow-x: auto; }
.tile {
  flex: 0 0 auto;
  width: 70px;
  height: 36px;
  border: 2px solid #161616;
  border-radius: 7px;
  background: white;
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  align-items: center;
  color: #111;
  font-weight: 900;
  box-shadow: 0 3px 7px rgba(0,0,0,.25);
}
.tile.vertical { width: 40px; height: 78px; grid-template-columns: 1fr; grid-template-rows: 1fr 2px 1fr; }
.tile-divider { height: 100%; background: #222; }
.tile.vertical .tile-divider { height: 2px; width: 100%; }
.tile-half { display: grid; place-items: center; }
.hand-area { position: absolute; left: 12px; right: 12px; bottom: 14px; }
.hand { display: flex; justify-content: center; align-items: end; gap: 6px; overflow-x: auto; padding: 13px; }
.hand .tile { width: 44px; height: 82px; grid-template-columns: 1fr; grid-template-rows: 1fr 2px 1fr; cursor: pointer; transition: transform .12s ease; }
.hand .tile:hover, .hand .tile.selected { transform: translateY(-9px); outline: 3px solid var(--orange); }
.hand .tile .tile-divider { height: 2px; width: 100%; }
.side-picker { display: flex; justify-content: center; gap: 9px; }
.score-list { display: grid; gap: 9px; }
.score-row { display: flex; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); }

.chat-shell { display: grid; grid-template-rows: 1fr auto; min-height: calc(100vh - 185px); border-radius: var(--radius); background: white; box-shadow: var(--shadow); overflow: hidden; }
.chat-list { padding: 18px; overflow-y: auto; max-height: calc(100vh - 290px); }
.chat-message { display: grid; grid-template-columns: 42px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--orange); font-weight: 900; }
.chat-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-meta strong { color: var(--blue); }
.reply-preview { margin: 5px 0; padding: 7px 9px; border-left: 3px solid var(--orange); color: var(--muted); background: #faf6f2; font-size: .82rem; }
.chat-composer { padding: 13px; border-top: 1px solid var(--line); background: white; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 11px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: #475467; font-size: .8rem; text-transform: uppercase; }

.empty-state { padding: 45px 20px; text-align: center; color: var(--muted); }
.empty-state .bi { display: block; color: var(--orange); font-size: 2.5rem; margin-bottom: 9px; }
.loading { padding: 30px; text-align: center; color: var(--muted); }
.footer-note { margin: 35px 0 0; padding: 18px; text-align: center; color: var(--muted); font-size: .83rem; }

@media (max-width: 900px) {
  .hero, .game-layout { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .game-table { min-height: 570px; }
}

@media (max-width: 680px) {
  body { padding-bottom: 72px; }
  .app-header { min-height: 59px; padding: 7px 13px; }
  .brand-logo { width: 108px; height: 38px; }
  .header-actions { gap: 9px; }
  .balance-link { font-size: .82rem; }
  .desktop-menu-button { display: none; }
  .bottom-nav { display: grid; }
  .page, .page-narrow { width: min(100% - 20px, 1180px); margin-top: 18px; }
  .hero { padding: 25px 20px; gap: 20px; }
  .hero-visual { min-height: 230px; }
  .domino-demo { width: 58px; height: 110px; }
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .card { padding: 16px; }
  .form-group.full { grid-column: auto; }
  .game-table { min-height: 610px; border-width: 7px; border-radius: 22px; }
  .game-layout { gap: 12px; }
  .board { justify-content: flex-start; min-height: 180px; padding: 14px; }
  .tile { width: 62px; height: 33px; }
  .hand { justify-content: flex-start; }
  .chat-shell { min-height: calc(100vh - 160px); }
  .chat-list { max-height: calc(100vh - 275px); padding: 12px; }
  .modal { padding: 19px; }
}

/* =========================================================
   LAOLAO V2 — interface joueurs, profil, présence et admin
   ========================================================= */
:root {
  --sky: #36a9e1;
  --sky-dark: #1f87bd;
  --navy: #0d2748;
  --navy-2: #163a64;
  --pink: #e85d8f;
  --green-card: #1e9e63;
  --orange-card: #f57c00;
  --blue-card: #1976d2;
  --purple-card: #7a5af8;
  --font-text: "Comfortaa", ui-rounded, system-ui, sans-serif;
  --font-number: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --white: #111827;
  --ink: #f4f7fb;
  --muted: #a8b2c3;
  --surface: #0b1220;
  --line: #2b3547;
  --shadow: 0 8px 24px rgba(0, 0, 0, .38);
}

body {
  padding-top: 66px;
  font-family: var(--font-text);
  transition: background-color .18s ease, color .18s ease;
}

.metric,
.numeric,
.money-value,
input[type="number"],
input[inputmode="numeric"],
.balance-link,
.badge-dot,
table td,
table th {
  font-family: var(--font-number);
  font-variant-numeric: tabular-nums;
}

.app-header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
}

.guest-profile-button {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 2px solid var(--orange);
  border-radius: 50%;
  background: transparent;
  color: var(--orange);
  font-size: 1.25rem;
}

.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef8f3;
  color: #146c43;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
html[data-theme="dark"] .presence-pill { background: #123426; color: #8ce6b8; }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: #20b26b; box-shadow: 0 0 0 4px rgba(32,178,107,.15); }

.bottom-nav {
  grid-template-columns: repeat(5, 1fr);
}
.bottom-nav a,
.bottom-nav .bi { color: var(--orange); }
.bottom-nav a.active,
.bottom-nav a.active .bi { color: var(--sky); }

/* Profil */
.profile-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.profile-avatar-wrap { position: relative; width: 132px; height: 132px; }
.profile-avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #fff;
  box-shadow: 0 8px 22px rgba(16,24,40,.2);
  background: #fff4eb;
}
.profile-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--orange);
  font-family: var(--font-number);
  font-size: 3.1rem;
  font-weight: 900;
}
.avatar-edit {
  position: absolute;
  right: 2px;
  bottom: 3px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}
.profile-main h1 { margin: 0 0 5px; }
.profile-main p { margin: 4px 0; color: var(--muted); }
.profile-actions { display: grid; gap: 10px; justify-items: end; }
.btn-power { background: transparent; color: var(--danger); border: 1px solid rgba(217,45,32,.35); }
.btn-power .bi { font-size: 1.18rem; }
.theme-choice { display: flex; gap: 8px; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.theme-choice button { border: 0; border-radius: 9px; padding: 8px 11px; background: transparent; color: var(--muted); }
.theme-choice button.active { background: var(--blue); color: #fff; }
.profile-info-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-top: 18px; }
.profile-info-item { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.profile-info-item .label { color: var(--muted); font-size: .78rem; margin-bottom: 5px; }
.profile-info-item .value { font-weight: 700; overflow-wrap: anywhere; }

/* Opérateurs Mobile Money */
.operator-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.operator-choice { position: relative; }
.operator-choice input { position: absolute; opacity: 0; pointer-events: none; }
.operator-choice label {
  min-height: 82px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.operator-choice img { width: 100%; max-height: 58px; object-fit: contain; }
.operator-choice input:checked + label { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(54,169,225,.16); transform: translateY(-1px); }

/* À propos */
.about-cover { padding: clamp(28px,5vw,62px); border-radius: 26px; background: var(--white); box-shadow: var(--shadow); }
.about-cover h1 { max-width: 850px; margin: 0 0 14px; font-size: clamp(2rem,5vw,4rem); line-height: 1.12; }
.about-cover p { max-width: 850px; color: var(--muted); }
.about-article { display: grid; gap: 18px; }
.about-article section { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.about-article h2 { color: var(--navy); }
html[data-theme="dark"] .about-article h2 { color: #8ec9ff; }
.about-article blockquote { margin: 18px 0; padding: 18px; border-left: 4px solid var(--orange); background: var(--surface); border-radius: 0 14px 14px 0; }
.responsible-highlight { border: 2px solid var(--orange) !important; }

/* Admin totalement séparé */
.admin-body { padding: 0; background: #eef2f7; font-family: var(--font-text); }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 22px 16px;
  background: var(--navy);
  color: #fff;
  overflow-y: auto;
}
.admin-sidebar .brand-logo { width: 150px; filter: brightness(0) invert(1); margin: 0 10px 25px; }
.admin-nav { display: grid; gap: 6px; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 11px;
  color: #dbeafe;
  font-weight: 650;
}
.admin-nav a:hover,
.admin-nav a.active { background: var(--navy-2); color: #fff; }
.admin-nav .bi { color: #ff9d57; font-size: 1.15rem; }
.admin-content { grid-column: 2; min-width: 0; padding: 24px 28px 48px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.admin-title-wrap { display: flex; align-items: center; gap: 13px; }
.admin-bell {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--orange);
  font-size: 1.25rem;
  box-shadow: 0 4px 14px rgba(16,24,40,.09);
}
.admin-bell .badge-dot { display: flex; top: -5px; right: -5px; }
.admin-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 15px; }
.admin-metric {
  min-height: 120px;
  padding: 18px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 8px 20px rgba(16,24,40,.13);
}
.admin-metric .muted { color: rgba(255,255,255,.82); }
.admin-metric .metric { font-size: 2rem; }
.admin-metric.orange { background: var(--orange-card); }
.admin-metric.green { background: var(--green-card); }
.admin-metric.blue { background: var(--blue-card); }
.admin-metric.pink { background: var(--pink); }
.admin-metric.purple { background: var(--purple-card); }
.admin-panel { margin-top: 20px; background: #fff; color: #172033; }
.admin-login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #eef2f7; }
.admin-login-card { width: min(430px,100%); padding: 30px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.admin-login-card .brand-logo { display: block; width: 160px; margin: 0 auto 20px; }
.admin-mobile-menu { display: none; }

/* Responsive plus compact */
@media (max-width: 1000px) {
  .admin-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  body { padding-top: 59px; }
  h1 { font-size: 1.55rem; line-height: 1.2; }
  h2 { font-size: 1.18rem; line-height: 1.3; }
  h3 { font-size: 1rem; }
  p, li, label, input, select, textarea, button { font-size: .86rem; }
  .hero h1 { font-size: clamp(1.75rem,8vw,2.35rem); }
  .hero p { font-size: .88rem; }
  .section-title { font-size: 1.28rem; }
  .section-subtitle { font-size: .82rem; }
  .metric { font-size: 1.35rem; }
  .small, .field-help { font-size: .72rem; }
  .presence-pill { display: none; }
  .balance-link span { display: none; }
  .profile-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 20px; }
  .profile-main { text-align: center; }
  .profile-actions { justify-items: center; }
  .profile-info-grid { grid-template-columns: 1fr; }
  .operator-choices { grid-template-columns: 1fr; }
  .operator-choice label { min-height: 72px; }
  .operator-choice img { max-height: 52px; }
  .about-article section { padding: 17px; }

  .admin-layout { display: block; }
  .admin-sidebar { transform: translateX(-100%); transition: transform .2s ease; z-index: 1700; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-content { padding: 15px 13px 36px; }
  .admin-mobile-menu { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; }
  .admin-metrics { grid-template-columns: 1fr; }
  .admin-topbar { align-items: flex-start; }
}
.chat-avatar { overflow: hidden; }
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }

html[data-theme="dark"] .app-header,
html[data-theme="dark"] .desktop-drawer,
html[data-theme="dark"] .bottom-nav,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .chat-shell,
html[data-theme="dark"] .chat-composer,
html[data-theme="dark"] .card,
html[data-theme="dark"] .profile-hero,
html[data-theme="dark"] .profile-info-item {
  background: var(--white);
  color: var(--ink);
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #172033;
  color: #f4f7fb;
  border-color: #3b465a;
}
html[data-theme="dark"] .btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .chip { background: #263146; color: #d7dfeb; }
html[data-theme="dark"] .chip.orange { background: #4d2a16; color: #ffb078; }
html[data-theme="dark"] .chip.blue { background: #153453; color: #9fd2ff; }
html[data-theme="dark"] .reply-preview { background: #182235; }
.avatar-edit:disabled { opacity: .5; cursor: not-allowed; }
