:root {
  --delta-blue: #0a78e6;
  --delta-blue-dark: #0758b8;
  --delta-red: #ef1841;
  --delta-green: #07a874;
  --delta-navy: #071425;
  --delta-navy-2: #0d2038;
  --delta-bg: #f4f7fb;
  --delta-border: #e5eaf1;
  --delta-text: #1b2b40;
  --delta-muted: #738198;
  --sidebar-width: 270px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--delta-text);
  background: var(--delta-bg);
}

/* LOGIN */
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 20%, rgba(10,120,230,.18), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(7,168,116,.16), transparent 26%),
    linear-gradient(135deg, #03101e 0%, #081b31 52%, #061523 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.07);
}
.login-page::before { top: -220px; right: -130px; }
.login-page::after { left: -200px; bottom: -250px; }
.login-shell { min-height: 100vh; position: relative; z-index: 1; }
.login-brand-panel {
  color: #fff;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-brand-panel .brand-logo {
  width: min(410px, 80%);
  filter: drop-shadow(0 18px 35px rgba(0,0,0,.3));
}
.login-brand-panel h1 { font-weight: 800; letter-spacing: -.035em; }
.login-brand-panel p { color: rgba(255,255,255,.72); max-width: 560px; font-size: 1.05rem; }
.feature-chip {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  padding: .55rem .8rem;
  border-radius: 999px;
  color: rgba(255,255,255,.85);
  font-size: .88rem;
}
.login-card {
  width: min(460px, 100%);
  border: 0;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  padding: 2.25rem;
}
.login-card .mini-logo { width: 92px; }
.form-control, .form-select {
  border-color: #dce3ec;
  border-radius: 12px;
  min-height: 48px;
}
.form-control:focus, .form-select:focus {
  border-color: rgba(10,120,230,.65);
  box-shadow: 0 0 0 .22rem rgba(10,120,230,.12);
}
.btn-delta {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--delta-blue), var(--delta-blue-dark));
  box-shadow: 0 10px 22px rgba(10,120,230,.25);
  border-radius: 12px;
  min-height: 48px;
  font-weight: 700;
}
.btn-delta:hover { color: #fff; filter: brightness(1.05); }

/* DASHBOARD */
.app-layout { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #061425 0%, #0b2036 100%);
  color: #fff;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  box-shadow: 14px 0 40px rgba(5,20,37,.08);
}
.sidebar-brand {
  min-height: 112px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-brand img { width: 105px; height: 82px; object-fit: contain; }
.sidebar-brand .brand-copy small { color: rgba(255,255,255,.58); }
.sidebar-brand .brand-copy strong { font-size: 1.05rem; letter-spacing: .02em; }
.sidebar-nav { padding: 1.25rem .9rem; overflow-y: auto; }
.sidebar-label {
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
  font-size: .68rem;
  letter-spacing: .16em;
  padding: .8rem .75rem .45rem;
  font-weight: 700;
}
.sidebar .nav-link {
  color: rgba(255,255,255,.72);
  border-radius: 12px;
  padding: .78rem .85rem;
  margin-bottom: .25rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  font-weight: 600;
}
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar .nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(10,120,230,.96), rgba(10,120,230,.62));
  box-shadow: 0 8px 20px rgba(10,120,230,.16);
}
.sidebar-footer { margin-top: auto; padding: 1rem; border-top: 1px solid rgba(255,255,255,.07); }
.main-content { margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar {
  height: 76px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--delta-border);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
}
.content-wrapper { padding: 1.5rem; }
.page-title h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.025em; margin: 0; }
.page-title p { margin: .2rem 0 0; color: var(--delta-muted); }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--delta-blue), var(--delta-green));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.card-soft {
  border: 1px solid var(--delta-border);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(20,43,70,.05);
}
.metric-card { position: relative; overflow: hidden; }
.metric-card::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  right: -25px;
  top: -25px;
  background: var(--metric-bg, rgba(10,120,230,.08));
}
.metric-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--metric-bg, rgba(10,120,230,.1));
  color: var(--metric-color, var(--delta-blue));
  font-size: 1.2rem;
}
.metric-value { font-size: 1.65rem; font-weight: 800; }
.metric-label { color: var(--delta-muted); font-size: .88rem; }
.search-hero {
  border: 0;
  border-radius: 22px;
  color: white;
  background:
    linear-gradient(115deg, rgba(3,16,30,.12), rgba(3,16,30,.05)),
    linear-gradient(135deg, #0866ca 0%, #0a78e6 55%, #07976f 125%);
  box-shadow: 0 16px 34px rgba(8,102,202,.18);
}
.search-box {
  background: #fff;
  border-radius: 16px;
  padding: .45rem;
  display: flex;
  gap: .45rem;
}
.search-box .form-control { border: 0; min-height: 50px; box-shadow: none; }
.search-box .btn { border-radius: 12px; min-width: 130px; }

.modal-content {
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 26px 60px rgba(7, 20, 37, 0.18);
}
.modal-dialog.modal-lg {
  max-width: 980px;
}
.modal-header {
  background: linear-gradient(135deg, #0866ca 0%, #0a78e6 55%, #07976f 125%);
  color: #fff;
  border-bottom: 0;
  padding: 1.15rem 1.4rem;
}
.modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 1;
}
.modal-title {
  font-weight: 800;
  letter-spacing: -.02em;
}
.modal-body {
  padding: 1.4rem;
  background: #f8fbff;
}
.modal-footer {
  border-top: 1px solid #e7edf5;
  background: #fff;
  padding: 1rem 1.4rem;
}
.modal-card {
  background: #fff;
  border: 1px solid var(--delta-border);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(20,43,70,.05);
}
.company-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.status-badge { border-radius: 999px; padding: .38rem .65rem; font-size: .76rem; font-weight: 700; }
.quick-action {
  border: 1px solid var(--delta-border);
  background: #fff;
  border-radius: 16px;
  padding: 1rem;
  text-decoration: none;
  color: var(--delta-text);
  transition: transform .15s ease, box-shadow .15s ease;
  height: 100%;
  display: block;
}
.quick-action:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(20,43,70,.08); color: var(--delta-text); }
.quick-action .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: .8rem;
}
.table > :not(caption) > * > * { padding: .9rem .75rem; border-bottom-color: #edf1f5; }
.table thead th { color: var(--delta-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }

.mobile-brand img { width: 50px; height: 50px; object-fit: contain; }
.offcanvas.offcanvas-start { width: var(--sidebar-width); background: #061425; color: white; }

@media (max-width: 991.98px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .topbar { height: 68px; padding: 0 1rem; }
  .content-wrapper { padding: 1rem; }
  .page-title h2 { font-size: 1.25rem; }
  .search-box { flex-direction: column; }
  .search-box .btn { min-height: 48px; width: 100%; }
}

@media (max-width: 575.98px) {
  .login-card { border-radius: 22px; padding: 1.5rem; }
  .metric-value { font-size: 1.4rem; }
  .content-wrapper { padding: .85rem; }
}
