/* ============================================
   UAN FLOW - Demo Page CSS
   ============================================ */

body {
  background: #1a1d1a;
  overflow: hidden;
}

.demo-container {
  display: flex;
  height: 100vh;
}

/* ============================================
   Demo Sidebar
   ============================================ */

.demo-sidebar {
  width: 280px;
  background: #2a2f2a;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #3a3f3a;
}

.demo-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #3a3f3a;
}

.demo-back {
  display: inline-block;
  color: #9CA998;
  font-size: 12px;
  margin-bottom: 16px;
  transition: color 0.2s;
}

.demo-back:hover {
  color: white;
}

.demo-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.demo-logo .logo-icon {
  font-size: 24px;
  background: var(--stack);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.demo-logo .logo-text {
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.demo-subtitle {
  font-size: 12px;
  color: #6a7a6a;
  margin: 0;
}

/* Navigation Menu */
.demo-nav-menu {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  color: #5a6a5a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 20px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: #8a9a8a;
  font-size: 13px;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(156, 169, 152, 0.1);
  color: #c0d0c0;
}

.nav-item.active {
  background: rgba(156, 169, 152, 0.15);
  color: #9CA998;
  border-left-color: #9CA998;
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  background: #c45c5c;
  color: white;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Sidebar Footer */
.demo-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #3a3f3a;
}

.demo-progress-bar {
  height: 4px;
  background: #3a3f3a;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.demo-progress-bar span {
  display: block;
  height: 100%;
  background: #9CA998;
  border-radius: 2px;
}

.demo-progress span:last-child {
  font-size: 11px;
  color: #5a6a5a;
}

/* ============================================
   Demo Main Area
   ============================================ */

.demo-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #1a1d1a;
}

/* Toolbar */
.demo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #2a2f2a;
  border-bottom: 1px solid #3a3f3a;
}

.demo-toolbar-info {
  display: flex;
  flex-direction: column;
}

.current-screen-name {
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.current-screen-path {
  font-size: 12px;
  color: #6a7a6a;
}

.demo-toolbar-actions {
  display: flex;
  gap: 8px;
}

.demo-btn {
  background: #3a3f3a;
  border: none;
  color: #8a9a8a;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-primary);
}

.demo-btn:hover {
  background: #4a4f4a;
  color: white;
}

.demo-btn.active {
  background: #9CA998;
  color: #1a1d1a;
}

.demo-btn.secondary {
  background: transparent;
  border: 1px solid #3a3f3a;
}

.demo-btn.secondary:hover {
  border-color: #5a5f5a;
}

/* Viewport */
.demo-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}

.demo-frame {
  background: var(--bg-primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 1400px;
  height: calc(100vh - 180px);
  overflow-y: auto;
}

/* Viewport Sizes */
.demo-viewport.mobile .demo-frame {
  max-width: 375px;
  height: 700px;
}

.demo-viewport.tablet .demo-frame {
  max-width: 768px;
  height: 600px;
}

/* Loading State */
.screen-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--stack);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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

/* Demo Footer */
.demo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #2a2f2a;
  border-top: 1px solid #3a3f3a;
}

.demo-info {
  font-size: 12px;
  color: #6a7a6a;
}

.demo-info strong {
  color: #9CA998;
}

/* ============================================
   Screen Content Styles
   ============================================ */

.screen-content {
  min-height: 100%;
}

/* Screen Header */
.screen-header {
  background: var(--stack);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.screen-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.screen-header-icon {
  width: 36px;
  height: 36px;
  background: var(--cararra);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.screen-header-title {
  font-size: 16px;
  font-weight: 500;
  color: white;
}

.screen-header-subtitle {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
}

.screen-header-right {
  display: flex;
  gap: 8px;
}

/* Screen Body */
.screen-body {
  padding: 20px;
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-color);
}

.stat-card .stat-icon {
  float: right;
  font-size: 24px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.stat-card.success { background: var(--success-light); }
.stat-card.success .stat-value { color: var(--success); }

.stat-card.warning { background: var(--warning-light); }
.stat-card.warning .stat-value { color: var(--warning); }

.stat-card.danger { background: var(--danger-light); }
.stat-card.danger .stat-value { color: var(--danger); }

.stat-card.info { background: var(--info-light); }
.stat-card.info .stat-value { color: var(--info); }

/* Responsive */
@media (max-width: 1024px) {
  .demo-sidebar {
    width: 240px;
  }
  
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .demo-sidebar {
    display: none;
  }
}
