/* =========================================================
   Janta Darbar – common stylesheet
   Used by: login.html, dashboard.html, visitors.html, contacts.html
   Requires: Bootstrap 4.6, Font Awesome 5, Poppins font
   Page-specific tweaks are scoped with a body class:
   .page-login  .page-dashboard  .page-visitors  .page-contacts
   ========================================================= */

/* ---------- 1. Variables & base ---------- */
:root {
  --jd-primary: #4f46e5;
  --jd-primary-dark: #3730a3;
  --jd-accent: #f97316;
  --jd-green: #16a34a;
  --jd-bg: #f4f6fb;
  --jd-surface: #ffffff;
  --jd-text: #1f2937;
  --jd-muted: #6b7280;
  --jd-border: #e5e7eb;
  --jd-sidebar: #111827;
  --jd-sidebar-w: 240px;
  --jd-sidebar-w-collapsed: 72px;
  --jd-radius: 14px;
  --jd-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', 'Noto Sans Devanagari', sans-serif;
  background: var(--jd-bg);
  color: var(--jd-text);
  font-size: 14px;
}

.form-control:focus,
.custom-select:focus {
  border-color: var(--jd-primary);
  box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15);
}

/* ---------- 2. Sidebar ---------- */
.jd-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--jd-sidebar-w);
  background: linear-gradient(180deg, #111827 0%, #1e1b4b 100%);
  color: #cbd5e1;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: width .25s ease, transform .25s ease;
}

.jd-brand {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  white-space: nowrap;
  overflow: hidden;
}

.jd-brand-logo {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--jd-accent), #fbbf24);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
}

.jd-brand-text {
  font-weight: 700;
  letter-spacing: .5px;
  color: #fff;
  font-size: 16px;
  line-height: 1.1;
}

.jd-brand-text small {
  display: block;
  font-weight: 400;
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 1.5px;
}

.jd-nav {
  list-style: none;
  margin: 0;
  padding: 16px 12px;
  flex: 1;
}

.jd-nav-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #64748b;
  padding: 8px 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.jd-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  margin-bottom: 4px;
  border-radius: 10px;
  color: #cbd5e1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: background .15s, color .15s;
}

.jd-nav a i {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex: 0 0 20px;
}

.jd-nav a:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff;
}

.jd-nav a.active {
  background: var(--jd-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .45);
}

.jd-nav-bottom {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.jd-nav-bottom a {
  color: #fca5a5;
}

body.sidebar-collapsed .jd-sidebar {
  width: var(--jd-sidebar-w-collapsed);
}

body.sidebar-collapsed .jd-brand-text,
body.sidebar-collapsed .jd-nav-label,
body.sidebar-collapsed .jd-nav a span {
  display: none;
}

body.sidebar-collapsed .jd-main {
  margin-left: var(--jd-sidebar-w-collapsed);
}

/* ---------- 3. Main area + top bar ---------- */
.jd-main {
  margin-left: var(--jd-sidebar-w);
  transition: margin-left .25s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.jd-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: 68px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--jd-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
}

.jd-toggle {
  border: 0;
  background: transparent;
  font-size: 18px;
  color: var(--jd-muted);
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.jd-toggle:hover {
  background: var(--jd-bg);
  color: var(--jd-text);
}

.jd-global-search {
  position: relative;
  margin-left: auto;
  width: 320px;
  max-width: 100%;
}

.jd-global-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 13px;
}

.jd-global-search input {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--jd-border);
  background: var(--jd-bg);
  padding-left: 38px;
  font-size: 13px;
}

.jd-global-search input:focus {
  background: #fff;
  border-color: var(--jd-primary);
  box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15);
}

.jd-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.jd-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--jd-primary), #818cf8);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 14px;
}

.jd-user-name {
  font-weight: 600;
  line-height: 1.1;
}

.jd-user-role {
  font-size: 11px;
  color: var(--jd-muted);
}

.jd-content {
  padding: 24px;
  flex: 1;
}

.jd-page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.jd-page-title h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

.jd-page-title .breadcrumb {
  background: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
}

.jd-footer {
  text-align: center;
  padding: 18px;
  color: var(--jd-muted);
  font-size: 12px;
  border-top: 1px solid var(--jd-border);
  background: #fff;
}

.jd-footer b {
  color: var(--jd-primary);
}

/* ---------- 4. Panels ---------- */
.jd-panel {
  background: var(--jd-surface);
  border-radius: var(--jd-radius);
  box-shadow: var(--jd-shadow);
  border: 0;
}

.jd-panel-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--jd-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.jd-panel-head h5 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.jd-panel-head h5 i {
  color: var(--jd-primary);
  background: #eef2ff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.jd-panel-body {
  padding: 18px 22px 22px;
}

/* ---------- 5. Buttons ---------- */
.btn-tool {
  border: 1px solid var(--jd-border);
  background: #fff;
  color: var(--jd-muted);
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
}

.btn-tool:hover {
  background: var(--jd-primary);
  color: #fff;
  border-color: var(--jd-primary);
}

.btn-add {
  background: var(--jd-primary);
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border: 0;
}

.btn-add:hover {
  background: var(--jd-primary-dark);
  color: #fff;
}

.btn-back {
  background: #fff;
  border: 1px solid var(--jd-border);
  color: var(--jd-muted);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
}

.btn-back:hover {
  background: var(--jd-bg);
  color: var(--jd-text);
}

.btn-today {
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
}

.btn-today:hover {
  background: #0e7490;
  color: #fff;
  border-color: #0e7490;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 0;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  transition: transform .15s;
}

.btn-icon:hover {
  transform: translateY(-2px);
}
.btn-icon:disabled { opacity: .42; cursor: not-allowed; transform: none; }

.btn-edit {
  background: #eef2ff;
  color: var(--jd-primary);
}

.btn-view { background: #e0f2fe; color: #0369a1; }
.btn-view:hover { background: #0369a1; color: #fff; }

.visitor-profile-modal { overflow: hidden; border: 0; border-radius: 18px; box-shadow: 0 24px 70px rgba(15, 23, 42, .2); }
.visitor-profile-header { align-items: center; padding: 20px 26px; border-bottom: 1px solid #e8edf5; background: #fff; }
.visitor-profile-header h5 { color: #172554; font-size: 18px; font-weight: 700; }
.visitor-profile-header-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-right: 13px; border-radius: 13px; background: #eef2ff; color: #4f46e5; font-size: 17px; }
.visitor-profile-body { padding: 24px 26px 28px; background: #f7f9fc; }
.visitor-profile-loading { padding: 55px 16px; color: #64748b; text-align: center; }
.visitor-profile-hero { display: flex; align-items: center; gap: 16px; padding: 21px 23px; border: 1px solid #e6ebf3; border-radius: 15px; background: #fff; box-shadow: 0 4px 14px rgba(30, 41, 59, .035); }
.visitor-profile-avatar { display: grid; flex: 0 0 54px; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, #4f46e5, #818cf8); color: #fff; font-size: 21px; }
.visitor-profile-main { min-width: 0; }
.visitor-profile-name { color: #172554; font-size: 21px; font-weight: 700; line-height: 1.25; }
.visitor-profile-location { margin-top: 5px; color: #64748b; font-size: 13px; }
.visitor-profile-location i { color: #818cf8; margin-right: 3px; }
.visitor-profile-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; margin-left: auto; }
.visitor-token-label, .visitor-info-card small, .visitor-registration-card small { color: #94a3b8; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.visitor-token-value { color: #3730a3; font-family: Consolas, monospace; font-size: 14px; font-weight: 700; }
.visitor-status-pill { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.visitor-status-pill.status-done { background: #dcfce7; color: #15803d; }
.visitor-status-pill.status-pending { background: #fef3c7; color: #b45309; }
.visitor-status-pill.status-cancelled { background: #fee2e2; color: #b91c1c; }
.visitor-profile-section-title { display: flex; align-items: center; gap: 12px; margin: 23px 0 12px; color: #334155; font-size: 13px; font-weight: 700; }
.visitor-profile-section-title::after { flex: 1; height: 1px; background: #e2e8f0; content: ""; }
.visitor-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.visitor-info-card { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 13px 15px; border: 1px solid #e6ebf3; border-radius: 12px; background: #fff; }
.visitor-info-icon { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #f1f5f9; color: #64748b; }
.visitor-info-card div, .visitor-registration-card div { min-width: 0; }
.visitor-info-card small, .visitor-info-card strong, .visitor-registration-card small, .visitor-registration-card strong { display: block; }
.visitor-info-card strong, .visitor-registration-card strong { margin-top: 3px; color: #1e293b; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.visitor-purpose-card { grid-column: 1 / -1; align-items: flex-start; }
.visitor-purpose-card strong { white-space: pre-wrap; }
.visitor-registration-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; padding: 15px 17px; border: 1px solid #e6ebf3; border-radius: 12px; background: #fff; }
.visitor-remarks-heading { margin-top: 22px; }
.visitor-remarks-list { max-height: 260px; overflow-y: auto; }
.visitor-remarks-list > div { margin-bottom: 9px; padding: 12px 15px; border: 1px solid #e6ebf3 !important; border-radius: 11px; background: #fff; }
.visitor-remark-meta { display: flex; justify-content: space-between; gap: 12px; color: #94a3b8; font-size: 11px; }
.visitor-remark-meta strong { color: #475569; font-weight: 600; }
.visitor-remark-text { margin-top: 6px; color: #334155; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 575.98px) {
  .visitor-profile-header { padding: 16px; }
  .visitor-profile-body { padding: 15px; }
  .visitor-profile-hero { align-items: flex-start; flex-wrap: wrap; padding: 16px; }
  .visitor-profile-avatar { flex-basis: 44px; width: 44px; height: 44px; }
  .visitor-profile-name { font-size: 18px; }
  .visitor-profile-meta { flex-direction: row; align-items: center; width: 100%; margin-left: 60px; }
  .visitor-info-grid { grid-template-columns: 1fr; }
  .visitor-purpose-card { grid-column: auto; }
}

.btn-edit:hover {
  background: var(--jd-primary);
  color: #fff;
}

.btn-del {
  background: #fee2e2;
  color: #dc2626;
}

.btn-del:hover {
  background: #dc2626;
  color: #fff;
}

/* ---------- 6. Table toolbar, tables, pagination ---------- */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.table-toolbar label {
  margin: 0;
  color: var(--jd-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-toolbar .form-control {
  height: 36px;
  border-radius: 9px;
  border-color: var(--jd-border);
  font-size: 13px;
  width: auto;
}

.search-box {
  position: relative;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 12px;
}

.search-box .form-control {
  padding-left: 32px;
  width: 240px;
}

.jd-table {
  margin: 0;
  font-size: 13px;
}

.jd-table thead th {
  background: #f9fafb;
  color: #4b5563;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-top: 0;
  border-bottom: 1px solid var(--jd-border);
  white-space: nowrap;
  padding: 12px 14px;
}

.jd-table td {
  padding: 12px 14px;
  vertical-align: middle;
  border-top: 1px solid #f1f3f6;
  white-space: nowrap;
}

.jd-table tbody tr {
  transition: background .15s;
}

.jd-table tbody tr:hover {
  background: #f8f9ff;
}

.empty-row td {
  text-align: center;
  color: var(--jd-muted);
  padding: 28px;
}

.token-pill {
  font-family: 'SFMono-Regular', Consolas, monospace;
  background: #eef2ff;
  color: var(--jd-primary-dark);
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 12px;
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.name-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e0e7ff;
  color: var(--jd-primary-dark);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex: 0 0 30px;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--jd-muted);
  font-size: 12.5px;
}

.pagination {
  margin: 0;
}

.page-link {
  border-radius: 8px !important;
  margin: 0 2px;
  border: 1px solid var(--jd-border);
  color: var(--jd-muted);
  font-size: 12.5px;
  padding: 5px 11px;
}

.page-item.active .page-link {
  background: var(--jd-primary);
  border-color: var(--jd-primary);
  color: #fff;
}

/* ---------- 7. Dashboard ---------- */
.page-dashboard .jd-panel {
  margin-bottom: 24px;
}

.page-dashboard .jd-panel-head {
  gap: 8px;
}

.page-dashboard .jd-panel-head h5 {
  font-size: 15px;
}

.page-dashboard .jd-panel-head h5 i {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.page-dashboard .search-box .form-control {
  width: 220px;
}

.stat-card {
  background: var(--jd-surface);
  border-radius: var(--jd-radius);
  box-shadow: var(--jd-shadow);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(16, 24, 40, .12);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--tint);
  opacity: .6;
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--c);
  background: var(--tint);
  flex: 0 0 54px;
  position: relative;
  z-index: 1;
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  position: relative;
  z-index: 1;
  color: #333 !important;
}

.stat-label {
  color: var(--jd-muted);
  font-size: 13px;
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

.stat-blue {
  --c: #4f46e5;
  --tint: #eef2ff;
}

.stat-orange {
  --c: #f97316;
  --tint: #fff1e6;
}

.stat-green {
  --c: #16a34a;
  --tint: #e8f8ee;
}

.badge-total {
  background: #fff1e6;
  color: #c2410c !important;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 20px;
}

/* ---------- 8. Visitors ---------- */
.page-visitors .jd-table td {
  padding: 10px 14px;
}

.page-visitors .jd-table tbody tr.is-done {
  background: #f0fdf4;
  box-shadow: inset 3px 0 0 #22c55e;
}

.page-visitors .jd-table tbody tr.is-done:hover {
  background: #e6faee;
}

.contact-select {
  height: 34px;
  min-width: 170px;
  border-radius: 9px;
  border: 1px solid var(--jd-border);
  font-size: 13px;
  background-color: #fff;
}

.is-done .contact-select {
  background-color: #fff;
  border-color: #bbf7d0;
}

.status-done {
  background: #dcfce7;
  color: #15803d;
  font-weight: 600;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 20px;
}

.status-done i {
  font-size: 10px;
  margin-right: 4px;
}

.btn-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--jd-primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(79, 70, 229, .35);
}

.btn-mark:hover {
  background: var(--jd-primary-dark);
}

/* ---------- 9. Contacts ---------- */
.page-contacts .name-cell {
  gap: 12px;
  font-weight: 500;
}

.page-contacts .name-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 13px;
  color: #fff;
  background: none;
}

.page-contacts .av-1 {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.page-contacts .av-2 {
  background: linear-gradient(135deg, #f97316, #fbbf24);
}

.page-contacts .av-3 {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.designation-pill {
  background: #eef2ff;
  color: var(--jd-primary-dark);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.contact-link {
  color: var(--jd-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-link i {
  color: #9ca3af;
  font-size: 12px;
  width: 14px;
}

.contact-link:hover {
  color: var(--jd-primary);
  text-decoration: none;
}

.contact-link:hover i {
  color: var(--jd-primary);
}

/* ---------- 10. Login ---------- */
.page-login,
html:has(.page-login) {
  height: 100%;
}

.page-login .login-wrap {
  min-height: 100vh;
  display: flex;
}

.page-login .brand-panel {
  flex: 1 1 52%;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #111827 0%, #1e1b4b 55%, #3730a3 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
}

.page-login .brand-panel::before,
.page-login .brand-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.page-login .brand-panel::before {
  width: 420px;
  height: 420px;
  right: -140px;
  top: -140px;
  background: radial-gradient(circle, rgba(249, 115, 22, .55), transparent 70%);
}

.page-login .brand-panel::after {
  width: 480px;
  height: 480px;
  left: -160px;
  bottom: -180px;
  background: radial-gradient(circle, rgba(22, 163, 74, .45), transparent 70%);
}

.page-login .brand-inner {
  position: relative;
  z-index: 1;
  max-width: 460px;
}

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--jd-accent), #fbbf24);
  display: grid;
  place-items: center;
  font-size: 24px;
  box-shadow: 0 10px 30px rgba(249, 115, 22, .4);
  margin-bottom: 28px;
}

.page-login .brand-panel h1 {
  font-weight: 700;
  font-size: 38px;
  letter-spacing: .5px;
  line-height: 1.15;
  margin-bottom: 14px;
}

.page-login .brand-panel h1 span {
  color: #fdba74;
}

.page-login .brand-panel p.lead {
  color: #c7d2fe;
  font-size: 15px;
  font-weight: 300;
  margin-bottom: 36px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  color: #e0e7ff;
}

.feature i {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .1);
  display: grid;
  place-items: center;
  font-size: 15px;
  flex: 0 0 38px;
}

.page-login .form-panel {
  flex: 1 1 48%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: #fff;
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-sub {
  color: var(--jd-muted);
  margin-bottom: 30px;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .5px;
}

.mobile-brand .brand-logo {
  width: 40px;
  height: 40px;
  font-size: 18px;
  margin: 0;
  border-radius: 12px;
  box-shadow: none;
}

.mobile-brand b {
  color: var(--jd-accent);
}

.mobile-brand span {
  color: var(--jd-green);
}

.field {
  position: relative;
  margin-bottom: 20px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 6px;
  letter-spacing: .3px;
}

.field .ico {
  position: absolute;
  left: 14px;
  bottom: 0;
  height: 48px;
  display: grid;
  place-items: center;
  color: #9ca3af;
  font-size: 14px;
  pointer-events: none;
  transition: color .15s;
}

.field .form-control {
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--jd-border);
  padding-left: 42px;
  font-size: 14px;
  background: #f9fafb;
  transition: all .15s;
}

.field .form-control:focus {
  background: #fff;
  border-color: var(--jd-primary);
  box-shadow: 0 0 0 .22rem rgba(79, 70, 229, .15);
}

.field .form-control:focus~.ico {
  color: var(--jd-primary);
}

.field .form-control.is-invalid {
  background-image: none;
  border-color: #ef4444;
}

.field .form-control.is-invalid:focus {
  box-shadow: 0 0 0 .22rem rgba(239, 68, 68, .15);
}

.toggle-pass {
  position: absolute;
  right: 6px;
  bottom: 4px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  border-radius: 10px;
}

.toggle-pass:hover {
  color: var(--jd-primary);
  background: #eef2ff;
}

.invalid-feedback {
  font-size: 12px;
}

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -4px 0 22px;
  font-size: 13px;
}

.custom-control-label {
  color: var(--jd-muted);
  cursor: pointer;
}

.custom-control-input:checked~.custom-control-label::before {
  background-color: var(--jd-primary);
  border-color: var(--jd-primary);
}

.options a {
  color: var(--jd-primary);
  font-weight: 500;
  text-decoration: none;
}

.options a:hover {
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  background: linear-gradient(135deg, var(--jd-primary), #6366f1);
  box-shadow: 0 10px 24px rgba(79, 70, 229, .35);
  transition: transform .15s, box-shadow .15s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(79, 70, 229, .45);
  color: #fff;
}

.btn-login:disabled {
  opacity: .85;
  transform: none;
  box-shadow: none;
}

.login-alert {
  display: none;
  border-radius: 12px;
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 20px;
  background: #fee2e2;
  color: #b91c1c;
  border: 0;
}

.login-footer {
  margin-top: 36px;
  text-align: center;
  color: var(--jd-muted);
  font-size: 12px;
}

.login-footer b {
  color: var(--jd-primary);
}

/* ---------- 11. Responsive ---------- */
@media (max-width: 991.98px) {

  /* app shell */
  .jd-sidebar {
    transform: translateX(-100%);
    width: var(--jd-sidebar-w) !important;
  }

  body.sidebar-open .jd-sidebar {
    transform: translateX(0);
  }

  .jd-main,
  body.sidebar-collapsed .jd-main {
    margin-left: 0;
  }

  body.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1035;
  }

  body.sidebar-collapsed .jd-brand-text,
  body.sidebar-collapsed .jd-nav-label,
  body.sidebar-collapsed .jd-nav a span {
    display: initial;
  }

  .jd-content {
    padding: 16px;
  }

  .jd-global-search {
    display: none;
  }

  .jd-user {
    margin-left: auto;
  }

  .search-box .form-control,
  .page-dashboard .search-box .form-control {
    width: 100%;
  }

  /* login */
  .page-login .brand-panel {
    display: none;
  }

  .mobile-brand {
    display: flex;
  }

  .page-login .form-panel {
    background: linear-gradient(180deg, #eef2ff 0%, #fff 40%);
  }
}

div.table-responsive>div.dt-container>div.row {
    margin-top: 10px;
}

.jd-notification-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  margin-right: 18px;
  color: var(--jd-primary);
  font-size: 18px;
  text-decoration: none;
}
.jd-notification-link:hover { color: var(--jd-primary); text-decoration: none; }
.jd-notification-count {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 10px;
  background: #dc3545;
  color: #fff;
  font-size: 10px;
  line-height: 17px;
  text-align: center;
}
.jd-notification-dropdown { margin-left: 0; }
.jd-notification-dropdown .jd-notification-link { margin-left: 0; margin-right: 0; }
.jd-notification-menu { width: 340px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.jd-notification-menu-title { padding: 12px 16px; font-weight: 600; border-bottom: 1px solid var(--jd-border); }
.jd-notification-empty { padding: 16px; color: var(--jd-muted); }
.jd-notification-item { display: block; white-space: normal; padding: 10px 16px; border-bottom: 1px solid var(--jd-border); }
.jd-notification-item.unread { background: #f2f5ff; }
.jd-notification-item strong, .jd-notification-item span, .jd-notification-item small { display: block; }
.jd-notification-item span { color: var(--jd-text); font-size: 12px; margin-top: 3px; }
.jd-notification-item small { color: var(--jd-muted); margin-top: 4px; }
.jd-notification-all { text-align: center; color: var(--jd-primary); font-weight: 600; padding: 10px; }
.jd-push-control { padding: 10px 14px; border-bottom: 1px solid var(--jd-border); }

.visitor-chart-period { width: auto; min-width: 150px; border-radius: 8px; }
.visitor-chart-date-filter { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.visitor-chart-date-filter .form-group { min-width: 150px; }
.visitor-chart-date-filter label { display: block; margin-bottom: 4px; color: #64748b; font-size: 11px; font-weight: 600; }
.visitor-chart-date-filter .form-control { border-radius: 8px; }
.visitor-chart-plot { display: flex; align-items: stretch; gap: 10px; min-height: 250px; padding: 14px 4px 0; overflow-x: auto; border-bottom: 1px solid #e2e8f0; background: repeating-linear-gradient(to top, transparent 0, transparent 59px, #edf1f7 60px); }
.visitor-chart-column { display: flex; flex: 1 0 42px; flex-direction: column; align-items: center; min-width: 42px; }
.visitor-chart-value { min-height: 20px; color: #64748b; font-size: 11px; font-weight: 600; }
.visitor-chart-track { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 195px; }
.visitor-chart-bar { width: min(34px, 68%); min-height: 3px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, #818cf8 0%, #4f46e5 100%); transition: height .25s ease, filter .15s ease; }
.visitor-chart-column:hover .visitor-chart-bar { filter: brightness(.94); }
.visitor-chart-column small { min-height: 27px; padding-top: 8px; color: #64748b; font-size: 10px; white-space: nowrap; }
.visitor-chart-note { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: #64748b; font-size: 11px; }
.visitor-chart-note span { width: 9px; height: 9px; border-radius: 3px; background: #4f46e5; }
.visitor-chart-view[hidden] { display: none !important; }

@media (max-width: 575.98px) {
  .visitor-chart-panel .jd-panel-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .visitor-chart-panel .jd-panel-head > div { width: 100%; }
  .visitor-chart-period { flex: 1; }
  .visitor-chart-plot { gap: 6px; }
}
