/* ========================================
   ULTIMATE DEVELOPER LOUNGE — DESIGN SYSTEM
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-tertiary: #1a1a3e;
  --bg-card: rgba(25, 25, 60, 0.6);
  --bg-card-hover: rgba(35, 35, 80, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-strong: rgba(255, 255, 255, 0.07);

  --text-primary: #e8e8ff;
  --text-secondary: #9896c8;
  --text-muted: #6865a5;
  --text-accent: #00e5ff;

  --accent-cyan: #00e5ff;
  --accent-purple: #b47aff;
  --accent-pink: #ff6ec7;
  --accent-green: #39ff98;
  --accent-orange: #ffad42;
  --accent-red: #ff4d6a;
  --accent-blue: #4d8dff;

  --gradient-primary: linear-gradient(135deg, #00e5ff 0%, #b47aff 100%);
  --gradient-hero: linear-gradient(160deg, #0a0a1a 0%, #1a0a3a 40%, #0a1a3a 70%, #0a0a1a 100%);
  --gradient-card: linear-gradient(135deg, rgba(0, 229, 255, 0.08) 0%, rgba(180, 122, 255, 0.08) 100%);
  --gradient-btn: linear-gradient(135deg, #00e5ff 0%, #b47aff 50%, #ff6ec7 100%);
  --gradient-danger: linear-gradient(135deg, #ff4d6a 0%, #ff6ec7 100%);

  --border-glass: 1px solid rgba(255, 255, 255, 0.08);
  --border-accent: 1px solid rgba(0, 229, 255, 0.3);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow-cyan: 0 0 30px rgba(0, 229, 255, 0.15);
  --shadow-glow-purple: 0 0 30px rgba(180, 122, 255, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 50%;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* --- RESET & BASE --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- ANIMATED BACKGROUND --- */
.bg-animated {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--gradient-hero);
  overflow: hidden;
}

.bg-animated::before,
.bg-animated::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  animation: floatOrb 20s ease-in-out infinite;
}

.bg-animated::before {
  width: 600px;
  height: 600px;
  background: var(--accent-purple);
  top: -200px;
  right: -200px;
  animation-delay: -5s;
}

.bg-animated::after {
  width: 500px;
  height: 500px;
  background: var(--accent-cyan);
  bottom: -150px;
  left: -150px;
  animation-delay: -10s;
}

@keyframes floatOrb {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(80px, -60px) scale(1.1);
  }

  50% {
    transform: translate(-40px, 40px) scale(0.95);
  }

  75% {
    transform: translate(60px, 80px) scale(1.05);
  }
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1rem;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: var(--shadow-glow-cyan);
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  border: var(--border-glass);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--gradient-danger);
  color: #fff;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 77, 106, 0.3);
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* --- INPUTS --- */
.input,
.textarea,
.select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-glass);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all var(--transition-normal);
  outline: none;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.textarea {
  resize: vertical;
  min-height: 80px;
}

.select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239896c8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* --- CARDS & GLASS PANELS --- */
.glass-panel {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px;
  transition: all var(--transition-normal);
}

.glass-panel:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.glass-panel-accent {
  background: var(--gradient-card);
  border: var(--border-accent);
}

/* --- BADGES --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-cyan {
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
}

.badge-purple {
  background: rgba(180, 122, 255, 0.15);
  color: var(--accent-purple);
}

.badge-pink {
  background: rgba(255, 110, 199, 0.15);
  color: var(--accent-pink);
}

.badge-green {
  background: rgba(57, 255, 152, 0.15);
  color: var(--accent-green);
}

.badge-orange {
  background: rgba(255, 173, 66, 0.15);
  color: var(--accent-orange);
}

/* --- LAYOUT --- */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

/* --- VIEW TRANSITIONS --- */
.view {
  display: none;
  animation: viewFadeIn 0.5s ease forwards;
}

.view.active {
  display: block;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* ============================
   LANDING / AUTH VIEW
   ============================ */
#auth-view.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 40px 20px;
}

.landing-logo {
  font-size: 4rem;
  margin-bottom: 8px;
  animation: pulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.3));
}

.landing-title {
  font-size: 3rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.landing-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 36px;
  animation: scaleIn 0.6s ease forwards;
}

.login-card h3 {
  margin-bottom: 24px;
  color: var(--text-primary);
}

.login-card .input {
  margin-bottom: 16px;
}

.login-card .btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  margin-top: 8px;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 40px;
  max-width: 600px;
}

.feature-pill {
  padding: 8px 18px;
  background: var(--bg-glass-strong);
  border: var(--border-glass);
  border-radius: 30px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  animation: slideInUp 0.5s ease forwards;
  opacity: 0;
}

.feature-pill:nth-child(1) {
  animation-delay: 0.1s;
}

.feature-pill:nth-child(2) {
  animation-delay: 0.2s;
}

.feature-pill:nth-child(3) {
  animation-delay: 0.3s;
}

.feature-pill:nth-child(4) {
  animation-delay: 0.4s;
}

.feature-pill:nth-child(5) {
  animation-delay: 0.5s;
}

.feature-pill:nth-child(6) {
  animation-delay: 0.6s;
}

/* ============================
   DASHBOARD VIEW
   ============================ */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-glass-strong);
  border: var(--border-glass);
  border-radius: 30px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.user-chip .avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
}

.dashboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.studios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.studio-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.4s ease forwards;
  opacity: 0;
}

.studio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-purple);
}

.studio-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.studio-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.studio-card h3 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.studio-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.studio-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: var(--border-glass);
}

.studio-card-members {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  animation: viewFadeIn 0.5s ease forwards;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.empty-state p {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 24px;
}

/* ============================
   MODAL
   ============================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: viewFadeIn 0.2s ease;
  padding: 20px;
}

.modal {
  background: var(--bg-secondary);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.3s ease forwards;
  box-shadow: var(--shadow-lg);
}

.modal h3 {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ============================
   STUDIO WORKSPACE VIEW
   ============================ */
.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.workspace-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass-strong);
  border: var(--border-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.workspace-title h2 {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

.workspace-title p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.workspace-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- Tabs --- */
.workspace-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-glass);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  color: var(--text-secondary);
  background: var(--bg-glass);
}

.tab-btn.active {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-glow-cyan);
}

/* --- Tab Panels --- */
.tab-panel {
  display: none;
  animation: viewFadeIn 0.4s ease forwards;
}

.tab-panel.active {
  display: block;
}

/* ============================
   SKETCHBOARD
   ============================ */
.sketch-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-glass);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sketch-toolbar .divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
}

.color-picker-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.color-picker-wrapper input[type="color"] {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  cursor: pointer;
  border: none;
  background: none;
}

.brush-size-slider {
  width: 100px;
  -webkit-appearance: none;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  outline: none;
}

.brush-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.sketch-canvas-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--border-glass);
  background: #0d0d20;
  position: relative;
}

.sketch-canvas-container canvas {
  display: block;
  width: 100%;
  cursor: crosshair;
}

/* ============================
   TO-DO LIST
   ============================ */
.todo-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.todo-input-row .input {
  flex: 1;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-glass);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  animation: slideInRight 0.3s ease forwards;
}

.todo-item:hover {
  background: var(--bg-glass-strong);
}

.todo-item.completed {
  opacity: 0.5;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
}

.todo-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  font-size: 0.75rem;
  color: transparent;
}

.todo-checkbox:hover {
  border-color: var(--accent-cyan);
}

.todo-checkbox.checked {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #000;
}

.todo-text {
  flex: 1;
  font-size: 0.9rem;
}

.todo-assignee {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.todo-delete {
  cursor: pointer;
  color: var(--text-muted);
  opacity: 0;
  transition: all var(--transition-fast);
  font-size: 1rem;
  background: none;
  border: none;
}

.todo-item:hover .todo-delete {
  opacity: 1;
}

.todo-delete:hover {
  color: var(--accent-red);
}

/* ============================
   BUDGET TRACKER
   ============================ */
.budget-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.budget-stat {
  padding: 20px;
  text-align: center;
}

.budget-stat .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.budget-stat .stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.stat-value.income {
  color: var(--accent-green);
}

.stat-value.expense {
  color: var(--accent-red);
}

.stat-value.balance {
  color: var(--accent-cyan);
}

.budget-add-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.budget-add-row .input {
  flex: 1;
  min-width: 120px;
}

.budget-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.budget-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-glass);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  animation: slideInRight 0.3s ease forwards;
}

.budget-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.budget-item-icon.income-icon {
  background: rgba(57, 255, 152, 0.15);
}

.budget-item-icon.expense-icon {
  background: rgba(255, 77, 106, 0.15);
}

.budget-item-info {
  flex: 1;
}

.budget-item-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.budget-item-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.budget-item-amount {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
}

.budget-item-amount.income {
  color: var(--accent-green);
}

.budget-item-amount.expense {
  color: var(--accent-red);
}

.budget-item-delete {
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-muted);
  opacity: 0;
  transition: all var(--transition-fast);
}

.budget-item:hover .budget-item-delete {
  opacity: 1;
}

.budget-item-delete:hover {
  color: var(--accent-red);
}

/* ============================
   FILE SHARING
   ============================ */
.file-upload-zone {
  padding: 48px 24px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-bottom: 24px;
  position: relative;
}

.file-upload-zone:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.03);
}

.file-upload-zone.dragover {
  border-color: var(--accent-purple);
  background: rgba(180, 122, 255, 0.05);
  transform: scale(1.01);
}

.file-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-upload-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.file-upload-zone h4 {
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.file-upload-zone p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.file-card {
  padding: 20px;
  text-align: center;
  animation: scaleIn 0.3s ease forwards;
}

.file-card-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.file-card-name {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 4px;
  word-break: break-all;
}

.file-card-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.file-card-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* ============================
   MEMBERS PANEL
   ============================ */
.members-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.invite-code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-glass);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.invite-code-box code {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.1em;
  flex: 1;
}

.invite-code-box .btn {
  flex-shrink: 0;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-glass);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  animation: slideInRight 0.3s ease forwards;
}

.member-item:hover {
  background: var(--bg-glass-strong);
}

.member-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.member-info {
  flex: 1;
}

.member-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.member-role-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-role-controls .select {
  width: auto;
  min-width: 140px;
  padding: 6px 32px 6px 12px;
  font-size: 0.8rem;
}

.kick-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 77, 106, 0.1);
  border: 1px solid rgba(255, 77, 106, 0.2);
  color: var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.85rem;
}

.kick-btn:hover {
  background: rgba(255, 77, 106, 0.2);
}

/* ============================
   PLANS PANEL
   ============================ */
.plans-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.plans-input-row .input,
.plans-input-row .textarea {
  flex: 1;
  min-width: 200px;
}

.plans-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.plan-card {
  position: relative;
  padding: 20px;
  animation: slideInUp 0.3s ease forwards;
}

.plan-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.plan-card h4 {
  font-size: 1.05rem;
}

.plan-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
}

.plan-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: var(--border-glass);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.plan-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: color var(--transition-fast);
}

.plan-delete:hover {
  color: var(--accent-red);
}

/* ============================
   TOAST NOTIFICATIONS
   ============================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  min-width: 260px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease forwards;
  pointer-events: auto;
  backdrop-filter: blur(20px);
}

.toast.success {
  border-left: 3px solid var(--accent-green);
}

.toast.error {
  border-left: 3px solid var(--accent-red);
}

.toast.info {
  border-left: 3px solid var(--accent-cyan);
}

.toast-exit {
  animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
  to {
    opacity: 0;
    transform: translateX(80px);
  }
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
  .landing-title {
    font-size: 2rem;
  }

  .landing-logo {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .studios-grid {
    grid-template-columns: 1fr;
  }

  .workspace-tabs {
    gap: 2px;
  }

  .tab-btn {
    padding: 8px 14px;
    font-size: 0.78rem;
  }

  .budget-add-row {
    flex-direction: column;
  }

  .todo-input-row {
    flex-direction: column;
  }

  .files-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .app-container {
    padding: 12px;
  }

  .glass-panel {
    padding: 16px;
  }

  .modal {
    padding: 24px;
  }

  .files-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================
   ADMIN PANEL
   ============================ */
.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.admin-setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: var(--bg-glass);
  border: var(--border-glass);
  border-radius: var(--radius-md);
}

.admin-setting-item label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.admin-setting-item .input {
  width: 80px;
  text-align: center;
  padding: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* --- Canvas Selector --- */
.canvas-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

.canvas-selector .select {
  width: auto;
  min-width: 140px;
  padding: 6px 32px 6px 12px;
  font-size: 0.8rem;
}

/* --- Loading Spinner --- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 26, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  z-index: 3000;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: var(--text-secondary);
}

/* --- Studio Creation Wizard --- */
.modal-wide {
  max-width: 800px;
}

.storage-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.storage-plan {
  background: var(--bg-glass);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.storage-plan::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.storage-plan:hover {
  transform: translateY(-4px);
  background: var(--bg-glass-strong);
  border-color: rgba(0, 229, 255, 0.3);
}

.storage-plan.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.1);
  box-shadow: var(--shadow-glow-cyan);
}

.storage-plan.active .plan-header {
  color: var(--accent-cyan);
}

.plan-header {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.plan-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.plan-details {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* --- Real-Time Chat --- */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 320px);
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  border: var(--border-glass);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-message.sent {
  align-self: flex-end;
  background: var(--gradient-primary);
  color: #fff;
  border-top-right-radius: 2px;
}

.chat-message.received {
  align-self: flex-start;
  background: var(--bg-glass-strong);
  border: var(--border-glass);
  border-top-left-radius: 2px;
}

.message-user {
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 4px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chat-input-area {
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 12px;
  border-top: var(--border-glass);
}

/* Admin Dashboard Grid (from previous edits) */
.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .storage-plans {
    grid-template-columns: 1fr;
  }
}