/* Growli PM - Design System (matches growli.co branding) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============ LIGHT THEME (Default) ============ */
:root {
  /* Core Colors - Growli Orange */
  --primary: #fc6100;
  --primary-dark: #e05600;
  --primary-light: rgba(252, 97, 0, 0.08);
  --primary-border: rgba(252, 97, 0, 0.2);
  
  /* Light Theme Backgrounds */
  --bg-dark: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #fafafa;
  --bg-input: #ffffff;
  --bg-sidebar: #e4e6eb;
  
  /* Text Colors */
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --text-secondary: rgba(0, 0, 0, 0.6);
  --text-sidebar: #1a1a1a;
  --text-sidebar-muted: #5f6368;
  
  /* Border */
  --border: #e5e7eb;
  --border-light: rgba(0, 0, 0, 0.06);
  --border-sidebar: #e0e2e6;
  
  /* Status Colors */
  --danger: #dc2626;
  --warning: #f59e0b;
  --info: #3b82f6;
  --success: #22c55e;
  
  /* UI */
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ============ DARK THEME ============ */
[data-theme="dark"] {
  --bg-dark: #0f0f0f;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-input: #0a0a0a;
  --bg-sidebar: #0a0a0a;
  
  --text: #fafafa;
  --text-muted: #a6a6a6;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-sidebar: #fafafa;
  --text-sidebar-muted: #a6a6a6;
  
  --border: #292929;
  --border-light: rgba(255, 255, 255, 0.1);
  --border-sidebar: #292929;
  
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Login Page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(252, 97, 0, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.login-box {
  background: var(--bg-card);
  padding: 48px 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 40px;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Brand Logo - "Growli" white text, orange dot on the i */
.brand {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 8px;
  display: inline-block;
}

.brand-i {
  position: relative;
}

/* Orange dot above the dotless i */
.brand-i::after {
  content: '';
  position: absolute;
  top: 0.05em;
  left: 50%;
  transform: translateX(-50%);
  width: 0.25em;
  height: 0.25em;
  background: var(--primary);
  border-radius: 50%;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 20px rgba(252, 97, 0, 0.15);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: scale(1.015);
  box-shadow: 0 0 30px rgba(252, 97, 0, 0.25);
}

.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #222;
  border-color: var(--primary-border);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 13px;
}

.error-message {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid var(--danger);
  color: #fca5a5;
  padding: 14px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 14px;
}

.forgot-link {
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: var(--primary);
}

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar stays dark always (hybrid approach) */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-sidebar);
  color: var(--text-sidebar);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-sidebar);
}

.sidebar-logo .brand {
  font-size: 22px;
  margin-bottom: 0;
  color: var(--text-sidebar);
}

.sidebar-logo .badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--primary);
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: auto;
}

.sidebar-nav {
  flex: 1;
}

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

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-sidebar-muted);
  padding: 0 16px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-sidebar-muted);
  text-decoration: none;
  border-radius: var(--radius);
  margin-bottom: 4px;
  transition: all 0.15s ease;
  font-weight: 500;
  font-size: 14px;
}

.nav-item:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-sidebar);
}

.nav-item.active {
  background: var(--primary);
  color: white;
}

.nav-item i,
.nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
  opacity: 0.7;
  flex-shrink: 0;
}

.nav-item.active i,
.nav-item.active svg {
  opacity: 1;
}

.nav-item .icon {
  font-size: 18px;
  opacity: 0.8;
}

.nav-item.active .icon {
  opacity: 1;
}

/* Logout button icon */
.logout-btn i,
.logout-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
}

.sidebar-clock {
  margin-top: auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border-sidebar);
}

.sidebar-clock .label {
  font-size: 12px;
  color: var(--text-sidebar-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-clock .timer {
  font-size: 28px;
  font-weight: 700;
  font-family: 'SF Mono', Monaco, monospace;
  color: var(--primary);
  margin: 8px 0;
}

.sidebar-clock .status {
  font-size: 12px;
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sidebar-clock .status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  margin-top: 20px;
  border-top: 1px solid var(--border-sidebar);
}

.sidebar-user .avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
}

.sidebar-user .info {
  flex: 1;
}

.sidebar-user .name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-sidebar);
}

.sidebar-user .role {
  font-size: 12px;
  color: var(--text-sidebar-muted);
}

.logout-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  transition: all 0.15s;
}

.logout-btn:hover {
  color: var(--danger);
  background: rgba(220, 38, 38, 0.1);
}

.main-content {
  flex: 1;
  padding: 32px 40px;
  overflow-y: auto;
  background: var(--bg-dark);
}

/* Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-header .subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.card:hover {
  border-color: var(--primary-border);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title .icon {
  color: var(--primary);
}

/* Status badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pending { 
  background: rgba(166, 166, 166, 0.15); 
  color: var(--text-muted); 
}
.status-queued { 
  background: rgba(59, 130, 246, 0.15); 
  color: #60a5fa; 
}
.status-in_progress { 
  background: rgba(252, 97, 0, 0.15); 
  color: var(--primary); 
}
.status-review { 
  background: rgba(34, 197, 94, 0.15); 
  color: #4ade80; 
}
.status-revisions { 
  background: rgba(245, 158, 11, 0.15); 
  color: #fbbf24; 
}
.status-completed { 
  background: rgba(34, 197, 94, 0.2); 
  color: #4ade80; 
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: var(--primary-border);
}

.stat-card .icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.stat-card .number {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-card .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* Project cards */
.project-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-card .project-title {
  font-size: 16px;
  font-weight: 600;
}

.project-card .project-client {
  color: var(--text-muted);
  font-size: 14px;
}

.project-card .project-info {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 14px;
}

.project-card .project-meta {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.project-card .project-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-card .project-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* Budget bar */
.budget-bar {
  margin-top: 12px;
}

.budget-bar .bar {
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
}

.budget-bar .bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #ff8533);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.budget-bar .bar .fill.warning {
  background: linear-gradient(90deg, var(--warning), #fcd34d);
}

.budget-bar .bar .fill.danger {
  background: linear-gradient(90deg, var(--danger), #f87171);
}

.budget-bar .text {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.budget-bar .text .amount {
  color: var(--text);
  font-weight: 600;
}

/* Table */
.table-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Comments */
.comments-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.comments-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.comment:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
}

.comment-author {
  font-weight: 600;
  font-size: 14px;
}

.comment-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.comment-content {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
  padding-left: 44px;
}

.comment-form {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

.comment-form textarea {
  flex: 1;
  resize: none;
  min-height: 80px;
}

/* Margin display (for agency) */
.margin-info {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
}

.margin-info .title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--success);
  margin-bottom: 8px;
  font-weight: 600;
}

.margin-info .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--success);
}

.margin-info .detail {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
}

/* Error page */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-dark);
}

.error-container {
  text-align: center;
}

.error-icon {
  font-size: 72px;
  display: block;
  margin-bottom: 24px;
}

.error-container h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.error-container p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Section titles */
.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .icon {
  color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    padding: 16px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .sidebar-logo {
    margin-bottom: 0;
    border-bottom: none;
    padding: 8px 0;
  }
  
  .sidebar-nav {
    display: flex;
    gap: 8px;
    order: 3;
    width: 100%;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  
  .nav-item {
    white-space: nowrap;
    padding: 10px 14px;
  }
  
  .sidebar-clock {
    display: none;
  }
  
  .sidebar-user {
    margin-left: auto;
    margin-top: 0;
    border-top: none;
    padding: 0;
  }
  
  .main-content {
    padding: 20px;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* Animations */
.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a3a3a;
}

/* Focus states for accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============ BRIEF FORM ============ */

.brief-form .card {
  margin-bottom: 24px;
}

.brief-form .section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* File Upload */
.file-upload-area {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-upload-area:hover,
.file-upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-upload-area input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.upload-icon {
  font-size: 32px;
}

.upload-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.file-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-input);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.file-icon {
  font-size: 20px;
}

.file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: 12px;
  color: var(--text-muted);
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
}

.alert-error {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid var(--danger);
  color: #fca5a5;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid var(--success);
  color: #86efac;
}

.alert-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid var(--info);
  color: #93c5fd;
}

/* Page subtitle */
.page-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ============ DELIVERABLES ============ */

.deliverables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.deliverable-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.2s ease;
}

.deliverable-card:hover {
  border-color: var(--primary-border);
  background: var(--bg-card-hover);
}

.deliverable-preview {
  width: 100%;
  height: 120px;
  background: var(--bg-dark);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}

.deliverable-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.deliverable-preview .file-icon-large {
  font-size: 48px;
  opacity: 0.5;
}

.deliverable-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.deliverable-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.deliverable-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.deliverable-actions .btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 12px;
}

/* Upload form in project view */
.upload-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.upload-inline {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.upload-inline .form-group {
  flex: 1;
  margin-bottom: 0;
}

.upload-inline input[type="file"] {
  padding: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  width: 100%;
}

/* Version badge */
.version-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

/* ============ THEME TOGGLE ============ */

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-sidebar);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.8);
}

.theme-toggle-icon {
  font-size: 16px;
}

.theme-toggle-label {
  font-size: 12px;
  color: var(--text-sidebar-muted);
  flex: 1;
}

.theme-toggle-switch {
  width: 36px;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
}

.theme-toggle-switch::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

[data-theme="dark"] .theme-toggle-switch {
  background: var(--primary);
}

[data-theme="dark"] .theme-toggle-switch::after {
  transform: translateX(16px);
}

/* Login page light mode adjustments */
.login-page {
  background: var(--bg-dark);
}

[data-theme="dark"] .login-page {
  background: #0f0f0f;
}

.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

/* Card shadows for light mode */
.card {
  box-shadow: var(--shadow);
}

/* Input focus states */
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Table adjustments for light mode */
.table th {
  background: var(--bg-dark);
  color: var(--text);
}

.table td {
  border-color: var(--border);
}

/* Comments light mode */
.comment {
  background: var(--bg-dark);
  border: 1px solid var(--border);
}

/* ============ ICON UTILITIES ============ */

.icon-inline {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 4px;
  stroke-width: 2;
}

.btn-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 6px;
  stroke-width: 2;
}

.btn-icon-right {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  margin-left: 4px;
  stroke-width: 2;
}

/* Status Dots */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.status-dot-success { background: var(--success); }
.status-dot-warning { background: var(--warning); }
.status-dot-danger { background: var(--danger); }
.status-dot-info { background: var(--info); }
.status-dot-muted { background: var(--text-muted); }

/* Section headers with icons */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.section-header i,
.section-header svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}
