






@media (max-width: 1280px) {
  .hero-card,
  .split-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1100px) {
  .brand-lockup {
    width: 58px;
    max-width: 58px;
  }

  .brand-image-wide {
    display: none;
  }

  .brand-image-symbol {
    display: inline-flex;
  }

  .brand-logo {
    height: 72px;
    max-height: 72px;
    object-position: center center;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-sidebar="collapsed"] .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-area {
    grid-column: 1;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(88vw, 340px);
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(calc(-100% - 8px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  body:not([data-js-ready]) .sidebar {
    transform: translateX(calc(-100% - 8px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  body:not([data-js-ready]) .sidebar-backdrop {
    display: none;
  }

  body[data-sidebar="open"] .sidebar {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body:not([data-js-ready]) .sidebar,
  body:not([data-js-ready])[data-sidebar="open"] .sidebar {
    transform: translateX(calc(-100% - 8px)) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: none !important;
  }

  body:not([data-js-ready]) .sidebar-backdrop,
  body:not([data-js-ready])[data-sidebar="open"] .sidebar-backdrop {
    display: none !important;
  }

  body[data-sidebar="collapsed"] .sidebar {
    transform: translateX(calc(-100% - 8px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  body[data-sidebar="open"] .sidebar-backdrop {
    display: block;
  }

  body[data-sidebar="collapsed"] .sidebar-backdrop {
    display: none;
  }

  body[data-sidebar="open"] .bottom-nav {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .bottom-nav,
  body[data-sidebar="collapsed"] .bottom-nav {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
  }

  .page-content {
    padding:
      18px
      18px
      calc(var(--bottom-nav-height) + 88px)
      18px;
    scroll-padding-bottom: calc(var(--bottom-nav-height) + 88px);
  }

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

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

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

  .highlight-banner {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .filter-actions {
    justify-content: flex-start;
  }

  .bottom-nav-inner {
    padding-inline: 4px;
  }

  .bottom-nav-action {
    width: 68px;
    padding-inline: 6px;
  }

  .bottom-nav-more-menu {
    right: 0;
    left: auto;
    transform: none;
  }

  .settings-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field-wide {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 12px;
  }

  .brand-lockup {
    width: 48px;
    max-width: 48px;
  }

  .brand-image-symbol {
    width: 48px;
    flex-basis: 48px;
  }

  .brand-logo {
    height: 60px;
    max-height: 60px;
  }

  .topbar-title {
    text-align: left;
    font-size: .95rem;
  }

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

  .page-content {
    padding:
      16px
      16px
      calc(var(--bottom-nav-height) + 92px)
      16px;
    scroll-padding-bottom: calc(var(--bottom-nav-height) + 92px);
  }
}

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

  .hamburger,
  .notification-button {
    width: 42px;
    height: 42px;
  }

  .topbar-title {
    font-size: .9rem;
  }

  .bottom-nav,
  body[data-sidebar="collapsed"] .bottom-nav {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 16px);
  }

  .bottom-nav-more-menu {
    max-width: calc(100vw - 20px);
  }

  .section-card {
    padding: 16px;
  }

  .hero-card {
    padding: 18px;
  }

  .preview-body {
    grid-template-columns: 1fr;
  }

  .preview-poster {
    max-width: 120px;
  }
}


@media (max-width: 1180px) {
  .responsive-table-wrap {
    overflow-x: visible;
  }

  .responsive-table {
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tbody {
    display: grid;
    gap: 12px;
  }

  .responsive-table tr {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: var(--surface-soft);
    box-shadow: var(--shadow-soft);
  }

  .responsive-table td {
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .responsive-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .responsive-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--text-3);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .responsive-table td[data-label=""]::before {
    display: none;
  }

  .responsive-table .action-row {
    align-items: stretch;
  }

  .responsive-table .action-row .button,
  .responsive-table .action-row form,
  .responsive-table .action-row form button {
    width: 100%;
  }
}







@media (max-width: 1080px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell,
  .content-area,
  .page-content,
  .view-stack,
  .card,
  .section-card,
  .modal-card,
  .table-wrap,
  .responsive-table-wrap {
    max-width: 100%;
    overflow-x: hidden;
  }

  .action-row {
    gap: 12px;
    margin-bottom: 16px;
  }

  .section-card > .action-row:first-child {
    margin-bottom: 20px;
  }

  .admin-users-action-row {
    margin-bottom: 24px;
  }

  .setting-item {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 14px;
  }

  .setting-item > .form-field,
  .admin-users-threshold-field {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }

  .setting-item > .form-field input,
  .setting-item > .form-field select,
  .setting-item > .form-field textarea {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .section-card > .action-row:first-child {
    margin-bottom: 22px;
  }

  .admin-users-action-row {
    margin-bottom: 28px;
  }
}








@media (max-width: 1080px) and (display-mode: standalone),
       (max-width: 1080px) and (display-mode: fullscreen) {
  :root {
    --cinelor-pwa-safe-top: clamp(36px, calc(env(safe-area-inset-top, 0px) - 20px), 50px);
    --cinelor-pwa-header-content-height: 54px;
  }

  html,
  body,
  .app-shell,
  .content-area {
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
  }

  .topbar {
    height: calc(var(--cinelor-pwa-safe-top) + var(--cinelor-pwa-header-content-height) + 10px) !important;
    flex-basis: calc(var(--cinelor-pwa-safe-top) + var(--cinelor-pwa-header-content-height) + 10px) !important;
    padding:
      var(--cinelor-pwa-safe-top)
      16px
      0 !important;
  }

  .topbar > * {
    transform: translateY(-16px) !important;
  }

  .bottom-nav,
  body[data-sidebar="collapsed"] .bottom-nav {
    left: max(14px, env(safe-area-inset-left, 0px)) !important;
    right: max(14px, env(safe-area-inset-right, 0px)) !important;
    bottom: 14px !important;
    height: var(--bottom-nav-height) !important;
    min-height: var(--bottom-nav-height) !important;
    max-width: calc(100vw - 28px) !important;
    padding: 8px !important;
    align-items: center !important;
  }

  .page-content {
    padding-bottom: calc(var(--bottom-nav-height) + 48px) !important;
    scroll-padding-bottom: calc(var(--bottom-nav-height) + 48px) !important;
  }
}

@media (max-width: 520px) and (display-mode: standalone),
       (max-width: 520px) and (display-mode: fullscreen) {
  :root {
    --cinelor-pwa-safe-top: clamp(34px, calc(env(safe-area-inset-top, 0px) - 22px), 48px);
    --cinelor-pwa-header-content-height: 52px;
  }

  .topbar {
    height: calc(var(--cinelor-pwa-safe-top) + var(--cinelor-pwa-header-content-height) + 10px) !important;
    flex-basis: calc(var(--cinelor-pwa-safe-top) + var(--cinelor-pwa-header-content-height) + 10px) !important;
    padding:
      var(--cinelor-pwa-safe-top)
      12px
      0 !important;
  }

  .topbar > * {
    transform: translateY(-17px) !important;
  }

  .bottom-nav,
  body[data-sidebar="collapsed"] .bottom-nav {
    left: max(14px, env(safe-area-inset-left, 0px)) !important;
    right: max(14px, env(safe-area-inset-right, 0px)) !important;
    bottom: 14px !important;
    max-width: calc(100vw - 28px) !important;
  }

  .page-content {
    padding-bottom: calc(var(--bottom-nav-height) + 48px) !important;
    scroll-padding-bottom: calc(var(--bottom-nav-height) + 48px) !important;
  }
}
