/**
 * Responsive layout — mobile, tablet, desktop.
 * Loaded after premium-ui.css.
 */

/* ——— App shell: collapsible sidebar on mobile ——— */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 100;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 1.35rem;
  box-shadow: var(--shadow-lift);
  cursor: pointer;
}

@media (max-width: 900px) {
  #screen-app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(288px, 88vw);
    z-index: 90;
    transform: translateX(-105%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    max-height: 100vh;
    overflow-y: auto;
    border-bottom: none;
    box-shadow: var(--shadow-lift);
  }

  #screen-app.sidebar-open .sidebar {
    transform: translateX(0);
  }

  #screen-app.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 80;
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main {
    max-width: none;
    padding: 1.25rem 1rem 5rem;
    max-height: none;
    min-height: 100vh;
  }

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

  .page-head-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hub-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hub-modules {
    grid-template-columns: 1fr;
  }

  .designer-shell,
  .visual-designer,
  .insp-designer {
    grid-template-columns: 1fr !important;
  }

  .card-grid,
  .kpi-tips-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .nav-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-row .btn {
    width: 100%;
  }

  .split-panels {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .coverage-table {
    min-width: 560px;
  }

  .messages-modal-panel {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    padding: 2rem 1.25rem;
    min-height: auto;
  }

  .auth-forms {
    padding: 2rem 1.25rem;
    max-width: none;
  }

  .lang-picker {
    grid-template-columns: 1fr;
    max-height: 220px;
  }

  .profile-lang-row .lang-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-panel {
    max-width: none;
  }

  .trust-strip {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hub-stats {
    grid-template-columns: 1fr;
  }

  .page-head h2 {
    font-size: 1.25rem;
  }

  .btn {
    min-height: 44px;
  }

  input, select, textarea {
    font-size: 16px; /* prevent iOS zoom */
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  #screen-app {
    grid-template-columns: 240px 1fr;
  }

  .main {
    padding: 1.5rem 1.5rem 3rem;
  }
}

/* Verify screen */
.verify-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}
.verify-card {
  max-width: 440px;
  width: 100%;
  padding: 2rem;
  border-radius: var(--radius-lg, 22px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lift);
  text-align: center;
}
.verify-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}
.verify-email-display {
  font-weight: 600;
  color: var(--accent);
  word-break: break-all;
}
.verify-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.5rem;
}
.verify-dev-link {
  margin-top: 1rem;
  text-align: left;
  font-size: 0.8rem;
  word-break: break-all;
}

.sales-card {
  max-width: 720px;
  text-align: left;
}
.sales-card .billing-plans-grid {
  margin-top: 1rem;
}
.sales-mode-hint {
  margin-bottom: 0.75rem;
}

.billing-profile-form label {
  display: block;
  margin-bottom: 0.75rem;
}
.billing-profile-form input {
  width: 100%;
  margin-top: 0.25rem;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 600px) {
  .form-row-2 { grid-template-columns: 1fr; }
}
.billing-invoices-list a {
  margin-left: 0.35rem;
}
