/* ===================================================================
   KIP BIZ AUTOMATION – Theme: light/dark + dashboard polish + responsive content
   Dark mode = <html class="kip-dark">, saved in localStorage "kip_theme".
   =================================================================== */

/* ---------- Dashboard / content polish (both themes) ---------- */
.content { padding-left: 20px; padding-right: 20px; }
.content-header h1 { font-weight: 700; letter-spacing: -.01em; }
.box {
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
.box-header { border-bottom: 1px solid #f1f5f9; }
.info-box, .small-box {
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16,24,40,.06);
}
.table-responsive { -webkit-overflow-scrolling: touch; }

/* ---------- Dark mode ---------- */
html.kip-dark { color-scheme: dark; }
html.kip-dark body,
html.kip-dark .content-wrapper,
html.kip-dark .content { background-color: #0b1220 !important; color: #e2e8f0; }
html.kip-dark .box,
html.kip-dark .info-box,
html.kip-dark .small-box,
html.kip-dark .modal-content,
html.kip-dark .dropdown-menu,
html.kip-dark .panel,
html.kip-dark .well,
html.kip-dark .tw-bg-white,
html.kip-dark [class*="tw-bg-white"] {
  background-color: #111a2e !important;
  color: #e2e8f0 !important;
  border-color: #1f2a40 !important;
}
html.kip-dark .box-header,
html.kip-dark .modal-header,
html.kip-dark .modal-footer,
html.kip-dark .box-footer { border-color: #1f2a40 !important; }
html.kip-dark .tw-bg-gray-50,
html.kip-dark .tw-bg-gray-100 { background-color: #0f1729 !important; }
html.kip-dark .tw-text-gray-900,
html.kip-dark .tw-text-gray-800,
html.kip-dark .tw-text-gray-700,
html.kip-dark .content-header h1,
html.kip-dark h1, html.kip-dark h2, html.kip-dark h3,
html.kip-dark h4, html.kip-dark h5, html.kip-dark h6 { color: #f1f5f9 !important; }
html.kip-dark .tw-text-gray-600,
html.kip-dark .tw-text-gray-500,
html.kip-dark .text-muted,
html.kip-dark small { color: #94a3b8 !important; }
html.kip-dark .tw-border-gray-200,
html.kip-dark .tw-border-gray-300,
html.kip-dark table,
html.kip-dark th, html.kip-dark td { border-color: #1f2a40 !important; }
html.kip-dark table thead th { background: #0f1729; color: #cbd5e1; }
html.kip-dark table tbody tr:hover { background: #15213a; }
html.kip-dark .form-control,
html.kip-dark select.form-control,
html.kip-dark .select2-container--default .select2-selection--single,
html.kip-dark .select2-container--default .select2-selection--multiple,
html.kip-dark .input-group-addon {
  background-color: #0b1424 !important;
  color: #e2e8f0 !important;
  border-color: #2a3852 !important;
}
html.kip-dark .form-control::placeholder { color: #64748b; }
html.kip-dark .select2-dropdown { background: #111a2e; border-color: #2a3852; color: #e2e8f0; }
html.kip-dark .select2-results__option { color: #cbd5e1; }
html.kip-dark .select2-results__option--highlighted { background: #1e3a8a !important; color: #fff !important; }
html.kip-dark .dropdown-menu > li > a { color: #cbd5e1; }
html.kip-dark .dropdown-menu > li > a:hover { background: #15213a; color: #fff; }
html.kip-dark .nav-tabs > li > a { color: #94a3b8; }
html.kip-dark .nav-tabs > li.active > a { background: #111a2e; color: #e2e8f0; border-color: #1f2a40 #1f2a40 transparent; }
html.kip-dark .main-footer { background: #0b1220 !important; color: #94a3b8; border-color: #1f2a40; }
html.kip-dark a { color: #93c5fd; }
html.kip-dark .btn-default { background: #1e293b; color: #e2e8f0; border-color: #334155; }
html.kip-dark .alert { border-color: transparent; }
html.kip-dark .swal2-popup, html.kip-dark .swal-modal { background: #111a2e !important; color: #e2e8f0 !important; }

/* sidebar in dark mode (original sidebar design) */
html.kip-dark .side-bar { background: #0f172a !important; box-shadow: none !important; border-right: 1px solid #1f2a40; }
html.kip-dark .sb-search { background: #0f172a; }
html.kip-dark .sb-search input { background: #0b1424; border-color: #2a3852; color: #e2e8f0; }
html.kip-dark .sb-search input:focus { background: #0b1424; border-color: #3b82f6; }
html.kip-dark #side-bar > a,
html.kip-dark #side-bar .drop_down { color: #cbd5e1; }
html.kip-dark #side-bar > a:hover,
html.kip-dark #side-bar .drop_down:hover { background: #1e293b; color: #fff; }
html.kip-dark #side-bar > a.tw-bg-gray-200 { background: rgba(59,130,246,.22) !important; color: #93c5fd !important; }
html.kip-dark #side-bar > div.tw-bg-gray-200 { background: #111a2e !important; box-shadow: inset 0 0 0 1px #1f2a40; }
html.kip-dark #side-bar .chiled a { color: #94a3b8; }
html.kip-dark #side-bar .chiled a:hover { background: #1e293b; color: #fff; }
html.kip-dark #side-bar .chiled a.tw-text-primary-700 { background: rgba(59,130,246,.18); color: #93c5fd; }
html.kip-dark #side-bar .chiled > div:first-child { background: #1f2a40 !important; }
html.kip-dark #side-bar > div.tw-uppercase { color: #64748b; }

/* theme toggle button (header) */
#kip-theme-toggle { cursor: pointer; }
#kip-theme-toggle:hover { background: rgba(255,255,255,.18) !important; }

/* ---------- Mobile / small screens ---------- */
@media (max-width: 640px) {
  .content { padding-left: 10px; padding-right: 10px; }
  .content-header { padding: 10px 12px; }
  .content-header h1 { font-size: 18px; }
  .box { border-radius: 12px; }
  .box-header .box-title { font-size: 15px; }
  .info-box { min-height: 70px; }
  .modal-dialog { margin: 8px; }
}

/* =====================================================================
   v7: professional dashboard + complete dark mode
   ===================================================================== */
.side-bar { box-shadow: none !important; }

body, .content, .content-header, .box, .modal-content {
  font-family: "Inter", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.content-wrapper { background-color: #f4f6fb; }
.content { padding-top: 16px; }
.content-header { padding: 18px 20px 6px; }
.content-header h1 { font-size: 22px; color: #0f172a; }
.content-header small { color: #64748b; }

/* cards (dashboard tiles, widgets) */
.content .tw-bg-white.tw-rounded-xl {
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06) !important;
}
.content .tw-bg-white.tw-rounded-xl:hover { box-shadow: 0 4px 12px rgba(16,24,40,.08) !important; }

/* light-mode tint badges (red/green/blue ... 100) stay readable */
.content [class*="tw-bg-red-100"] { background-color: #fee2e2; }

/* ---------- complete dark mode ---------- */
html.kip-dark .content-wrapper { background-color: #0b1220 !important; }
html.kip-dark .content-header h1 { color: #f8fafc; }
html.kip-dark .content-header small { color: #94a3b8; }
html.kip-dark .content [class*="bg-white"],
html.kip-dark .modal-content [class*="bg-white"],
html.kip-dark .dropdown-menu,
html.kip-dark .popover,
html.kip-dark .tooltip-inner {
  background-color: #111a2e !important;
  color: #e2e8f0 !important;
}
html.kip-dark .content [class*="bg-gray-50"],
html.kip-dark .content [class*="bg-gray-100"],
html.kip-dark .content [class*="bg-slate-50"],
html.kip-dark .content [class*="bg-slate-100"] { background-color: #0f1729 !important; }
html.kip-dark .content [class*="bg-red-100"]    { background-color: rgba(239,68,68,.16) !important; }
html.kip-dark .content [class*="bg-green-100"]  { background-color: rgba(34,197,94,.16) !important; }
html.kip-dark .content [class*="bg-blue-100"],
html.kip-dark .content [class*="bg-sky-100"]    { background-color: rgba(59,130,246,.16) !important; }
html.kip-dark .content [class*="bg-yellow-100"],
html.kip-dark .content [class*="bg-amber-100"]  { background-color: rgba(245,158,11,.16) !important; }
html.kip-dark .content [class*="bg-indigo-100"],
html.kip-dark .content [class*="bg-purple-100"] { background-color: rgba(139,92,246,.16) !important; }
html.kip-dark .content [class*="text-gray-900"],
html.kip-dark .content [class*="text-gray-800"],
html.kip-dark .content [class*="text-gray-700"],
html.kip-dark .content [class*="text-slate-900"],
html.kip-dark .content [class*="text-slate-800"] { color: #f1f5f9 !important; }
html.kip-dark .content [class*="text-gray-600"],
html.kip-dark .content [class*="text-gray-500"],
html.kip-dark .content [class*="text-gray-400"],
html.kip-dark .content [class*="text-slate-500"] { color: #94a3b8 !important; }
html.kip-dark .content [class*="border-gray-"],
html.kip-dark .content [class*="ring-gray-"] { border-color: #1f2a40 !important; --tw-ring-color: #1f2a40 !important; }
html.kip-dark .modal-content [class*="text-gray-"] { color: #cbd5e1 !important; }
html.kip-dark .modal-header, html.kip-dark .modal-footer { background: #111a2e; border-color: #1f2a40; }
html.kip-dark .modal-title { color: #f1f5f9; }
html.kip-dark .close { color: #cbd5e1; text-shadow: none; }
html.kip-dark .nav-tabs { border-color: #1f2a40; }
html.kip-dark .nav-tabs > li > a:hover { background: #15213a; }
html.kip-dark .breadcrumb { background: transparent; }
html.kip-dark .label-default, html.kip-dark .badge { color: #e2e8f0; }
html.kip-dark input[type="checkbox"], html.kip-dark input[type="radio"] { accent-color: #3b82f6; }
html.kip-dark ::-webkit-scrollbar-thumb { background: #334155; }
html.kip-dark ::-webkit-scrollbar-track { background: transparent; }

/* smoother theme switch */
html, body, .content-wrapper, .box, .tw-bg-white { transition: background-color .2s ease, color .2s ease; }
