* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: linear-gradient(160deg, #c8e6c9 0%, #a5d6a7 20%, #81c784 40%, #b2dfdb 70%, #e0f2f1 100%);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

.app {
  display: flex;
  height: 100vh;
}

.main {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: linear-gradient(180deg, #f1f8e9, #e8f5e9);
}

.top {
  position: relative;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: #ffffff;
  color: rgba(16, 35, 58, 0.65);
  font-size: 14px;
  font-weight: 600;
}

.top-brand {
  position: absolute;
  left: 16px;
  font-size: 12px;
  color: rgba(16, 35, 58, 0.28);
  font-weight: 600;
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

.top-title {
  color: rgba(16, 35, 58, 0.65);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

.top-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232, 245, 233, 0.95);
  border: 1px solid rgba(76, 175, 80, 0.35);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--green-dark);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.top-actions {
  position: absolute;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

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

.top-auth-controls[hidden] {
  display: none;
}

.top-home-btn:hover {
  background: #e8f5e9;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.12);
}

@media (max-width: 768px) {
  body,
  .app {
    min-height: 100dvh;
    height: 100dvh;
  }

  .main {
    width: 100%;
  }

  .top {
    min-height: 64px;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0;
    padding: 10px 56px 12px 78px;
  }

  .top-brand {
    position: static;
    display: none;
    width: auto;
    font-size: 15px;
    font-weight: 700;
    color: rgba(16, 35, 58, 0.65);
    text-align: center;
  }

  .top-title {
    display: block;
    position: static;
    width: auto;
    font-size: 15px;
    font-weight: 700;
    color: rgba(16, 35, 58, 0.65);
    text-align: center;
  }

  .top.startup-header .top-brand {
    display: block;
  }

  .top.startup-header .top-title {
    display: none;
  }

  .top-home-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 12px;
    font-size: 0;
  }

  .top-actions {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    gap: 8px;
  }

  .top-auth-controls {
    gap: 6px;
  }
}

@media (max-width: 520px) {
  .top {
    padding-right: 132px;
  }

  .top-actions {
    right: 10px;
    gap: 6px;
  }
}
