﻿.top {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid rgba(86, 217, 155, 0.16);
  background: rgba(16, 22, 19, 0.92);
  backdrop-filter: blur(8px);
}

.top-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 72px;
  padding: 12px 24px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-size: 29px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-reph {
  color: #f3f5f7;
}

.brand-on {
  color: var(--accent);
}

.brand-tag {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(161, 205, 184, 0.32);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(36, 53, 45, 0.9), rgba(27, 39, 33, 0.88));
  padding: 6px;
  box-shadow: 0 8px 18px rgba(10, 14, 12, 0.35);
}

.nav .nav-link {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 11px;
  color: #e7f0ff;
  font-size: 14px;
  font-weight: 620;
  line-height: 1;
  text-decoration: none;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.nav .nav-link:visited {
  color: #e7f0ff;
}

.nav .nav-link:hover {
  color: #ffffff;
  border-color: rgba(86, 217, 155, 0.42);
  background: rgba(86, 217, 155, 0.16);
  text-decoration: none;
}

.nav .nav-link.active {
  color: #ffffff;
  border-color: rgba(143, 228, 184, 0.85);
  background: linear-gradient(180deg, rgba(62, 207, 142, 0.55), rgba(46, 159, 114, 0.5));
  box-shadow: 0 0 0 1px rgba(123, 222, 174, 0.35) inset;
}


.top-menu-shell {
  position: relative;
}

.top-left .top-menu-shell {
  margin-left: 4px;
}

.top-left .top-menu-dropdown {
  left: 0;
  right: auto;
}

.menu-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(138, 204, 172, 0.42);
  border-radius: 10px;
  background: #212f28;
  color: #e7f0ff;
  padding: 8px 12px;
  min-height: 38px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(10, 14, 12, 0.24);
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.menu-toggle-btn:hover {
  border-color: rgba(86, 217, 155, 0.68);
  background: rgba(62, 207, 142, 0.18);
}

.menu-toggle-btn:focus-visible {
  outline: none;
  border-color: rgba(143, 228, 184, 0.9);
  box-shadow: 0 0 0 2px rgba(86, 217, 155, 0.2);
}

.menu-toggle-icon {
  font-size: 18px;
  line-height: 1;
}

.top-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(340px, calc(100vw - 24px));
  border: 1px solid rgba(138, 204, 172, 0.34);
  border-radius: 12px;
  background: #1e2c25;
  box-shadow: 0 10px 24px rgba(10, 14, 12, 0.3);
  padding: 10px;
  display: grid;
  gap: 8px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 260;
}

.top-menu-shell.open .top-menu-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.menu-section {
  border: 1px solid rgba(138, 204, 172, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  padding: 8px;
  display: grid;
  gap: 4px;
}

.menu-section h4 {
  margin: 0 0 4px;
  color: #a8ccbb;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.menu-link {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  color: #e7f0ff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}


.top-menu-dropdown .nav {
  display: grid;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.top-menu-dropdown .nav .nav-link {
  width: 100%;
  border-radius: 8px;
  padding: 8px 10px;
}

.menu-link:hover {
  color: #ffffff;
  border-color: rgba(86, 217, 155, 0.46);
  background: rgba(62, 207, 142, 0.18);
}

.menu-link.active {
  color: #ffffff;
  border-color: rgba(158, 233, 193, 0.88);
  background: linear-gradient(180deg, rgba(62, 207, 142, 0.36), rgba(46, 159, 114, 0.32));
  box-shadow: 0 0 0 1px rgba(136, 226, 181, 0.34) inset;
}

.auth-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-badge {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.auth-link {
  border: 1px solid rgba(62, 207, 142, 0.56);
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 8px 12px;
  color: #f8fcff;
  font-size: 13px;
  font-weight: 620;
  line-height: 1;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.auth-link:hover {
  border-color: rgba(62, 207, 142, 0.82);
  background: rgba(62, 207, 142, 0.26);
}

.wrap {
  max-width: 1520px;
  margin: 0 auto;
  padding: 32px 24px 14px;
}

.app-content,
.page-home,
.page-dashboard,
.page-stub,
.orders-page-shell,
.prices-page-shell,
.settings-page-shell {
  display: grid;
  gap: 12px;
}

.orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.orders-total {
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  padding: 9px 14px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.orders-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  gap: 16px;
  align-items: start;
}

.orders-main,
.side-panel,
.settings-content {
  min-width: 0;
}

.side-panel {
  display: grid;
  gap: 12px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
}

.dashboard-grid {
  margin-top: 10px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.foot {
  margin-top: 18px;
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

@media (max-width: 1220px) {
  .orders-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    order: -1;
  }
}

@media (max-width: 1000px) {
  .top-inner {
    padding: 12px 16px;
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .top-left,
  .top-right {
    justify-content: center;
    flex-wrap: wrap;
  }

  .top-menu-dropdown {
    left: 50%;
    transform: translate(-50%, -8px);
    width: min(340px, calc(100vw - 32px));
  }

  .top-menu-shell.open .top-menu-dropdown {
    transform: translate(-50%, 0);
  }

  .wrap {
    padding: 20px 16px 12px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-tabs {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 760px) {
  .orders-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-tag {
    display: none;
  }

  .nav {
    justify-content: center;
    border-radius: 16px;
  }
}


@media (max-width: 640px) {
  .top-menu-dropdown {
    width: calc(100vw - 20px);
    max-width: 340px;
  }

  .top-inner {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Graphite + Emerald layout pass */
.top {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 15, 20, 0.96), rgba(10, 13, 18, 0.94));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}

.top-inner {
  min-height: 74px;
  padding: 14px 26px;
}

.brand {
  letter-spacing: 0.07em;
  color: var(--text);
}

.brand-reph {
  color: var(--text);
}

.brand-on {
  color: var(--primary);
}

.menu-toggle-btn {
  border-color: var(--border-strong);
  border-radius: 11px;
  background: linear-gradient(180deg, #1a202b 0%, #151b25 100%);
  color: var(--text);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.menu-toggle-btn:hover {
  border-color: rgba(86, 217, 155, 0.56);
  background: linear-gradient(180deg, #202834 0%, #1a222d 100%);
}

.menu-toggle-btn:focus-visible {
  border-color: rgba(86, 217, 155, 0.72);
  box-shadow: 0 0 0 2px rgba(62, 207, 142, 0.2);
}

.top-menu-dropdown {
  border-color: var(--border-strong);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 25, 33, 0.98), rgba(16, 20, 28, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.56);
  padding: 12px;
  gap: 10px;
}

.menu-section {
  border-color: var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.005));
  border-radius: 11px;
  padding: 9px;
}

.menu-section h4 {
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.menu-link {
  color: var(--text-soft);
  padding: 9px 10px;
}

.menu-link:hover {
  color: var(--text);
  border-color: rgba(86, 217, 155, 0.42);
  background: rgba(62, 207, 142, 0.12);
}

.menu-link.active {
  color: #eafff4;
  border-color: rgba(86, 217, 155, 0.72);
  background: linear-gradient(180deg, rgba(62, 207, 142, 0.24), rgba(62, 207, 142, 0.12));
  box-shadow: 0 0 0 1px rgba(86, 217, 155, 0.24) inset;
}

.user-badge {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
}

.auth-link {
  border-color: rgba(86, 217, 155, 0.48);
  background: linear-gradient(180deg, rgba(62, 207, 142, 0.26), rgba(62, 207, 142, 0.14));
  color: #effff7;
}

.auth-link:hover {
  border-color: rgba(86, 217, 155, 0.78);
  background: linear-gradient(180deg, rgba(86, 217, 155, 0.32), rgba(62, 207, 142, 0.2));
}

