*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f0f13;
  --surface: #1a1a23;
  --border: #2a2a38;
  --text: #e8e8f0;
  --muted: #7a7a9a;
  --accent: #7c6af7;
  --radius: 10px;
  --font: system-ui, -apple-system, sans-serif;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  width: 100%;
  max-width: 400px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  text-align: center;
}

.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 7px 0;
  border-radius: 6px;
  transition: all 0.15s;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: -6px;
}

.form input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: 0.95rem;
  padding: 10px 13px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.form input:focus {
  border-color: var(--accent);
}

.form input::placeholder {
  color: var(--border);
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: -4px;
}

.error-banner {
  background: rgba(220, 60, 60, 0.12);
  border: 1px solid rgba(220, 60, 60, 0.3);
  border-radius: 7px;
  color: #f08080;
  font-size: 0.875rem;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.btn-primary {
  background: var(--accent);
  border: none;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 11px 0;
  transition: opacity 0.15s;
  margin-top: 4px;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.85;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 6px 14px;
  transition: all 0.15s;
}

.btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
}

.btn-open {
  background: transparent;
  border: 1px solid;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 20px;
  text-decoration: none;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.btn-open:hover {
  opacity: 0.75;
}


.dashboard {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-user {
  color: var(--muted);
  font-size: 0.875rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 32px 28px;
  max-width: 1100px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  transition: border-color 0.15s;
}

.service-card:hover {
  border-color: #3a3a58;
}

.service-icon {
  border-radius: 10px;
  flex-shrink: 0;
  font-size: 1.6rem;
  height: 52px;
  width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-info {
  flex: 1;
  min-width: 0;
}

.service-info h2 {
  font-size: 1rem;
  font-weight: 600;
}

.service-info p {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2px;
}
