:root {
  --ra-bg: #061122;
  --ra-surface-1: #10203a;
  --ra-surface-2: #142847;
  --ra-surface-3: #0d1a31;
  --ra-stroke: rgba(255, 255, 255, 0.08);
  --ra-text-1: #eaf2ff;
  --ra-text-2: rgba(234, 242, 255, 0.72);
  --ra-text-3: rgba(234, 242, 255, 0.5);
  --ra-primary: #4ea4d6;
  --ra-primary-strong: #2d9cdb;
  --ra-danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(900px 500px at 10% 10%, rgba(78, 164, 214, 0.14), transparent 55%),
    radial-gradient(800px 500px at 90% 20%, rgba(78, 164, 214, 0.10), transparent 50%),
    var(--ra-bg);
  color: var(--ra-text-1);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hidden {
  display: none !important;
}

.ra-shell {
  min-height: 100vh;
  padding: 18px;
}

.ra-login {
  min-height: calc(100vh - 36px);
  display: grid;
  place-items: center;
}

.ra-login-card,
.ra-header,
.ra-panel,
.ra-sidebar {
  border: 1px solid var(--ra-stroke);
  background: linear-gradient(180deg, rgba(16,32,58,.92), rgba(20,40,71,.92));
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.ra-login-card {
  width: 100%;
  max-width: 520px;
  padding: 28px;
}

.ra-brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ra-text-3);
}

.ra-brand-sidebar {
  margin-bottom: 14px;
}

.ra-title,
.ra-page-title {
  margin: 10px 0 8px;
  font-weight: 800;
  color: var(--ra-text-1);
}

.ra-title {
  font-size: 32px;
  line-height: 1.05;
}

.ra-page-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.ra-subtitle,
.ra-page-subtitle {
  color: var(--ra-text-2);
  line-height: 1.45;
}

.ra-subtitle {
  margin: 0 0 22px;
}

.ra-page-subtitle {
  margin-top: 4px;
  font-size: 13px;
}

.ra-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ra-field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ra-text-3);
  line-height: 1.15;
}

.ra-field input,
.ra-field select,
.ra-field textarea {
  width: 100%;
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid var(--ra-stroke);
  background: rgba(6, 17, 34, 0.35);
  color: var(--ra-text-1);
  padding: 10px 11px;
  outline: none;
  font: inherit;
  font-size: 13px;
}

.ra-field textarea {
  min-height: 120px;
  resize: vertical;
}

.ra-field input::placeholder,
.ra-field textarea::placeholder {
  color: var(--ra-text-3);
}

.ra-field input:focus,
.ra-field select:focus,
.ra-field textarea:focus {
  border-color: rgba(78, 164, 214, 0.5);
  box-shadow: 0 0 0 3px rgba(78, 164, 214, 0.14);
}

.ra-login-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.ra-error {
  margin-top: 14px;
  color: var(--ra-danger);
  font-size: 12px;
  line-height: 1.35;
}

.ra-btn {
  appearance: none;
  border: 1px solid var(--ra-stroke);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ra-text-1);
  border-radius: 12px;
  min-height: 38px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.ra-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(78, 164, 214, 0.34);
}

.ra-btn-primary {
  background: var(--ra-primary);
  border-color: transparent;
  color: #fff;
}

.ra-btn-primary:hover {
  background: var(--ra-primary-strong);
}

.ra-app {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 36px);
}

.ra-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 12px;
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
}

.ra-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ra-nav-btn {
  appearance: none;
  width: 100%;
  border: 1px solid var(--ra-stroke);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ra-text-2);
  border-radius: 14px;
  min-height: 46px;
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background .14s ease, color .14s ease;
}

.ra-nav-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(78, 164, 214, 0.34);
  color: var(--ra-text-1);
}

.ra-nav-btn.is-active {
  background: rgba(78, 164, 214, 0.16);
  border-color: rgba(78, 164, 214, 0.42);
  color: var(--ra-text-1);
}

.ra-sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ra-btn-sidebar {
  min-height: 40px;
  font-size: 12px;
  padding: 0 10px;
}

.ra-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.ra-header {
  padding: 16px 18px;
}

.ra-page-stack {
  min-width: 0;
}

.ra-page {
  display: none;
}

.ra-page.is-active {
  display: block;
}

.ra-panel {
  padding: 16px;
}

.ra-placeholder {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ra-placeholder-title {
  font-size: 18px;
  font-weight: 800;
}

.ra-placeholder-text {
  color: var(--ra-text-2);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .ra-shell {
    padding: 14px;
  }

  .ra-app {
    grid-template-columns: 1fr;
  }

  .ra-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
  }

  .ra-sidebar-top,
  .ra-sidebar-bottom {
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .ra-sidebar-top {
    flex: 1;
  }

  .ra-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .ra-nav-btn {
    width: auto;
    min-width: 76px;
    min-height: 40px;
  }
}