@media (max-width: 768px) {
  .header{min-height:52px !important;padding:11px 10px !important;}
  .topbar{padding:9px !important;gap:8px !important;}
  .container{margin-top:10px !important;}
  .card,
    .stat-card,
    .summary-card,
    .panel,
    .section,
    .report-chooser,
    .reports-hero,
    .filter-box,
    .summary-box,
    .list-item,
    .form-card,
    .content-box{padding:12px !important;}
  .card-icon,
    .user-badge-icon{width:38px !important;height:38px !important;}
  .user-badge{min-height:50px !important;padding:8px 10px !important;}
  .user-badge-role{padding:3px 8px !important;}
  .btn,
    .back,
    .back-btn,
    .topbar-back,
    .top-link a,
    .logout,
    button{min-height:40px !important;padding:8px 11px !important;}
  input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea{min-height:42px !important;padding:8px 10px !important;}
  textarea{min-height:92px !important;}
  .tabs,
    .tab-buttons,
    .nav-tabs,
    .report-tabs,
    .voucher-tabs{padding:4px !important;}
  .tabs a,
    .tab-buttons a,
    .nav-tabs a,
    .report-tabs a,
    .voucher-tabs a,
    .tab,
    .tab-button{min-height:36px !important;padding:8px 10px !important;}
  .table-wrap,
    .table-container,
    .table-responsive,
    .report-table-wrap,
    .directory-table,
    .expiry-table-wrap,
    .mobile-table-scroll,
    .mobile-table-card{margin:9px 0 !important;padding-bottom:8px !important;}
  .table-wrap table,
    .table-container table,
    .table-responsive table,
    .report-table-wrap table,
    .directory-table table,
    .expiry-table-wrap table,
    .mobile-table-scroll table,
    .mobile-table-card table{min-width:var(--mobile-table-min, 700px) !important;}
  .table-wrap th,
    .table-container th,
    .table-responsive th,
    .report-table-wrap th,
    .directory-table th,
    .expiry-table-wrap th,
    .mobile-table-scroll th,
    .mobile-table-card th{padding:8px 9px !important;}
  .table-wrap td,
    .table-container td,
    .table-responsive td,
    .report-table-wrap td,
    .directory-table td,
    .expiry-table-wrap td,
    .mobile-table-scroll td,
    .mobile-table-card td{padding:8px 9px !important;}
  .mobile-table-card th:first-child,
    .mobile-table-card td:first-child,
    .mobile-table-scroll th:first-child,
    .mobile-table-scroll td:first-child{min-width:64px !important;}
  .table-wrap .btn,
    .table-container .btn,
    .table-responsive .btn,
    .report-table-wrap .btn,
    .directory-table .btn,
    .expiry-table-wrap .btn,
    .mobile-table-scroll .btn,
    .table-wrap button,
    .table-container button,
    .table-responsive button,
    .report-table-wrap button,
    .directory-table button,
    .expiry-table-wrap button,
    .mobile-table-scroll button,
    .table-wrap a,
    .table-container a,
    .table-responsive a,
    .report-table-wrap a,
    .directory-table a,
    .expiry-table-wrap a,
    .mobile-table-scroll a{min-height:30px !important;padding:5px 8px !important;}
  .modal-content,
    .modal-box,
    .popup-content,
    .dialog-content,
    .confirm-box,
    .modal-card,
    .modal-window{padding:13px !important;}
}
@media (max-width: 420px) {
  .table-wrap table,
    .table-container table,
    .table-responsive table,
    .report-table-wrap table,
    .directory-table table,
    .expiry-table-wrap table,
    .mobile-table-scroll table,
    .mobile-table-card table{min-width:var(--mobile-table-min, 660px) !important;}
  .table-wrap th,
    .table-container th,
    .table-responsive th,
    .report-table-wrap th,
    .directory-table th,
    .expiry-table-wrap th,
    .mobile-table-scroll th,
    .mobile-table-card th,
    .table-wrap td,
    .table-container td,
    .table-responsive td,
    .report-table-wrap td,
    .directory-table td,
    .expiry-table-wrap td,
    .mobile-table-scroll td,
    .mobile-table-card td{padding:7px 8px !important;}
}
@media (max-width: 768px) {
  .header{position:sticky !important;top:0 !important;z-index:30 !important;min-height:50px !important;}
  .topbar{margin-top:8px !important;}
  .cards-grid,
    .reports-row,
    .stats-grid,
    .summary-grid{grid-template-columns:repeat(2, minmax(0, 1fr)) !important;gap:9px !important;}
  .card,
    .stat-card,
    .summary-card{min-height:0 !important;padding:11px !important;}
  .card h3{min-height:0 !important;margin-bottom:3px !important;}
  .card p{display:-webkit-box !important;overflow:hidden !important;}
  .mobile-table-card{overflow:visible !important;padding:0 !important;}
  .mobile-table-card::before,
    .mobile-table-scroll::before{display:none !important;content:none !important;}
  .mobile-card-table{display:block !important;width:100% !important;min-width:0 !important;max-width:100% !important;border-collapse:separate !important;border-spacing:0 !important;}
  .mobile-card-table thead{display:none !important;}
  .mobile-card-table tbody{display:grid !important;width:100% !important;gap:10px !important;}
  .mobile-card-table tr{display:block !important;width:100% !important;margin:0 !important;overflow:hidden !important;}
  .mobile-card-table td,
    .mobile-card-table th{position:static !important;right:auto !important;left:auto !important;z-index:auto !important;display:grid !important;width:100% !important;min-width:0 !important;max-width:100% !important;grid-template-columns:minmax(82px, 35%) minmax(0, 1fr) !important;gap:8px !important;align-items:center !important;padding:8px 10px !important;text-align:right !important;white-space:normal !important;word-break:break-word !important;}
  .mobile-card-table td::before,
    .mobile-card-table th::before{content:attr(data-label);}
  .mobile-card-table td[colspan],
    .mobile-card-table th[colspan]{grid-template-columns:1fr !important;}
  .mobile-card-table td[colspan]::before,
    .mobile-card-table th[colspan]::before{display:none !important;content:none !important;}
  .mobile-card-table .actions,
    .mobile-card-table .table-actions,
    .mobile-card-table .action-buttons{display:flex !important;width:100% !important;flex-wrap:wrap !important;gap:6px !important;}
}
@media (max-width: 390px) {
  .cards-grid,
    .reports-row,
    .stats-grid,
    .summary-grid{gap:8px !important;}
}
@media (max-width: 768px) {
  .hero-box{padding:8px !important;margin-bottom:9px !important;}
  .cards-grid{grid-template-columns:repeat(3, minmax(0, 1fr)) !important;gap:7px !important;margin-top:7px !important;}
  .reports-row{grid-template-columns:repeat(4, minmax(0, 1fr)) !important;gap:6px !important;margin-top:7px !important;}
  .stats-grid,
    .summary-grid{grid-template-columns:repeat(2, minmax(0, 1fr)) !important;gap:7px !important;}
  .cards-grid .card,
    .reports-row .card{min-height:86px !important;padding:8px 6px !important;align-items:center !important;justify-content:space-between !important;gap:5px !important;text-align:center !important;}
  .cards-grid .card-icon,
    .reports-row .card-icon{width:28px !important;height:28px !important;margin:0 auto !important;}
  .cards-grid .card h3,
    .reports-row .card h3{margin:0 !important;text-align:center !important;overflow-wrap:anywhere !important;}
  .cards-grid .card p,
    .reports-row .card p{display:none !important;}
  .cards-grid .card .btn,
    .reports-row .card .btn{width:auto !important;min-width:44px !important;min-height:27px !important;padding:4px 8px !important;}
  .reports-row .card{min-height:78px !important;padding:7px 4px !important;}
  .reports-row .card-icon{width:24px !important;height:24px !important;}
  .reports-row .card .btn{min-width:38px !important;min-height:24px !important;padding:3px 6px !important;}
  .stat-card,
    .summary-card{min-height:72px !important;padding:8px 9px !important;gap:4px !important;}
  .stat-note{display:none !important;}
}
@media (max-width: 390px) {
  .cards-grid{gap:6px !important;}
  .reports-row{gap:5px !important;}
  .cards-grid .card,
    .reports-row .card{min-height:78px !important;padding:7px 5px !important;}
  .reports-row .card{min-height:72px !important;padding:6px 3px !important;}
  .cards-grid .card-icon,
    .reports-row .card-icon{width:25px !important;height:25px !important;}
  .cards-grid .card .btn,
    .reports-row .card .btn{min-height:25px !important;padding:3px 7px !important;}
}
@media (max-width: 768px) {
  .table-wrap,
    .table-container,
    .table-responsive,
    .report-table-wrap,
    .directory-table,
    .expiry-table-wrap,
    .mobile-table-scroll{display:block !important;overflow-x:auto !important;overflow-y:visible !important;padding:0 0 8px !important;}
  .table-wrap::before,
    .table-container::before,
    .table-responsive::before,
    .report-table-wrap::before,
    .directory-table::before,
    .expiry-table-wrap::before,
    .mobile-table-scroll::before{display:none !important;content:none !important;}
  .table-wrap table,
    .table-container table,
    .table-responsive table,
    .report-table-wrap table,
    .directory-table table,
    .expiry-table-wrap table,
    .mobile-table-scroll table,
    table.mobile-card-table{display:table !important;width:max-content !important;min-width:var(--mobile-table-min, 660px) !important;max-width:none !important;border-collapse:collapse !important;border-spacing:0 !important;table-layout:auto !important;}
  .mobile-card-table thead,
    table thead{display:table-header-group !important;}
  .mobile-card-table tbody,
    table tbody{display:table-row-group !important;}
  .mobile-card-table tr,
    table tr{display:table-row !important;width:auto !important;}
  .mobile-card-table th,
    .mobile-card-table td,
    table th,
    table td{display:table-cell !important;position:static !important;right:auto !important;left:auto !important;width:auto !important;min-width:0 !important;max-width:none !important;padding:7px 8px !important;text-align:center !important;white-space:nowrap !important;word-break:normal !important;}
  .mobile-card-table th::before,
    .mobile-card-table td::before,
    table th::before,
    table td::before{display:none !important;content:none !important;}
}
@media (max-width: 768px) {
  .table-wrap,
    .table-container,
    .table-responsive,
    .report-table-wrap,
    .directory-table,
    .expiry-table-wrap,
    .mobile-table-scroll{overflow-x:hidden !important;padding-bottom:0 !important;}
  .table-wrap table,
    .table-container table,
    .table-responsive table,
    .report-table-wrap table,
    .directory-table table,
    .expiry-table-wrap table,
    .mobile-table-scroll table,
    table.mobile-card-table{width:100% !important;min-width:100% !important;max-width:100% !important;table-layout:fixed !important;}
  .table-wrap th,
    .table-container th,
    .table-responsive th,
    .report-table-wrap th,
    .directory-table th,
    .expiry-table-wrap th,
    .mobile-table-scroll th,
    .table-wrap td,
    .table-container td,
    .table-responsive td,
    .report-table-wrap td,
    .directory-table td,
    .expiry-table-wrap td,
    .mobile-table-scroll td,
    table.mobile-card-table th,
    table.mobile-card-table td{padding:4px 3px !important;white-space:normal !important;overflow-wrap:anywhere !important;word-break:break-word !important;text-align:center !important;vertical-align:middle !important;}
  .table-wrap th,
    .table-container th,
    .table-responsive th,
    .report-table-wrap th,
    .directory-table th,
    .expiry-table-wrap th,
    .mobile-table-scroll th,
    table.mobile-card-table th{padding:5px 3px !important;}
  .table-wrap .btn,
    .table-container .btn,
    .table-responsive .btn,
    .report-table-wrap .btn,
    .directory-table .btn,
    .expiry-table-wrap .btn,
    .mobile-table-scroll .btn,
    .table-wrap button,
    .table-container button,
    .table-responsive button,
    .report-table-wrap button,
    .directory-table button,
    .expiry-table-wrap button,
    .mobile-table-scroll button,
    .table-wrap a,
    .table-container a,
    .table-responsive a,
    .report-table-wrap a,
    .directory-table a,
    .expiry-table-wrap a,
    .mobile-table-scroll a{min-width:0 !important;min-height:22px !important;padding:2px 4px !important;white-space:normal !important;}
  .table-wrap input:not([type="checkbox"]):not([type="radio"]),
    .table-container input:not([type="checkbox"]):not([type="radio"]),
    .table-responsive input:not([type="checkbox"]):not([type="radio"]),
    .report-table-wrap input:not([type="checkbox"]):not([type="radio"]),
    .directory-table input:not([type="checkbox"]):not([type="radio"]),
    .expiry-table-wrap input:not([type="checkbox"]):not([type="radio"]),
    .mobile-table-scroll input:not([type="checkbox"]):not([type="radio"]),
    .table-wrap select,
    .table-container select,
    .table-responsive select,
    .report-table-wrap select,
    .directory-table select,
    .expiry-table-wrap select,
    .mobile-table-scroll select{width:100% !important;min-width:0 !important;min-height:24px !important;padding:2px 4px !important;}
}
@media (max-width: 768px) {
  .report-center .reports-hero{padding:12px !important;margin-bottom:8px !important;}
  .report-center .reports-hero-text h2{margin-bottom:4px !important;}
  .report-center .reports-hero-text p,
    .report-center .reports-hero-note{display:none !important;}
  .report-center .cards{display:grid !important;grid-template-columns:repeat(4, minmax(0, 1fr)) !important;gap:5px !important;width:100% !important;max-width:100% !important;margin:0 auto !important;}
  .report-center .card-link{display:block !important;min-width:0 !important;}
  .report-center .card{min-height:72px !important;padding:6px 3px !important;align-items:center !important;justify-content:space-between !important;gap:3px !important;text-align:center !important;}
  .report-center .card-icon{position:static !important;width:21px !important;height:21px !important;margin:0 auto !important;}
  .report-center .card-kicker{max-width:100% !important;margin:0 !important;padding:2px 4px !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
  .report-center .card h3{margin:0 !important;text-align:center !important;overflow-wrap:anywhere !important;}
  .report-center .card .small,
    .report-center .card-arrow{display:none !important;}
  .report-center .report-chooser{display:none !important;}
}
@media (max-width: 390px) {
  .report-center .cards{gap:4px !important;}
  .report-center .card{min-height:68px !important;padding:5px 3px !important;}
  .report-center .card-icon{width:20px !important;height:20px !important;}
}
@media (max-width: 768px) {
  .hero-box .stats-grid,
    .stats-grid{grid-template-columns:repeat(3, minmax(0, 1fr)) !important;gap:6px !important;}
  .hero-box .stat-card,
    .stats-grid .stat-card{min-height:68px !important;padding:7px 6px !important;gap:4px !important;}
  .hero-box .stat-note,
    .stats-grid .stat-note{display:none !important;}
}
@media (max-width: 390px) {
  .hero-box .stats-grid,
    .stats-grid{gap:5px !important;}
  .hero-box .stat-card,
    .stats-grid .stat-card{min-height:62px !important;padding:6px 4px !important;}
}
@media screen and (min-width: 769px) {
  :is(.table-wrap, .table-container, .table-responsive, .report-table-wrap, .directory-table, .expiry-table-wrap, .mobile-table-scroll, .owners-table-wrap, .activity-table-wrap) :is(th, td){padding:6px 8px !important;height:36px !important;min-height:0 !important;vertical-align:middle !important;}
  :is(.table-wrap, .table-container, .table-responsive, .report-table-wrap, .directory-table, .expiry-table-wrap, .mobile-table-scroll, .owners-table-wrap, .activity-table-wrap) :is(.actions, .row-actions, .table-actions, .action-buttons){gap:5px !important;flex-wrap:nowrap !important;}
  :is(.table-wrap, .table-container, .table-responsive, .report-table-wrap, .directory-table, .expiry-table-wrap, .mobile-table-scroll, .owners-table-wrap, .activity-table-wrap) :is(.btn, .mini-btn, .action-link, .action-button, button, a.edit, a.delete, .edit, .delete){min-width:50px !important;min-height:30px !important;height:30px !important;padding:5px 10px !important;white-space:nowrap !important;}
  :is(.table-wrap, .table-container, .table-responsive, .report-table-wrap, .directory-table, .expiry-table-wrap, .mobile-table-scroll, .owners-table-wrap, .activity-table-wrap) :is(.type-badge, .role-pill, .status-pill, .badge, .record-count){min-height:24px !important;padding:4px 9px !important;}
  .documents-table :is(.action-link, .action-button, button),
    .definitions-table :is(.action-link, .action-button, button),
    .report-table :is(.btn, button),
    .ledger-table :is(.btn, button){min-width:52px !important;}
}
