/* Shared web adjustments; page-specific desktop layouts remain in their views. */
img { max-width: 100%; }
input, select, textarea { min-width: 0; max-width: 100%; }
.admin-menu-toggle { display: none; }
.admin-web .main { min-width: 0; }
.mobile-web .app-content { overflow-wrap: anywhere; }
.mobile-web .card-header { flex-wrap: wrap; }
.mobile-web .topbar-title { min-width: 0; overflow-wrap: anywhere; padding-inline: .5rem; }
.mobile-web .list-item > div,
.mobile-web .info-row > *,
.mobile-web .product-card { min-width: 0; }
.mobile-web .bottom-nav a { min-width: 0; text-align: center; }
.auth-web { overflow-y: auto; min-height: 100svh; }
.auth-web > .login-card, .auth-web > .card { margin-block: auto; overflow-wrap: anywhere; }
.auth-web .otp-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.auth-web .login-options { flex-wrap: wrap; }

@media (max-width: 900px) {
  .admin-web { flex-direction: column; }
  .admin-web .sidebar { width: 100%; position: relative; }
  .admin-web .sidebar-logo { padding-right: 7rem; min-height: 64px; }
  .admin-menu-toggle { display: block; position: absolute; right: 1rem; top: .6rem; min-height: 44px; padding: .6rem 1rem; border: 1px solid rgba(255,255,255,.5); border-radius: 8px; background: transparent; color: white; font: inherit; cursor: pointer; }
  .admin-web .sidebar nav, .admin-web .sidebar-footer { display: none; }
  .admin-web .sidebar.menu-open nav, .admin-web .sidebar.menu-open .sidebar-footer { display: block; }
  .admin-web .nav-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-web .sidebar nav a { min-height: 44px; font-size: .875rem; }
  .admin-web .signout-btn { min-height: 44px; font-size: .875rem; }
  .admin-web .main { width: 100%; margin-left: 0; }
  .admin-web .topbar { padding: .85rem 1rem; gap: .75rem; flex-wrap: wrap; }
  .admin-web .topbar > div { flex-wrap: wrap; }
  .admin-web .topbar h1 { font-size: 1.1rem; }
  .admin-web .page-content { padding: 1rem; }
  .admin-web .card-header { padding: 1rem; gap: .75rem; flex-wrap: wrap; }
  .admin-web .card-body { padding: 1rem; }
  .admin-web .grid-2 > *, .admin-web .page-content > * { min-width: 0; }
  .admin-web .notif-dropdown { max-width: calc(100vw - 2rem); }
}

@media (max-width: 600px) {
  .auth-web input, .auth-web select,
  .mobile-web input, .mobile-web select, .mobile-web textarea,
  .admin-web input, .admin-web select, .admin-web textarea { font-size: 16px !important; }
  .auth-web { padding: 1rem; }
  .auth-web .login-card, .auth-web > .card { padding: 1.5rem 1rem; }
  .auth-web .login-logo { margin-bottom: 1.25rem; }
  .auth-web .login-logo img { width: 64px; height: 64px; }
  .auth-web .password-visibility { min-height: 44px; }
  .admin-web .page-content { overflow-wrap: anywhere; }
  .admin-web .page-content form { max-width: 100%; }
  .admin-web .page-content input, .admin-web .page-content select,
  .admin-web .om-search-field, .admin-web .om-select-wrap { min-width: 0 !important; max-width: 100%; }
  .admin-web .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
  .admin-web .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .mobile-web .btn { white-space: normal; min-height: 44px; text-align: center; }
  .mobile-web .product-info { padding: .65rem; }
  .mobile-web .product-name { font-size: .85rem; }
  .mobile-web .product-meta, .mobile-web .product-farmer,
  .mobile-web .product-rating, .mobile-web .product-stock { font-size: .72rem; }
  .mobile-web .product-price { font-size: .85rem; }
  .mobile-web .product-price span { font-size: .7rem; }
  .mobile-web .product-qty-row { grid-template-columns: 36px minmax(0, 1fr) 36px; }
  .mobile-web .qty-btn { width: 36px; height: 44px; }
  .mobile-web .qty-input { height: 44px; }
  .mobile-web .product-add-btn { height: auto; min-height: 44px; font-size: .78rem; padding: .5rem; }
  .mobile-web .product-card-actions { grid-template-columns: 1fr; }
  .mobile-web .product-card-actions form .btn { width: 100%; }
  .mobile-web .profile-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-web .topbar-icon { min-height: 44px; }
  .mobile-web .qty-wrap button { width: 36px; height: 44px; }
  .mobile-web .remove-btn { min-height: 44px; }
}

@media (max-width: 380px) {
  .mobile-web .product-grid { grid-template-columns: 1fr; }
  .mobile-web .stat-row { grid-template-columns: 1fr; }
  .mobile-web .info-row { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .mobile-web .product-form-row { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-height: 600px) {
  .auth-web { align-items: flex-start; }
}
