:root {
  --eq-bg-0: #090d14;
  --eq-bg-1: #0f1724;
  --eq-bg-2: #121d30;
  --eq-glass: rgba(21, 33, 54, 0.78);
  --eq-glass-2: rgba(17, 28, 46, 0.86);
  --eq-border: rgba(160, 181, 214, 0.17);
  --eq-text: #edf3fb;
  --eq-muted: #9fb0cb;
  --eq-accent: #d4a843;
  --eq-accent-soft: rgba(212, 168, 67, 0.18);
  --eq-danger: #ef6d7f;
  --eq-success: #44c08f;
  --eq-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
}

body.eq-app {
  min-height: 100vh;
  margin: 0;
  color: var(--eq-text);
  font-family: "Manrope", "Inter", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1100px 650px at -20% -18%, rgba(68, 192, 143, 0.12), transparent 62%),
    radial-gradient(1200px 760px at 120% -10%, rgba(212, 168, 67, 0.14), transparent 62%),
    linear-gradient(185deg, var(--eq-bg-1), var(--eq-bg-0) 58%, #070b11);
}

a {
  color: inherit;
}

.eq-shell {
  max-width: 1340px;
  margin: 1.2rem auto;
  padding: 0 1rem 1rem;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 1rem;
}

.eq-sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
  border: 1px solid var(--eq-border);
  background: linear-gradient(160deg, var(--eq-glass), var(--eq-glass-2));
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--eq-shadow);
  backdrop-filter: blur(10px);
}

.eq-brand {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.12em;
  color: #fff;
  margin-bottom: 1rem;
}

.eq-entity-switcher {
  margin-bottom: 0.9rem;
}

.eq-entity-switcher label {
  display: grid;
  gap: 0.3rem;
  color: var(--eq-muted);
  font-size: 0.78rem;
}

.eq-entity-switcher select {
  border: 1px solid var(--eq-border);
  border-radius: 10px;
  background: rgba(8, 14, 24, 0.72);
  color: #fff;
  padding: 0.45rem 0.5rem;
  font-size: 0.84rem;
}

.eq-nav {
  display: grid;
  gap: 0.35rem;
}

.eq-nav a {
  display: block;
  padding: 0.58rem 0.7rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--eq-muted);
  font-size: 0.9rem;
  transition: all 0.18s ease;
}

.eq-nav a:hover,
.eq-nav a.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(212, 168, 67, 0.22), rgba(212, 168, 67, 0.1));
  border: 1px solid rgba(212, 168, 67, 0.35);
}

.eq-user-chip {
  margin-top: 0.95rem;
  border-top: 1px solid var(--eq-border);
  padding-top: 0.85rem;
  color: var(--eq-muted);
  font-size: 0.81rem;
}

.eq-logout {
  margin-top: 0.8rem;
}

.eq-logout button {
  width: 100%;
  border: 1px solid var(--eq-border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-radius: 10px;
  padding: 0.53rem;
  cursor: pointer;
}

.eq-main {
  border: 1px solid var(--eq-border);
  border-radius: 18px;
  background: linear-gradient(170deg, rgba(20, 31, 50, 0.92), rgba(14, 24, 40, 0.88));
  box-shadow: var(--eq-shadow);
  padding: 1rem;
  backdrop-filter: blur(8px);
}

.eq-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
}

.eq-toolbar h1 {
  margin: 0;
  font-size: 1.26rem;
  font-weight: 700;
}

.eq-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.eq-button,
.eq-form button {
  border: 1px solid rgba(212, 168, 67, 0.35);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(212, 168, 67, 0.24), rgba(212, 168, 67, 0.1));
}

.eq-button.secondary {
  border-color: var(--eq-border);
  background: rgba(255, 255, 255, 0.05);
}

.eq-button.danger {
  border-color: rgba(239, 109, 127, 0.46);
  background: rgba(239, 109, 127, 0.17);
}

.eq-notice,
.eq-error {
  border-radius: 10px;
  margin-bottom: 0.85rem;
  padding: 0.68rem 0.8rem;
  font-size: 0.86rem;
}

.eq-notice {
  background: rgba(68, 192, 143, 0.18);
  border: 1px solid rgba(68, 192, 143, 0.43);
  color: #c9f6e1;
}

.eq-error {
  background: rgba(239, 109, 127, 0.18);
  border: 1px solid rgba(239, 109, 127, 0.43);
  color: #ffd5dd;
}

.eq-grid {
  display: grid;
  gap: 0.78rem;
}

.eq-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eq-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.eq-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.eq-card {
  border: 1px solid var(--eq-border);
  border-radius: 14px;
  padding: 0.9rem;
  background: linear-gradient(180deg, rgba(22, 36, 60, 0.84), rgba(17, 29, 49, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.eq-card h2,
.eq-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.97rem;
  font-weight: 700;
}

.eq-kpi {
  font-size: 1.55rem;
  font-weight: 800;
}

.eq-kpi-sub {
  margin-top: 0.15rem;
  color: var(--eq-muted);
  font-size: 0.8rem;
}

.eq-next-steps .eq-actions {
  margin-top: 0.45rem;
}

.eq-form {
  display: grid;
  gap: 0.62rem;
}

.eq-form.inline {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}

.eq-form label {
  display: grid;
  gap: 0.28rem;
  color: var(--eq-muted);
  font-size: 0.8rem;
}

.eq-form input,
.eq-form select,
.eq-form textarea {
  border: 1px solid var(--eq-border);
  border-radius: 10px;
  background: rgba(8, 14, 24, 0.72);
  color: #fff;
  padding: 0.62rem 0.68rem;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.eq-textarea-lg {
  min-height: 220px;
}

.eq-form textarea {
  min-height: 120px;
  resize: vertical;
}

.eq-form input::placeholder,
.eq-form textarea::placeholder {
  color: rgba(159, 176, 203, 0.75);
}

.eq-wizard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.eq-valuation-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.72rem;
  align-items: end;
}

.eq-valuation-form label {
  min-width: 0;
}

.eq-valuation-form input,
.eq-valuation-form select {
  min-width: 0;
}

.eq-valuation-form button {
  width: 100%;
  white-space: nowrap;
}

.eq-form input:focus,
.eq-form select:focus,
.eq-form textarea:focus {
  outline: none;
  border-color: rgba(212, 168, 67, 0.6);
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.13);
}

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

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

.eq-table th,
.eq-table td {
  border-bottom: 1px solid var(--eq-border);
  padding: 0.54rem 0.44rem;
  text-align: left;
  font-size: 0.83rem;
}

.eq-table th {
  color: var(--eq-muted);
  font-weight: 600;
}

.eq-stack {
  display: grid;
  gap: 0.55rem;
}

.eq-bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 3fr) 70px;
  gap: 0.55rem;
  align-items: center;
}

.eq-bar-label {
  color: var(--eq-text);
  font-size: 0.84rem;
}

.eq-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--eq-border);
  overflow: hidden;
}

.eq-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(68, 192, 143, 0.95), rgba(212, 168, 67, 0.95));
}

.eq-bar-value {
  text-align: right;
  font-size: 0.8rem;
  color: var(--eq-muted);
}

.eq-chart-wrap {
  width: 100%;
  min-height: 220px;
}

.eq-chart-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--eq-border);
  border-radius: 10px;
  background: rgba(8, 14, 24, 0.45);
}

.eq-storage-filter {
  width: 100%;
  margin-bottom: 0.55rem;
  border: 1px solid var(--eq-border);
  border-radius: 10px;
  background: rgba(8, 14, 24, 0.72);
  color: #fff;
  padding: 0.48rem 0.56rem;
}

.eq-explorer {
  padding: 1rem;
}

.eq-explorer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.eq-explorer-toolbar {
  margin-bottom: 0.5rem;
}

.eq-explorer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.eq-explorer-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0.8rem;
}

.eq-explorer-tree {
  border: 1px solid var(--eq-border);
  border-radius: 10px;
  background: rgba(8, 14, 24, 0.36);
  padding: 0.55rem;
  max-height: 68vh;
  overflow: auto;
}

.eq-explorer-tree h3 {
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
  color: var(--eq-muted);
}

.eq-folder-tree-link {
  display: block;
  text-decoration: none;
  color: var(--eq-muted);
  padding: 0.32rem 0.45rem;
  border-radius: 8px;
  font-size: 0.84rem;
}

.eq-folder-tree-link:hover,
.eq-folder-tree-link.active {
  background: rgba(212, 168, 67, 0.16);
  color: #fff;
}

.eq-explorer-path code {
  display: inline-block;
  max-width: 100%;
  padding: 0.24rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--eq-border);
  background: rgba(8, 14, 24, 0.62);
}

code {
  word-break: break-all;
}

.eq-breadcrumbs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.eq-explorer-table-wrap {
  border: 1px solid var(--eq-border);
  border-radius: 10px;
  background: rgba(8, 14, 24, 0.36);
}

.eq-explorer-table tbody tr {
  transition: background-color 0.15s ease;
}

.eq-explorer-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.eq-folder-row {
  cursor: pointer;
}

.eq-folder-row:hover {
  background: rgba(212, 168, 67, 0.08);
}

.eq-folder-link {
  text-decoration: none;
}

.eq-folder-row-link {
  display: block;
  color: inherit;
  text-decoration: none;
  width: 100%;
}

.eq-folder-link strong::before {
  content: "[DIR] ";
  color: var(--eq-muted);
}

.eq-file-name::before {
  content: "[FILE] ";
  color: var(--eq-muted);
}

@media (max-width: 980px) {
  .eq-explorer-layout {
    grid-template-columns: 1fr;
  }
}

.eq-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.44rem;
  font-size: 0.75rem;
  background: var(--eq-accent-soft);
  border: 1px solid rgba(212, 168, 67, 0.36);
  color: #f4dfac;
}

.eq-login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.eq-login-card {
  width: min(540px, 94vw);
}

.eq-login-links {
  margin-top: 0.65rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--eq-muted);
}

.eq-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--eq-border);
  border-radius: 16px;
  width: min(720px, 92vw);
  max-height: 88vh;
  background: linear-gradient(180deg, rgba(22, 36, 58, 0.97), rgba(14, 24, 40, 0.97));
  color: var(--eq-text);
  padding: 0;
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.58);
  overflow: auto;
  margin: 0;
}

.eq-modal::backdrop {
  background: rgba(4, 8, 14, 0.82);
  backdrop-filter: blur(2px);
}

.eq-modal-inner {
  padding: 1rem;
}

.eq-modal-head {
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.eq-modal-close {
  border-radius: 9px;
  border: 1px solid var(--eq-border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
}

@media (max-width: 1060px) {
  .eq-shell {
    grid-template-columns: 1fr;
  }

  .eq-sidebar {
    position: static;
  }
}

@media (max-width: 880px) {
  .eq-grid.cols-2,
  .eq-grid.cols-3,
  .eq-grid.cols-4 {
    grid-template-columns: 1fr;
  }
}
