/* AI Theme - Revolutionary Layout */

/* Main Layout Structure */
body.ai-theme {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Sidebar Navigation */
.ai-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(30, 137, 227, 0.2);
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s ease;
}

.ai-sidebar.collapsed {
  transform: translateX(280px);
}

/* Sidebar Header */
.sidebar-header {
  padding: 30px 25px;
  border-bottom: 1px solid rgba(30, 137, 227, 0.2);
  text-align: center;
}

.sidebar-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  background: var(--ai-gradient-2);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
  box-shadow: 0 10px 30px rgba(30, 137, 227, 0.3);
  position: relative;
  overflow: hidden;
}

.sidebar-logo::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: logoRotate 10s linear infinite;
}

@keyframes logoRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sidebar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--ai-gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: 20px 0;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 5px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 15px 25px;
  color: var(--ai-text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sidebar-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--ai-gradient-2);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--ai-text);
  background: rgba(99, 102, 241, 0.1);
  padding-left: 35px;
}

.sidebar-nav a:hover::before,
.sidebar-nav a.active::before {
  transform: translateX(0);
}

.sidebar-nav i {
  font-size: 1.25rem;
  margin-right: 15px;
  width: 25px;
  text-align: center;
  color: var(--ai-primary-light);
}

/* Sidebar Footer */
.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  border-top: 1px solid rgba(99, 102, 241, 0.2);
}

/* Main Content Area */
.ai-main-content {
  margin-right: 280px;
  min-height: 100vh;
  transition: margin-right 0.3s ease;
  position: relative;
}

.ai-main-content.full-width {
  margin-right: 0;
}

/* Minimal Header */
.ai-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(10, 22, 40, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  padding: 15px 30px;
  transition: all 0.3s ease;
}

.ai-header.scrolled {
  padding: 10px 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Search Bar */
.ai-search-bar {
  flex: 1;
  max-width: 600px;
  margin: 0 30px;
}

.ai-search-bar .search-input {
  width: 100%;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--ai-text);
  padding: 12px 50px 12px 20px;
  border-radius: 50px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.ai-search-bar .search-input:focus {
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--ai-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

.ai-search-bar .search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--ai-gradient-2);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ai-search-bar .search-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-actions .action-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ai-text);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.header-actions .action-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--ai-primary);
  transform: translateY(-2px);
}

.header-actions .notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: white;
  font-weight: 700;
}

/* Theme Toggle Button */
.theme-toggle {
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle i {
  transition: transform 0.3s ease;
}

.theme-toggle:hover i {
  transform: rotate(20deg);
}

/* Sidebar Toggle */
.sidebar-toggle {
  width: 50px;
  height: 50px;
  background: var(--ai-gradient-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Floating Action Buttons */
.floating-actions {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 900;
}

.fab-main {
  width: 60px;
  height: 60px;
  background: var(--ai-gradient-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
  position: relative;
}

.fab-main:hover {
  transform: scale(1.1) rotate(45deg);
}

.fab-menu {
  position: absolute;
  bottom: 70px;
  left: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.fab-menu.open {
  opacity: 1;
  visibility: visible;
}

.fab-item {
  width: 50px;
  height: 50px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ai-primary-light);
  margin-bottom: 15px;
  cursor: pointer;
  transform: scale(0);
  transition: all 0.3s ease;
}

.fab-menu.open .fab-item {
  transform: scale(1);
}

.fab-menu.open .fab-item:nth-child(1) { transition-delay: 0.1s; }
.fab-menu.open .fab-item:nth-child(2) { transition-delay: 0.2s; }
.fab-menu.open .fab-item:nth-child(3) { transition-delay: 0.3s; }

/* Content Container */
.ai-content {
  padding: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Animated Background Pattern */
.ai-bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.ai-bg-pattern::before,
.ai-bg-pattern::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
}

.ai-bg-pattern::before {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  top: -300px;
  left: -300px;
  animation: float1 20s ease-in-out infinite;
}

.ai-bg-pattern::after {
  background: radial-gradient(circle, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
  bottom: -300px;
  right: -300px;
  animation: float2 25s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(100px, 50px) scale(1.1); }
  66% { transform: translate(-50px, 100px) scale(0.9); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-100px, -50px) scale(0.9); }
  66% { transform: translate(50px, -100px) scale(1.1); }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .ai-sidebar {
    transform: translateX(280px);
  }
  
  .ai-sidebar.open {
    transform: translateX(0);
  }
  
  .ai-main-content {
    margin-right: 0;
  }
  
  .ai-search-bar {
    margin: 0 15px;
  }
}

@media (max-width: 768px) {
  .ai-sidebar {
    width: 100%;
    transform: translateX(100%);
  }
  
  .ai-sidebar.open {
    transform: translateX(0);
  }
  
  .ai-header {
    padding: 10px 15px;
  }
  
  .ai-search-bar {
    display: none;
  }
  
  .header-actions .action-btn {
    width: 40px;
    height: 40px;
  }
  
  .ai-content {
    padding: 20px 15px;
  }
}

/* Hide Original Elements */
body.ai-theme .navbar,
body.ai-theme .master-breadcrumb,
body.ai-theme #header {
  display: none !important;
}

/* Override container margins */
body.ai-theme .container {
  max-width: 100%;
  padding: 0;
  margin: 0;
}

/* Light Mode Specific Styles */
[data-theme="light"] .ai-sidebar {
  background: rgba(248, 250, 252, 0.95);
  border-left: 1px solid rgba(30, 137, 227, 0.2);
}

[data-theme="light"] .sidebar-header {
  border-bottom: 1px solid rgba(30, 137, 227, 0.2);
}

[data-theme="light"] .sidebar-nav a {
  color: var(--ai-text-secondary);
}

[data-theme="light"] .sidebar-nav a:hover,
[data-theme="light"] .sidebar-nav a.active {
  background: rgba(30, 137, 227, 0.1);
  color: var(--ai-primary);
}

[data-theme="light"] .ai-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

[data-theme="light"] .ai-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .action-btn {
  background: rgba(30, 137, 227, 0.05);
  border: 1px solid rgba(30, 137, 227, 0.2);
  color: var(--ai-text);
}

[data-theme="light"] .action-btn:hover {
  background: rgba(30, 137, 227, 0.15);
  border-color: var(--ai-primary);
}

[data-theme="light"] .ai-search-bar .search-input {
  background: rgba(226, 232, 240, 0.5);
  border: 1px solid rgba(203, 213, 225, 0.5);
  color: var(--ai-text);
}

[data-theme="light"] .ai-search-bar .search-input:focus {
  background: white;
  border-color: var(--ai-primary);
}

[data-theme="light"] .ai-content {
  background: var(--ai-dark-secondary);
}