/* =====================================================================
   RESPONSIVE-DASHBOARD.CSS
   ---------------------------------------------------------------------
   Loaded after dashboard.css / login.css. The dashboard already has a
   working sidebar breakpoint system (desktop fixed -> tablet icon-only
   @992px -> mobile offcanvas @640px) and Tailwind sm:/lg: grid classes
   for the stat cards and slider cards, so this file only fills the
   remaining gaps requested by the spec: extra-small phones, touch
   target sizing, table/report overflow safety, and modal edge cases.
   Nothing here changes existing selectors' desktop behaviour.
   ===================================================================== */

* { -webkit-tap-highlight-color: transparent; }

html, body { overflow-x: hidden; max-width: 100%; }

/* Touch-friendly controls everywhere in the admin area (Requirement 9) */
.menu-toggle, .nav-link, button, .slide-card-actions button, .login-btn {
    min-height: 44px;
}

/* Any future <table> (Reports/Orders/Customers) gets automatic
   horizontal scroll instead of breaking the layout (Requirement 6/13) */
table { width: 100%; }
.table-responsive, .dash-table-wrap, table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
table thead, table tbody, table tr { display: revert; }

/* Charts/graphs (Requirement 13) - any canvas/svg chart should never
   force horizontal scroll and should scale to its container */
canvas, .chart, .chart-container svg {
    max-width: 100% !important;
    height: auto !important;
}

/* Very small phones: tighten padding so nothing clips */
@media (max-width: 430px) {
    main { padding-left: 12px !important; padding-right: 12px !important; }
    .stat-card { padding: 14px 16px; }
    .title-heading { font-size: 1.25rem !important; }
}
@media (max-width: 375px) {
    .modal-card { padding: 16px !important; }
    .flex.gap-4.pt-2 { flex-direction: column; }
}
@media (max-width: 320px) {
    .stat-value { font-size: 22px; }
}

/* Login card: keep comfortable margins on the smallest phones */
@media (max-width: 375px) {
    .login-card { padding: 24px 18px !important; }
}
@media (max-width: 320px) {
    .login-brand-mark { font-size: 0.9rem !important; }
}

/* Focus visibility for keyboard nav in the admin area */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid #facc15;
    outline-offset: 2px;
}
