/* ============================================================
   Bluedog Secure – Professional Light Blue Theme
   ============================================================ */

:root {
  /* Lighter blue palette */
  --bd-primary:        #3b82f6;
  --bd-primary-dark:   #2563eb;
  --bd-primary-light:  #eff6ff;
  --bd-navy:           #1e40af;
  --bd-navy-hover:     #1d4ed8;
  --bd-sidebar-width:  240px;
  --bd-topbar-height:  60px;
  --bd-bg:             #f5f9ff;
  --bd-card-radius:    .875rem;
  --bd-font:           'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Base ─────────────────────────────────────────────────── */
html, body { height: 100%; }

body {
  font-family: var(--bd-font);
  background: var(--bd-bg);
  color: #1e293b;
  font-size: .9375rem;
}

/* ── Admin Shell ──────────────────────────────────────────── */
.bd-wrapper { min-height: 100vh; }

/* ── Sidebar ──────────────────────────────────────────────── */
.bd-sidebar {
  width: var(--bd-sidebar-width);
  min-height: 100vh;
  background: var(--bd-navy);
  transition: width .25s ease;
  overflow: hidden;
  flex-shrink: 0;
  z-index: 100;
}

.bd-sidebar.bd-sidebar-collapsed { width: 60px; }
.bd-sidebar.bd-sidebar-collapsed .bd-brand span,
.bd-sidebar.bd-sidebar-collapsed .nav-link span,
.bd-sidebar.bd-sidebar-collapsed .sidebar-label,
.bd-sidebar.bd-sidebar-collapsed .mt-auto { display: none; }

.bd-brand {
  padding: 1.25rem 1rem 1rem;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.01em;
  border-bottom: 1px solid rgba(255,255,255,.1);
  white-space: nowrap;
}
.bd-brand i   { color: #93c5fd; font-size: 1.35rem; flex-shrink: 0; }
.bd-brand:hover { color: #bfdbfe; }

.bd-sidebar .nav-link {
  color: rgba(255,255,255,.72);
  padding: .55rem 1rem;
  border-radius: .5rem;
  margin: 2px .5rem;
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.bd-sidebar .nav-link:hover  { background: rgba(255,255,255,.1);  color: #fff; }
.bd-sidebar .nav-link.active { background: rgba(147,197,253,.2); color: #bfdbfe; }
.bd-sidebar .nav-link i { width: 18px; text-align: center; }

.sidebar-label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.32);
  padding: .5rem 1rem .2rem;
}

/* ── Main content ─────────────────────────────────────────── */
.bd-main { min-width: 0; background: var(--bd-bg); }

/* ── Topbar ───────────────────────────────────────────────── */
.bd-topbar {
  height: var(--bd-topbar-height);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(59,130,246,.06);
}

.bd-toggle-sidebar { color: #64748b; font-size: 1.1rem; border: none !important; background: none; }
.bd-toggle-sidebar:hover { color: var(--bd-primary); }
.bd-topbar h5 { color: #1e293b; font-size: .95rem; }

.bd-badge-online {
  background: #dcfce7;
  color: #16a34a;
  font-size: .68rem;
  font-weight: 600;
  padding: .3em .65em;
  border-radius: 50px;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  border-radius: var(--bd-card-radius) !important;
  border: 1px solid #e2e8f0 !important;
}

.bd-card-header {
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  padding: .875rem 1.25rem;
  font-size: .875rem;
}

/* Stat cards */
.bd-stat-card {
  border: none !important;
  background: #fff !important;
  box-shadow: 0 1px 4px rgba(59,130,246,.08), 0 4px 18px rgba(59,130,246,.05) !important;
  border-radius: var(--bd-card-radius) !important;
  transition: transform .15s, box-shadow .15s;
}
.bd-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 22px rgba(59,130,246,.14) !important;
}

.bd-stat-icon {
  width: 48px; height: 48px;
  border-radius: .625rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}

/* ── Avatar ───────────────────────────────────────────────── */
.bd-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
}

/* ── Tables ───────────────────────────────────────────────── */
.table th {
  font-size: .74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b;
  padding: .75rem 1rem;
}
.table td { padding: .75rem 1rem; }
.table-hover tbody tr:hover { background: #f0f7ff; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  background: var(--bd-primary);
  border-color: var(--bd-primary);
  font-weight: 500;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--bd-primary-dark);
  border-color: var(--bd-primary-dark);
}
.btn-outline-primary {
  color: var(--bd-primary);
  border-color: var(--bd-primary);
}
.btn-outline-primary:hover {
  background: var(--bd-primary);
  border-color: var(--bd-primary);
  color: #fff;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: #d1d5db;
}
.form-control:focus, .form-select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 .2rem rgba(59,130,246,.15);
}

/* ── AUTH PAGES ───────────────────────────────────────────── */
/* The unauthenticated bg wrapper */
.bd-auth-bg {
  background: linear-gradient(145deg, #1e40af 0%, #3b82f6 55%, #60a5fa 100%);
  padding: 2rem 1rem;
}

/* The card itself */
.bd-auth-card {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 20px 60px rgba(30,64,175,.25), 0 4px 16px rgba(0,0,0,.08);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

/* Card header zone */
.bd-auth-header {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}

.bd-auth-logo {
  width: 60px; height: 60px;
  background: rgba(255,255,255,.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.6rem;
  color: #fff;
  backdrop-filter: blur(4px);
}

.bd-auth-title {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: .25rem;
  letter-spacing: -.02em;
}

.bd-auth-subtitle {
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  margin-bottom: 0;
}

/* Card body zone */
.bd-auth-body {
  padding: 2rem 2rem 1.5rem;
}

/* Labels inside auth */
.bd-auth-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
  margin-bottom: .35rem;
}

/* Input group icon cell */
.bd-input-icon {
  background: var(--bd-primary-light);
  border-color: #d1d5db;
  color: var(--bd-primary);
  min-width: 42px;
  justify-content: center;
}

/* Password show/hide toggle button */
.bd-input-toggle {
  border: 1px solid #d1d5db;
  border-left: none;
  background: #fff;
  color: #94a3b8;
  padding: 0 .75rem;
}
.bd-input-toggle:hover { color: var(--bd-primary); background: var(--bd-primary-light); }

/* Override Bootstrap floating label inputs inside input groups */
.bd-auth-input {
  border-left: none;
  padding-left: .75rem;
}
.bd-auth-input:focus { border-color: #93c5fd; }

/* Big sign-in button */
.bd-auth-btn {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  padding: .7rem 1rem;
  border-radius: .625rem;
  transition: opacity .15s, transform .1s;
}
.bd-auth-btn:hover  { opacity: .92; color: #fff; transform: translateY(-1px); }
.bd-auth-btn:active { transform: translateY(0); }
.bd-auth-btn:focus  { color: #fff; box-shadow: 0 0 0 .25rem rgba(59,130,246,.35); }

/* Card footer zone */
.bd-auth-footer {
  background: #f8faff;
  border-top: 1px solid #e2e8f0;
  padding: 1rem 2rem;
  text-align: center;
}

/* Links inside auth */
.bd-auth-link {
  color: var(--bd-primary);
  text-decoration: none;
  font-size: .85rem;
}
.bd-auth-link:hover { color: var(--bd-primary-dark); text-decoration: underline; }

/* ── Progress bar ─────────────────────────────────────────── */
.progress { border-radius: 50px; background: #e2e8f0; }

/* ── Badges ───────────────────────────────────────────────── */
.bg-success-subtle  { background: #dcfce7 !important; }
.bg-secondary-subtle { background: #f1f5f9 !important; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c7d2e0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Page content padding ─────────────────────────────────── */
.bd-main main { padding-top: 1.5rem; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .bd-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--bd-sidebar-width);
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 200;
  }
  .bd-sidebar.bd-sidebar-open { transform: translateX(0); }
  .bd-auth-card { max-width: 100%; border-radius: .75rem; }
}

/* ── Utility ──────────────────────────────────────────────── */
.font-monospace { font-family: 'Courier New', Courier, monospace !important; }
pre { white-space: pre-wrap; word-break: break-all; font-size: .78rem; }
