:root {
  --brand-navy: #03112f;
  --brand-blue: #075cff;
  --brand-cyan: #19c2ff;
  --brand-surface: #f7fbff;
  --brand-surface-strong: #eef7ff;
  --brand-border: #dcecff;
  --navy-950: var(--brand-navy);
  --navy-900: #061b4c;
  --navy-800: #082a68;
  --blue-700: var(--brand-blue);
  --blue-600: #0b73ff;
  --cyan-500: #00a8ff;
  --cyan-400: var(--brand-cyan);
  --ink: #101828;
  --muted: #64748b;
  --line: #d8e5f5;
  --surface: #ffffff;
  --surface-soft: #f5f9ff;
  --success: #15803d;
  --success-bg: #dcfce7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(25, 194, 255, 0.18), transparent 28rem),
    linear-gradient(135deg, var(--brand-surface) 0%, var(--brand-surface-strong) 100%);
}

a {
  color: inherit;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card,
.panel,
.stat-card,
.user-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 55px rgba(3, 17, 47, 0.08);
}

.login-card {
  width: min(480px, 100%);
  overflow: hidden;
}

.login-header {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(3, 17, 47, 0.98), rgba(7, 92, 255, 0.94)),
    var(--navy-950);
  color: #ffffff;
}

.brand-inline {
  display: grid;
  gap: 10px;
}

.brand-inline img {
  display: block;
  width: min(100%, 220px);
  max-width: 220px;
  max-height: 78px;
  height: auto;
  margin: 0 auto;
  padding: 10px 12px;
  border-radius: 12px;
  object-fit: contain;
  background: linear-gradient(135deg, #ffffff 0%, #f4faff 100%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.brand-inline span {
  color: #c8e8ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

form {
  display: grid;
  gap: 14px;
}

.login-card form,
.panel {
  padding: 22px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(11, 115, 255, 0.14);
  outline: none;
}

textarea {
  min-height: 88px;
  padding-top: 10px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-700), var(--cyan-500));
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(7, 92, 255, 0.22);
}

button:hover,
.button:hover {
  filter: brightness(1.03);
}

.button.secondary,
.logout-button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.button.secondary-light {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--blue-700);
  box-shadow: none;
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 13px;
}

.alert {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
}

.alert.success {
  background: var(--success-bg);
  color: var(--success);
}

.alert.error {
  background: var(--danger-bg);
  color: var(--danger);
}

.app-shell {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100vh;
  padding: 22px 16px;
  background:
    linear-gradient(180deg, rgba(3, 17, 47, 0.98), rgba(7, 92, 255, 0.94)),
    var(--navy-950);
  color: #ffffff;
}

.brand {
  display: grid;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  text-decoration: none;
}

.brand-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 232px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f4faff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.brand-logo-card img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 56px;
  height: auto;
  object-fit: contain;
}

.brand-caption {
  color: #dcefff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.sidebar nav a {
  min-height: 42px;
  padding: 11px 12px;
  border-radius: 8px;
  color: #d8ecff;
  text-decoration: none;
}

.sidebar nav a:hover,
.sidebar nav a:focus-visible {
  background: rgba(25, 194, 255, 0.18);
  color: #ffffff;
}

.sidebar form {
  margin-top: auto;
}

.workspace {
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar-controls {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.company-switcher {
  min-width: 270px;
}

.company-switcher label {
  color: var(--blue-700);
  font-size: 12px;
  text-transform: uppercase;
}

.context-line {
  margin: 6px 0 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--navy-950);
  font-size: 30px;
  letter-spacing: 0;
}

h2 {
  color: var(--navy-950);
  font-size: 18px;
}

.user-box {
  min-width: 190px;
  padding: 10px 12px;
}

.user-box strong,
.user-box span {
  display: block;
}

.user-box span {
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-700), var(--cyan-500));
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--navy-950);
  font-size: 30px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 34px;
  border-bottom: 1px solid #e5eefb;
}

.detail-list span {
  color: var(--muted);
  font-size: 13px;
}

.detail-list strong {
  color: var(--navy-950);
  text-align: right;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid #e5eefb;
  color: #344054;
  font-size: 14px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.table-wrap {
  overflow-x: auto;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(25, 194, 255, 0.16);
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 860px) {
  .app-shell,
  .split-grid,
  .grid,
  .form-grid,
  .topbar {
    display: block;
  }

  .sidebar {
    min-height: auto;
  }

  .brand-logo-card img {
    max-width: 220px;
  }

  .panel,
  .stat-card {
    margin-bottom: 14px;
  }

  .topbar-controls {
    display: block;
    margin-top: 14px;
  }

  .company-switcher,
  .user-box {
    margin-bottom: 10px;
    min-width: 100%;
  }
}
