/* Heaven Burns Red 6.13.0 Offline Save Editor — Flutter Material 3 (Material You) Adaptive Design System
 * Zero external CDN dependencies; supports Light & Dark schemes, desktop NavigationDrawer,
 * tablet ModalNavigationDrawer, and mobile Bottom NavigationBar + ModalBottomSheet.
 */

:root {
  /* Material 3 Light ColorScheme (Seed #6750A4 — classic Flutter M3 Indigo/Violet) */
  --md-primary: #6750a4;
  --md-on-primary: #ffffff;
  --md-primary-container: #eaddff;
  --md-on-primary-container: #21005d;

  --md-secondary: #625b71;
  --md-on-secondary: #ffffff;
  --md-secondary-container: #e8def8;
  --md-on-secondary-container: #1d192b;

  --md-tertiary: #7d5260;
  --md-on-tertiary: #ffffff;
  --md-tertiary-container: #ffd8e4;
  --md-on-tertiary-container: #31111d;

  --md-error: #b3261e;
  --md-on-error: #ffffff;
  --md-error-container: #f9dedc;
  --md-on-error-container: #410e0b;

  --md-success: #1b6d3f;
  --md-success-container: #d3f4df;
  --md-on-success-container: #072914;

  --md-warn: #8a5600;
  --md-warn-container: #ffdf9e;
  --md-on-warn-container: #2c1800;

  --md-surface: #fcf8ff;
  --md-surface-dim: #ded8e1;
  --md-surface-lowest: #ffffff;
  --md-surface-low: #f7f2fa;
  --md-surface-container: #f3edf7;
  --md-surface-high: #ece6f0;
  --md-surface-highest: #e6e0e9;

  --md-topbar-bg: rgba(247, 242, 250, 0.86);
  --md-hero-grad: linear-gradient(135deg, #6750a4 0%, #7d57c2 52%, #a45e98 100%);
  --md-brand-grad: linear-gradient(135deg, #6750a4 0%, #9b51e0 100%);
  --md-gate-bg:
    radial-gradient(circle at 12% 16%, rgba(103, 80, 164, 0.16), transparent 44%),
    radial-gradient(circle at 86% 84%, rgba(181, 111, 163, 0.18), transparent 46%),
    radial-gradient(circle at 50% 50%, rgba(234, 221, 255, 0.45), transparent 65%),
    var(--md-surface-container);

  --md-on-surface: #1d1b20;
  --md-on-surface-variant: #49454f;
  --md-outline: #79747e;
  --md-outline-variant: #cac4d0;

  --md-inverse-surface: #322f35;
  --md-inverse-on-surface: #f5eff7;
  --md-scrim: rgba(29, 27, 32, 0.46);

  --md-hover-layer: rgba(103, 80, 164, 0.08);
  --md-press-layer: rgba(103, 80, 164, 0.14);
  --md-dirty-tint: rgba(103, 80, 164, 0.09);

  --md-elev-1: 0 1px 2px rgba(29, 27, 32, 0.08), 0 2px 6px rgba(103, 80, 164, 0.06);
  --md-elev-2: 0 2px 6px rgba(29, 27, 32, 0.10), 0 6px 16px rgba(103, 80, 164, 0.09);
  --md-elev-3: 0 8px 24px rgba(29, 27, 32, 0.14), 0 2px 8px rgba(103, 80, 164, 0.10);

  --md-shape-xs: 6px;
  --md-shape-sm: 10px;
  --md-shape-md: 14px;
  --md-shape-lg: 20px;
  --md-shape-xl: 28px;
  --md-shape-full: 9999px;

  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: "Roboto", "Segoe UI", "PingFang SC", "Microsoft YaHei UI", system-ui, -apple-system, sans-serif;
}

:root[data-theme="dark"] {
  /* Material 3 Dark ColorScheme (Seed #6750A4) */
  --md-primary: #d0bcff;
  --md-on-primary: #381e72;
  --md-primary-container: #4f378b;
  --md-on-primary-container: #eaddff;

  --md-secondary: #ccc2dc;
  --md-on-secondary: #332d41;
  --md-secondary-container: #4a4458;
  --md-on-secondary-container: #e8def8;

  --md-tertiary: #efb8c8;
  --md-on-tertiary: #492532;
  --md-tertiary-container: #633b48;
  --md-on-tertiary-container: #ffd8e4;

  --md-error: #f2b8b5;
  --md-on-error: #601410;
  --md-error-container: #8c1d18;
  --md-on-error-container: #f9dedc;

  --md-success: #7cda9f;
  --md-success-container: #0f522d;
  --md-on-success-container: #c5f7d5;

  --md-warn: #f8c15c;
  --md-warn-container: #613b00;
  --md-on-warn-container: #ffdf9e;

  --md-surface: #131117;
  --md-surface-dim: #110f15;
  --md-surface-lowest: #0e0c12;
  --md-surface-low: #1c1a21;
  --md-surface-container: #221f28;
  --md-surface-high: #2b2833;
  --md-surface-highest: #36333f;

  --md-topbar-bg: rgba(28, 26, 33, 0.86);
  --md-hero-grad: linear-gradient(135deg, #4f378b 0%, #6945b0 55%, #84417a 100%);
  --md-brand-grad: linear-gradient(135deg, #7f5af0 0%, #c084fc 100%);
  --md-gate-bg:
    radial-gradient(circle at 14% 18%, rgba(208, 188, 255, 0.14), transparent 46%),
    radial-gradient(circle at 86% 82%, rgba(239, 184, 200, 0.12), transparent 48%),
    var(--md-surface);

  --md-on-surface: #e6e0e9;
  --md-on-surface-variant: #cac4d0;
  --md-outline: #938f99;
  --md-outline-variant: #44404d;

  --md-inverse-surface: #e6e0e9;
  --md-inverse-on-surface: #322f35;
  --md-scrim: rgba(0, 0, 0, 0.66);

  --md-hover-layer: rgba(208, 188, 255, 0.08);
  --md-press-layer: rgba(208, 188, 255, 0.15);
  --md-dirty-tint: rgba(208, 188, 255, 0.12);

  --md-elev-1: 0 1px 3px rgba(0, 0, 0, 0.36), 0 2px 6px rgba(0, 0, 0, 0.24);
  --md-elev-2: 0 4px 12px rgba(0, 0, 0, 0.42), 0 2px 4px rgba(0, 0, 0, 0.35);
  --md-elev-3: 0 10px 28px rgba(0, 0, 0, 0.54), 0 3px 8px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--md-surface);
  color: var(--md-on-surface);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.drawer-open {
  overflow: hidden;
}

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--md-outline-variant); border-radius: var(--md-shape-full); }
::-webkit-scrollbar-thumb:hover { background: var(--md-outline); }

.hidden { display: none !important; }
body.is-regular-user .admin-only { display: none !important; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--md-surface-high);
  color: var(--md-primary);
  padding: 1px 6px;
  border-radius: 6px;
}

/* Flutter InkWell Ripple */
.md-ripple-host { position: relative; overflow: hidden; }
.md-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: currentColor;
  opacity: 0.18;
  pointer-events: none;
  animation: mdRippleAnim 0.46s cubic-bezier(0.2, 0, 0, 1);
}
@keyframes mdRippleAnim {
  to { transform: scale(2.6); opacity: 0; }
}

/* ==================================================================
 * Adaptive Scaffold: NavigationDrawer + Frosted TopAppBar + Content
 * ================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--md-surface);
}

.drawer-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--md-scrim);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: mdFadeOnly 0.18s ease;
}
.drawer-scrim.open { display: block; }

/* Material 3 NavigationDrawer (fixed full-height edge-to-edge so it never floats on scroll) */
.sidebar {
  width: 272px;
  flex-shrink: 0;
  background: var(--md-surface-low);
  border-right: 1px solid var(--md-outline-variant);
  display: flex;
  flex-direction: column;
  padding: 16px 12px 14px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 16px;
  margin-bottom: 6px;
}

.brand-copy { flex: 1; min-width: 0; }

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--md-brand-grad);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(103, 80, 164, 0.28);
}

.brand-title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.1px;
  color: var(--md-on-surface);
}

.brand-sub {
  font-size: 11.5px;
  color: var(--md-on-surface-variant);
  font-family: var(--mono);
}

.icon-btn.drawer-close-btn {
  display: none;
}

.drawer-mobile-tools {
  display: none;
  gap: 8px;
  margin-bottom: 8px;
}
.drawer-mobile-tools .btn { flex: 1; }

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

/* NavigationDrawerDestination Pill */
.nav-item {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 46px;
  background: transparent;
  border: none;
  color: var(--md-on-surface-variant);
  padding: 0 16px;
  border-radius: var(--md-shape-full);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  letter-spacing: 0.1px;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.nav-item:hover {
  background: var(--md-hover-layer);
  color: var(--md-on-surface);
}

.nav-item.active {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  font-weight: 600;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
}
.nav-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.nav-badge {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  background: var(--md-surface-highest);
  color: var(--md-on-surface-variant);
  padding: 2px 9px;
  border-radius: var(--md-shape-full);
}
.nav-item.active .nav-badge {
  background: var(--md-primary);
  color: var(--md-on-primary);
}

.sidebar-footer {
  border-top: 1px solid var(--md-outline-variant);
  padding-top: 12px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-card {
  background: var(--md-surface-container);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-shape-md);
  padding: 12px;
  margin-bottom: 4px;
}

.user-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.user-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--md-on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-actions {
  display: flex;
  gap: 6px;
}
.user-card-actions .btn { flex: 1; }

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--md-on-surface-variant);
  padding: 2px 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--md-outline);
  flex-shrink: 0;
}
.dot.ok {
  background: var(--md-success);
  box-shadow: 0 0 0 3px rgba(27, 109, 63, 0.18);
}
:root[data-theme="dark"] .dot.ok {
  box-shadow: 0 0 0 3px rgba(124, 218, 159, 0.2);
}
.dot.err { background: var(--md-error); }

/* Material 3 Frosted TopAppBar */
.main-wrap {
  flex: 1;
  min-width: 0;
  margin-left: 272px;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--md-topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--md-outline-variant);
  padding: 10px 24px;
}

.topbar-row-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 44px;
}

.topbar-nav-head {
  display: none;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-header-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-title-text {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--md-on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.mobile-title-sub {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--md-on-surface-variant);
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.player-select-field select {
  max-width: 280px;
  text-overflow: ellipsis;
}

.btn-svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.content {
  padding: 22px 24px 44px;
  flex: 1;
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: mdFadeIn 0.2s cubic-bezier(0.2, 0, 0, 1); }

@keyframes mdFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mdFadeOnly {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mdDialogIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==================================================================
 * Material 3 Cards (Elevated & Tonal) + Hero KPI Stat Tiles
 * ================================================================== */
.card {
  background: var(--md-surface-lowest);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-shape-lg);
  padding: 20px 22px;
  box-shadow: var(--md-elev-1);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

:root[data-theme="dark"] .card {
  background: var(--md-surface-low);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.card h2 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.1px;
  color: var(--md-on-surface);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 1280px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.stat-card {
  position: relative;
  overflow: hidden;
  background: var(--md-surface-lowest);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-shape-lg);
  padding: 15px 17px;
  box-shadow: var(--md-elev-1);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

:root[data-theme="dark"] .stat-card {
  background: var(--md-surface-low);
}

.stat-card:hover {
  box-shadow: var(--md-elev-2);
  transform: translateY(-2px);
  border-color: var(--md-primary);
}

.stat-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 17px; height: 17px; fill: currentColor; }

.stat-card:first-child,
:root[data-theme="dark"] .stat-card:first-child {
  background: var(--md-hero-grad);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(103, 80, 164, 0.28);
}
.stat-card:first-child:hover {
  box-shadow: 0 10px 26px rgba(103, 80, 164, 0.36);
}
.stat-card:first-child .stat-icon {
  background: rgba(255, 255, 255, 0.20);
  color: #ffffff;
}
.stat-card:first-child .stat-label { color: rgba(255, 255, 255, 0.88); }
.stat-card:first-child .stat-value { color: #ffffff; }
.stat-card:first-child .stat-sub { color: rgba(255, 255, 255, 0.90); }

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--md-on-surface-variant);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--md-on-surface);
  letter-spacing: -0.4px;
  line-height: 1.25;
}

.stat-sub {
  font-size: 11.5px;
  color: var(--md-primary);
  margin-top: 5px;
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.span-2 { grid-column: span 2; }
.field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--md-on-surface-variant);
  letter-spacing: 0.15px;
}

.field-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--md-on-surface-variant);
}

.form-inline-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==================================================================
 * Material 3 OutlinedTextField & Select
 * ================================================================== */
input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
  background: var(--md-surface-lowest);
  color: var(--md-on-surface);
  border: 1px solid var(--md-outline);
  border-radius: var(--md-shape-md);
  padding: 9px 13px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

:root[data-theme="dark"] input[type="text"],
:root[data-theme="dark"] input[type="password"],
:root[data-theme="dark"] input[type="number"],
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background: var(--md-surface-high);
}

input::placeholder, textarea::placeholder {
  color: var(--md-on-surface-variant);
  opacity: 0.65;
}

input:hover, select:hover, textarea:hover {
  border-color: var(--md-on-surface);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--md-primary);
  box-shadow: 0 0 0 3px rgba(103, 80, 164, 0.20);
}

:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] select:focus,
:root[data-theme="dark"] textarea:focus {
  box-shadow: 0 0 0 3px rgba(208, 188, 255, 0.22);
}

.input-sm { padding: 7px 11px; font-size: 13px; }
.input-xs { padding: 5px 8px; font-size: 12.5px; width: 76px; font-family: var(--mono); border-radius: var(--md-shape-sm); }
.input-search { width: 260px; padding: 8px 15px; border-radius: var(--md-shape-full); }

/* ==================================================================
 * Material 3 Buttons (Filled / FilledTonal / Outlined / Error / Icon)
 * ================================================================== */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: var(--md-shape-full);
  padding: 0 20px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.15px;
  cursor: pointer;
  transition: box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, filter 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn:active:not(:disabled) { transform: scale(0.985); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; }
.btn-sm { height: 36px; padding: 0 15px; font-size: 13px; }
.btn-xs { height: 30px; padding: 0 12px; font-size: 12px; }

/* FilledButton */
.btn-primary {
  background: var(--md-primary);
  color: var(--md-on-primary);
}
.btn-primary:hover {
  box-shadow: var(--md-elev-2);
  filter: brightness(1.06);
}

/* FilledTonalButton */
.btn-cyan {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
}
.btn-cyan:hover {
  box-shadow: var(--md-elev-1);
  filter: brightness(0.96);
}
:root[data-theme="dark"] .btn-cyan:hover { filter: brightness(1.12); }

/* OutlinedButton */
.btn-ghost {
  background: transparent;
  border-color: var(--md-outline);
  color: var(--md-primary);
}
.btn-ghost:hover {
  background: var(--md-hover-layer);
  border-color: var(--md-primary);
}

/* Warning Tonal Button */
.btn-warn {
  background: var(--md-warn-container);
  color: var(--md-on-warn-container);
}
.btn-warn:hover { box-shadow: var(--md-elev-1); filter: brightness(0.96); }

/* Error Tonal Button */
.btn-danger {
  background: var(--md-error-container);
  color: var(--md-on-error-container);
}
.btn-danger:hover {
  background: var(--md-error);
  color: var(--md-on-error);
  box-shadow: var(--md-elev-1);
}

/* M3 IconButton */
.icon-btn {
  position: relative;
  overflow: hidden;
  width: 40px;
  height: 40px;
  border-radius: var(--md-shape-full);
  border: 1px solid var(--md-outline-variant);
  background: var(--md-surface-lowest);
  color: var(--md-on-surface-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.icon-btn-sm { width: 34px; height: 34px; }
:root[data-theme="dark"] .icon-btn { background: var(--md-surface-high); }
.icon-btn:hover { background: var(--md-hover-layer); color: var(--md-primary); border-color: var(--md-primary); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

.btn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Checkbox & Material 3 Switch */
.chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--md-on-surface);
}
.chk input {
  accent-color: var(--md-primary);
  width: 17px;
  height: 17px;
  cursor: pointer;
  flex-shrink: 0;
}

.check-row { display: flex; gap: 14px; margin: 12px 0; flex-wrap: wrap; }

.switch-stack {
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 16px;
}

.m3-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--md-shape-md);
  background: var(--md-surface-container);
  border: 1px solid var(--md-outline-variant);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.m3-switch:hover { border-color: var(--md-primary); }
.m3-switch span { font-size: 13px; line-height: 1.4; color: var(--md-on-surface); }

.m3-switch input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: var(--md-shape-full);
  background: var(--md-surface-highest);
  border: 1.5px solid var(--md-outline);
  transition: background-color 0.18s ease, border-color 0.18s ease;
  flex-shrink: 0;
  margin: 0;
}
.m3-switch input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--md-outline);
  transform: translateY(-50%);
  transition: left 0.18s cubic-bezier(0.2, 0, 0, 1), width 0.18s ease, height 0.18s ease, background-color 0.18s ease;
}
.m3-switch input[type="checkbox"]:checked {
  background: var(--md-primary);
  border-color: var(--md-primary);
}
.m3-switch input[type="checkbox"]:checked::after {
  left: 22px;
  width: 18px;
  height: 18px;
  background: var(--md-on-primary);
}

/* ==================================================================
 * Material 3 Chips, SegmentedButton & Rarity Badges
 * ================================================================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--md-shape-full);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  line-height: 1.25;
  letter-spacing: 0.15px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
  flex-shrink: 0;
}
.tag-pink {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  border-color: color-mix(in srgb, var(--md-primary) 22%, transparent);
}
.tag-cyan {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  border-color: color-mix(in srgb, var(--md-primary) 16%, transparent);
}
.tag-green {
  background: var(--md-success-container);
  color: var(--md-on-success-container);
  border-color: color-mix(in srgb, var(--md-success) 26%, transparent);
}
.tag-warn {
  background: var(--md-warn-container);
  color: var(--md-on-warn-container);
  border-color: color-mix(in srgb, var(--md-warn) 28%, transparent);
}

.code-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--md-shape-sm);
  background: var(--md-surface-container);
  border: 1px solid var(--md-outline-variant);
  color: var(--md-on-surface);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.cell-nowrap { white-space: nowrap; }

/* M3 SegmentedButton Group */
.pill-group {
  display: inline-flex;
  background: var(--md-surface-lowest);
  border: 1px solid var(--md-outline);
  border-radius: var(--md-shape-full);
  overflow: hidden;
}
:root[data-theme="dark"] .pill-group { background: var(--md-surface-high); }

.pill {
  background: transparent;
  border: none;
  border-right: 1px solid var(--md-outline-variant);
  color: var(--md-on-surface);
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}
.pill:last-child { border-right: none; }
.pill:hover { background: var(--md-hover-layer); }
.pill.active { background: var(--md-secondary-container); color: var(--md-on-secondary-container); font-weight: 600; }
.pill-ssr.active { background: var(--md-primary); color: var(--md-on-primary); }
.pill-ss.active { background: var(--md-warn-container); color: var(--md-on-warn-container); }
.pill-s.active { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.pill-a.active { background: var(--md-surface-highest); color: var(--md-on-surface); }

.rarity-badge {
  display: inline-block;
  min-width: 44px;
  text-align: center;
  padding: 2px 8px;
  border-radius: var(--md-shape-sm);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono);
  line-height: 1.25;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.rar-4 { background: var(--md-primary); color: var(--md-on-primary); }
.rar-3 { background: var(--md-warn-container); color: var(--md-on-warn-container); }
.rar-2 { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.rar-1 { background: var(--md-surface-highest); color: var(--md-on-surface-variant); }

/* ==================================================================
 * Surface Containers, Dividers & DataTables
 * ================================================================== */
.preset-box {
  background: var(--md-surface-container);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-shape-md);
  padding: 16px;
}

.preset-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--md-on-surface);
}

.preset-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--md-outline-variant); margin: 16px 0; }
.muted { color: var(--md-on-surface-variant); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.toolbar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 580px;
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-shape-md);
  background: var(--md-surface-lowest);
}
:root[data-theme="dark"] .table-wrap { background: var(--md-surface-low); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--md-surface-high);
  color: var(--md-on-surface-variant);
  text-align: left;
  padding: 11px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-bottom: 1px solid var(--md-outline-variant);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--md-outline-variant);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--md-hover-layer); }
.data-table tbody tr.row-dirty {
  background: var(--md-dirty-tint);
  box-shadow: inset 3px 0 0 var(--md-primary);
}
.data-table tbody tr.row-warn {
  background: var(--md-warn-container);
  box-shadow: inset 3px 0 0 var(--md-warn);
}

.cell-title { font-weight: 600; color: var(--md-on-surface); }
.cell-sub { font-size: 11.5px; color: var(--md-on-surface-variant); font-family: var(--mono); }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  color: var(--md-on-surface-variant);
}

/* Module Unlock Grid */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.module-tile {
  background: var(--md-surface-container);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-shape-md);
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.module-tile:hover {
  border-color: var(--md-primary);
  box-shadow: var(--md-elev-1);
  transform: translateY(-1px);
}

.module-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 13.5px;
}

.module-tile-stat { font-size: 12px; color: var(--md-primary); font-family: var(--mono); }

/* Raw 381 Table Editor */
.raw-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 16px;
}
@media (max-width: 960px) { .raw-layout { grid-template-columns: 1fr; } }

.raw-table-list {
  max-height: 490px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.raw-tbl-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--md-on-surface);
  padding: 8px 12px;
  border-radius: var(--md-shape-full);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  text-align: left;
}
.raw-tbl-btn:hover { background: var(--md-hover-layer); }
.raw-tbl-btn.active { background: var(--md-secondary-container); color: var(--md-on-secondary-container); font-weight: 600; }

.json-editor {
  width: 100%;
  height: 470px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  background: var(--md-surface-container);
}

/* LinearProgressIndicator */
.prog-cell { min-width: 148px; }
.prog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  white-space: nowrap;
}
.prog-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--md-on-surface-variant);
}
.prog-pct {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--md-shape-full);
  background: var(--md-surface-high);
  color: var(--md-on-surface-variant);
}
.prog-pct.is-active {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}
.prog-pct.is-done {
  background: var(--md-success-container);
  color: var(--md-on-success-container);
}
.prog-bar {
  height: 7px;
  background: var(--md-surface-highest);
  border-radius: var(--md-shape-full);
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--md-primary), #9b51e0);
  border-radius: var(--md-shape-full);
  transition: width 0.25s ease;
}
.prog-fill.is-done {
  background: linear-gradient(90deg, var(--md-success), #2e9d68);
}

/* ==================================================================
 * Mobile Bottom NavigationBar (Flutter Material 3 NavigationBar)
 * ================================================================== */
.mobile-bottom-nav {
  display: none;
}

/* ==================================================================
 * Material 3 SnackBar & AlertDialog / ModalBottomSheet
 * ================================================================== */
.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--md-inverse-surface);
  color: var(--md-inverse-on-surface);
  border-radius: var(--md-shape-md);
  padding: 13px 16px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--md-elev-3);
  border-left: 4px solid var(--md-primary);
  animation: mdFadeIn 0.2s cubic-bezier(0.2, 0, 0, 1);
}
.toast.ok { border-left-color: var(--md-success); }
.toast.err { border-left-color: var(--md-error); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--md-scrim);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: mdFadeOnly 0.16s ease;
}
.modal-backdrop.hidden { display: none; }

.modal-card {
  width: min(460px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--md-surface-lowest);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-shape-xl);
  padding: 24px;
  box-shadow: var(--md-elev-3);
  animation: mdDialogIn 0.2s cubic-bezier(0.2, 0, 0, 1);
}
:root[data-theme="dark"] .modal-card {
  background: var(--md-surface-high);
}
.modal-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--md-on-surface);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

/* ==================================================================
 * Material 3 Auth & ID Binding Gate Screens
 * ================================================================== */
.gate-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: var(--md-gate-bg);
}

.gate-theme-fab {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 85;
  box-shadow: var(--md-elev-2);
}

.gate-card {
  width: min(450px, 94vw);
  background: var(--md-surface-lowest);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-shape-xl);
  padding: 30px 28px;
  box-shadow: var(--md-elev-3);
  animation: mdDialogIn 0.24s cubic-bezier(0.2, 0, 0, 1);
}

:root[data-theme="dark"] .gate-card {
  background: var(--md-surface-high);
}

.gate-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.gate-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gate-banner {
  background: var(--md-tertiary-container);
  color: var(--md-on-tertiary-container);
  border-radius: var(--md-shape-md);
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

/* M3 SegmentedButton for Login / Register */
.gate-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--md-outline);
  border-radius: var(--md-shape-full);
  overflow: hidden;
  margin-bottom: 18px;
  background: transparent;
}

.gate-tab {
  position: relative;
  overflow: hidden;
  background: transparent;
  border: none;
  color: var(--md-on-surface);
  font-weight: 500;
  font-size: 13.5px;
  height: 42px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.gate-tab:first-child { border-right: 1px solid var(--md-outline); }
.gate-tab:hover { background: var(--md-hover-layer); }
.gate-tab.active {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  font-weight: 700;
}

.gate-error {
  background: var(--md-error-container);
  color: var(--md-on-error-container);
  border-radius: var(--md-shape-md);
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.grid-2-tight {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 10px;
  align-items: end;
}

.gate-submit {
  width: 100%;
  height: 46px;
  font-size: 14.5px;
  font-weight: 700;
  margin-top: 4px;
}

/* ==================================================================
 * TABLET & MOBILE RESPONSIVE ADAPTATION (Flutter Adaptive Scaffold)
 * ================================================================== */

/* Tablet & Compact Laptop (<= 1024px): Slide-Over Modal NavigationDrawer */
@media (max-width: 1024px) {
  .main-wrap {
    margin-left: 0;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(304px, 84vw);
    z-index: 75;
    border-right: none;
    border-radius: 0 24px 24px 0;
    box-shadow: var(--md-elev-3);
    transform: translateX(-106%);
    transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .topbar-nav-head {
    display: inline-flex;
  }
  .icon-btn.drawer-close-btn {
    display: inline-flex;
  }
  .topbar {
    padding: 10px 16px;
  }
  .content {
    padding: 18px 16px 40px;
  }
}

/* Mobile Phone (<= 768px): Bottom NavigationBar + Compact TopAppBar + 1-Col Forms */
@media (max-width: 768px) {
  .topbar {
    padding: 8px 12px 10px;
  }

  .topbar-row-primary {
    row-gap: 8px;
    column-gap: 8px;
  }

  .topbar-nav-head {
    order: 1;
    flex: 1;
    min-width: 0;
  }

  .topbar-right {
    order: 2;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .topbar-left {
    order: 3;
    flex-basis: 100%;
    width: 100%;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .desktop-only-action {
    display: none !important;
  }

  .drawer-mobile-tools {
    display: flex;
  }

  #btnRefreshAll {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--md-shape-full);
  }
  #btnRefreshAll .btn-label {
    display: none;
  }

  .player-select-field {
    flex: 1;
    min-width: 0;
  }
  .player-select-lbl {
    display: none;
  }
  .player-select-field select {
    width: 100%;
    max-width: none;
    height: 38px;
    padding: 6px 10px;
    font-size: 14px;
    border-radius: var(--md-shape-full);
  }

  #btnTopBindNew {
    height: 38px;
    padding: 0 13px;
    font-size: 12.5px;
    flex-shrink: 0;
  }

  .content {
    padding: 14px 12px calc(92px + env(safe-area-inset-bottom));
  }

  /* Hero Quartz Card spans full width; other stats in crisp 2-col grid */
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }
  .stat-card {
    padding: 13px 13px;
    border-radius: 16px;
  }
  .stat-card:first-child {
    grid-column: 1 / -1;
    padding: 16px 18px;
  }
  .stat-card:last-child {
    grid-column: 1 / -1;
  }
  .stat-card:first-child .stat-value {
    font-size: 26px;
  }
  .stat-value {
    font-size: 18px;
  }
  .stat-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }
  .stat-icon svg {
    width: 15px;
    height: 15px;
  }

  .card {
    padding: 16px 14px;
    border-radius: 18px;
  }
  .card h2 {
    font-size: 15.5px;
  }

  .grid-2,
  .form-grid,
  .grid-2-tight {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .field.span-2 {
    grid-column: span 1;
  }

  /* Prevent iOS Safari zoom on input focus */
  input[type="text"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px;
  }
  .data-table input[type="number"],
  .data-table select,
  .input-xs {
    font-size: 13.5px;
  }

  /* Responsive Toolbars & Filter Bars */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .toolbar-group {
    width: 100%;
    gap: 8px;
  }
  .input-search {
    width: 100% !important;
    flex: 1 1 100%;
  }
  .pill-group {
    width: 100%;
    display: flex;
    overflow-x: auto;
  }
  .pill {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
  }
  .toolbar-group select.input-sm {
    flex: 1 1 140px;
    max-width: none !important;
  }
  .toolbar-group .btn {
    flex: 1 1 auto;
  }

  .preset-row .btn,
  .form-inline-pair .btn {
    flex: 1 1 auto;
  }

  /* Horizontal-scroll responsive DataTables without column crushing */
  .table-wrap {
    max-height: 58vh;
  }
  .data-table {
    min-width: 560px;
    font-size: 13px;
  }
  #tab-gacha .data-table,
  #tab-backups .data-table,
  #bindModal .data-table {
    min-width: 440px;
  }
  .data-table thead th,
  .data-table tbody td {
    padding: 8px 10px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .raw-table-list {
    max-height: 220px;
  }
  .json-editor {
    height: 320px;
    font-size: 13px;
  }

  /* Authentic Flutter Material 3 Bottom NavigationBar */
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--md-topbar-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--md-outline-variant);
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  }

  .mnav-item {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: var(--md-on-surface-variant);
    padding: 2px 0;
    cursor: pointer;
    font-family: inherit;
  }

  .mnav-pill {
    width: 56px;
    height: 30px;
    border-radius: var(--md-shape-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
  }
  .mnav-pill svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }

  .mnav-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
  }

  .mnav-item.active {
    color: var(--md-on-surface);
  }
  .mnav-item.active .mnav-pill {
    background: var(--md-secondary-container);
    color: var(--md-on-secondary-container);
  }
  .mnav-item.active .mnav-label {
    font-weight: 700;
    color: var(--md-primary);
  }

  /* SnackBar sits above Bottom NavigationBar */
  .toast-stack {
    left: 12px;
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    max-width: none;
  }

  /* Gate Screens mobile spacing */
  .gate-screen {
    align-items: flex-start;
    padding: 72px 14px 28px;
  }
  .gate-theme-fab {
    top: 14px;
    right: 14px;
  }
  .gate-card {
    width: 100%;
    padding: 24px 18px;
    border-radius: 24px;
  }
}

/* Mobile ModalBottomSheet (<= 640px) */
@media (max-width: 640px) {
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .modal-card {
    width: 100% !important;
    max-width: 100%;
    max-height: 88dvh;
    border-radius: 28px 28px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 14px 18px calc(22px + env(safe-area-inset-bottom));
    animation: mdSheetUp 0.24s cubic-bezier(0.2, 0, 0, 1);
  }
  .modal-card::before {
    content: "";
    display: block;
    width: 38px;
    height: 4px;
    border-radius: 99px;
    background: var(--md-outline-variant);
    margin: 0 auto 14px;
  }
  .modal-card .form-inline-pair {
    flex-direction: column;
    align-items: stretch;
  }
  .modal-card .form-inline-pair input,
  .modal-card .form-inline-pair .btn {
    width: 100%;
  }
  .modal-actions {
    flex-direction: row;
  }
  .modal-actions .btn {
    flex: 1;
  }
}

@keyframes mdSheetUp {
  from { transform: translateY(32px); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}
