:root {
  --bg: #eef6fb;
  --panel: #ffffff;
  --panel-soft: #f6fbfd;
  --ink: #102033;
  --muted: #64748b;
  --line: #d9e7ee;
  --primary: #0f6fb7;
  --primary-2: #13b8d4;
  --ok: #0f9f6e;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 24px 70px rgb(15 32 51 / 12%);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgb(19 184 212 / 18%), transparent 30%),
    radial-gradient(circle at 88% 8%, rgb(15 111 183 / 18%), transparent 32%),
    linear-gradient(135deg, #eef6fb, #f8fbff);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0;
  color: #0f6fb7;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.primary-button,
.ghost-button,
.danger-button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 900;
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #ffffff;
  box-shadow: 0 16px 34px rgb(15 111 183 / 22%);
}

.ghost-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.danger-button {
  background: #fff1f2;
  color: #be123c;
}

.panel-login {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 480px);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
  min-height: 100vh;
  padding: clamp(18px, 5vw, 70px);
}

.login-art {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-height: 560px;
  border: 1px solid rgb(15 111 183 / 14%);
  border-radius: 34px;
  padding: 28px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgb(9 30 66 / 92%), rgb(7 95 138 / 82%)),
    repeating-linear-gradient(90deg, transparent 0 68px, rgb(255 255 255 / 8%) 69px 70px);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.login-art::before {
  content: "SYSTEM ZOW";
  position: absolute;
  left: 34px;
  top: 34px;
  color: rgb(255 255 255 / 18%);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 950;
  line-height: 0.82;
  letter-spacing: -0.08em;
}

.login-art .orb {
  position: absolute;
  right: 12%;
  top: 16%;
  width: min(360px, 38vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #ffffff, transparent 9%),
    conic-gradient(from 140deg, #10b981, #06b6d4, #2563eb, #10b981);
  filter: drop-shadow(0 30px 80px rgb(6 182 212 / 32%));
  opacity: 0.86;
}

.login-art article {
  position: relative;
  z-index: 1;
  align-self: end;
  min-height: 150px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 22px;
  padding: 18px;
  background: rgb(255 255 255 / 10%);
  backdrop-filter: blur(14px);
}

.login-art span,
.login-art small {
  color: rgb(255 255 255 / 78%);
}

.login-art strong {
  display: block;
  margin: 18px 0 8px;
  font-size: 1.35rem;
}

.login-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: clamp(22px, 3vw, 34px);
  background: rgb(255 255 255 / 88%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card img {
  width: 160px;
}

.login-card h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.95;
}

.login-card > span,
.login-card label {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: var(--ink);
}

.login-card input,
.panel-form input,
.panel-form select,
.panel-form textarea {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--ink);
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-weight: 900;
}

.panel-shell {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  min-height: 100vh;
}

.panel-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  gap: 22px;
  height: 100vh;
  padding: 22px;
  background:
    radial-gradient(circle at 20% 0%, rgb(19 184 212 / 18%), transparent 34%),
    linear-gradient(180deg, #071b34, #0d263f);
  color: #ffffff;
}

.panel-brand {
  display: grid;
  gap: 10px;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
  font-weight: 950;
}

.panel-brand img {
  width: 164px;
  border-radius: 16px;
  padding: 8px;
  background: #ffffff;
}

.panel-nav {
  display: grid;
  gap: 8px;
}

.panel-nav button {
  min-height: 46px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 14px;
  padding: 0 14px;
  background: rgb(255 255 255 / 5%);
  color: #dceeff;
  text-align: left;
  font-weight: 900;
}

.panel-nav button:hover,
.panel-nav button.is-active {
  background: linear-gradient(135deg, #0f6fb7, #13b8d4);
  color: #ffffff;
}

.sidebar-note {
  display: grid;
  gap: 6px;
  margin-top: auto;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 18px;
  padding: 14px;
  background: rgb(255 255 255 / 6%);
}

.sidebar-note span {
  color: #b9d6e8;
  font-size: 0.85rem;
  line-height: 1.45;
}

.panel-workspace {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
  padding: clamp(18px, 2.6vw, 34px);
}

.panel-topbar,
.panel-card,
.company-card,
.panel-alert,
.panel-form,
.system-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 18px 50px rgb(15 32 51 / 8%);
}

.panel-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.panel-topbar h1 {
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 2.4vw, 2.6rem);
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

#userBadge {
  border-radius: 999px;
  padding: 10px 13px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 950;
}

.panel-content {
  display: grid;
  gap: 18px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-radius: 30px;
  padding: clamp(22px, 3vw, 38px);
  background:
    linear-gradient(135deg, #071b34, #123b72 54%, #13b8d4),
    repeating-linear-gradient(90deg, transparent 0 78px, rgb(255 255 255 / 7%) 79px 80px);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  margin: 6px 0;
  font-size: clamp(2.1rem, 4vw, 4.8rem);
  line-height: 0.92;
}

.hero-panel span {
  color: rgb(255 255 255 / 82%);
  font-weight: 850;
}

.hero-badge {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 34px;
  background: rgb(255 255 255 / 12%);
  backdrop-filter: blur(16px);
  font-weight: 950;
}

.metric-grid,
.system-grid,
.company-grid,
.quick-grid {
  display: grid;
  gap: 14px;
}

.metric-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.quick-grid,
.system-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.company-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.metric-card,
.panel-card,
.system-card,
.company-card {
  padding: 16px;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
}

.metric-card span,
.system-card span,
.company-card span,
.panel-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.metric-card strong {
  font-size: 2rem;
}

.panel-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-section-head h2 {
  margin: 4px 0 0;
}

.company-card {
  display: grid;
  gap: 14px;
}

.company-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.company-head h3 {
  margin: 4px 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 10px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.75rem;
  font-weight: 950;
}

.pill.ok {
  background: #dcfce7;
  color: #166534;
}

.pill.danger {
  background: #fee2e2;
  color: #991b1b;
}

.company-stats,
.card-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.company-stats article,
.card-list article {
  display: grid;
  gap: 4px;
  border-radius: 14px;
  padding: 10px;
  background: var(--panel-soft);
}

.company-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.panel-form label,
.system-checks label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 850;
}

.panel-form .span-2 {
  grid-column: span 2;
}

.system-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.system-checks label {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #ffffff;
}

.panel-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
}

.panel-table th,
.panel-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px;
  text-align: left;
}

.panel-table th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.panel-alert {
  padding: 14px 16px;
  color: #075985;
  font-weight: 900;
}

@media (max-width: 1080px) {
  .panel-shell {
    grid-template-columns: 1fr;
  }

  .panel-sidebar {
    position: static;
    height: auto;
  }

  .panel-nav {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .metric-grid,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .panel-login,
  .metric-grid,
  .form-grid,
  .company-stats,
  .card-list,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .login-art {
    min-height: 320px;
    grid-template-columns: 1fr;
  }

  .panel-form .span-2 {
    grid-column: span 1;
  }

  .panel-topbar {
    align-items: stretch;
    flex-direction: column;
  }
}
