/* ============================================================
   Stream v220 - global responsive column / row design
   - Fix main content width and blank right space
   - Make all list pages responsive without browser horizontal scroll
   - Convert tables into row cards on tablet/mobile with generated labels
   ============================================================ */
:root{--stream-sidebar-final:260px;--stream-content-gap:16px;--stream-radius:16px;}
html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important;}
body[data-panel]{min-width:0!important;background:#f3f3f9!important;}
body[data-panel] *{box-sizing:border-box;}
body[data-panel] .stream-app,
body[data-panel] .app-shell{display:flex!important;align-items:stretch!important;width:100%!important;max-width:100vw!important;min-width:0!important;min-height:100vh!important;overflow-x:hidden!important;}
body[data-panel] .sidebar{flex:0 0 var(--stream-sidebar-final)!important;width:var(--stream-sidebar-final)!important;min-width:var(--stream-sidebar-final)!important;max-width:var(--stream-sidebar-final)!important;overflow-x:hidden!important;}
body[data-panel] .stream-main,
body[data-panel] .main{flex:1 1 0%!important;width:auto!important;max-width:none!important;min-width:0!important;overflow-x:hidden!important;background:#f3f3f9!important;}
body[data-panel] .stream-main-only{width:100%!important;max-width:100vw!important;min-width:0!important;overflow-x:hidden!important;background:#f3f3f9!important;}
body[data-panel] .stream-content,
body[data-panel] .content{width:100%!important;max-width:none!important;min-width:0!important;overflow-x:hidden!important;padding:18px clamp(12px,1.3vw,24px) 24px!important;}
body[data-panel] .stream-topbar,
body[data-panel] .topbar{width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;}
body[data-panel] .top-actions,
body[data-panel] .super-top-actions{min-width:0!important;flex-wrap:wrap!important;}
body[data-panel] .date-pill,
body[data-panel] .icon-btn,
body[data-panel] .profile-chip,
body[data-panel] .super-money-chip,
body[data-panel] .topbar-language-form{max-width:100%!important;}

/* Page header / filter / cards */
body[data-panel] .page-head,
body[data-panel] .page-title-box,
body[data-panel] .page-title-flex,
body[data-panel] .card-head,
body[data-panel] .modal-head,
body[data-panel] .section-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;flex-wrap:wrap!important;min-width:0!important;max-width:100%!important;}
body[data-panel] .page-head > *,
body[data-panel] .page-title-box > *,
body[data-panel] .page-title-flex > *,
body[data-panel] .card-head > *{min-width:0!important;}
body[data-panel] .card,
body[data-panel] .card-body,
body[data-panel] .stream-card,
body[data-panel] .box,
body[data-panel] .panel,
body[data-panel] .vendor-page,
body[data-panel] .vendor-card,
body[data-panel] .vendor-card-body,
body[data-panel] .game-page,
body[data-panel] .api-provider-page{width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;}
body[data-panel] .card{border-radius:var(--stream-radius)!important;}
body[data-panel] .card-body{padding:clamp(12px,1.1vw,18px)!important;}
body[data-panel] .grid,
body[data-panel] .form-grid,
body[data-panel] .filter-grid,
body[data-panel] .stream-filter-grid,
body[data-panel] .dashboard-grid,
body[data-panel] .stream-summary-cards,
body[data-panel] .kpi-grid,
body[data-panel] .quick-menu,
body[data-panel] .two-col,
body[data-panel] .lower-grid{display:grid!important;gap:var(--stream-content-gap)!important;min-width:0!important;max-width:100%!important;}
body[data-panel] .kpi-grid,
body[data-panel] .stream-summary-cards{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;}
body[data-panel] .quick-menu{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;}
body[data-panel] .two-col,
body[data-panel] .lower-grid{grid-template-columns:repeat(auto-fit,minmax(min(360px,100%),1fr))!important;}
body[data-panel] .form-grid,
body[data-panel] .filter-grid,
body[data-panel] .stream-filter-grid{grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr))!important;}
body[data-panel] .wide,
body[data-panel] .wide2,
body[data-panel] .wide3,
body[data-panel] .wide4{grid-column:auto!important;}
body[data-panel] .actions,
body[data-panel] .form-actions,
body[data-panel] .filter-actions{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;min-width:0!important;}
body[data-panel] input,
body[data-panel] select,
body[data-panel] textarea,
body[data-panel] .form-control{max-width:100%!important;min-width:0!important;}
body[data-panel] .btn{max-width:100%;}

/* Desktop tables: fill available width, wrap text, do not create page scroll */
body[data-panel] .table-responsive,
body[data-panel] .table-wrap,
body[data-panel] .list-table-wrap,
body[data-panel] .api-provider-list-wrap,
body[data-panel] .vendor-table-wrap,
body[data-panel] .game-list-table-wrap{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important;overflow-y:visible!important;}
body[data-panel] table,
body[data-panel] .table,
body[data-panel] .admin-table,
body[data-panel] .api-provider-list-table,
body[data-panel] .vendor-table,
body[data-panel] .game-list-table{width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:collapse!important;}
body[data-panel] table th,
body[data-panel] table td{white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;vertical-align:middle!important;min-width:0!important;}
body[data-panel] .admin-table th,
body[data-panel] .admin-table td{padding:10px 8px!important;font-size:12px!important;line-height:1.35!important;}
body[data-panel] .admin-table th{font-size:11px!important;letter-spacing:-.02em!important;}
body[data-panel] .text-nowrap,
body[data-panel] .nowrap{white-space:normal!important;}
body[data-panel] .badge,
body[data-panel] .status,
body[data-panel] .game-chip{max-width:100%!important;white-space:normal!important;line-height:1.25!important;}

/* Specific list column tuning */
body[data-panel] .api-provider-action-row{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:4px!important;max-width:100%!important;min-width:0!important;}
body[data-panel] .api-provider-action-row .btn{height:28px!important;min-height:28px!important;padding:0 7px!important;font-size:11px!important;border-radius:8px!important;white-space:nowrap!important;}
body[data-panel] .api-provider-settings-cell,
body[data-panel] .api-provider-settings-th{width:220px!important;max-width:220px!important;min-width:0!important;}
body[data-panel] .game-thumb,
body[data-panel] .game-thumb-empty{width:44px!important;height:44px!important;min-width:44px!important;border-radius:10px!important;}
body[data-panel] .game-sub-title,
body[data-panel] .game-main-title,
body[data-panel] .game-code-cell{max-width:100%!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;word-break:break-word!important;}
body[data-panel] .stream-toggle-switch{white-space:nowrap!important;gap:5px!important;}
body[data-panel] .stream-toggle-track{width:38px!important;min-width:38px!important;height:21px!important;}
body[data-panel] .stream-toggle-knob{width:15px!important;height:15px!important;}
body[data-panel] .stream-toggle-switch input:checked + .stream-toggle-track .stream-toggle-knob{left:20px!important;}

/* Pagination - responsive row */
body[data-panel] .pagination-footer,
body[data-panel] .stream-pagination-footer{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;padding-top:12px!important;}
body[data-panel] .pagination-info,
body[data-panel] .stream-pagination-info{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;flex:1 1 260px!important;min-width:0!important;}
body[data-panel] .pagination-links,
body[data-panel] .stream-pagination-links{display:flex!important;justify-content:flex-end!important;flex:1 1 360px!important;min-width:0!important;max-width:100%!important;overflow:hidden!important;}
body[data-panel] .stream-pagination{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:4px!important;flex-wrap:wrap!important;max-width:100%!important;margin:0!important;padding:0!important;list-style:none!important;}
body[data-panel] .stream-page-btn{width:auto!important;min-width:30px!important;max-width:none!important;height:30px!important;padding:0 9px!important;border-radius:8px!important;font-size:12px!important;}

/* Tablet: reduce low priority columns, keep content full width */
@media (max-width: 1440px){
  :root{--stream-sidebar-final:240px;}
  body[data-panel] .stream-content,body[data-panel] .content{padding-left:14px!important;padding-right:14px!important;}
  body[data-panel] .api-provider-list-table th:nth-child(7),body[data-panel] .api-provider-list-table td:nth-child(7),
  body[data-panel] .api-provider-list-table th:nth-child(10),body[data-panel] .api-provider-list-table td:nth-child(10),
  body[data-panel] .game-list-table th:nth-child(9),body[data-panel] .game-list-table td:nth-child(9),
  body[data-panel] .game-list-table th:nth-child(11),body[data-panel] .game-list-table td:nth-child(11),
  body[data-panel] .vendor-table th:nth-child(6),body[data-panel] .vendor-table td:nth-child(6){display:none!important;}
}
@media (max-width: 1180px){
  :root{--stream-sidebar-final:220px;}
  body[data-panel] .api-provider-settings-cell,body[data-panel] .api-provider-settings-th{width:190px!important;max-width:190px!important;}
  body[data-panel] .game-list-table th:nth-child(5),body[data-panel] .game-list-table td:nth-child(5),
  body[data-panel] .game-list-table th:nth-child(8),body[data-panel] .game-list-table td:nth-child(8),
  body[data-panel] .api-provider-list-table th:nth-child(5),body[data-panel] .api-provider-list-table td:nth-child(5){display:none!important;}
}

/* Mobile/tablet card rows for every list table */
@media (max-width: 920px){
  body[data-panel] .stream-app,body[data-panel] .app-shell{display:block!important;}
  body[data-panel] .sidebar{position:relative!important;width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;}
  body[data-panel] .stream-main,body[data-panel] .main{width:100%!important;max-width:100%!important;min-width:0!important;}
  body[data-panel] .stream-topbar,body[data-panel] .topbar{height:auto!important;min-height:58px!important;flex-wrap:wrap!important;gap:8px!important;padding:10px 12px!important;}
  body[data-panel] .stream-content,body[data-panel] .content{padding:12px!important;}
  body[data-panel] .page-head h1{font-size:22px!important;}
  body[data-panel] .card-body{padding:12px!important;}
  body[data-panel] .table-responsive,body[data-panel] .vendor-table-wrap,body[data-panel] .game-list-table-wrap,body[data-panel] .api-provider-list-wrap{overflow:visible!important;}
  body[data-panel] .admin-table,
  body[data-panel] .api-provider-list-table,
  body[data-panel] .vendor-table,
  body[data-panel] .game-list-table{display:block!important;border-collapse:separate!important;background:transparent!important;}
  body[data-panel] .admin-table thead,
  body[data-panel] .api-provider-list-table thead,
  body[data-panel] .vendor-table thead,
  body[data-panel] .game-list-table thead{display:none!important;}
  body[data-panel] .admin-table tbody,
  body[data-panel] .api-provider-list-table tbody,
  body[data-panel] .vendor-table tbody,
  body[data-panel] .game-list-table tbody{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important;}
  body[data-panel] .admin-table tr,
  body[data-panel] .api-provider-list-table tr,
  body[data-panel] .vendor-table tr,
  body[data-panel] .game-list-table tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px 12px!important;width:100%!important;border:1px solid #e5e7eb!important;border-radius:14px!important;background:#fff!important;padding:12px!important;box-shadow:0 8px 18px rgba(15,23,42,.04)!important;}
  body[data-panel] .admin-table td,
  body[data-panel] .api-provider-list-table td,
  body[data-panel] .vendor-table td,
  body[data-panel] .game-list-table td{display:flex!important;flex-direction:column!important;gap:4px!important;width:100%!important;max-width:100%!important;min-width:0!important;border:0!important;padding:0!important;background:transparent!important;text-align:left!important;}
  body[data-panel] .admin-table td::before,
  body[data-panel] .api-provider-list-table td::before,
  body[data-panel] .vendor-table td::before,
  body[data-panel] .game-list-table td::before{content:attr(data-label);display:block!important;color:#64748b!important;font-size:11px!important;font-weight:900!important;line-height:1.2!important;}
  body[data-panel] .admin-table td[data-label="" ]::before{display:none!important;}
  body[data-panel] .api-provider-action-row{justify-content:flex-start!important;}
  body[data-panel] .pagination-footer,body[data-panel] .stream-pagination-footer{align-items:flex-start!important;}
  body[data-panel] .pagination-links,body[data-panel] .stream-pagination-links{justify-content:flex-start!important;width:100%!important;flex-basis:100%!important;}
}
@media (max-width: 560px){
  body[data-panel] .admin-table tr,
  body[data-panel] .api-provider-list-table tr,
  body[data-panel] .vendor-table tr,
  body[data-panel] .game-list-table tr{grid-template-columns:1fr!important;}
  body[data-panel] .actions,body[data-panel] .form-actions,body[data-panel] .filter-actions{flex-direction:column!important;align-items:stretch!important;}
  body[data-panel] .actions .btn,body[data-panel] .form-actions .btn,body[data-panel] .filter-actions .btn{width:100%!important;}
  body[data-panel] .stream-page-btn{min-width:28px!important;height:28px!important;padding:0 7px!important;font-size:11px!important;}
}
