/* Dashboard: layout, sidebar, feature windows */

html, body { background: #000 !important; }

#dashboard-screen { 
  background: transparent !important; 
  position: relative !important;
}

/* Ensure dust canvas stays behind all content but is visible */
#dust-canvas {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  display: block !important;
  background: #000 !important;
  pointer-events: none !important;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.feature-window { background: rgba(15,15,15,0.63) !important; backdrop-filter: blur(16px) saturate(1.08); -webkit-backdrop-filter: blur(16px) saturate(1.08); box-shadow: 0 14px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05); border: 1px solid rgba(151,151,151,0.3); border-radius: 20px; transition: box-shadow 0.3s cubic-bezier(.2,.9,.2,1), transform 0.3s cubic-bezier(.2,.9,.2,1); }
.feature-window:active, .feature-window:focus-within { box-shadow: 0 32px 96px 0 rgba(0,0,0,0.65), 0 8px 32px rgba(0,0,0,0.32); transform: scale(1.025); backdrop-filter: blur(12px) saturate(1.3); }
.feature-window-header { background: #232323 !important; box-shadow: 0 4px 16px 0 rgba(0,0,0,0.18); border-bottom: 2px solid #232323; border-radius: 1.3rem 1.3rem 0 0; }

.top-info { 
  position: absolute;
  top: 0;
  left: 240px;
  right: 0;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  z-index: 150;
  pointer-events: none;
  background: transparent !important;
  transition: left 0.3s cubic-bezier(.2,.9,.2,1);
}

/* Adjust top-info padding when sidebar is collapsed */
#sidebar-container:has(.sidebar.collapsed) ~ .main-area .top-info {
  left: 4.5rem !important;
}

.top-info > * {
  pointer-events: auto;
}

.top-info h1 { 
  white-space: nowrap; 
  font-size: 1.25rem; 
  font-weight: 700; 
  letter-spacing: 0.05em; 
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(251, 191, 36, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 20px rgba(251, 191, 36, 0.2);
}
.subscription-toggle-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.subscription-toggle-btn:hover {
  background: rgba(66, 66, 66, 0.3);
  color: rgba(255, 255, 255, 0.95);
}

.subscription-toggle-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s cubic-bezier(.2,.9,.2,1);
}

.subscription-toggle-btn.open svg {
  transform: rotate(90deg);
}

/* Subscription dropdown */
.subscription-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid rgba(151, 151, 151, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  overflow: hidden;
  z-index: 1001;
  pointer-events: auto !important;
}

.subscription-dropdown.hidden {
  display: none;
}

.subscription-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(151, 151, 151, 0.2);
}

.subscription-dropdown-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.02em;
}

.subscription-dropdown-content {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subscription-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.subscription-label {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.subscription-value {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.main-area { 
  background: transparent !important; 
  min-height: 100vh; 
  display: flex; 
  flex-direction: column; 
  position: relative;
  z-index: 110;
  pointer-events: none;
}

.main-area > * {
  pointer-events: auto;
}

.feature-windows { 
  flex: 1; 
  position: relative; 
  background: transparent !important; 
  overflow: hidden; 
  padding: 0; 
  z-index: 50;
  pointer-events: none;
}

.feature-windows > * {
  pointer-events: auto;
}

.feature-window { 
  position: absolute; 
  top: 80px; 
  left: 260px; 
  min-width: 320px; 
  min-height: 180px; 
  max-width: 90vw; 
  max-height: 90vh; 
  background: #18181b; 
  border-radius: 0.75rem; 
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.25); 
  border: 1.5px solid #232323; 
  z-index: 200; 
  display: flex; 
  flex-direction: column; 
  overflow: hidden; 
  resize: both; 
}

.feature-window-content { 
  flex: 1; 
  overflow: auto; 
  color: #d4d4d8;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feature-window-close { 
  background: none; 
  border: none; 
  color: #ff0000; 
  font-size: 1.5em; 
  line-height: 1;
  cursor: pointer; 
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
  padding: 0;
}

.feature-window-close:hover { 
  background: transparent;
  color: #ff5b5b; 
  transform: scale(1.1);
}

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
}

.profile-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-btn:hover {
    transform: scale(1.05);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid rgba(151, 151, 151, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    overflow: hidden;
    z-index: 1000;
}

.dropdown-item {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: rgba(66, 66, 66, 0.4);
}

.dropdown-item.delete-item {
    color: #ef4444;
}

.dropdown-item.delete-item:hover {
    background: rgba(239, 68, 68, 0.2);
}

.dropdown-divider {
    height: 1px;
    background: rgba(151, 151, 151, 0.2);
    margin: 4px 0;
}


/* AI Assistant Button */
.ai-btn {
    width: 40px;
    height: 40px;
    background: rgba(66, 66, 66, 0.3);
    border: 1px solid rgba(151, 151, 151, 0.3);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.ai-btn:hover {
    background: rgba(66, 66, 66, 0.5);
    border-color: rgba(151, 151, 151, 0.5);
    color: #fbbf24;
    transform: scale(1.05);
}

.ai-btn svg {
    width: 24px;
    height: 24px;
}

/* Modal Dialogs */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none;
}

.modal-dialog {
    background: rgba(24, 24, 27, 0.95);
    border: 1px solid rgba(63, 63, 70, 0.5);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    animation: modalSlideIn 0.3s cubic-bezier(.2,.9,.2,1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(63, 63, 70, 0.5);
    background: rgba(39, 39, 42, 0.3);
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #f4f4f5;
}

.modal-body {
    padding: 20px 24px;
    color: #d4d4d8;
    font-size: 14px;
    line-height: 1.6;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(63, 63, 70, 0.5);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn.cancel {
    background: rgba(39, 39, 42, 0.5);
    color: #d4d4d8;
    border: 1px solid rgba(63, 63, 70, 0.5);
}

.modal-btn.cancel:hover {
    background: rgba(39, 39, 42, 0.7);
    color: #f4f4f5;
}

.modal-btn.confirm {
    background: #fbbf24;
    color: #000000;
}

.modal-btn.confirm:hover {
    background: #f59e0b;
}

.modal-btn.delete {
    background: #ef4444;
    color: #ffffff;
}

.modal-btn.delete:hover {
    background: #dc2626;
}
