/* ───────────────────────────────────────────────────────────
   INSTITUTO ELORA — Admin Panel Styles
   Sidebar dark (#1A1612), content light (#F8F6F3), gold accent (#C5A364)
   ─────────────────────────────────────────────────────────── */

:root {
  --adm-gold:       #C5A364;
  --adm-gold-dark:  #A8884B;
  --adm-gold-light: #D9C37A;
  --adm-ink:        #1A1612;
  --adm-ink-light:  #2C2520;
  --adm-cream:      #F2EEEB;
  --adm-bg:         #F8F6F3;
  --adm-white:      #FFFFFF;
  --adm-border:     #E8E2DB;
  --adm-text:       #2C2520;
  --adm-text-muted: #7A6D63;
  --adm-red:        #E74C3C;
  --adm-green:      #27AE60;
  --adm-blue:       #2980B9;
  --adm-yellow:     #F39C12;
  --adm-sidebar-w:  240px;
  --adm-topbar-h:   60px;
  --adm-shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --adm-shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --adm-shadow-lg:  0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --adm-radius:     8px;
  --adm-font:       'Manrope', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--adm-font);
  font-size: 14px;
  color: var(--adm-text);
  background: var(--adm-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ─── Auth Screen ─── */
#authScreen, #accessDenied {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--adm-ink);
  background-image: radial-gradient(ellipse at 20% 30%, rgba(197,163,100,.12) 0%, transparent 60%);
  padding: 24px;
}

.auth-card {
  background: #221E1A;
  border: 1px solid rgba(197,163,100,.18);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 48px rgba(0,0,0,.5);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.auth-brand-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--adm-gold);
  letter-spacing: .02em;
}
.auth-brand-sub {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,.4);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.auth-title {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  margin-bottom: 24px;
  line-height: 1.5;
}

.auth-error {
  background: rgba(231,76,60,.12);
  border: 1px solid rgba(231,76,60,.3);
  border-radius: 6px;
  padding: 10px 14px;
  color: #e74c3c;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--adm-radius);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s, border-color .2s;
}
.auth-google:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: rgba(255,255,255,.25);
  font-size: 12px;
}
.auth-or::before, .auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.1);
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  letter-spacing: .04em;
}
.auth-field input {
  padding: 10px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--adm-radius);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.auth-field input::placeholder { color: rgba(255,255,255,.2); }
.auth-field input:focus { border-color: var(--adm-gold); }

.auth-submit {
  width: 100%;
  padding: 12px 16px;
  background: var(--adm-gold);
  color: var(--adm-ink);
  border-radius: var(--adm-radius);
  font-size: 14px;
  font-weight: 600;
  transition: background .2s, transform .1s;
  margin-top: 4px;
}
.auth-submit:hover { background: var(--adm-gold-light); }
.auth-submit:active { transform: scale(.98); }
.auth-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Admin App Layout ─── */
#adminApp {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─── Sidebar ─── */
.adm-sidebar {
  width: var(--adm-sidebar-w);
  min-width: var(--adm-sidebar-w);
  height: 100vh;
  background: var(--adm-ink);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .25s ease;
  z-index: 100;
  flex-shrink: 0;
}

.adm-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.adm-sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--adm-gold);
  letter-spacing: .03em;
  white-space: nowrap;
}

.adm-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.adm-nav-divider {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  color: rgba(255,255,255,.25);
  padding: 16px 20px 6px;
  text-transform: uppercase;
}

.adm-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,.55);
  font-size: 13.5px;
  font-weight: 500;
  transition: color .18s, background .18s;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}
.adm-nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: .7;
}
.adm-nav-item:hover {
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.05);
}
.adm-nav-item.active {
  color: var(--adm-gold);
  background: rgba(197,163,100,.1);
}
.adm-nav-item.active svg { opacity: 1; }
.adm-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--adm-gold);
  border-radius: 0 2px 2px 0;
}

.adm-badge {
  margin-left: auto;
  background: var(--adm-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.6;
  min-width: 18px;
  text-align: center;
}

.adm-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.adm-sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--adm-gold);
  color: var(--adm-ink);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.adm-sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.adm-sidebar-userinfo {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.adm-sidebar-username {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-sidebar-useremail {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-logout-btn {
  color: rgba(255,255,255,.3);
  padding: 6px;
  border-radius: 6px;
  transition: color .18s, background .18s;
  flex-shrink: 0;
}
.adm-logout-btn:hover {
  color: var(--adm-red);
  background: rgba(231,76,60,.1);
}

/* ─── Main Area ─── */
.adm-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ─── Topbar ─── */
.adm-topbar {
  height: var(--adm-topbar-h);
  background: var(--adm-white);
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  box-shadow: var(--adm-shadow);
  z-index: 50;
}
.adm-topbar-left { display: flex; align-items: center; gap: 14px; }
.adm-page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--adm-text);
}
.adm-topbar-right { display: flex; align-items: center; gap: 10px; }
.adm-menu-toggle {
  display: none;
  color: var(--adm-text-muted);
  padding: 6px;
  border-radius: 6px;
}

/* ─── Content Area ─── */
.adm-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ─── Buttons ─── */
.adm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--adm-radius);
  font-size: 13px;
  font-weight: 500;
  transition: background .18s, color .18s, border-color .18s, transform .1s;
  cursor: pointer;
  white-space: nowrap;
}
.adm-btn:active { transform: scale(.97); }
.adm-btn-primary {
  background: var(--adm-gold);
  color: var(--adm-ink);
  border: 1px solid var(--adm-gold);
}
.adm-btn-primary:hover { background: var(--adm-gold-light); border-color: var(--adm-gold-light); }
.adm-btn-secondary {
  background: var(--adm-white);
  color: var(--adm-text);
  border: 1px solid var(--adm-border);
}
.adm-btn-secondary:hover { background: var(--adm-bg); }
.adm-btn-danger {
  background: var(--adm-red);
  color: #fff;
  border: 1px solid var(--adm-red);
}
.adm-btn-danger:hover { background: #c0392b; border-color: #c0392b; }
.adm-btn-ghost {
  background: transparent;
  color: var(--adm-text-muted);
  border: 1px solid transparent;
}
.adm-btn-ghost:hover {
  background: var(--adm-bg);
  border-color: var(--adm-border);
  color: var(--adm-text);
}
.adm-btn-sm { padding: 5px 10px; font-size: 12px; }

/* ─── Cards ─── */
.adm-card {
  background: var(--adm-white);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
}
.adm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--adm-border);
}
.adm-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--adm-text);
}
.adm-card-body { padding: 20px; }

/* ─── Stat Cards ─── */
.adm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--adm-white);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 20px;
  box-shadow: var(--adm-shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-card-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--adm-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--adm-text);
  line-height: 1;
}
.stat-card-sub {
  font-size: 12px;
  color: var(--adm-text-muted);
}
.stat-card.gold { border-left: 3px solid var(--adm-gold); }
.stat-card.green { border-left: 3px solid var(--adm-green); }
.stat-card.yellow { border-left: 3px solid var(--adm-yellow); }
.stat-card.blue { border-left: 3px solid var(--adm-blue); }

/* ─── Data Table ─── */
.adm-table-wrap {
  overflow-x: auto;
  border-radius: var(--adm-radius);
  border: 1px solid var(--adm-border);
  background: var(--adm-white);
  box-shadow: var(--adm-shadow);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.data-table thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--adm-text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  background: var(--adm-bg);
  border-bottom: 1px solid var(--adm-border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--adm-border);
  color: var(--adm-text);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(245,243,240,.8); }
.data-table tbody tr.clickable { cursor: pointer; }

/* ─── Status Badges ─── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-badge.pending {
  background: rgba(243,156,18,.1);
  color: #d68910;
}
.status-badge.confirmed {
  background: rgba(39,174,96,.1);
  color: #229954;
}
.status-badge.cancelled {
  background: rgba(231,76,60,.1);
  color: #c0392b;
}
.status-badge.open {
  background: rgba(41,128,185,.1);
  color: #2471a3;
}
.status-badge.closed {
  background: rgba(127,140,141,.1);
  color: #717d7e;
}
.status-badge.admin {
  background: rgba(197,163,100,.15);
  color: var(--adm-gold-dark);
}
.status-badge.client {
  background: var(--adm-bg);
  color: var(--adm-text-muted);
}

/* ─── Form Fields ─── */
.adm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.adm-form-grid .full { grid-column: 1 / -1; }

.adm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adm-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--adm-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.adm-input, .adm-select, .adm-textarea {
  padding: 9px 13px;
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  background: var(--adm-white);
  color: var(--adm-text);
  font-size: 13.5px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.adm-input:focus, .adm-select:focus, .adm-textarea:focus {
  border-color: var(--adm-gold);
  box-shadow: 0 0 0 3px rgba(197,163,100,.12);
}
.adm-textarea { resize: vertical; min-height: 80px; }
.adm-select { appearance: none; cursor: pointer; }

/* ─── Modal ─── */
.adm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(2px);
}
.adm-modal-box {
  background: var(--adm-white);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--adm-shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.adm-confirm-box { max-width: 400px; }
.adm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--adm-border);
  flex-shrink: 0;
}
.adm-modal-title { font-size: 15px; font-weight: 600; }
.adm-modal-close {
  color: var(--adm-text-muted);
  padding: 4px;
  border-radius: 6px;
  transition: color .18s, background .18s;
}
.adm-modal-close:hover { color: var(--adm-red); background: rgba(231,76,60,.08); }
.adm-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.adm-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--adm-border);
  flex-shrink: 0;
}

/* ─── Toast ─── */
.adm-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.adm-toast {
  padding: 12px 18px;
  border-radius: var(--adm-radius);
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--adm-shadow-md);
  pointer-events: auto;
  animation: toastIn .25s ease;
  max-width: 320px;
}
.adm-toast.success { background: var(--adm-green); }
.adm-toast.error { background: var(--adm-red); }
.adm-toast.info { background: var(--adm-blue); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* ─── Dashboard ─── */
.adm-dash-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
  margin-top: 8px;
}
@media (max-width: 1100px) {
  .adm-dash-grid { grid-template-columns: 1fr; }
}

/* ─── Toolbar ─── */
.adm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.adm-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-toolbar-right { display: flex; align-items: center; gap: 10px; }

/* ─── Chats Layout ─── */
.adm-chats-wrap {
  display: grid;
  grid-template-columns: 300px 1fr 240px;
  gap: 0;
  height: calc(100vh - var(--adm-topbar-h) - 48px);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  background: var(--adm-white);
  overflow: hidden;
  box-shadow: var(--adm-shadow);
}
@media (max-width: 900px) {
  .adm-chats-wrap { grid-template-columns: 1fr; }
}

.chat-sidebar-list {
  border-right: 1px solid var(--adm-border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.chat-list-header {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--adm-text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  border-bottom: 1px solid var(--adm-border);
  background: var(--adm-bg);
  flex-shrink: 0;
}
.chat-list-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--adm-border);
  cursor: pointer;
  transition: background .18s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-list-item:hover { background: var(--adm-bg); }
.chat-list-item.active { background: rgba(197,163,100,.08); border-left: 3px solid var(--adm-gold); }
.chat-list-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.chat-list-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--adm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-list-time {
  font-size: 11px;
  color: var(--adm-text-muted);
  flex-shrink: 0;
}
.chat-list-preview {
  font-size: 12px;
  color: var(--adm-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-list-unread {
  display: inline-block;
  background: var(--adm-gold);
  color: var(--adm-ink);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  flex-shrink: 0;
}

.chat-window {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-window-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--adm-border);
  background: var(--adm-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chat-window-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--adm-text);
}
.chat-window-status {
  font-size: 11.5px;
  color: var(--adm-text-muted);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adm-text-muted);
  font-size: 13px;
  text-align: center;
  padding: 24px;
}
.chat-bubble {
  max-width: 70%;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}
.chat-bubble.client {
  background: var(--adm-bg);
  color: var(--adm-text);
  border: 1px solid var(--adm-border);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.chat-bubble.admin {
  background: var(--adm-gold);
  color: var(--adm-ink);
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.chat-bubble-meta {
  font-size: 10.5px;
  color: var(--adm-text-muted);
  margin-top: 3px;
}
.chat-bubble.admin .chat-bubble-meta { text-align: right; }

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--adm-border);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
}
.chat-input-area textarea {
  flex: 1;
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 9px 13px;
  font-size: 13.5px;
  resize: none;
  outline: none;
  min-height: 40px;
  max-height: 100px;
  line-height: 1.4;
  font-family: var(--adm-font);
  background: var(--adm-white);
  color: var(--adm-text);
  transition: border-color .18s;
}
.chat-input-area textarea:focus { border-color: var(--adm-gold); }
.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--adm-gold);
  color: var(--adm-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, transform .1s;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--adm-gold-light); }
.chat-send-btn:active { transform: scale(.9); }

.chat-client-info {
  border-left: 1px solid var(--adm-border);
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-client-info h4 {
  font-size: 11px;
  font-weight: 600;
  color: var(--adm-text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 8px;
}
.chat-client-detail { font-size: 12.5px; color: var(--adm-text); margin-bottom: 4px; }
.chat-client-detail small { display: block; color: var(--adm-text-muted); font-size: 11px; }

/* ─── Team Cards ─── */
.adm-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.adm-team-card {
  background: var(--adm-white);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--adm-shadow);
  transition: border-color .18s, box-shadow .18s;
}
.adm-team-card:hover {
  border-color: var(--adm-gold);
  box-shadow: var(--adm-shadow-md);
}
.adm-team-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--adm-gold);
  color: var(--adm-ink);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  overflow: hidden;
}
.adm-team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.adm-team-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.adm-team-role { font-size: 12px; color: var(--adm-text-muted); margin-bottom: 8px; }
.adm-team-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-bottom: 14px;
}
.adm-team-spec {
  background: var(--adm-bg);
  border: 1px solid var(--adm-border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--adm-text-muted);
}
.adm-team-actions { display: flex; gap: 8px; justify-content: center; }

/* ─── Content editor cards ─── */
.adm-content-sections { display: flex; flex-direction: column; gap: 20px; }
.adm-content-hint {
  font-size: 12.5px;
  color: var(--adm-text-muted);
  background: rgba(197,163,100,.08);
  border: 1px solid rgba(197,163,100,.2);
  border-radius: var(--adm-radius);
  padding: 10px 16px;
  margin-bottom: 20px;
}

/* ─── Empty state ─── */
.adm-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--adm-text-muted);
  font-size: 14px;
}
.adm-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  opacity: .3;
}

/* ─── Loading ─── */
.adm-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--adm-text-muted);
  font-size: 13px;
  gap: 10px;
}
.adm-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--adm-border);
  border-top-color: var(--adm-gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Section headers ─── */
.adm-section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--adm-text);
  margin-bottom: 4px;
}
.adm-section-sub {
  font-size: 13px;
  color: var(--adm-text-muted);
  margin-bottom: 20px;
}

/* ─── Pagination ─── */
.adm-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--adm-border);
  background: var(--adm-bg);
  font-size: 13px;
  color: var(--adm-text-muted);
}

/* ─── Actions cell ─── */
.adm-actions { display: flex; align-items: center; gap: 6px; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .adm-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    z-index: 200;
    transition: left .25s ease;
  }
  .adm-sidebar.open { left: 0; }
  .adm-menu-toggle { display: flex; }
  .adm-content { padding: 16px; }
  .adm-topbar { padding: 0 16px; }
  .adm-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .adm-chats-wrap { grid-template-columns: 1fr; height: auto; min-height: 500px; }
  .chat-client-info { display: none; }
  .chat-sidebar-list { max-height: 240px; }
  .adm-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .adm-stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
}

/* ─── Sidebar overlay for mobile ─── */
.adm-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
}
.adm-sidebar-overlay.show { display: block; }

/* ─── Row highlight ─── */
tr.selected-row > td { background: rgba(197,163,100,.06); }
