:root {
  --bg-body: #0b1120;
  --bg-sidebar: #0d1424;
  --bg-card: #111a2e;
  --bg-card-hover: #141f38;
  --bg-elevated: #182136;
  --border-subtle: #1e293f;
  --border-strong: #26314d;
  --text-primary: #f2f4f8;
  --text-secondary: #8b95ab;
  --text-muted: #5f6a83;
  --accent: #3b6df6;
  --accent-soft: rgba(59, 109, 246, 0.15);
  --accent-hover: #5580ff;
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --warning: #eab308;
  --warning-soft: rgba(234, 179, 8, 0.15);
  --pending: #8b95ab;
  --pending-soft: rgba(139, 149, 171, 0.14);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --sidebar-width: 264px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.02);
  --muted: #5f6a83;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body.login {
  font-family: Inter, system-ui, sans-serif;
  margin: 0;
  color: var(--text);
  background: url('http://portal.teamtask.in/img/bg/1.jpg');
  /*background:
    radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.18), transparent 35%), radial-gradient(circle at 85% 80%, rgba(79, 70, 229, 0.15), transparent 35%),
    linear-gradient(135deg, #f8fbff, #eef4ff 45%, #f8fafc);*/
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow: hidden;
}
body.login::before,
body.login::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
}
body.login::before {
  left: -120px;
  top: -120px;
  background: rgba(37, 99, 235, 0.15);
}
body.login::after {
  right: -120px;
  bottom: -120px;
  background: rgba(79, 70, 229, 0.18);
}
.content {
  width: 100%;
  max-width: 460px;
  background: rgba(220, 237, 255, 0.11);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(47, 92, 234, 0.08);
  border-radius: 28px;
  padding: 40px;
  box-shadow: var(--shadow);
}
.new-style {
  text-align: center;
  margin-bottom: 24px;
}
.new-style img {
  max-width: 180px;
}
.form-title {
  text-align: center;
  color: var(--text) !important;
  font-size: 2rem;
  margin: 0 0 8px;
  font-weight: 700;
}
.form-title::after {
  content: "Sign in to continue";
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
  margin-top: 8px;
}
.control-group {
  margin-bottom: 20px;
}
.control-label {
  display: none;
}
.controls {
  width: 100%;
}
.input-icon {
  position: relative;
}
.input-icon.left i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  color: var(--muted);
  z-index: 2;
}

.m-wrap {
  width: 100%;
  height: 56px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 18px 0 48px;
  font-size: 15px;
  outline: none;
  transition: var(--transition);
  background: #fff;
}
.m-wrap:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.12);
}
.form-actions {
  margin-top: 28px;
}

.create-new {
  color: #0d6efd !important;
}
#btnLogin {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 14px;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.25);
}
#btnLogin:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.35);
}
#btnLogin i {
  display: none;
}
.pull-right {
  float: none !important;
}
.light-green {
  background: none;
}
.alert {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.alert-error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.hide {
  display: none !important;
}
.copyright {
  text-align: center;
  margin-top: 24px;
  color: var(--muted) !important;
  font-size: 0.8rem;
}
.text-center {
  text-align: center;
  margin-top: 14px;
}
.text-center a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.text-center a:hover {
  text-decoration: underline;
}
#img1 {
  display: none !important;
}
input::placeholder {
  color: #9ca3af;
}
@media (max-width: 576px) {
  .content {
    padding: 28px 22px;
    border-radius: 20px;
  }
  .form-title {
    font-size: 1.7rem;
  }
}

/* ==========================
   Alert Base
========================== */

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

/* ==========================
   Error Alert
========================== */
.help-inline {
  color: #b91c1c;
}

.alert-danger,
.alert-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* ==========================
   Success Alert
========================== */

.alert-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

/* ==========================
   Warning Alert
========================== */

.alert-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

/* ==========================
   Info Alert
========================== */

.alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

/* ==========================
   Icon
========================== */

.alert i {
  font-size: 18px;
  flex-shrink: 0;
}

/* ==========================
   Close Button (Optional)
========================== */

.alert .btn-close {
  margin-left: auto;
  opacity: 0.6;
}

.alert .btn-close:hover {
  opacity: 1;
}

/* ==========================
   Hidden
========================== */

.hide,
.d-none {
  display: none !important;
}

/* ==========================
   Animation
========================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.navbar-brand img {
  width: 200px;
}

body {
  background: var(--bg-body);
  color: var(--text-primary);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 0.9375rem;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- Topbar ---------- */
.topbar {
  height: 72px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.brand img {
  width: 200px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  background: linear-gradient(145deg, var(--accent), #274fd6);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(59, 109, 246, 0.35);
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.search-field {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0.55rem 0.9rem 0.55rem 2.6rem;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}
.search-field::placeholder {
  color: var(--text-muted);
}
.search-field:focus {
  background: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  color: var(--text-primary);
}
.search-wrap {
  position: relative;
}
.search-wrap .bi-search {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  position: relative;
}
.icon-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.notif-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-sidebar);
}

.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.user-menu-btn {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.3rem 0.5rem 0.3rem 0.3rem;
  transition: all 0.15s ease;
}
.user-menu-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  padding: 1.5rem 1rem;
  overflow-y: auto;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.2rem;
  transition: all 0.15s ease;
  font-size: 0.9rem;
}
.nav-link-item i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}
.nav-link-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.nav-link-item.active {
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 600;
}
.nav-link-item.active i {
  color: var(--accent-hover);
}

.sidebar-toggle {
  display: none;
}

/* ---------- Main ---------- */
.main-content {
  padding: 1.75rem;
  min-width: 0;
}

/* ---------- Stat cards ---------- */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  height: 100%;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.stat-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  font-size: 1.1rem;
}
.stat-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border-radius: 20px;
}
.stat-badge.up {
  background: var(--success-soft);
  color: var(--success);
}
.stat-badge.down {
  background: var(--danger-soft);
  color: var(--danger);
}
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 0.9rem;
}
.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.2rem;
}

/* ---------- Panels ---------- */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  height: 100%;
}
.panel-title {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.panel-subtitle {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.chip-metric {
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
}

/* ---------- Table panel ---------- */
.filter-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}
.filter-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

table.dataTable {
  color: var(--text-primary);
}
table.dataTable thead th {
  color: var(--text-muted) !important;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle) !important;
  padding: 0.85rem 1rem !important;
  background: transparent !important;
}
table.dataTable tbody td {
  border-bottom: 1px solid var(--border-subtle) !important;
  padding: 1rem !important;
  vertical-align: middle;
  background: transparent !important;
}
table.dataTable tbody tr {
  transition: background 0.15s ease;
}
table.dataTable tbody tr:hover {
  background: var(--bg-elevated) !important;
}
table.dataTable tbody tr:last-child td {
  border-bottom: none !important;
}

.case-id-link {
  color: var(--accent-hover);
  font-weight: 700;
}
.case-id-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.location-cell {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.location-cell i {
  color: var(--danger);
  margin-right: 0.25rem;
}
.time-cell {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  display: inline-block;
}
.status-completed {
  background: var(--success-soft);
  color: var(--success);
}
.status-progress {
  background: var(--warning-soft);
  color: var(--warning);
}
.status-pending {
  background: var(--pending-soft);
  color: var(--pending);
}

/* dataTables built-ins, dark override */
/*.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
  display: none;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  color: var(--text-muted) !important;
  font-size: 0.82rem;
  padding-top: 1rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  color: var(--text-secondary) !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid transparent !important;
  padding: 0.3rem 0.7rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--accent-soft) !important;
  color: var(--accent-hover) !important;
  border-color: var(--accent-soft) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}

*/
.dataTables_wrapper .dataTables_paginate {
    text-align:right;
    float: right;
    margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_paginate ul{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:8px;
    list-style:none;
    margin:0;
    padding:0;
}

.dataTables_wrapper .dataTables_paginate ul li{
    list-style:none;
}

.dataTables_wrapper .dataTables_paginate ul li a{
    display:block;
    padding:6px 12px;
    color:#fff;
    text-decoration:none;
    background:#22284d;
    border:1px solid #3b4470;
    border-radius:6px;
}

.dataTables_wrapper .dataTables_paginate ul li.active a{
    background:#0d6efd;
    border-color:#0d6efd;
    color:#fff;
}

.dataTables_wrapper .dataTables_paginate ul li.disabled a{
    opacity:.5;
    pointer-events:none;
}

.dataTables_wrapper .dataTables_paginate ul li a:hover{
    background:#0d6efd;
    color:#fff;
}
/* ---------- Offcanvas sidebar (mobile) ---------- */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1045;
    padding-top: 1.5rem;
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1040;
  }
  .sidebar-backdrop.show {
    display: block;
  }
  .sidebar-toggle {
    display: flex;
  }
  .search-wrap {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .brand-name {
    display: none;
  }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 8px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* dashboard */

#addCaseDrawer {
  width: 650px;
}

.error {
  color: red !important;
}

table tr td {
  color: #fff !important;
}

@media (max-width: 768px) {
  #addCaseDrawer {
    width: 100%;
  }
}
.footer {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  color: #ffffff4f;
  padding-left: 27px;
  font-size: 14px;
}

.control-group {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.control-group .form-label {
  width: 220px;
  margin-bottom: 0;
  font-weight: 600;
  color: #62738a;
  padding-right: 20px;
  flex-shrink: 0;
}

.control-group .controls {
  flex: 1;
}

.control-group .form-control,
.control-group .form-select {
  width: 100%;
}

.control-group .help-inline {
  display: block;
  margin-top: 6px;
}

@media (max-width: 767px) {
  .control-group {
    display: block;
  }

  .control-group .form-label {
    width: 100%;
    margin-bottom: 8px;
    padding-right: 0;
  }
  .brand img {
    width: 100px;
  }
  .avatar-circle {
    height: 27px;
  }
}

#trackajax {
  display: block;
  color: #f25b5b;
  background: #ff00001c;
  border-radius: 5px;
  padding: 4px 20px;
  font-size: 15px !important;
  border: 1px solid #4c0000;
}

#trackajax h3 {
  font-size: 18px;
  margin: 0px;
  padding: 0px;
}
@media (min-width: 998px) {
  .sidebar {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
  }
}
