/* =========================================================
   PRO-AI-COPILOT
   Archivo: style.css
   Autor: Bernardo G. Peña Madera
   ========================================================= */

:root {
  --bg-main: #12071f;
  --bg-secondary: #1a0b2e;
  --bg-tertiary: #26103d;
  --bg-panel: rgba(38, 16, 61, 0.94);
  --bg-panel-solid: #26103d;
  --bg-hover: rgba(255, 179, 0, 0.10);
  --bg-input: rgba(255, 255, 255, 0.06);

  --primary: #ff9d00;
  --primary-rgb: 255, 157, 0;
  --secondary: #ff3d81;
  --secondary-rgb: 255, 61, 129;

  --success: #36e6a0;
  --success-rgb: 54, 230, 160;
  --warning: #ffd166;
  --warning-rgb: 255, 209, 102;
  --danger: #ff4057;
  --danger-rgb: 255, 64, 87;

  --purple: #a855f7;
  --cyan: #26ddff;
  --orange: #ff7a00;

  --text-primary: #fffaf2;
  --text-secondary: #d9cbe8;
  --text-muted: #9d89b5;
  --text-dark: #160822;

  --border: rgba(255, 190, 70, 0.14);
  --border-strong: rgba(255, 190, 70, 0.28);

  --sidebar-width: 290px;
  --topbar-height: 86px;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 20px 60px rgba(0, 0, 0, 0.42);
  --shadow-glow:
    0 0 25px rgba(255, 157, 0, 0.20),
    0 0 55px rgba(255, 61, 129, 0.12);

  --transition-fast: 160ms ease;
  --transition: 260ms ease;
  --transition-slow: 420ms ease;
}

body.light-theme {
  --bg-main: #eef3fb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f5f7fc;
  --bg-panel: rgba(255, 255, 255, 0.95);
  --bg-panel-solid: #ffffff;
  --bg-hover: rgba(15, 23, 42, 0.06);
  --bg-input: rgba(15, 23, 42, 0.045);

  --text-primary: #101827;
  --text-secondary: #4b5870;
  --text-muted: #7b879d;

  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);

  --shadow-sm: 0 10px 30px rgba(36, 50, 80, 0.1);
  --shadow-md: 0 20px 60px rgba(36, 50, 80, 0.16);
}

/* =========================================================
   RESET
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(var(--primary-rgb), 0.1), transparent 30%),
    radial-gradient(circle at 85% 85%, rgba(var(--secondary-rgb), 0.08), transparent 32%),
    var(--bg-main);
  color: var(--text-primary);
  transition:
    background var(--transition),
    color var(--transition);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

button,
input,
textarea,
select {
  outline: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.22);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

textarea {
  resize: none;
}

::selection {
  background: rgba(var(--primary-rgb), 0.28);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid transparent;
  background-clip: padding-box;
}

body.light-theme ::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.16);
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* =========================================================
   GLOBAL
   ========================================================= */

.noscript-message {
  padding: 14px;
  text-align: center;
  background: var(--danger);
  color: #ffffff;
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
}

.main-wrapper {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

.main-content {
  flex: 1;
  padding: 28px;
}

.page-section {
  display: none;
  animation: pageFade 0.35s ease;
}

.page-section.active {
  display: block;
}

@keyframes pageFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}

.panel-header h3 {
  margin: 4px 0 0;
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
}

.panel-eyebrow,
.section-eyebrow,
.page-eyebrow,
.nav-section-title,
.context-card-title,
.command-section-title {
  color: var(--text-muted);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.section-block {
  margin-top: 28px;
}

.section-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.section-heading h3 {
  margin: 4px 0 0;
  font-family: "Montserrat", sans-serif;
}

.compact-heading {
  margin-top: 28px;
}

.page-toolbar {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.page-toolbar h2 {
  margin: 5px 0 8px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.page-toolbar p {
  margin: 0;
  color: var(--text-secondary);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: var(--bg-input);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.icon-button:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.icon-button.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.icon-button.active {
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), 0.35);
  background: rgba(var(--primary-rgb), 0.12);
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: all var(--transition-fast);
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), #4776ff);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.24);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(var(--primary-rgb), 0.34);
}

.secondary-button {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-primary);
}

.secondary-button:hover {
  border-color: rgba(var(--primary-rgb), 0.45);
  background: rgba(var(--primary-rgb), 0.1);
}

.danger-button {
  background: rgba(var(--danger-rgb), 0.12);
  border-color: rgba(var(--danger-rgb), 0.26);
  color: var(--danger);
}

.compact {
  min-height: 40px;
  padding: 0 15px;
  font-size: 0.87rem;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.text-button:hover {
  color: var(--cyan);
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 12px rgba(var(--success-rgb), 0.75);
}

.live-chip,
.status-chip {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.live-chip {
  padding: 7px 10px;
  border: 1px solid rgba(var(--success-rgb), 0.22);
  background: rgba(var(--success-rgb), 0.09);
  color: var(--success);
}

.live-chip.large {
  padding: 10px 15px;
}

.status-chip {
  padding: 6px 10px;
}

.status-chip.success {
  color: var(--success);
  background: rgba(var(--success-rgb), 0.11);
}

.status-chip.progress {
  color: var(--warning);
  background: rgba(var(--warning-rgb), 0.12);
}

.status-chip.neutral {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.progress-track,
.mini-progress {
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-hover);
}

.progress-track {
  height: 7px;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.mini-progress {
  width: 100px;
  height: 5px;
}

.mini-progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1000;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.045), transparent 22%),
    rgba(8, 13, 27, 0.97);
  backdrop-filter: blur(25px);
  transition: transform var(--transition);
}

body.light-theme .sidebar {
  background:
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.05), transparent 22%),
    rgba(255, 255, 255, 0.98);
}

.sidebar-header {
  min-height: 86px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.brand-button {
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  text-align: left;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  font-size: 1.2rem;
  box-shadow: 0 12px 25px rgba(var(--primary-rgb), 0.24);
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong {
  display: block;
  overflow: hidden;
  font-family: "Montserrat", sans-serif;
  font-size: 0.91rem;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 3px;
  display: block;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.sidebar-close {
  display: none;
}

.sidebar-profile {
  margin: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--bg-input);
}

.profile-avatar,
.user-avatar,
.contact-avatar {
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  font-weight: 900;
}

.profile-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.profile-info {
  min-width: 0;
  flex: 1;
}

.profile-info strong,
.profile-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-info strong {
  font-size: 0.82rem;
}

.profile-info span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.profile-menu-button {
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
}

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

.nav-section + .nav-section {
  margin-top: 24px;
}

.nav-section-title {
  padding: 0 12px 9px;
  display: block;
}

.nav-item {
  width: 100%;
  min-height: 45px;
  margin: 3px 0;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  transition: all var(--transition-fast);
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-item.active {
  border-color: rgba(var(--primary-rgb), 0.18);
  background: linear-gradient(
    90deg,
    rgba(var(--primary-rgb), 0.17),
    rgba(var(--secondary-rgb), 0.05)
  );
  color: var(--text-primary);
}

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

.nav-icon {
  width: 25px;
  flex: 0 0 auto;
  text-align: center;
  color: var(--text-muted);
}

.nav-label {
  min-width: 0;
  flex: 1;
  font-size: 0.82rem;
  font-weight: 650;
}

.nav-badge,
.nav-count {
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 800;
}

.nav-badge {
  padding: 4px 7px;
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
}

.nav-count {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: var(--bg-hover);
  color: var(--text-muted);
}

.radio-icon {
  color: var(--success);
}

.chef-icon {
  color: var(--orange);
}

.studio-icon {
  color: var(--secondary);
}

.translator-icon {
  color: var(--cyan);
}

.crm-icon {
  color: var(--warning);
}

.sidebar-system-card {
  margin: 0 16px 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-input);
}

.system-card-heading,
.system-meter-row,
.system-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.system-card-heading {
  font-size: 0.72rem;
  font-weight: 800;
}

.system-card-heading > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 0.62rem;
}

.system-meter {
  margin-top: 14px;
}

.system-meter-row {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.system-meter-row strong {
  color: var(--text-primary);
}

.system-card-footer {
  margin-top: 13px;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.system-card-footer button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
}

.sidebar-footer {
  padding: 0 12px 14px;
}

.logout-button {
  color: var(--danger);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 990;
  display: none;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
}

/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  min-height: var(--topbar-height);
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(200px, 0.8fr) minmax(280px, 1.5fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: 22px;
  background: rgba(7, 11, 23, 0.88);
  backdrop-filter: blur(20px);
}

body.light-theme .topbar {
  background: rgba(255, 255, 255, 0.88);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-button {
  display: none;
}

.page-heading h1 {
  margin: 3px 0 0;
  font-family: "Montserrat", sans-serif;
  font-size: 1.28rem;
}

.global-search {
  height: 46px;
  padding: 0 12px 0 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  transition: border-color var(--transition-fast);
}

.global-search:focus-within {
  border-color: rgba(var(--primary-rgb), 0.45);
}

.global-search > i {
  color: var(--text-muted);
}

.global-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-primary);
}

.global-search input::placeholder {
  color: var(--text-muted);
}

.search-shortcut {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 0.62rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.notification-button {
  position: relative;
}

.notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid var(--bg-main);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--danger);
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 800;
}

.user-menu {
  margin-left: 4px;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  text-align: left;
}

.user-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.76rem;
}

.user-avatar.large {
  width: 48px;
  height: 48px;
}

.user-copy {
  min-width: 0;
}

.user-copy strong,
.user-copy small {
  display: block;
}

.user-copy strong {
  max-width: 110px;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.user-menu > i {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* =========================================================
   HERO
   ========================================================= */

.hero-panel {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.6fr);
  align-items: center;
  gap: 40px;
  background:
    linear-gradient(135deg, rgba(var(--primary-rgb), 0.16), rgba(var(--secondary-rgb), 0.1)),
    var(--bg-panel-solid);
  box-shadow: var(--shadow-md);
}

.hero-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
}

.hero-orb-one {
  top: -100px;
  right: 25%;
  width: 260px;
  height: 260px;
  background: rgba(var(--primary-rgb), 0.2);
}

.hero-orb-two {
  right: -80px;
  bottom: -100px;
  width: 300px;
  height: 300px;
  background: rgba(var(--secondary-rgb), 0.16);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(90deg, #000, transparent 80%);
}

.hero-content,
.hero-assistant {
  position: relative;
  z-index: 1;
}

.hero-badge,
.chef-badge {
  width: fit-content;
  padding: 8px 11px;
  border: 1px solid rgba(var(--success-rgb), 0.22);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--success-rgb), 0.08);
  color: var(--success);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-content h2 {
  max-width: 730px;
  margin: 20px 0 16px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.7rem);
  line-height: 1.04;
}

.hero-content h2 span {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
}

.hero-content p {
  max-width: 760px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

.hero-actions {
  margin-top: 27px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-assistant {
  display: grid;
  place-items: center;
}

.assistant-core {
  position: relative;
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
}

.assistant-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(var(--primary-rgb), 0.28);
  animation: ringPulse 4s infinite ease-in-out;
}

.ring-one {
  inset: 0;
}

.ring-two {
  inset: 22px;
  border-color: rgba(var(--secondary-rgb), 0.3);
  animation-delay: -1.2s;
}

.ring-three {
  inset: 44px;
  animation-delay: -2.2s;
}

.assistant-brain {
  width: 82px;
  height: 82px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  font-size: 2rem;
  box-shadow:
    0 0 45px rgba(var(--primary-rgb), 0.42),
    0 0 80px rgba(var(--secondary-rgb), 0.2);
}

.assistant-status {
  margin-top: 15px;
  text-align: center;
}

.assistant-status span,
.assistant-status strong {
  display: block;
}

.assistant-status span {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.assistant-status strong {
  margin-top: 4px;
  color: var(--success);
}

@keyframes ringPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.96) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.04) rotate(180deg);
  }
}

/* =========================================================
   METRICS
   ========================================================= */

.metric-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.metric-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.metric-icon,
.summary-icon,
.timeline-icon,
.notification-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
}

.metric-icon.blue,
.summary-icon.blue,
.timeline-icon.blue,
.notification-icon.blue {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.12);
}

.metric-icon.magenta,
.summary-icon.magenta,
.timeline-icon.magenta,
.notification-icon.magenta {
  color: var(--secondary);
  background: rgba(var(--secondary-rgb), 0.12);
}

.metric-icon.green,
.summary-icon.green,
.timeline-icon.success,
.notification-icon.green {
  color: var(--success);
  background: rgba(var(--success-rgb), 0.12);
}

.metric-icon.orange,
.summary-icon.orange,
.timeline-icon.orange,
.notification-icon.orange {
  color: var(--orange);
  background: rgba(255, 140, 66, 0.12);
}

.metric-content {
  min-width: 0;
  flex: 1;
}

.metric-content > span,
.metric-content strong,
.metric-content small {
  display: block;
}

.metric-content > span {
  color: var(--text-secondary);
  font-size: 0.74rem;
}

.metric-content strong {
  margin-top: 5px;
  font-family: "Montserrat", sans-serif;
  font-size: 1.45rem;
}

.metric-content small {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.metric-content small i {
  margin-right: 4px;
}

.metric-action {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-hover);
  color: var(--text-muted);
}

.metric-action:hover {
  color: var(--primary);
}

/* =========================================================
   DASHBOARD GRIDS
   ========================================================= */

.dashboard-grid {
  margin-top: 24px;
  display: grid;
  gap: 20px;
}

.dashboard-grid-main {
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.7fr);
}

.dashboard-grid-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* =========================================================
   CHAT
   ========================================================= */

.copilot-panel {
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copilot-chat,
.full-chat {
  flex: 1;
  overflow-y: auto;
}

.copilot-chat {
  min-height: 345px;
  max-height: 445px;
  padding: 22px;
}

.full-chat {
  padding: 28px;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.chat-message + .chat-message {
  margin-top: 18px;
}

.chat-message.user-message {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
}

.message-bubble {
  max-width: min(760px, 85%);
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: 5px 18px 18px;
  background: var(--bg-input);
}

.user-message .message-bubble {
  border-radius: 18px 5px 18px 18px;
  border-color: rgba(var(--primary-rgb), 0.2);
  background: rgba(var(--primary-rgb), 0.13);
}

.message-bubble strong {
  font-size: 0.76rem;
}

.message-bubble p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.65;
}

.quick-actions {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-actions button {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.quick-actions button:hover {
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.copilot-composer {
  margin: 0 20px 20px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: end;
  gap: 7px;
  background: var(--bg-input);
}

.copilot-composer:focus-within,
.full-composer:focus-within {
  border-color: rgba(var(--primary-rgb), 0.4);
}

.copilot-composer textarea,
.full-composer textarea {
  min-height: 39px;
  max-height: 150px;
  flex: 1;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  line-height: 1.5;
}

.composer-tool,
.send-button,
.voice-compose-button {
  border: 0;
  display: grid;
  place-items: center;
}

.composer-tool,
.voice-compose-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
}

.composer-tool:hover,
.voice-compose-button:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

.send-button {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
}

.send-button.large {
  width: 46px;
  height: 46px;
}

/* =========================================================
   HEALTH PANEL
   ========================================================= */

.health-panel {
  padding-bottom: 20px;
}

.health-score {
  padding: 24px 20px 16px;
  display: grid;
  place-items: center;
}

.health-ring {
  width: 164px;
  height: 164px;
  padding: 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--success) 0 98%, var(--bg-hover) 98% 100%);
  box-shadow: 0 0 45px rgba(var(--success-rgb), 0.15);
}

.health-ring > div {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: var(--bg-panel-solid);
}

.health-ring strong {
  font-family: "Montserrat", sans-serif;
  font-size: 2rem;
}

.health-ring span {
  margin-top: 3px;
  color: var(--success);
  font-size: 0.72rem;
}

.health-list {
  padding: 0 22px;
}

.health-row {
  padding: 13px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--border);
}

.health-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.health-icon {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-hover);
  color: var(--primary);
}

.health-label strong,
.health-label small {
  display: block;
}

.health-label strong {
  font-size: 0.76rem;
}

.health-label small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.63rem;
}

.health-value {
  min-width: 100px;
  text-align: right;
}

.health-value strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
}

/* =========================================================
   PROJECTS AND ACTIVITY
   ========================================================= */

.project-list,
.activity-timeline {
  padding: 9px 22px 20px;
}

.project-row {
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 13px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.project-row:last-child {
  border-bottom: 0;
}

.project-row:hover .project-info strong {
  color: var(--primary);
}

.project-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.radio-project-logo {
  color: var(--success);
  background: rgba(var(--success-rgb), 0.12);
}

.chef-project-logo {
  color: var(--orange);
  background: rgba(255, 140, 66, 0.12);
}

.studio-project-logo {
  color: var(--secondary);
  background: rgba(var(--secondary-rgb), 0.11);
}

.crm-project-logo {
  color: var(--warning);
  background: rgba(var(--warning-rgb), 0.11);
}

.project-info {
  min-width: 0;
  flex: 1;
}

.project-info strong,
.project-info small {
  display: block;
}

.project-info strong {
  font-size: 0.82rem;
}

.project-info small {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.66rem;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.activity-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
}

.activity-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 47px;
  bottom: -5px;
  left: 17px;
  width: 1px;
  background: var(--border);
}

.timeline-icon {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.activity-copy {
  min-width: 0;
  flex: 1;
}

.activity-copy strong {
  font-size: 0.78rem;
}

.activity-copy p {
  margin: 4px 0;
  color: var(--text-secondary);
  font-size: 0.69rem;
  line-height: 1.5;
}

.activity-copy span {
  color: var(--text-muted);
  font-size: 0.62rem;
}

/* =========================================================
   AGENTS
   ========================================================= */

.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.agent-card,
.management-agent-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  transition: all var(--transition-fast);
}

.agent-card:hover,
.management-agent-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.agent-card {
  padding: 21px;
}

.agent-card-top,
.management-agent-header,
.agent-title-row,
.management-agent-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-avatar {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.agent-avatar.large {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  font-size: 1.5rem;
}

.agent-avatar.blue {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.12);
}

.agent-avatar.magenta {
  color: var(--secondary);
  background: rgba(var(--secondary-rgb), 0.12);
}

.agent-avatar.green {
  color: var(--success);
  background: rgba(var(--success-rgb), 0.12);
}

.agent-avatar.orange {
  color: var(--orange);
  background: rgba(255, 140, 66, 0.12);
}

.agent-avatar.cyan {
  color: var(--cyan);
  background: rgba(32, 217, 255, 0.11);
}

.agent-avatar.purple {
  color: var(--purple);
  background: rgba(141, 92, 255, 0.12);
}

.agent-card h3 {
  margin: 18px 0 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.96rem;
}

.agent-card p {
  min-height: 59px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.73rem;
  line-height: 1.65;
}

.agent-skills {
  margin: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-skills span {
  padding: 5px 7px;
  border-radius: 7px;
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 0.6rem;
}

.agent-button {
  width: 100%;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: var(--primary);
  font-size: 0.73rem;
  font-weight: 800;
}

.filter-bar {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.filter-tabs {
  display: flex;
  gap: 7px;
}

.filter-tab {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
}

.filter-tab.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), #4776ff);
}

.filter-search {
  min-width: 230px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
}

.filter-search i {
  color: var(--text-muted);
}

.filter-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-primary);
}

.agent-management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.management-agent-card {
  overflow: hidden;
}

.management-agent-header {
  padding: 20px 20px 0;
}

.management-agent-body {
  padding: 18px 20px;
}

.agent-title-row h3 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 0.96rem;
}

.management-agent-body > p {
  min-height: 60px;
  margin: 11px 0 18px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.6;
}

.agent-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.agent-stats div {
  padding: 10px;
  border-radius: 10px;
  background: var(--bg-input);
  text-align: center;
}

.agent-stats strong,
.agent-stats span {
  display: block;
}

.agent-stats strong {
  font-size: 0.88rem;
}

.agent-stats span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.58rem;
}

.management-agent-footer {
  padding: 13px 20px;
  border-top: 1px solid var(--border);
}

.management-agent-footer button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
}

/* =========================================================
   COPILOT WORKSPACE
   ========================================================= */

.copilot-workspace {
  min-height: calc(100vh - 190px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 260px;
  background: var(--bg-panel);
}

.conversation-sidebar,
.context-sidebar {
  background: rgba(255, 255, 255, 0.015);
}

.conversation-sidebar {
  border-right: 1px solid var(--border);
}

.context-sidebar {
  padding: 18px;
  border-left: 1px solid var(--border);
}

.conversation-sidebar-header {
  height: 70px;
  padding: 0 17px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.conversation-sidebar-header strong {
  font-size: 0.83rem;
}

.conversation-list {
  padding: 12px;
}

.conversation-item {
  width: 100%;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
}

.conversation-item:hover,
.conversation-item.active {
  border-color: var(--border);
  background: var(--bg-hover);
  color: var(--text-primary);
}

.conversation-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-input);
  color: var(--primary);
}

.conversation-copy {
  min-width: 0;
}

.conversation-copy strong,
.conversation-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy strong {
  font-size: 0.72rem;
}

.conversation-copy small {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.61rem;
}

.copilot-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.copilot-main-header {
  height: 70px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copilot-identity,
.copilot-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.copilot-logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
}

.copilot-identity strong,
.copilot-identity span {
  display: block;
}

.copilot-identity strong {
  font-size: 0.8rem;
}

.copilot-identity > div > span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.63rem;
}

.copilot-identity .status-dot {
  margin-right: 4px;
}

.full-composer {
  margin: 0 22px 22px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--bg-input);
}

.composer-toolbar {
  padding-bottom: 9px;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.composer-toolbar button {
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.67rem;
}

.composer-toolbar button:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

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

.context-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-input);
}

.context-card + .context-card {
  margin-top: 14px;
}

.context-card-title {
  display: block;
  margin-bottom: 12px;
}

.context-project {
  display: flex;
  align-items: center;
  gap: 10px;
}

.context-project .project-logo {
  width: 38px;
  height: 38px;
}

.context-project strong,
.context-project small {
  display: block;
}

.context-project strong {
  font-size: 0.7rem;
}

.context-project small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.58rem;
}

.context-data {
  margin-top: 13px;
  display: grid;
  gap: 8px;
}

.context-data span {
  color: var(--text-secondary);
  font-size: 0.66rem;
}

.context-data i {
  width: 18px;
  color: var(--primary);
}

.context-card select,
.form-field select,
.form-field input,
.period-selector {
  width: 100%;
  min-height: 41px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-primary);
}

.toggle-row,
.settings-toggle-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle-row + .toggle-row {
  margin-top: 12px;
}

.toggle-row > span:first-child {
  color: var(--text-secondary);
  font-size: 0.67rem;
}

.toggle-row > span:first-child i {
  width: 20px;
  color: var(--primary);
}

.toggle-row input,
.settings-toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-switch {
  position: relative;
  width: 38px;
  height: 21px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--bg-hover);
  transition: background var(--transition-fast);
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all var(--transition-fast);
}

input:checked + .toggle-switch {
  background: rgba(var(--primary-rgb), 0.34);
}

input:checked + .toggle-switch::after {
  left: 20px;
  background: var(--primary);
}

/* =========================================================
   TABLES AND AUTOMATIONS
   ========================================================= */

.automation-summary,
.crm-summary-grid,
.analytics-summary-grid {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.summary-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-panel);
}

.summary-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.summary-card span,
.summary-card strong {
  display: block;
}

.summary-card > div > span {
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.summary-card strong {
  margin-top: 4px;
  font-size: 1.3rem;
}

.table-actions {
  display: flex;
  gap: 7px;
}

.responsive-table {
  overflow-x: auto;
}

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

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--text-muted);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
}

td {
  color: var(--text-secondary);
  font-size: 0.72rem;
}

tbody tr:hover {
  background: var(--bg-hover);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.table-title,
.contact-cell,
.file-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-icon,
.file-type-icon {
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.table-icon.radio {
  color: var(--success);
  background: rgba(var(--success-rgb), 0.1);
}

.table-icon.chef {
  color: var(--orange);
  background: rgba(255, 140, 66, 0.1);
}

.table-icon.blue {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
}

.table-icon.magenta {
  color: var(--secondary);
  background: rgba(var(--secondary-rgb), 0.1);
}

.table-title strong,
.table-title small,
.contact-cell strong,
.contact-cell small {
  display: block;
}

.table-title strong,
.contact-cell strong {
  color: var(--text-primary);
  font-size: 0.72rem;
}

.table-title small,
.contact-cell small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.6rem;
}

.contact-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  font-size: 0.67rem;
}

/* =========================================================
   RADIO
   ========================================================= */

.radio-dashboard-grid,
.radio-secondary-grid {
  display: grid;
  gap: 20px;
}

.radio-dashboard-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
}

.radio-secondary-grid {
  margin-top: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.now-playing-content {
  padding: 26px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 27px;
  align-items: center;
}

.album-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.32);
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-live-badge {
  position: absolute;
  top: 13px;
  left: 13px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 900;
}

.track-label {
  color: var(--success);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.track-details h3 {
  margin: 10px 0 7px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.track-details p {
  margin: 0;
  color: var(--text-secondary);
}

.audio-wave {
  height: 42px;
  margin: 23px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.audio-wave span {
  width: 4px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  animation: wave 1.1s infinite ease-in-out;
}

.audio-wave span:nth-child(1),
.audio-wave span:nth-child(8) {
  height: 20%;
}

.audio-wave span:nth-child(2),
.audio-wave span:nth-child(10) {
  height: 45%;
  animation-delay: -0.2s;
}

.audio-wave span:nth-child(3),
.audio-wave span:nth-child(7),
.audio-wave span:nth-child(11) {
  height: 70%;
  animation-delay: -0.45s;
}

.audio-wave span:nth-child(4),
.audio-wave span:nth-child(9) {
  height: 100%;
  animation-delay: -0.7s;
}

.audio-wave span:nth-child(5),
.audio-wave span:nth-child(12) {
  height: 55%;
  animation-delay: -0.3s;
}

.audio-wave span:nth-child(6) {
  height: 85%;
  animation-delay: -0.6s;
}

@keyframes wave {
  0%,
  100% {
    transform: scaleY(0.6);
    opacity: 0.6;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 13px;
}

.player-main-button,
.player-side-button {
  border: 0;
  display: grid;
  place-items: center;
}

.player-main-button {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.25);
}

.player-side-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.volume-control {
  margin-left: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-muted);
}

.volume-control input {
  width: 100px;
  accent-color: var(--primary);
}

.listener-panel {
  padding-bottom: 22px;
}

.listener-number {
  padding: 30px 20px 10px;
  text-align: center;
}

.listener-number strong,
.listener-number span {
  display: block;
}

.listener-number strong {
  font-family: "Montserrat", sans-serif;
  font-size: 4rem;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
}

.listener-number span {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.listener-chart {
  padding: 12px 25px;
}

.chart-bars {
  height: 120px;
  display: flex;
  align-items: end;
  gap: 7px;
}

.chart-bars span {
  flex: 1;
  min-width: 5px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, var(--primary), rgba(var(--primary-rgb), 0.25));
}

.chart-labels {
  margin-top: 9px;
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.58rem;
}

.listener-stats {
  margin: 14px 20px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.listener-stats div {
  padding: 10px 5px;
  border-radius: 10px;
  background: var(--bg-input);
  text-align: center;
}

.listener-stats span,
.listener-stats strong {
  display: block;
}

.listener-stats span {
  color: var(--text-muted);
  font-size: 0.58rem;
}

.listener-stats strong {
  margin-top: 4px;
  font-size: 0.85rem;
}

.track-history,
.schedule-list {
  padding: 10px 22px 20px;
}

.history-track {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-track:last-child {
  border-bottom: 0;
}

.history-number {
  width: 22px;
  color: var(--text-muted);
  font-size: 0.64rem;
}

.history-art {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15), rgba(var(--secondary-rgb), 0.15));
  color: var(--primary);
}

.history-info {
  min-width: 0;
  flex: 1;
}

.history-info strong,
.history-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-info strong {
  font-size: 0.73rem;
}

.history-info small {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.62rem;
}

.history-time {
  color: var(--text-muted);
  font-size: 0.6rem;
}

.schedule-item {
  position: relative;
  min-height: 67px;
  display: grid;
  grid-template-columns: 75px 14px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.schedule-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 0;
  left: 91px;
  width: 1px;
  background: var(--border);
}

.schedule-time {
  padding-top: 3px;
  color: var(--text-muted);
  font-size: 0.62rem;
}

.schedule-marker {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin-top: 2px;
  border: 3px solid var(--bg-panel-solid);
  border-radius: 50%;
  background: var(--text-muted);
}

.schedule-item.active .schedule-marker {
  background: var(--success);
  box-shadow: 0 0 12px rgba(var(--success-rgb), 0.55);
}

.schedule-copy strong,
.schedule-copy small {
  display: block;
}

.schedule-copy strong {
  font-size: 0.72rem;
}

.schedule-copy small {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.6rem;
}

/* =========================================================
   CHEF
   ========================================================= */

.chef-hero {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  align-items: center;
  gap: 28px;
  background:
    radial-gradient(circle at 90% 20%, rgba(255, 140, 66, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(87, 38, 12, 0.35), rgba(12, 19, 35, 0.9)),
    var(--bg-panel-solid);
}

.chef-badge {
  border-color: rgba(255, 140, 66, 0.25);
  background: rgba(255, 140, 66, 0.1);
  color: var(--orange);
}

.chef-hero h2 {
  max-width: 700px;
  margin: 18px 0 12px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.chef-hero p {
  max-width: 700px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.chef-plate {
  display: grid;
  place-items: center;
}

.plate-ring {
  width: 205px;
  height: 205px;
  border: 17px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, rgba(255, 140, 66, 0.2), transparent 60%),
    var(--bg-panel-solid);
  color: var(--orange);
  font-size: 3rem;
  box-shadow:
    inset 0 0 0 1px var(--border),
    0 25px 55px rgba(0, 0, 0, 0.3);
}

.chef-stat-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.chef-stat-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-panel);
}

.chef-stat-card > div > span,
.chef-stat-card strong,
.chef-stat-card small {
  display: block;
}

.chef-stat-card > div > span {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.chef-stat-card strong {
  margin-top: 3px;
  font-size: 1.2rem;
}

.chef-stat-card small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.58rem;
}

.chef-content-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 20px;
}

.recipe-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.recipe-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-input);
}

.recipe-image {
  position: relative;
  height: 140px;
  display: flex;
  align-items: end;
  padding: 12px;
  background-size: cover;
  background-position: center;
}

.recipe-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
}

.recipe-image span {
  position: relative;
  z-index: 1;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 0.58rem;
}

.recipe-image-one {
  background:
    radial-gradient(circle at 40% 50%, rgba(255, 174, 80, 0.7), transparent 20%),
    linear-gradient(135deg, #2f150a, #7a3918);
}

.recipe-image-two {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 226, 128, 0.75), transparent 23%),
    linear-gradient(135deg, #493014, #8c6c27);
}

.recipe-image-three {
  background:
    radial-gradient(circle at 50% 50%, rgba(145, 83, 41, 0.8), transparent 25%),
    linear-gradient(135deg, #27140e, #583228);
}

.recipe-body {
  padding: 14px;
}

.recipe-category {
  color: var(--orange);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.recipe-body h3 {
  margin: 8px 0 7px;
  font-size: 0.82rem;
}

.recipe-body p {
  min-height: 45px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.65rem;
  line-height: 1.55;
}

.recipe-meta {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.58rem;
}

.chef-assistant-panel {
  padding-bottom: 20px;
}

.chef-assistant-intro {
  padding: 28px 24px 18px;
  text-align: center;
}

.chef-assistant-intro .agent-avatar {
  margin: 0 auto;
}

.chef-assistant-intro h3 {
  margin: 16px 0 8px;
  font-family: "Montserrat", sans-serif;
}

.chef-assistant-intro p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.6;
}

.chef-quick-grid {
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.chef-quick-grid button {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  display: grid;
  place-items: center;
  gap: 7px;
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.67rem;
}

.chef-quick-grid button i {
  color: var(--orange);
  font-size: 1rem;
}

.chef-quick-grid button:hover {
  border-color: rgba(255, 140, 66, 0.3);
  color: var(--text-primary);
}

/* =========================================================
   STUDIO
   ========================================================= */

.studio-tools-grid {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.studio-tool-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--bg-panel);
  color: inherit;
  text-align: left;
  transition: all var(--transition-fast);
}

.studio-tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.studio-tool-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.studio-tool-icon.image {
  color: var(--secondary);
  background: rgba(var(--secondary-rgb), 0.12);
}

.studio-tool-icon.video {
  color: var(--danger);
  background: rgba(var(--danger-rgb), 0.12);
}

.studio-tool-icon.audio {
  color: var(--cyan);
  background: rgba(32, 217, 255, 0.11);
}

.studio-tool-icon.design {
  color: var(--warning);
  background: rgba(var(--warning-rgb), 0.11);
}

.studio-tool-card div {
  min-width: 0;
  flex: 1;
}

.studio-tool-card h3 {
  margin: 0;
  font-size: 0.78rem;
}

.studio-tool-card p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 0.62rem;
  line-height: 1.45;
}

.studio-tool-card > i {
  color: var(--text-muted);
}

.studio-workspace {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  background: var(--bg-panel);
}

.studio-editor {
  border-right: 1px solid var(--border);
}

.studio-editor-header,
.studio-preview-header {
  min-height: 70px;
  padding: 0 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-editor-header h3 {
  margin: 4px 0 0;
  font-family: "Montserrat", sans-serif;
}

.studio-editor-actions,
.studio-preview-header > div {
  display: flex;
  gap: 7px;
}

.studio-form {
  padding: 24px;
}

.form-label,
.form-field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
}

.studio-form textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-input);
  color: var(--text-primary);
  line-height: 1.6;
}

.studio-options-grid,
.settings-form-grid {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.studio-options-grid {
  grid-template-columns: repeat(3, 1fr);
}

.studio-generate-button {
  width: 100%;
  margin-top: 20px;
}

.studio-preview {
  min-height: 580px;
  display: flex;
  flex-direction: column;
}

.preview-placeholder {
  flex: 1;
  min-height: 460px;
  margin: 22px;
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  background:
    linear-gradient(45deg, var(--bg-input) 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(-45deg, var(--bg-input) 25%, transparent 25%) 0 0 / 20px 20px;
  text-align: center;
}

.preview-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(var(--secondary-rgb), 0.11);
  color: var(--secondary);
  font-size: 1.6rem;
}

.preview-placeholder strong {
  margin-top: 17px;
}

.preview-placeholder p {
  max-width: 360px;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

/* =========================================================
   TRANSLATOR
   ========================================================= */

.translator-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.translation-panel {
  overflow: hidden;
  min-height: 430px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
}

.language-selector {
  min-height: 60px;
  padding: 0 17px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.language-selector select {
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-weight: 800;
}

.language-selector span {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.translation-panel textarea {
  width: 100%;
  flex: 1;
  padding: 20px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.7;
}

.translation-panel-footer {
  min-height: 55px;
  padding: 0 13px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.translation-panel-footer button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--text-muted);
}

.translation-panel-footer button:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

.swap-language-button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-panel);
  color: var(--primary);
}

.translator-actions {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 14px;
  background: var(--bg-panel);
}

/* =========================================================
   ANALYTICS
   ========================================================= */

.period-selector {
  width: auto;
  min-width: 170px;
}

.analytics-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
}

.analytics-card > span,
.analytics-card strong,
.analytics-card small {
  display: block;
}

.analytics-card > span {
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.analytics-card strong {
  margin-top: 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 1.55rem;
}

.analytics-card small {
  width: fit-content;
  margin-top: 8px;
  font-size: 0.65rem;
}

.positive {
  color: var(--success);
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.5fr);
  gap: 20px;
}

.chart-legend {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.63rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.primary {
  background: var(--primary);
}

.legend-dot.secondary {
  background: var(--secondary);
}

.legend-dot.radio {
  background: var(--success);
}

.legend-dot.chef {
  background: var(--orange);
}

.legend-dot.studio {
  background: var(--secondary);
}

.legend-dot.crm {
  background: var(--warning);
}

.line-chart-placeholder {
  min-height: 350px;
  padding: 30px 24px 24px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
}

.chart-y-axis {
  height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.58rem;
}

.chart-area {
  position: relative;
  min-width: 0;
  height: 300px;
}

.chart-grid-lines {
  position: absolute;
  inset: 0 0 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chart-grid-lines span {
  width: 100%;
  border-top: 1px dashed var(--border);
}

.chart-area svg {
  position: absolute;
  inset: 0 0 20px;
  width: 100%;
  height: calc(100% - 20px);
  overflow: visible;
  color: var(--primary);
}

.chart-main-line,
.chart-secondary-line {
  fill: none;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

.chart-main-line {
  stroke: var(--primary);
}

.chart-secondary-line {
  stroke: var(--secondary);
  stroke-width: 3;
}

.chart-area-fill {
  fill: url(#lineFill);
  stroke: none;
}

.chart-x-axis {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.58rem;
}

.distribution-panel {
  padding-bottom: 22px;
}

.donut-chart {
  width: 180px;
  height: 180px;
  margin: 30px auto 24px;
  padding: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(
    var(--success) 0 42%,
    var(--orange) 42% 70%,
    var(--secondary) 70% 88%,
    var(--warning) 88% 100%
  );
}

.donut-center {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: var(--bg-panel-solid);
}

.donut-center strong,
.donut-center span {
  display: block;
}

.donut-center strong {
  font-size: 1.6rem;
}

.donut-center span {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.distribution-list {
  padding: 0 24px;
}

.distribution-list div {
  padding: 9px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.68rem;
}

/* =========================================================
   INTEGRATIONS
   ========================================================= */

.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.integration-card {
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  transition: all var(--transition-fast);
}

.integration-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.integration-card.connected {
  background:
    linear-gradient(135deg, rgba(var(--success-rgb), 0.04), transparent 40%),
    var(--bg-panel);
}

.integration-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.integration-logo.sonicpanel {
  color: var(--success);
  background: rgba(var(--success-rgb), 0.11);
}

.integration-logo.youtube {
  color: #ff0033;
  background: rgba(255, 0, 51, 0.11);
}

.integration-logo.facebook {
  color: #1877f2;
  background: rgba(24, 119, 242, 0.11);
}

.integration-logo.instagram {
  color: #e1306c;
  background: rgba(225, 48, 108, 0.11);
}

.integration-logo.whatsapp {
  color: #25d366;
  background: rgba(37, 211, 102, 0.11);
}

.integration-logo.firebase {
  color: #ffca28;
  background: rgba(255, 202, 40, 0.11);
}

.integration-copy h3 {
  margin: 17px 0 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.92rem;
}

.integration-copy p {
  min-height: 42px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.7rem;
  line-height: 1.55;
}

.integration-footer {
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.integration-footer button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 800;
}

/* =========================================================
   FILE MANAGER
   ========================================================= */

.file-manager {
  overflow: hidden;
  min-height: 620px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  background: var(--bg-panel);
}

.file-sidebar {
  padding: 16px;
  border-right: 1px solid var(--border);
}

.file-nav-item {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  font-size: 0.72rem;
}

.file-nav-item:hover,
.file-nav-item.active {
  border-color: var(--border);
  background: var(--bg-hover);
  color: var(--primary);
}

.storage-card {
  margin-top: 25px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--bg-input);
}

.storage-card-header {
  margin-bottom: 9px;
}

.storage-card-header span,
.storage-card-header strong {
  display: block;
}

.storage-card-header span {
  color: var(--text-secondary);
  font-size: 0.65rem;
}

.storage-card-header strong {
  margin-top: 4px;
  font-size: 0.66rem;
}

.storage-card small {
  margin-top: 8px;
  display: block;
  color: var(--text-muted);
  font-size: 0.58rem;
}

.file-content {
  min-width: 0;
  padding: 20px;
}

.file-content-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.breadcrumb,
.file-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb {
  color: var(--text-muted);
  font-size: 0.69rem;
}

.breadcrumb button {
  border: 0;
  background: transparent;
  color: var(--primary);
}

.folder-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.folder-card {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--bg-input);
}

.folder-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.folder-icon.blue {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.11);
}

.folder-icon.orange {
  color: var(--orange);
  background: rgba(255, 140, 66, 0.11);
}

.folder-icon.magenta {
  color: var(--secondary);
  background: rgba(var(--secondary-rgb), 0.11);
}

.folder-icon.green {
  color: var(--success);
  background: rgba(var(--success-rgb), 0.11);
}

.folder-card > div {
  min-width: 0;
  flex: 1;
}

.folder-card strong,
.folder-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-card strong {
  font-size: 0.68rem;
}

.folder-card small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.58rem;
}

.file-type-icon.html {
  color: #ff5722;
  background: rgba(255, 87, 34, 0.11);
}

.file-type-icon.css {
  color: #2196f3;
  background: rgba(33, 150, 243, 0.11);
}

.file-type-icon.js {
  color: #f7df1e;
  background: rgba(247, 223, 30, 0.11);
}

.file-name-cell strong {
  color: var(--text-primary);
}

/* =========================================================
   SETTINGS
   ========================================================= */

.settings-layout {
  overflow: hidden;
  min-height: 610px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: var(--bg-panel);
}

.settings-sidebar {
  padding: 16px;
  border-right: 1px solid var(--border);
}

.settings-tab {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  font-size: 0.72rem;
}

.settings-tab:hover,
.settings-tab.active {
  border-color: var(--border);
  background: var(--bg-hover);
  color: var(--primary);
}

.settings-content {
  padding: 28px;
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

.settings-panel-header {
  margin-bottom: 24px;
}

.settings-panel-header h3 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
}

.settings-panel-header p {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.settings-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field input {
  cursor: text;
}

.help-center-subtitle {
  margin: 18px 0 10px;
  font-size: 0.95rem;
  color: var(--text);
}

.help-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.help-faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
}

.help-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.help-faq-item summary::-webkit-details-marker {
  display: none;
}

.help-faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 16px;
  color: var(--primary);
  font-weight: 800;
}

.help-faq-item[open] summary::before {
  content: "−";
}

.help-faq-item p {
  margin: 8px 0 0 16px;
  color: var(--text-muted, #9aa3b2);
  font-size: 0.9rem;
}

.support-ticket-history {
  margin-top: 16px;
}

.support-ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.support-ticket-status {
  text-transform: capitalize;
  color: var(--primary);
  font-weight: 600;
}

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

.quicklink-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-input);
  color: var(--text-main, inherit);
  text-decoration: none;
  font-size: 0.78rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.quicklink-tile:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.quicklink-tile .quicklink-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--bg-panel, rgba(255, 255, 255, 0.05));
  font-size: 1.1rem;
  color: var(--primary);
}

.quicklink-icon-logo {
  background: #ffffff;
}

.quicklink-icon-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.quicklinks-note {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-muted, #9aa3b2);
  line-height: 1.5;
}

.quicklink-tile-emphasis {
  border: 1px solid rgba(var(--primary-rgb), 0.5);
  background: linear-gradient(160deg, rgba(var(--primary-rgb), 0.16), var(--bg-input));
}

.quicklink-tile-emphasis .quicklink-icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}

.weather-panel {
  padding: 20px;
}

.weather-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.weather-status {
  color: var(--text-muted, #9aa3b2);
  font-size: 0.88rem;
  margin: 0;
}

.weather-now {
  display: flex;
  align-items: center;
  gap: 18px;
}

.weather-now-icon {
  font-size: 2.4rem;
  color: var(--primary);
}

.weather-now-temp {
  font-size: 2.6rem;
  font-weight: 700;
}

.weather-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.weather-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-input);
}

.weather-detail strong {
  font-size: 1.1rem;
}

.weather-detail small {
  color: var(--text-muted, #9aa3b2);
  font-size: 0.72rem;
}

.weather-place {
  font-size: 0.8rem;
  color: var(--text-muted, #9aa3b2);
}

.world-clock-button {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), 0.4);
  background: rgba(20, 12, 30, 0.85);
  color: #fff;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.world-clock-panel {
  position: fixed;
  top: 62px;
  left: 18px;
  z-index: 9998;
  width: 220px;
  background: rgba(20, 12, 30, 0.97);
  border: 1px solid rgba(var(--primary-rgb), 0.35);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  padding: 12px 14px;
}

.world-clock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.82rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.world-clock-row:last-child {
  border-bottom: none;
}

.world-clock-row strong {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .world-clock-button span {
    display: none;
  }
}

.health-speedtest-button {
  width: 100%;
  margin-top: 14px;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.speedtest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.speedtest-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-input);
  text-align: center;
}

.speedtest-metric .speedtest-icon {
  font-size: 1.1rem;
  color: var(--primary);
}

.speedtest-metric strong {
  font-size: 1.5rem;
}

.speedtest-metric small {
  color: var(--text-muted, #9aa3b2);
  font-size: 0.78rem;
}

.speedtest-status {
  text-align: center;
  color: var(--text-muted, #9aa3b2);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.speedtest-start-button {
  width: 100%;
  justify-content: center;
}

@media (max-width: 560px) {
  .speedtest-grid {
    grid-template-columns: 1fr;
  }
}

.settings-divider {
  margin: 26px 0;
  border-top: 1px solid var(--border);
}

.settings-toggle-list {
  display: grid;
  gap: 12px;
}

.settings-toggle-row {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--bg-input);
}

.settings-toggle-row strong,
.settings-toggle-row > div > span {
  display: block;
}

.settings-toggle-row strong {
  font-size: 0.76rem;
}

.settings-toggle-row > div > span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.theme-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.theme-option {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
}

.theme-option.selected,
.theme-option:has(input:checked) {
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

.theme-option input {
  position: absolute;
  opacity: 0;
}

.theme-option strong {
  margin-top: 10px;
  display: block;
  font-size: 0.7rem;
}

.theme-preview {
  height: 120px;
  padding: 13px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 30% 1fr;
  grid-template-rows: 25% 1fr;
  gap: 7px;
}

.theme-preview i {
  border-radius: 5px;
}

.theme-preview i:first-child {
  grid-row: 1 / span 2;
}

.dark-preview {
  background: #070b17;
}

.dark-preview i {
  background: #182136;
}

.light-preview {
  background: #eef3fb;
}

.light-preview i {
  background: #ffffff;
}

.system-preview {
  background: linear-gradient(90deg, #070b17 50%, #eef3fb 50%);
}

.system-preview i {
  background: rgba(128, 128, 128, 0.45);
}

.security-card {
  margin-bottom: 18px;
  padding: 17px;
  border: 1px solid rgba(var(--success-rgb), 0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(var(--success-rgb), 0.06);
}

.security-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(var(--success-rgb), 0.12);
  color: var(--success);
}

.security-card > div {
  min-width: 0;
  flex: 1;
}

.security-card strong {
  font-size: 0.78rem;
}

.security-card p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.settings-panel .danger-button {
  margin-top: 22px;
}

/* =========================================================
   EMPTY STATES
   ========================================================= */

.empty-page-state {
  min-height: calc(100vh - 190px);
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.empty-page-state > span {
  width: 90px;
  height: 90px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.14), rgba(var(--secondary-rgb), 0.12));
  color: var(--primary);
  font-size: 2rem;
}

.empty-page-state h2 {
  margin: 18px 0 8px;
  font-family: "Montserrat", sans-serif;
}

.empty-page-state p {
  max-width: 440px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* =========================================================
   FOOTER
   ========================================================= */

.app-footer {
  min-height: 58px;
  padding: 0 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: var(--text-muted);
  font-size: 0.62rem;
}

/* =========================================================
   FLOATING PANELS
   ========================================================= */

.floating-panel {
  position: fixed;
  z-index: 1200;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--bg-panel-solid);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
}

.floating-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-panel {
  top: 76px;
  right: 78px;
  width: min(390px, calc(100vw - 28px));
  overflow: hidden;
}

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

.floating-panel-header strong,
.floating-panel-header span {
  display: block;
}

.floating-panel-header strong {
  font-size: 0.82rem;
}

.floating-panel-header span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.62rem;
}

.notification-list {
  max-height: 450px;
  overflow-y: auto;
}

.notification-item {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.notification-item:hover {
  background: var(--bg-hover);
}

.notification-item.unread {
  background: rgba(var(--primary-rgb), 0.025);
}

.notification-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.notification-copy {
  min-width: 0;
  flex: 1;
}

.notification-copy strong,
.notification-copy small,
.notification-copy time {
  display: block;
}

.notification-copy strong {
  font-size: 0.72rem;
}

.notification-copy small {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.63rem;
  line-height: 1.45;
}

.notification-copy time {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.57rem;
}

.floating-panel-footer {
  width: 100%;
  padding: 13px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 800;
}

.user-dropdown {
  top: 76px;
  right: 24px;
  width: 250px;
  padding: 9px;
}

.user-dropdown-profile {
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-dropdown-profile strong,
.user-dropdown-profile span {
  display: block;
}

.user-dropdown-profile strong {
  font-size: 0.74rem;
}

.user-dropdown-profile span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.62rem;
}

.user-dropdown-menu {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.user-dropdown-menu button {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  font-size: 0.69rem;
}

.user-dropdown-menu button:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.user-dropdown-menu button i {
  width: 18px;
}

.danger-menu-item {
  color: var(--danger) !important;
}

/* =========================================================
   MODALS
   ========================================================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1500;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(1, 4, 12, 0.74);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.command-palette,
.generic-modal {
  width: min(620px, 100%);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--bg-panel-solid);
  box-shadow: var(--shadow-md);
  transform: scale(0.96) translateY(-10px);
  transition: transform var(--transition-fast);
}

.modal-backdrop.open .command-palette,
.modal-backdrop.open .generic-modal {
  transform: scale(1) translateY(0);
}

.command-search {
  min-height: 70px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 11px;
}

.command-search > i {
  color: var(--text-muted);
}

.command-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.command-search button {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.61rem;
}

.command-results {
  max-height: 480px;
  overflow-y: auto;
  padding: 12px;
}

.command-section-title {
  padding: 8px 10px;
  display: block;
}

.command-results > button {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: var(--text-secondary);
}

.command-results > button:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.command-results > button span {
  display: flex;
  align-items: center;
  gap: 11px;
}

.command-results > button span i {
  width: 20px;
  color: var(--primary);
}

.command-results kbd {
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.58rem;
}

.generic-modal-header,
.generic-modal-footer {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.generic-modal-header {
  border-bottom: 1px solid var(--border);
}

.generic-modal-header h3 {
  margin: 4px 0 0;
  font-family: "Montserrat", sans-serif;
}

.generic-modal-body {
  padding: 22px 20px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.generic-modal-body p {
  margin: 0;
}

.generic-modal-footer {
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

/* =========================================================
   TOASTS
   ========================================================= */

.toast-container {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1800;
  display: grid;
  gap: 10px;
}

.toast {
  width: min(360px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--bg-panel-solid);
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
}

.toast-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 11px;
  display: grid;
  place-items: center;
}

.toast.success .toast-icon {
  color: var(--success);
  background: rgba(var(--success-rgb), 0.12);
}

.toast.error .toast-icon {
  color: var(--danger);
  background: rgba(var(--danger-rgb), 0.12);
}

.toast.info .toast-icon {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.12);
}

.toast-content {
  min-width: 0;
  flex: 1;
}

.toast-content strong,
.toast-content span {
  display: block;
}

.toast-content strong {
  font-size: 0.73rem;
}

.toast-content span {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.64rem;
  line-height: 1.45;
}

.toast-close {
  padding: 2px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1380px) {
  .topbar {
    grid-template-columns: minmax(180px, 0.7fr) minmax(250px, 1.2fr) auto;
  }

  .metric-grid,
  .chef-stat-grid,
  .studio-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-management-grid,
  .integration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .copilot-workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .context-sidebar {
    display: none;
  }
}

@media (max-width: 1120px) {
  :root {
    --sidebar-width: 270px;
  }

  .topbar {
    grid-template-columns: auto minmax(240px, 1fr) auto;
  }

  .page-eyebrow,
  .user-copy {
    display: none;
  }

  .dashboard-grid-main,
  .dashboard-grid-secondary,
  .radio-dashboard-grid,
  .radio-secondary-grid,
  .chef-content-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .recipe-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    overflow-x: auto;
  }

  .studio-workspace {
    grid-template-columns: 1fr;
  }

  .studio-editor {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .automation-summary,
  .crm-summary-grid,
  .analytics-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-button {
    display: inline-grid;
  }

  .sidebar-overlay.open {
    display: block;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .topbar {
    padding: 0 18px;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .topbar-center {
    order: 3;
    grid-column: 1 / -1;
    padding-bottom: 12px;
  }

  .topbar {
    min-height: auto;
    padding-top: 12px;
  }

  .main-content {
    padding: 20px;
  }

  .hero-panel,
  .chef-hero {
    padding: 34px;
    grid-template-columns: 1fr;
  }

  .hero-assistant,
  .chef-plate {
    display: none;
  }

  .copilot-workspace {
    grid-template-columns: 1fr;
  }

  .conversation-sidebar {
    display: none;
  }

  .file-manager,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .file-sidebar,
  .settings-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .file-sidebar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .storage-card {
    display: none;
  }

  .settings-sidebar {
    display: flex;
    overflow-x: auto;
  }

  .settings-tab {
    width: auto;
    flex: 0 0 auto;
  }

  .translator-workspace {
    grid-template-columns: 1fr;
  }

  .swap-language-button {
    margin: 0 auto;
    transform: rotate(90deg);
  }

  .translator-actions {
    grid-template-columns: 1fr 1fr;
  }

  .translator-actions .primary-button {
    grid-column: 1 / -1;
  }

  .app-footer {
    padding: 15px 20px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 680px) {
  .main-content {
    padding: 14px;
  }

  .topbar-actions .icon-button:nth-child(1),
  .search-shortcut {
    display: none;
  }

  .user-menu {
    padding: 4px;
  }

  .user-menu > i {
    display: none;
  }

  .hero-panel,
  .chef-hero {
    min-height: auto;
    padding: 28px 22px;
    border-radius: 22px;
  }

  .hero-content h2,
  .chef-hero h2 {
    font-size: 2rem;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions button {
    width: 100%;
  }

  .metric-grid,
  .chef-stat-grid,
  .studio-tools-grid,
  .automation-summary,
  .crm-summary-grid,
  .analytics-summary-grid,
  .agent-grid,
  .agent-management-grid,
  .integration-grid,
  .folder-grid {
    grid-template-columns: 1fr;
  }

  .page-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions {
    width: 100%;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-search {
    min-width: 0;
  }

  .filter-tabs {
    overflow-x: auto;
  }

  .now-playing-content {
    grid-template-columns: 1fr;
  }

  .album-cover {
    width: min(230px, 100%);
    margin: 0 auto;
  }

  .track-details {
    text-align: center;
  }

  .audio-wave,
  .player-controls {
    justify-content: center;
  }

  .volume-control {
    display: none;
  }

  .listener-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .recipe-grid {
    grid-template-columns: repeat(3, 230px);
  }

  .studio-options-grid,
  .settings-form-grid,
  .theme-option-grid {
    grid-template-columns: 1fr;
  }

  .studio-form,
  .settings-content,
  .file-content {
    padding: 16px;
  }

  .file-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-toolbar .primary-button,
  .page-toolbar .secondary-button {
    width: 100%;
  }

  .toolbar-actions {
    flex-wrap: wrap;
  }

  .notification-panel {
    top: 70px;
    right: 14px;
  }

  .user-dropdown {
    top: 70px;
    right: 14px;
  }

  .app-footer span {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .topbar {
    padding-inline: 12px;
  }

  .topbar-actions {
    gap: 5px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .page-heading h1 {
    font-size: 1rem;
  }

  .metric-card {
    padding: 16px;
  }

  .panel-header {
    padding: 18px;
  }

  .copilot-chat,
  .full-chat {
    padding: 16px;
  }

  .copilot-composer,
  .full-composer {
    margin-inline: 12px;
  }

  .message-bubble {
    max-width: 92%;
  }

  .schedule-item {
    grid-template-columns: 63px 14px minmax(0, 1fr);
  }

  .schedule-item .status-chip {
    display: none;
  }

  .schedule-item:not(:last-child)::after {
    left: 79px;
  }
}

/* =========================================================
   PRINT
   ========================================================= */

@media print {
  .sidebar,
  .topbar,
  .app-footer,
  .floating-panel,
  .modal-backdrop,
  .toast-container,
  button {
    display: none !important;
  }

  .main-wrapper {
    margin: 0;
  }

  .main-content {
    padding: 0;
  }

  body,
  .panel,
  .metric-card,
  .agent-card {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
  }
}



.nexus-logo-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  object-fit: cover;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}

.brand-mark img.nexus-logo-icon,
.copilot-logo img.nexus-logo-icon,
.message-avatar img.nexus-logo-icon {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: inherit;
}

.user-avatar-photo {
  object-fit: cover;
  display: block;
}

.nav-icon-img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 50%;
  display: inline-block;
}

.nav-icon-img-shield {
  border-radius: 0;
  object-fit: contain;
  background: transparent;
}

.smarttrack-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.smarttrack-hero-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

@media (max-width: 640px) {
  .smarttrack-hero-logo-img {
    width: 48px;
    height: 48px;
  }
}

.plate-ring-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.voice-assistant-button {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 9999;
}

.voice-assistant-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 36px rgba(var(--primary-rgb), 0.55);
}

.voice-assistant-button.listening {
  animation: voiceAssistantPulse 1.4s infinite;
}

@keyframes voiceAssistantPulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.55); }
  70% { box-shadow: 0 0 0 22px rgba(var(--primary-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); }
}

.voice-assistant-panel {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: rgba(20, 12, 30, 0.97);
  border: 1px solid rgba(var(--primary-rgb), 0.35);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.voice-assistant-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.voice-assistant-panel-header button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.85;
}

.voice-assistant-panel-header button:hover {
  opacity: 1;
}

.voice-assistant-panel-body {
  padding: 16px;
  max-height: 320px;
  overflow-y: auto;
}

.voice-assistant-status {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--text-muted, #a89bb8);
}

.voice-assistant-caption {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: #fff;
  min-height: 1.2em;
  font-style: italic;
}

.voice-assistant-reply {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #f1e9ff;
  white-space: pre-wrap;
}

.schedule-copy-with-img {
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedule-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.studio-generated-image {
  max-width: 100%;
  max-height: 360px;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  display: block;
  margin: 0 auto;
}

/* ============ SMARTTRACK MODULE ============ */

.summary-icon.red,
.metric-icon.red,
.notification-icon.red {
  color: var(--danger);
  background: rgba(var(--danger-rgb), 0.12);
}

.smarttrack-nav-icon {
  color: #0ea5e9;
}

.smarttrack-accent {
  background: linear-gradient(135deg, #00d4ff, #0ea5e9);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.28);
}

.smarttrack-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(14, 165, 233, 0.4);
}

.smarttrack-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.smarttrack-content-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  align-items: start;
}

.smarttrack-map-panel {
  padding-bottom: 18px;
}

.smarttrack-map {
  height: 340px;
  width: 100%;
  border-bottom: 1px solid var(--border);
}

.smarttrack-map-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.smarttrack-vehicle-list,
.smarttrack-alert-list {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.smarttrack-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.smarttrack-vehicle-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  transition: all var(--transition-fast);
}

.smarttrack-vehicle-card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.smarttrack-vehicle-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.14);
  color: #0ea5e9;
  font-size: 1.05rem;
}

.smarttrack-vehicle-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.smarttrack-vehicle-info strong {
  font-size: 0.95rem;
}

.smarttrack-vehicle-info small {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.smarttrack-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(var(--warning-rgb), 0.25);
  border-radius: var(--radius-md);
  background: rgba(var(--warning-rgb), 0.08);
}

.smarttrack-alert-item i {
  color: var(--warning);
  margin-top: 2px;
}

.smarttrack-alert-item strong {
  display: block;
  font-size: 0.85rem;
}

.smarttrack-alert-item p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.smarttrack-add-form {
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  animation: smarttrackFadeIn var(--transition) ease;
}

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

.smarttrack-form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.smarttrack-auth-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 30px 20px;
}

.smarttrack-auth-gate i {
  font-size: 1.8rem;
  color: #0ea5e9;
}

.smarttrack-auth-gate p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  max-width: 280px;
}

.smarttrack-auth-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.preferences-panel {
  margin-top: 24px;
}

.preferences-status {
  color: var(--text-muted, #9aa3b2);
  font-size: 0.82rem;
  margin: 4px 0 14px;
}

.preferences-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.preferences-genre-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.14);
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  font-size: 0.78rem;
  color: var(--text-primary, #fff);
}

.preferences-genre-chip strong {
  color: var(--primary);
}

.preferences-table-wrapper {
  overflow-x: auto;
}

.preferences-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.preferences-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-muted, #9aa3b2);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.preferences-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary, #fff);
}

.preferences-table td.preferences-empty {
  text-align: center;
  color: var(--text-muted, #9aa3b2);
  padding: 18px 10px;
}

.visitor-pulse-wrapper {
  position: relative;
}

.visitor-pulse-button {
  position: relative;
}

.visitor-pulse-button.active {
  border-color: rgba(34, 197, 94, 0.6);
  color: #22c55e;
}

.visitor-pulse-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 rgba(34, 197, 94, 0.6);
  animation: visitorPulseBeat 1.4s infinite;
}

@keyframes visitorPulseBeat {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.visitor-pulse-count {
  position: absolute;
  bottom: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #22c55e;
  color: #04140a;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.visitor-pulse-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  z-index: 9999;
  background: rgba(20, 12, 30, 0.97);
  border: 1px solid rgba(var(--primary-rgb), 0.35);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  padding: 14px 16px;
}

.visitor-pulse-title {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.visitor-pulse-status {
  color: var(--text-muted, #9aa3b2);
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.visitor-pulse-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
}

.visitor-pulse-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.78rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.visitor-pulse-list li:last-child {
  border-bottom: none;
}

.visitor-pulse-list li i {
  color: #22c55e;
  font-size: 0.6rem;
}

@media (max-width: 900px) {
  .smarttrack-content-grid {
    grid-template-columns: 1fr;
  }

  .smarttrack-summary {
    grid-template-columns: 1fr;
  }
}