:root {
  --argus-bg:#07111f;
  --argus-surface:#0e1d30;
  --argus-surface-2:#142840;
  --argus-border:#263b53;
  --argus-text:#e5edf7;
  --argus-muted:#8da2b9;
  --argus-cyan:#42c8e8;
  --argus-green:#35c58a;
  --argus-amber:#e7ad52;
  --argus-red:#e36c75;
  --argus-radius:15px;
}

html,body {
  background:var(--argus-bg)!important;
  color:var(--argus-text);
  font-family:Inter,"Segoe UI",Roboto,sans-serif;
}

.app-shell {
  background:radial-gradient(ellipse at 75% 0%,rgba(34,105,151,.12),transparent 38%),var(--argus-bg)!important;
}

.sidebar {
  background:#091626!important;
  border-right:1px solid var(--argus-border)!important;
}

.topbar {
  background:rgba(10,23,40,.94)!important;
  border-color:var(--argus-border)!important;
}

.content,.page-view {
  min-width:0;
  width:100%;
}

.page-view {
  animation:argusPageIn .2s ease-out;
}

@keyframes argusPageIn {
  from {opacity:.7;transform:translateY(4px)}
  to {opacity:1;transform:translateY(0)}
}

.page-heading {margin-bottom:22px!important}
.page-heading h1,.page-title {color:var(--argus-text)!important;letter-spacing:-.035em}
.page-heading p,.page-description {color:var(--argus-muted)!important}

.page-view .panel {
  min-width:0;
  padding:20px!important;
  margin-bottom:18px;
  background:linear-gradient(145deg,var(--argus-surface),#0b192a)!important;
  border:1px solid var(--argus-border)!important;
  border-radius:var(--argus-radius)!important;
  box-shadow:0 12px 32px rgba(0,0,0,.19);
}

.panel-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  padding-bottom:14px;
  margin-bottom:17px;
  border-bottom:1px solid #1b3047;
}

.panel-heading h2,.panel-heading h3 {
  color:var(--argus-text)!important;
  font-size:15px;
  font-weight:700;
}

.page-view .btn,.page-view button {
  min-height:39px;
  border-radius:9px!important;
  font-weight:650;
}

.btn-primary {
  background:linear-gradient(135deg,#147da6,#2363a8)!important;
  border:1px solid #318bb8!important;
  color:white!important;
}

.btn-quiet {
  background:var(--argus-surface-2)!important;
  border:1px solid var(--argus-border)!important;
  color:var(--argus-text)!important;
}

input,select,textarea {
  min-height:42px;
  max-width:100%;
  background:#09182a!important;
  border:1px solid var(--argus-border)!important;
  border-radius:9px!important;
  color:var(--argus-text)!important;
}

input:focus,select:focus,textarea:focus {
  outline:2px solid rgba(66,200,232,.2)!important;
  border-color:var(--argus-cyan)!important;
}

label,.field-hint {color:var(--argus-muted)}

table {width:100%;border-collapse:separate;border-spacing:0}
th {
  background:#142840!important;
  color:#a9bfd5!important;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.07em;
}
td {color:var(--argus-text);border-color:#1b3047!important}
th,td {padding:12px 14px!important}
tbody tr:hover {background:rgba(66,200,232,.045)}

.empty-state {
  padding:24px!important;
  border:1px dashed #344b63!important;
  border-radius:12px;
  background:rgba(13,29,47,.65)!important;
  color:var(--argus-muted)!important;
}

/* 01 OVERVIEW */
#page-overview .v3-command-header {
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(180px,.7fr);
  align-items:center;
  gap:24px;
  min-height:180px;
  padding:clamp(20px,4vw,34px)!important;
  background:radial-gradient(circle at 80% 50%,rgba(44,163,205,.17),transparent 35%),linear-gradient(120deg,#102b45,#0b1b2e)!important;
  border:1px solid #28506d!important;
  border-radius:18px!important;
}

#page-overview .v3-command-copy {max-width:650px}
#page-overview .v3-command-art {justify-self:center;max-width:220px}

#page-overview .v3-metric-grid {
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:13px!important;
  margin:18px 0 22px;
}

#page-overview .v3-metric-card {
  min-width:0;
  padding:17px!important;
  background:linear-gradient(150deg,#142a42,#0d1d30)!important;
  border:1px solid var(--argus-border)!important;
  border-radius:14px!important;
}

#page-overview .v3-main-grid,
#page-overview .v3-bottom-grid {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:17px!important;
  margin-bottom:18px;
}

#page-overview .v3-panel {
  min-width:0;
  padding:19px!important;
  border-radius:15px!important;
  background:var(--argus-surface)!important;
  border:1px solid var(--argus-border)!important;
}

#page-overview .v3-module-grid {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px!important;
}

#page-overview .v3-module-grid button {
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  min-height:76px;
  padding:13px!important;
  text-align:left;
  background:#142840!important;
  border:1px solid var(--argus-border)!important;
  border-radius:11px!important;
}

#page-overview .v3-service-row {
  padding:12px 0;
  border-bottom:1px solid #1b3047;
}

/* 02 PHONE INTELLIGENCE */
#page-phone .phone-form {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(150px,.55fr) auto;
  align-items:end;
  gap:13px;
  padding:18px;
  background:#0a192a;
  border:1px solid #1b3047;
  border-radius:12px;
}

#page-phone .input-row {min-width:0}
#page-phone .result-panel {
  margin-top:18px;
  padding:20px;
  background:#0a192a;
  border:1px solid var(--argus-border);
  border-radius:13px;
}

#page-phone .result-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

/* 03 CASE MANAGEMENT */
#page-cases .case-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:9px;
  margin-bottom:15px;
}

#page-cases .case-table-wrap {
  overflow-x:auto;
  border:1px solid #1b3047;
  border-radius:12px;
}

#page-cases .cases-table {min-width:620px}

/* 04 EVIDENCE MANAGEMENT */
#page-evidence .case-actions {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:9px;
}

#page-evidence .setting-row {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  padding:16px;
  background:#0a192a;
  border:1px solid #1b3047;
  border-radius:12px;
}

/* 05 DEVICE RECORDS */
#page-device #s05-device-form {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  padding:18px;
  background:#0a192a;
  border:1px solid #1b3047;
  border-radius:12px;
}

#page-device #s05-device-result {margin-top:17px}

/* 06 BTS INFRASTRUCTURE */
#page-bts #s05-bts-form {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  padding:18px;
  background:#0a192a;
  border:1px solid #1b3047;
  border-radius:12px;
}

#page-bts #s05-bts-result {margin-top:17px}

#page-bts #s05-bts-note {
  padding:13px 15px;
  border-left:3px solid var(--argus-amber);
  background:rgba(231,173,82,.07);
  border-radius:7px;
}

/* 07 LOCATION INTELLIGENCE */
#page-location {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:17px;
}

#page-location > .panel {min-width:0;height:100%}
#page-location .field-hint {line-height:1.65}

/* 08 REPORT MANAGEMENT */
#page-reports .case-form {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  padding:18px;
  background:#0a192a;
  border:1px solid #1b3047;
  border-radius:12px;
}

#page-reports #reportNotes {grid-column:1/-1}
#page-reports #reportCreateBtn {justify-self:start}

/* 09 AUDIT TRAIL */
#page-audit {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:17px;
}

#page-audit > .panel {min-width:0;width:100%}

#page-audit .empty-state {
  min-height:150px;
  display:grid;
  place-content:center;
  text-align:center;
}

/* 10 SETTINGS */
#page-settings {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:17px;
}

#page-settings > .panel {min-width:0;height:100%}

#page-settings .setting-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(120px,.8fr);
  align-items:center;
  gap:12px;
  padding:13px 0;
  border-bottom:1px solid #1b3047;
}

/* Tablet */
@media(max-width:900px) {
  #page-overview .v3-metric-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  #page-overview .v3-main-grid,
  #page-overview .v3-bottom-grid {
    grid-template-columns:1fr;
  }
}

/* Android portrait */
@media(max-width:640px) {
  .content {
    padding-left:14px!important;
    padding-right:14px!important;
  }

  .page-view .panel {padding:15px!important}

  #page-overview .v3-command-header {grid-template-columns:1fr}
  #page-overview .v3-command-art {display:none}

  #page-overview .v3-module-grid {grid-template-columns:1fr 1fr}

  #page-phone .phone-form,
  #page-device #s05-device-form,
  #page-bts #s05-bts-form,
  #page-reports .case-form,
  #page-evidence .setting-row,
  #page-location,
  #page-settings {
    grid-template-columns:1fr;
  }

  #page-phone .result-grid {grid-template-columns:1fr}
  #page-reports #reportNotes {grid-column:auto}
  #page-settings .setting-row {grid-template-columns:1fr}
  .panel-heading {align-items:flex-start}
}

/* Android landscape */
@media(max-height:500px) and (orientation:landscape) {
  #page-overview .v3-command-header {min-height:125px}
  .page-heading {margin-bottom:12px!important}
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration:.01ms!important;
    transition-duration:.01ms!important;
  }
}
