/* Door Way — Responsive CSS */

/* Desktop: hide mobile topbar */
.mobile-topbar { display: none !important; }

/* Mobile */
@media (max-width: 768px) {

  /* Show hamburger topbar */
  .mobile-topbar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    background: #201A14;
    border-bottom: none;
    padding: 14px 18px;
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .mobile-topbar-brand { font-size: 14px; font-weight: 700; color: #F5F0E6; }
  .hamburger {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(255,255,255,0.08); border: none;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .hamburger svg { width: 18px; height: 18px; stroke: #F5F0E6; fill: none; stroke-width: 2; }

  /* Sidebar slides in from left */
  .sidebar { left: -240px !important; }
  .sidebar.open { left: 0 !important; box-shadow: 4px 0 30px rgba(0,0,0,0.3); }

  /* Main takes full width */
  .main { margin-left: 0 !important; padding: 16px !important; }

  /* PAGE TYPOGRAPHY */
  .page-title { font-size: 20px !important; }
  .page-sub   { font-size: 12px !important; margin-bottom: 14px !important; }

  /* CARDS — 2 columns */
  .summary-row, .stats-grid, .scards, .sum-cards, .summary-cards {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .sum-card, .sc, .stat-card { padding: 12px !important; }
  .sum-value, .sv, .stat-value { font-size: 16px !important; }

  /* GRIDS — single col */
  .flats-grid, .pages-grid { grid-template-columns: 1fr !important; }

  /* CONTROLS */
  .controls-bar, .ctrl, .filter-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .rcount, .count, .count-badge { margin-left: 0 !important; }
  .flat-sel, .sel, .prop-select, .fi-sel { width: 100% !important; }

  /* TABLES */
  .table-card, .room-block, .tc-wrap { overflow-x: auto !important; }
  table { min-width: 540px; }

  /* FORMS */
  .form-grid, .layout { grid-template-columns: 1fr !important; }
  .fi-row, .frow, .fi-row-3, .drop-chain, .form-row { grid-template-columns: 1fr !important; }
  .method-tabs { flex-direction: column !important; }

  /* HEADERS */
  .page-header, .top-bar, .top-controls {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .header-btns { flex-wrap: wrap !important; gap: 8px !important; }

  /* TOTALS BARS */
  .ftbar, .flat-total { flex-wrap: wrap !important; }
  .ft-item, .fti { min-width: 50% !important; border-right: none !important; padding: 6px 8px !important; }
  .gtg { grid-template-columns: repeat(2,1fr) !important; }
  .gti { border-right: none !important; }

  /* PANELS — full width bottom sheet */
  #side-panel, #detail-panel, #dp, #panel-overlay > div, #panel-ov > div {
    width: 100vw !important;
    height: 90vh !important;
    border-radius: 20px 20px 0 0 !important;
  }
  #panel-overlay, #panel-ov { align-items: flex-end !important; }

  /* MODALS */
  .modal, .mbox, .tm-box {
    width: calc(100vw - 32px) !important;
    max-width: 100% !important;
    margin: 0 16px !important;
  }

  /* MISC */
  .sort-bar, .toolbar { flex-wrap: wrap !important; gap: 6px !important; }
  .tabs { width: 100% !important; }
  .tab { flex: 1; text-align: center; padding: 9px 12px !important; font-size: 12px !important; }
  .welcome-card { flex-direction: column !important; gap: 14px !important; }
  .property-selector { flex-direction: column !important; align-items: flex-start !important; }
  .ps-select { min-width: 100% !important; }
  .ps-divider { display: none !important; }
  .bars-card { grid-template-columns: 1fr !important; }
}

@media (max-width: 420px) {
  .summary-row, .scards, .stats-grid, .sum-cards { grid-template-columns: 1fr !important; }
  .filter-bar { gap: 6px !important; }
}
