:root {
  --ac-bg: #06080d;
  --ac-bg-card: #0c1018;
  --ac-bg-elevated: #111827;
  --ac-bg-input: #0f1420;
  --ac-primary: #3b82f6;
  --ac-primary-soft: rgba(59, 130, 246, 0.12);
  --ac-accent: #f97316;
  --ac-accent-soft: rgba(249, 115, 22, 0.12);
  --ac-accent-glow: rgba(249, 115, 22, 0.25);
  --ac-green: #22c55e;
  --ac-green-soft: rgba(34, 197, 94, 0.12);
  --ac-warning: #f59e0b;
  --ac-warning-soft: rgba(245, 158, 11, 0.12);
  --ac-error: #ef4444;
  --ac-error-soft: rgba(239, 68, 68, 0.1);
  --ac-text: #f1f5f9;
  --ac-text-secondary: #94a3b8;
  --ac-text-muted: #64748b;
  --ac-border: rgba(255, 255, 255, 0.06);
  --ac-border-hover: rgba(255, 255, 255, 0.12);
  --ac-border-input: rgba(255, 255, 255, 0.1);
  --ac-radius: 10px;
  --ac-radius-sm: 6px;
  --ac-radius-lg: 16px;
  --ac-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --ac-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --ac-header-height: 60px;
  --ac-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --ac-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: var(--ac-font);
  font-size: 14px;
  color: var(--ac-text);
  background: var(--ac-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.hidden { display: none !important; }

/* ========================================
   LOGIN SCREEN
   ======================================== */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 100%);
}

.login-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.login-glow-1 {
  top: 20%;
  left: 30%;
  width: 400px;
  height: 400px;
  background: rgba(249, 115, 22, 0.06);
  animation: loginGlow 8s ease-in-out infinite;
}

.login-glow-2 {
  bottom: 20%;
  right: 30%;
  width: 350px;
  height: 350px;
  background: rgba(59, 130, 246, 0.04);
  animation: loginGlow 10s ease-in-out infinite reverse;
}

@keyframes loginGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.1); }
}

.login-card {
  background: var(--ac-bg-card);
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
  animation: cardAppear 0.5s ease both;
}

@keyframes cardAppear {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  text-align: center;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.login-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--ac-accent), #fb923c);
  border-radius: 14px;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.2);
}

.login-logo-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--ac-text-muted);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ac-text-secondary);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--ac-border-input);
  border-radius: var(--ac-radius);
  font-size: 14px;
  font-family: var(--ac-font);
  color: var(--ac-text);
  background: var(--ac-bg-input);
  transition: border-color var(--ac-transition), box-shadow var(--ac-transition);
}

.form-input::placeholder {
  color: var(--ac-text-muted);
}

.form-input:focus {
  outline: none;
  border-color: var(--ac-accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12), 0 0 20px rgba(249, 115, 22, 0.06);
}

.form-hint {
  display: block;
  font-size: 11px;
  color: var(--ac-text-muted);
  margin-top: 5px;
}

.login-error,
.settings-error {
  background: var(--ac-error-soft);
  color: var(--ac-error);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--ac-radius-sm);
  margin-bottom: 16px;
  display: none;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.login-error.visible,
.settings-error.visible {
  display: block;
  animation: shakeError 0.4s ease;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.login-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 13px;
  color: var(--ac-text-muted);
  text-decoration: none;
  transition: color var(--ac-transition);
}

.login-back:hover {
  color: var(--ac-accent);
}

/* ========================================
   EMAIL VERIFICATION GATE
   ======================================== */

.verify-screen {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.verify-screen.active {
  display: flex;
}

.verify-card {
  background: var(--ac-bg-card);
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  animation: cardAppear 0.5s ease both;
}

.verify-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--ac-accent-soft);
  border: 1px solid rgba(249, 115, 22, 0.15);
  border-radius: 16px;
  color: var(--ac-accent);
  margin: 0 auto 20px;
}

.verify-title {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.75));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.verify-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--ac-text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.verify-email-display {
  text-align: center;
  font-size: 13px;
  color: var(--ac-text-secondary);
  margin-bottom: 20px;
  padding: 14px;
  background: var(--ac-bg-input);
  border: 1px solid var(--ac-border-input);
  border-radius: var(--ac-radius);
}

.verify-email-display strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  color: var(--ac-text);
}

.verify-desc {
  font-size: 13px;
  color: var(--ac-text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.verify-error {
  background: var(--ac-error-soft);
  color: var(--ac-error);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--ac-radius-sm);
  margin-bottom: 16px;
  display: none;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.verify-error.visible {
  display: block;
  animation: shakeError 0.4s ease;
}

.verify-change-link,
.verify-back-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
}

.verify-logout {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ac-border);
  font-size: 13px;
  color: var(--ac-text-muted);
}

.verify-logout .btn-text {
  font-size: 13px;
  padding: 0 4px;
  color: var(--ac-accent);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--ac-radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--ac-font);
  cursor: pointer;
  border: none;
  transition: all var(--ac-transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-glow {
  background: linear-gradient(135deg, var(--ac-accent), #fb923c);
  color: #fff;
  width: 100%;
  margin-top: 8px;
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.15);
}

.btn-glow:hover {
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.3), 0 4px 16px rgba(249, 115, 22, 0.15);
  transform: translateY(-1px);
}

.btn-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--ac-transition);
}

.btn-glow:hover::after { opacity: 1; }

.btn-glow:disabled,
.btn-settings:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-settings {
  background: var(--ac-accent-soft);
  color: var(--ac-accent);
  border: 1px solid rgba(249, 115, 22, 0.2);
  padding: 10px 24px;
  border-radius: var(--ac-radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--ac-font);
  cursor: pointer;
  transition: all var(--ac-transition);
  margin-top: 8px;
}

.btn-settings:hover:not(:disabled) {
  background: rgba(249, 115, 22, 0.18);
  border-color: rgba(249, 115, 22, 0.35);
}

.btn-small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--ac-radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--ac-font);
  cursor: pointer;
  border: none;
  transition: all var(--ac-transition);
}

.btn-outline {
  background: transparent;
  color: var(--ac-accent);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.btn-outline:hover {
  background: var(--ac-accent-soft);
}

.btn-danger-outline {
  background: transparent;
  color: var(--ac-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger-outline:hover {
  background: var(--ac-error-soft);
}

.btn-text {
  background: none;
  border: none;
  color: var(--ac-text-muted);
  font-size: 13px;
  font-family: var(--ac-font);
  cursor: pointer;
  padding: 6px 12px;
  transition: color var(--ac-transition);
}

.btn-text:hover {
  color: var(--ac-accent);
}

/* ========================================
   APP SHELL
   ======================================== */

.app-shell {
  display: none;
  height: 100vh;
  overflow: hidden;
  flex-direction: column;
}

.app-shell.active {
  display: flex;
}

/* ========================================
   HEADER
   ======================================== */

.app-header {
  height: var(--ac-header-height);
  background: var(--ac-bg-card);
  border-bottom: 1px solid var(--ac-border);
  color: var(--ac-text);
  display: flex;
  align-items: center;
  padding: 0 24px;
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========================================
   HEADER NAV
   ======================================== */

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
  padding: 0 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--ac-radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--ac-text-muted);
  text-decoration: none;
  transition: all var(--ac-transition);
  position: relative;
}

.nav-item:hover {
  color: var(--ac-text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: var(--ac-accent);
  background: var(--ac-accent-soft);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--ac-accent);
  border-radius: 1px;
}

.nav-item svg {
  flex-shrink: 0;
}

.header-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--ac-accent), #fb923c);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
}

#header-brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 2px;
}

.header-brand-sub {
  color: var(--ac-text-muted);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--ac-text-secondary);
}

.header-tenant {
  font-size: 11px;
  color: var(--ac-accent);
  padding: 4px 12px;
  background: var(--ac-accent-soft);
  border: 1px solid rgba(249, 115, 22, 0.15);
  border-radius: 100px;
  font-weight: 500;
}

.header-user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--ac-radius);
  transition: background var(--ac-transition);
}

.header-user-menu:hover {
  background: rgba(255, 255, 255, 0.04);
}

.header-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ac-primary-soft);
  color: var(--ac-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
}

.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-chevron {
  color: var(--ac-text-muted);
  transition: transform var(--ac-transition);
}

.header-user-menu.open .header-chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--ac-bg-elevated);
  border: 1px solid var(--ac-border-hover);
  border-radius: var(--ac-radius);
  min-width: 200px;
  padding: 6px;
  box-shadow: var(--ac-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.2s ease;
  z-index: 100;
  backdrop-filter: blur(16px);
}

.header-user-menu.open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--ac-radius-sm);
  font-size: 13px;
  color: var(--ac-text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--ac-transition);
  background: none;
  border: none;
  width: 100%;
  font-family: var(--ac-font);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ac-text);
}

.dropdown-item svg {
  flex-shrink: 0;
}

.dropdown-logout {
  color: var(--ac-error);
}

.dropdown-logout:hover {
  background: var(--ac-error-soft);
  color: var(--ac-error);
}

.dropdown-divider {
  height: 1px;
  background: var(--ac-border);
  margin: 4px 0;
}

/* ========================================
   MAIN AREA & VIEWS
   ======================================== */

.app-main {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

/* ========================================
   DASHBOARD
   ======================================== */

.dashboard-header {
  margin-bottom: 28px;
}

.dashboard-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.75));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dashboard-welcome {
  font-size: 14px;
  color: var(--ac-text-muted);
  margin-top: 4px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 960px;
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background: var(--ac-bg-card);
  border-radius: var(--ac-radius-lg);
  border: 1px solid var(--ac-border);
  padding: 24px;
  transition: all var(--ac-transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--ac-border-hover);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ac-border);
}

.card-icon {
  color: var(--ac-accent);
  flex-shrink: 0;
}

.card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ac-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--ac-border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-size: 12px;
  color: var(--ac-text-muted);
  font-weight: 500;
}

.info-value {
  font-size: 13px;
  color: var(--ac-text);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========================================
   TAGS
   ======================================== */

.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

.tag-accent {
  background: var(--ac-accent-soft);
  color: var(--ac-accent);
  border: 1px solid rgba(249, 115, 22, 0.12);
}

.tag-info {
  background: var(--ac-primary-soft);
  color: var(--ac-primary);
  border: 1px solid rgba(59, 130, 246, 0.12);
}

.tag-muted {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ac-text-muted);
  border: 1px solid var(--ac-border);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ========================================
   RELEASE CARD
   ======================================== */

.release-card {
  grid-column: 1 / -1;
}

.release-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.release-version {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.release-meta {
  font-size: 12px;
  color: var(--ac-text-muted);
}

.release-download {
  margin-left: auto;
  background: linear-gradient(135deg, var(--ac-accent), #fb923c);
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--ac-radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--ac-transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.15);
}

.release-download:hover {
  box-shadow: 0 0 28px rgba(249, 115, 22, 0.3);
  transform: translateY(-1px);
}

.release-empty {
  font-size: 13px;
  color: var(--ac-text-muted);
}

/* ========================================
   SETTINGS VIEW
   ======================================== */

.settings-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.settings-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ac-text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--ac-radius-sm);
  transition: all var(--ac-transition);
}

.settings-back:hover {
  color: var(--ac-accent);
  background: var(--ac-accent-soft);
}

.settings-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.75));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 960px;
}

.settings-card {
  grid-column: 1 / -1;
}

.settings-desc {
  font-size: 13px;
  color: var(--ac-text-muted);
  margin-bottom: 16px;
}

/* ========================================
   AVATAR SECTION
   ======================================== */

.avatar-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ac-border);
}

.avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--ac-primary-soft);
  color: var(--ac-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.avatar-hint {
  font-size: 11px;
  color: var(--ac-text-muted);
  display: block;
  width: 100%;
  margin-top: 2px;
}

/* ========================================
   EMAIL BADGE
   ======================================== */

.email-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}

.email-badge.verified {
  background: var(--ac-green-soft);
  color: var(--ac-green);
  border: 1px solid rgba(34, 197, 94, 0.15);
}

.email-badge.not-verified {
  background: var(--ac-warning-soft);
  color: var(--ac-warning);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

/* ========================================
   CODE INPUT (6 Digits)
   ======================================== */

.code-description {
  font-size: 13px;
  color: var(--ac-text-secondary);
  margin-bottom: 20px;
}

.code-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.code-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--ac-font);
  color: var(--ac-text);
  background: var(--ac-bg-input);
  border: 1px solid var(--ac-border-input);
  border-radius: var(--ac-radius);
  transition: all var(--ac-transition);
}

.code-digit:focus {
  outline: none;
  border-color: var(--ac-accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.code-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ========================================
   CHANNEL OPTIONS
   ======================================== */

.channel-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--ac-bg-input);
  border: 1px solid var(--ac-border-input);
  border-radius: var(--ac-radius);
  cursor: pointer;
  transition: all var(--ac-transition);
}

.channel-option:has(input:checked) {
  border-color: var(--ac-accent);
  background: var(--ac-accent-soft);
}

.channel-option input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ac-border-hover);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all var(--ac-transition);
}

.channel-option input[type="radio"]:checked {
  border-color: var(--ac-accent);
}

.channel-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ac-accent);
}

.channel-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.channel-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ac-text);
}

.channel-detail {
  font-size: 12px;
  color: var(--ac-text-muted);
}

/* ========================================
   TOGGLE SWITCH
   ======================================== */

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--ac-border);
}

.toggle-row:last-child {
  border-bottom: none;
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ac-text);
}

.toggle-detail {
  font-size: 12px;
  color: var(--ac-text-muted);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all var(--ac-transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--ac-text-muted);
  border-radius: 50%;
  transition: all var(--ac-transition);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--ac-accent-soft);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: var(--ac-accent);
}

/* ========================================
   TOAST
   ======================================== */

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--ac-bg-elevated);
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius);
  padding: 12px 20px;
  font-size: 13px;
  color: var(--ac-text);
  border-left: 3px solid var(--ac-primary);
  animation: toastIn 0.3s ease;
  max-width: 380px;
  backdrop-filter: blur(12px);
  box-shadow: var(--ac-shadow);
}

.toast.warning { border-left-color: var(--ac-warning); }
.toast.error { border-left-color: var(--ac-error); }
.toast.success { border-left-color: var(--ac-green); }

@keyframes toastIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ========================================
   SCROLLBAR
   ======================================== */

.app-main::-webkit-scrollbar {
  width: 6px;
}

.app-main::-webkit-scrollbar-track {
  background: transparent;
}

.app-main::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.app-main::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 700px) {
  .app-main {
    padding: 20px 16px;
  }

  .dashboard-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .release-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .release-download {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }

  .header-tenant {
    display: none;
  }

  .nav-item span {
    display: none;
  }

  .nav-item {
    padding: 8px 10px;
  }

  .header-nav {
    gap: 2px;
  }

  .code-digit {
    width: 40px;
    height: 48px;
    font-size: 18px;
  }

  .avatar-section {
    flex-direction: column;
    text-align: center;
  }

  .login-card {
    margin: 0 16px;
    padding: 32px 24px;
  }
}
