/* ============================================================
   Client Panel Styles
   ============================================================ */

:root {
  --sidebar-width: 240px;
  --sidebar-collapsed: 64px;
  --sidebar-bg: #1a1c2e;
  --sidebar-text: rgba(255,255,255,0.7);
  --sidebar-hover: rgba(255,255,255,0.07);
  --sidebar-active: rgba(102,126,234,0.2);
  --primary: #667eea;
  --primary-dark: #764ba2;
  --topbar-height: 56px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', -apple-system, sans-serif;
  background: #f5f7fb;
  margin: 0;
  display: flex;
  min-height: 100vh;
  font-size: 14px;
}

/* ── Client Sidebar ──────────────────────────────────────── */
.client-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: width 0.25s ease;
  overflow: hidden;
}

.client-sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.client-sidebar.collapsed .sidebar-text {
  display: none;
}

.client-nav-link {
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.client-nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.client-nav-link.active {
  background: var(--sidebar-active);
  color: #fff;
  border-left: 3px solid var(--primary);
}

/* ── Client Main ─────────────────────────────────────────── */
.client-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.25s ease;
}

.client-main.expanded {
  margin-left: var(--sidebar-collapsed);
}

.content-wrapper {
  flex: 1;
  padding: 24px;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  border-radius: 12px;
}

/* ── Progress bars ───────────────────────────────────────── */
.progress {
  border-radius: 10px;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  font-weight: 500;
  border-radius: 6px;
  font-size: 11px;
}

/* ── Tables ──────────────────────────────────────────────── */
.table > :not(caption) > * > * {
  padding: 10px 12px;
}

.table thead th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 8px;
  font-size: 13.5px;
  border-color: #e2e8f0;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn { border-radius: 8px; font-size: 13.5px; font-weight: 500; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a72d4, #6a3d9a);
  border: none;
}

/* ── Modals ──────────────────────────────────────────────── */
.modal-content { border-radius: 14px; border: none; }

/* ── Chat bubbles ────────────────────────────────────────── */
.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
}

.chat-bubble.inbound {
  background: #f0f2f7;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.chat-bubble.outbound {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

/* ── Gateway cards ───────────────────────────────────────── */
.gateway-card {
  cursor: pointer;
  transition: all 0.2s;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gateway-card:hover {
  border-color: var(--primary) !important;
  background: var(--primary-light, rgba(102,126,234,0.05));
}

/* ── Notifications ───────────────────────────────────────── */
.alert { border-radius: 10px; font-size: 13.5px; }

/* ── Stat mini ───────────────────────────────────────────── */
.stat-mini { font-size: 12px; color: #64748b; }

/* ── Code ────────────────────────────────────────────────── */
code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #e11d48;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .client-sidebar { width: var(--sidebar-collapsed); }
  .client-sidebar .sidebar-text { display: none; }
  .client-main { margin-left: var(--sidebar-collapsed); }
  .content-wrapper { padding: 16px; }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c1c5cd; border-radius: 3px; }

.cursor-pointer { cursor: pointer; }
.min-width-0 { min-width: 0; }
