:root {
  --line: #2a2d37;
  --muted: #8b90a0;
  --text: #f3f6ff;
  --red: #ef4444;
  --green: #22c55e;
  --blue: #1d66ed;
  --blue-dark: #1557d6;
  --card: #171922;
  --card-2: #14161d;
  --bg: #05060a;
  --shadow-lg: 0 18px 60px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.28);
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-width: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, rgba(32, 72, 160, 0.18), transparent 28%), #05060a;
  color: var(--text);
}

button, input {
  font: inherit;
}

.app {
  width: 100%;
  min-width: 840px;
  height: calc(100vh - 16px);
  min-height: calc(100vh - 16px);
  background: linear-gradient(180deg, #0d0f14 0%, #0b0c10 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.03);
}

.left-rail {
  background: linear-gradient(180deg, #0a0b10 0%, #0b0d12 100%);
  border-right: 1px solid #151821;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 12px;
  min-height: 0;
}

.rail-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  width: calc(100% - 16px);
}

.main {
  min-width: 0;
  min-height: 0;
  background: linear-gradient(180deg, #171922 0%, #14161d 100%);
  display: flex;
  flex-direction: column;
}

.dashboard-panel {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: 60px minmax(0, 1fr);
}

.dashboard-header {
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  background: linear-gradient(180deg, #1a1d25 0%, #171a21 100%);
}

.dashboard-header-left {
  min-width: 0;
}

.dashboard-title {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.18s ease;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.btn-primary {
  background: linear-gradient(180deg, #1d66ed 0%, #1557d6 100%);
  box-shadow: 0 10px 20px rgba(21, 87, 214, 0.24);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.22);
}

.btn-danger:hover {
  background: rgba(220, 38, 38, 0.18);
  color: #fff;
}

.btn-muted {
  background: #1b1f2a;
  border-color: #2a2e38;
  color: #d5d9e6;
}

.btn-muted:hover {
  background: #202534;
  color: #fff;
  border-color: #343b49;
}

.dashboard-content {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.alert {
  display: none;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid transparent;
}

.alert.show {
  display: block;
}

.alert.error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.22);
  color: #fecaca;
}

.alert.success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
  color: #bbf7d0;
}

.hero-card {
  background: radial-gradient(circle at top right, rgba(29, 102, 237, 0.18), transparent 32%), linear-gradient(180deg, #1a1d25 0%, #151821 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.hero-card h2 {
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.hero-card p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 760px;
}

.dashboard-content::-webkit-scrollbar {
  width: 10px;
}

.dashboard-content::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.10);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.dashboard-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.16);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(5, 7, 11, 0.76);
  z-index: 9999;
  backdrop-filter: blur(4px);
}

@media (max-width: 1200px) {
      .app {
        grid-template-columns: 64px minmax(0, 1fr);
      }
    }

@media (max-width: 980px) {
      body {
        padding: 0;
      }

      .app {
        min-height: 100vh;
        border-radius: 0;
        max-width: none;
        grid-template-columns: 64px minmax(0, 1fr);
      }

      .hero-card h2 {
        font-size: 24px;
      }
    }

@media (max-width: 760px) {
      .app {
        grid-template-columns: 64px minmax(0, 1fr);
      }

      .dashboard-header {
        padding: 12px 14px;
        height: auto;
        align-items: flex-start;
        flex-direction: column;
      }

      .dashboard-content {
        padding: 14px;
      }
    }
