/* V36.6.3 — table action menus, audit filters, theme glass consistency, landscape layout */

/* Apply the same compact vertical menu to customer and theme actions too. */
.admin-action-menu {
  display:flex !important; position:relative !important; flex-direction:column !important;
  align-items:stretch !important; justify-content:flex-start !important; flex-wrap:nowrap !important;
  width:min(132px,100%) !important; min-width:104px !important; gap:0 !important; margin-inline:auto !important;
}
.admin-action-menu > .admin-action-toggle {
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  width:100% !important; min-width:0 !important; min-height:36px !important; white-space:nowrap !important;
}
.admin-action-menu > .admin-action-items {
  display:none !important; width:100% !important; flex-direction:column !important; align-items:stretch !important;
  gap:6px !important; padding:6px 0 0 !important;
}
.admin-action-menu.open > .admin-action-items { display:flex !important; }
.admin-action-menu .btn-copy, .admin-action-menu .btn-convert {
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  width:100% !important; min-width:0 !important; min-height:36px !important;
  margin:0 !important; padding:7px 9px !important; text-align:center !important;
  line-height:1.2 !important; white-space:normal !important;
}

/* Make edit/delete controls a single tidy menu with equal-width menu items. */
.admin-action-menu.table-action-menu {
  display: flex !important;
  position: relative !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  width: min(132px, 100%) !important;
  min-width: 104px !important;
  gap: 0 !important;
  margin-inline: auto !important;
}
.admin-action-menu.table-action-menu > .admin-action-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}
.admin-action-menu.table-action-menu > .admin-action-items {
  display: none !important;
  width: 100% !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  padding: 6px 0 0 !important;
}
.admin-action-menu.table-action-menu.open > .admin-action-items { display: flex !important; }
.admin-action-menu.table-action-menu .btn-copy,
.admin-action-menu.table-action-menu .btn-convert {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 7px 9px !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  text-align: center !important;
}
.admin-action-menu .danger-action { color: #fecaca !important; border-color: rgba(248,113,113,.65) !important; }
.admin-action-menu .danger-action:hover { background: rgba(127,29,29,.5) !important; }
.custom-table td { vertical-align: middle !important; }
#admin-bank-accounts-body .bank-status { display: inline-flex; align-items:center; justify-content:center; min-height:28px; padding:4px 10px; border-radius:999px; white-space:nowrap; }

/* Audit filter uses Vietnam local datetime values; table stays readable on small screens. */
.audit-filter-bar { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; margin:12px 0 16px; padding:12px; border:1px solid rgba(148,163,184,.22); border-radius:13px; background:rgba(8,20,44,.38); }
.audit-filter-bar label { display:flex; flex:1 1 190px; flex-direction:column; gap:6px; color:var(--text-muted); font-size:12px; font-weight:700; }
.audit-filter-bar input { width:100%; min-height:38px; padding:7px 9px; border:1px solid var(--border-light); border-radius:9px; background:var(--bg-dark); color:var(--text-main); color-scheme:dark; }
.audit-filter-actions { display:flex; gap:7px; flex:0 0 auto; }

/* Winter and Ocean get the same readable frosted-glass treatment as Halloween. */
body.theme-winter .app-header,
body.theme-winter .kpi-card, body.theme-winter .balance-card, body.theme-winter .converter-card,
body.theme-winter .table-card, body.theme-winter .admin-card, body.theme-winter .admin-pane,
body.theme-winter .glass-panel, body.theme-winter .seasonal-sidebar, body.theme-winter .seasonal-kpi,
body.theme-ocean .app-header,
body.theme-ocean .kpi-card, body.theme-ocean .balance-card, body.theme-ocean .converter-card,
body.theme-ocean .table-card, body.theme-ocean .admin-card, body.theme-ocean .admin-pane,
body.theme-ocean .glass-panel, body.theme-ocean .seasonal-sidebar, body.theme-ocean .seasonal-kpi {
  background-color: rgba(5, 20, 42, .64) !important;
  -webkit-backdrop-filter: blur(18px) saturate(145%) !important;
  backdrop-filter: blur(18px) saturate(145%) !important;
  border-color: rgba(170, 215, 255, .30) !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.10) !important;
}
body.theme-ocean .app-header,
body.theme-ocean .kpi-card, body.theme-ocean .balance-card, body.theme-ocean .converter-card,
body.theme-ocean .table-card, body.theme-ocean .admin-card, body.theme-ocean .admin-pane,
body.theme-ocean .glass-panel, body.theme-ocean .seasonal-sidebar, body.theme-ocean .seasonal-kpi {
  background-color: rgba(0, 34, 49, .62) !important;
  border-color: rgba(83, 229, 231, .30) !important;
}

/* Mobile landscape: keep the header in two compact columns, prevent auth controls wrapping over content. */
@media (orientation: landscape) and (max-height: 560px) and (max-width: 1000px) {
  :root { --v36-header-height: 74px; }
  .app-header {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-rows:auto !important;
    align-items:center !important;
    gap:5px 8px !important;
    padding:5px 9px !important;
    min-height:66px !important;
    flex-wrap:nowrap !important;
  }
  .app-header .header-left {
    grid-column:1 !important; grid-row:1 !important;
    display:flex !important; flex:1 1 auto !important; width:auto !important; min-width:0 !important;
    flex-direction:column !important; align-items:flex-start !important; gap:3px !important;
  }
  .app-header .brand-stack { min-width:0 !important; }
  .app-header .brand-sub, .app-header .brand-tag { display:none !important; }
  .app-header .header-controls {
    grid-column:2 !important; grid-row:1 !important;
    display:flex !important; flex:0 0 auto !important; width:auto !important; min-width:0 !important;
    flex-direction:row !important; flex-wrap:nowrap !important; justify-content:flex-end !important;
    gap:4px !important; margin:0 !important;
  }
  .app-header #theme-picker { display:none !important; }
  .app-header #theme-gallery-toggle { order:1 !important; padding:5px 7px !important; min-height:34px !important; font-size:10px !important; }
  .app-header .notification-center { order:0 !important; }
  .app-header .user-pill { order:2 !important; max-width:132px !important; min-width:0 !important; gap:4px !important; padding:4px 6px !important; }
  .app-header .user-pill .user-avatar { display:none !important; }
  .app-header #user-name-display { display:block !important; max-width:54px !important; overflow:hidden !important; text-overflow:ellipsis !important; white-space:nowrap !important; font-size:10px !important; }
  .app-header #btn-auth-trigger, .app-header #btn-logout { padding:5px 6px !important; margin:0 !important; font-size:10px !important; white-space:nowrap !important; }
  #mobile-menu-toggle.mobile-menu-toggle { display:inline-flex !important; min-height:26px !important; padding:3px 8px !important; font-size:10px !important; }
  #app-sidebar.app-sidebar { top:calc(var(--v36-header-height) + 5px) !important; max-height:calc(100dvh - var(--v36-header-height) - 18px) !important; }
  .dashboard-main, .dashboard-content, .main-content { min-width:0 !important; max-width:100% !important; }
  .kpi-grid, .stats-grid, .dashboard-stats { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.theme-winter *, body.theme-ocean * { scroll-behavior:auto !important; }
}
