/* ==========================================================================
   FORJA PWA - CSS ESTILO MUSE (META REFERENCE) - VERSION 2.0.0
   ========================================================================== */

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

:root {
  /* Colors - Light Theme (Default) */
  --bg-app: #F4F6F9;
  --bg-surface: #FFFFFF;
  --bg-sidebar: #F8FAFC;
  --bg-bubble-agent: #F0F4F9;
  --bg-bubble-user: #0866FF;
  --text-user: #FFFFFF;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border-color: #E2E8F0;

  /* Brand Accent */
  --primary: #0866FF;
  --primary-hover: #0052D6;
  --primary-light: #E7F0FF;
  --primary-border: #BFDBFE;

  /* Status Colors */
  --success: #10B981;
  --success-bg: #D1FAE5;
  --warning: #F59E0B;
  --warning-bg: #FEF3C7;
  --danger: #EF4444;
  --danger-bg: #FEE2E2;

  /* Design Tokens */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --header-height: 60px;
  --bottom-bar-height: 58px;
  --composer-height: 68px;
  --composer-max-width: 800px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-app: #0B0F17;
  --bg-surface: #1E293B;
  --bg-sidebar: #111827;
  --bg-bubble-agent: #1E293B;
  --bg-bubble-user: #0866FF;
  --text-user: #FFFFFF;
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #64748B;
  --border-color: #334155;
  --primary-light: rgba(8, 102, 255, 0.15);
  --primary-border: #1E40AF;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Main App Container Layout */
#app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Helper SVG Icon style */
.forja-svg-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Micro-interaction scaling */
button, .icon-btn, .chip-btn, .project-item, .bottom-tab-item {
  transition: transform 0.15s ease, background-color 0.2s ease, opacity 0.2s ease;
}

button:active, .icon-btn:active, .chip-btn:active {
  transform: scale(0.96);
}

/* ==========================================================================
   DRAWER / LEFT SIDEBAR
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-left {
  width: 280px;
  min-width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 90;
  transition: transform 0.28s cubic-bezier(.22,.8,.2,1);
}

.sidebar-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  cursor: pointer;
}

.new-chat-btn {
  width: calc(100% - 32px);
  margin: 16px;
  padding: 11px 16px;
  background-color: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.new-chat-btn:hover {
  background-color: var(--primary-hover);
}

.sidebar-search-box {
  padding: 0 16px 12px;
}

.sidebar-search-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 16px;
}

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

.project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 4px;
}

.project-item:hover, .project-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-footer-info {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
}

/* ==========================================================================
   MAIN AREA & HEADER
   ========================================================================== */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  background-color: var(--bg-app);
  overflow: hidden;
}

.top-header {
  height: var(--header-height);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 20;
}

.agent-profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md);
}

.agent-profile-header:hover {
  background-color: var(--bg-app);
}

.agent-info {
  display: flex;
  flex-direction: column;
}

.agent-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

.agent-status {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
}

.status-dot.thinking {
  background-color: var(--warning);
  animation: pulse-dot 1s infinite alternate;
}

.status-dot.working {
  background-color: var(--primary);
  animation: pulse-dot 0.5s infinite alternate;
}

@keyframes pulse-dot {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

/* Header Tabs (Desktop & Tablet) */
.header-tabs {
  display: flex;
  background-color: var(--bg-app);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  position: relative;
}

.tab-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
}

.tab-btn.active {
  background-color: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* SVG Avatar */
.forja-avatar-wrapper {
  position: relative;
  width: 38px;
  height: 38px;
}

.forja-avatar-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.forja-avatar-wrapper.reposo .bot-body {
  animation: float-idle 3s ease-in-out infinite alternate;
}

@keyframes float-idle {
  0% { transform: translateY(0); }
  100% { transform: translateY(-2px); }
}

/* ==========================================================================
   VIEWS (CHAT, PROYECTOS, IDEAS)
   ========================================================================== */
.view-panel {
  display: none;
  flex: 1;
  width: 100%;
  max-width: 100%;
  height: calc(100% - var(--header-height));
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  animation: fadeIn 0.25s ease forwards;
}

.view-panel.active {
  display: flex;
  flex-direction: column;
}

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

/* ==========================================================================
   REQUERIMIENTO 1: CHAT & FULL WIDTH BUBBLES
   ========================================================================== */
#chat-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.chat-thread {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px calc(var(--composer-height) + var(--bottom-bar-height) + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  .chat-thread {
    padding-bottom: calc(var(--composer-height) + 24px);
  }
}

.chat-thread-inner {
  max-width: var(--composer-max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ONBOARDING PROGRESS BAR */
.onboarding-banner {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.3s ease;
}

.onboarding-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
}

.onboarding-progress-bg {
  width: 100%;
  height: 6px;
  background-color: rgba(8, 102, 255, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.onboarding-progress-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* FULL WIDTH MESSAGE GROUP (NO MESSAGE AVATARS - REQ 1a) */
.msg-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  gap: 6px;
  animation: fadeInUp 0.25s ease forwards;
}

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

.msg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.msg-author-time {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.msg-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.8;
}

.msg-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.msg-action-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

/* Text Bubbles taking FULL WIDTH (REQ 1a) */
.bubble-text {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 14.5px;
  line-height: 1.55;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}

.agent-msg .bubble-text {
  background-color: var(--bg-bubble-agent);
  color: var(--text-primary);
  border-top-left-radius: 4px;
}

.user-msg .bubble-text {
  background-color: var(--bg-bubble-user);
  color: var(--text-user);
  border-top-right-radius: 4px;
}

.bubble-text p { margin-bottom: 8px; }
.bubble-text p:last-child { margin-bottom: 0; }
.bubble-text strong { font-weight: 600; }
.bubble-text ul { margin-left: 20px; margin-bottom: 8px; }

/* ==========================================================================
   COMPOSER (REQ 1c)
   ========================================================================== */
.composer-container {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--bottom-bar-height);
  z-index: 40;
  padding: 8px 12px;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: center;
}

@media (min-width: 768px) {
  .composer-container {
    bottom: 0;
  }
}

.composer-inner {
  max-width: var(--composer-max-width);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.composer-inner:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.attachment-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 2px;
}

.attachment-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-primary);
}

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.composer-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text-primary);
  resize: none;
  max-height: 110px;
  min-height: 24px;
  line-height: 1.4;
  padding: 6px 0;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.send-btn:hover {
  background-color: var(--primary-hover);
}

.attach-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.attach-btn:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
}

/* FLOATING SCROLL BOTTOM BUTTON */
.scroll-bottom-btn {
  position: fixed;
  right: 20px;
  bottom: calc(var(--bottom-bar-height) + var(--composer-height) + 16px);
  z-index: 45;
  background: var(--bg-surface);
  color: var(--primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  display: none;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  animation: fadeIn 0.2s ease;
}

@media (min-width: 768px) {
  .scroll-bottom-btn {
    bottom: calc(var(--composer-height) + 16px);
  }
}

.scroll-bottom-btn.visible {
  display: flex;
}

/* ==========================================================================
   CARDS & ARTIFACTS
   ========================================================================== */
.rich-block {
  width: 100%;
  margin-top: 4px;
}

/* Brief Card */
.card-brief {
  background: var(--bg-surface);
  border: 2px solid var(--primary-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brief-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.brief-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.brief-label {
  font-size: 11.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
}

.brief-value {
  font-size: 13.5px;
  color: var(--text-primary);
  font-weight: 500;
}

/* Project Card */
.card-project {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.card-project-title {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-status {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
}

.badge-status.in-progress {
  background-color: var(--warning-bg);
  color: var(--warning);
}

.badge-status.completed {
  background-color: var(--success-bg);
  color: var(--success);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Approval Card */
.card-approval {
  background-color: var(--bg-surface);
  border: 2px solid var(--primary-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.approval-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  font-size: 15.5px;
}

.approval-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.btn-approve {
  flex: 1;
  padding: 10px 16px;
  background-color: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-approve:hover {
  background-color: var(--primary-hover);
}

.btn-reject {
  padding: 10px 16px;
  background-color: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-reject:hover {
  background-color: var(--danger-bg);
}

/* Quick Selection Chips */
.quick-chips-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.chip-btn {
  background-color: var(--bg-surface);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.chip-btn:hover, .chip-btn.selected {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.card-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

.card-step-list {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.step-item.done {
  color: var(--success);
  font-weight: 600;
}

.step-item.active {
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================================================
   REQUERIMIENTO 2: PROYECTOS & IDEAS (FIX DISPLACEMENT & CAROUSEL)
   ========================================================================== */
.view-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 16px 80px;
  box-sizing: border-box;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
  margin-top: 16px;
}

/* HORIZONTAL CAROUSEL (REQ 2) */
.horizontal-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  padding: 8px 4px 16px;
  margin: 0 -4px;
  cursor: grab;
  user-select: none;
}

.horizontal-carousel:active {
  cursor: grabbing;
}

.carousel-card {
  flex: 0 0 82%;
  min-width: 260px;
  max-width: 320px;
  scroll-snap-align: start;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border-color);
  transition: background-color 0.2s, width 0.2s;
}

.indicator-dot.active {
  background-color: var(--primary);
  width: 18px;
  border-radius: 4px;
}

/* ==========================================================================
   REQUERIMIENTO 3: BOTTOM SHEET FOR SETTINGS & MODALS
   ========================================================================== */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet-modal {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  background-color: var(--bg-surface);
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(.22,.8,.2,1);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sheet-overlay.open .sheet-modal {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .sheet-overlay {
    align-items: center;
  }
  .sheet-modal {
    border-radius: 20px;
    transform: translateY(20px) scale(0.95);
  }
  .sheet-overlay.open .sheet-modal {
    transform: translateY(0) scale(1);
  }
}

.sheet-handle {
  width: 42px;
  height: 5px;
  background-color: var(--border-color);
  border-radius: 3px;
  margin: 0 auto 8px;
}

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

.sheet-title {
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-select {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR (MOBILE <768px)
   ========================================================================== */
.bottom-tab-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px));
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  z-index: 50;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
}

.bottom-tab-item.active {
  color: var(--primary);
}

/* BREAKPOINTS */
@media (max-width: 1023px) {
  .sidebar-left {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
  }
  .sidebar-left.open {
    transform: translateX(0);
  }
}

@media (max-width: 767px) {
  .header-tabs {
    display: none;
  }
  .bottom-tab-bar {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .drawer-overlay {
    display: none !important;
  }
  #close-sidebar-btn {
    display: none !important;
  }
  #menu-toggle-btn {
    display: none !important;
  }
}

/* ACCESSIBILITY & MOTION PREFERENCES */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
