/**
 * responsive.css — Adaptabilidad responsiva premium KOVE Customer & Sales Hub
 * Breakpoints: 1280px / 980px / 720px / 420px + print
 */

/* Desktops compactos (≤ 1280px) */
@media (max-width: 1280px) {
  .inbox-container {
    grid-template-columns: 280px 1fr 300px;
  }

  .hero-banner {
    padding: var(--space-5) var(--space-6);
  }
}

/* Tablets horizontales (≤ 980px) */
@media (max-width: 980px) {
  :root {
    --sidebar-width: 72px;
  }

  .sidebar-header .brand-subtitle,
  .sidebar-header .brand-tagline,
  .sidebar-nav .nav-link span:not(.badge):not(.nav-badge),
  .sidebar-nav .nav-section-title,
  .sidebar-footer .system-status span,
  .sidebar-footer .sidebar-promo-text,
  .sidebar-footer > div:last-child {
    display: none;
  }

  .sidebar-header {
    padding: var(--space-3);
    align-items: center;
  }

  .brand-row {
    justify-content: center;
  }

  .brand-badge {
    font-size: 0.9rem;
    padding: 2px 6px;
  }

  .brand-logo-z {
    display: none;
  }

  .sidebar-nav .nav-link {
    justify-content: center;
    padding: var(--space-3);
  }

  .nav-link-content {
    justify-content: center;
    gap: 0;
  }

  .sidebar-promo {
    padding: var(--space-2);
    justify-content: center;
  }

  .sidebar-promo-arrow {
    margin: 0;
  }

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

  .inbox-container {
    grid-template-columns: 260px 1fr;
  }

  .inbox-context {
    display: none;
  }

  .hero-banner .hero-banner-slogan {
    display: none;
  }

  .topbar-search {
    width: 240px;
  }

  .topbar-search:focus-within {
    width: 300px;
  }

  .topbar-user-info {
    display: none;
  }
}

/* Tablets verticales y móviles grandes (≤ 720px) */
@media (max-width: 720px) {
  .app-shell {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .sidebar-header {
    flex-direction: row;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: var(--space-2);
    gap: 0;
  }

  .sidebar-footer {
    display: none;
  }

  .app-topbar {
    padding: 0 var(--space-3);
  }

  .topbar-search {
    width: 180px;
  }

  .topbar-search:focus-within {
    width: 220px;
  }

  .topbar-breadcrumbs {
    display: none;
  }

  .app-view {
    padding: var(--space-3);
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

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

  .inbox-container {
    grid-template-columns: 1fr;
    height: auto;
  }

  .inbox-chat {
    min-height: 420px;
  }

  .kanban-board {
    flex-direction: column;
  }

  .kanban-column {
    width: 100%;
    max-height: none;
  }

  .hero-banner {
    padding: var(--space-4);
    min-height: auto;
  }

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

  .app-footer {
    flex-direction: column;
    height: auto;
    padding: var(--space-3) var(--space-4);
    gap: var(--space-1);
    text-align: center;
  }
}

/* Pantallas móviles pequeñas (~420px) */
@media (max-width: 420px) {
  html {
    font-size: 13px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .kpi-value {
    font-size: 1.5rem;
  }

  .kpi-icon {
    display: none;
  }

  .btn {
    padding: 7px 12px;
  }

  .grid-cards {
    grid-template-columns: 1fr;
  }

  .metrics-bar {
    grid-template-columns: 1fr;
  }

  .telemetry-clock {
    display: none;
  }
}

/* Modo Impresión */
@media print {
  .app-sidebar,
  .app-topbar,
  .app-footer,
  .page-actions,
  .btn,
  .toast-container,
  .hero-banner {
    display: none !important;
  }

  body, .app-shell, .app-main, .app-view {
    background: #fff !important;
    color: #000 !important;
  }

  .card, .table-container, .kpi-card {
    border: 1px solid #ddd !important;
    background: #fff !important;
    box-shadow: none !important;
  }
}
