/* ========================================
   COMPONENTS.CSS
   ======================================== */
/* 
* GZIP BUDGET: ~58 KB (warn at 50 KB)
* This file contains: Reusable UI components (modals, toasts, forms, buttons, status utilities)
* Used by: All pages that need reusable components
*/

/* ========================================
   NAVIGATION COMPONENT
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #00455A; /* Solid var(--accent-darkest) - matches scrolled state */
  backdrop-filter: blur(5px);
  border-bottom: 1px solid var(--navbar-border-color);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  background: #00455A; /* Solid var(--accent-darkest) when scrolled */
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 8px;
}

.nav-organization {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 40%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 24px;
  color: var(--white);
  text-decoration: none;
}

/* Hide nav-brand on logged-in pages (dashboard pages) */
.player-dashboard .nav-brand,
.admin-dashboard .nav-brand,
.dashboard-page .nav-brand {
  display: none;
}

.nav-logo {
  display: none;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gray-600), var(--gray-500));
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  transition: var(--transition);
  padding: 8px 0;
}

.nav-links a:hover {
  color: var(--white);
}

/* Active/current page indicator */
.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--white);
  font-weight: 600;
  position: relative;
}

.nav-links a.active::after,
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-light);
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Navbar button - white text on dark navbar background */
.nav-actions .btn-ghost {
  color: rgba(255, 255, 255, 0.9);
}

.nav-actions .btn-ghost:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* Sign In button */
.sign-in-btn svg {
  display: none;
}

.sign-in-btn .sign-in-text {
  display: inline;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--white);
  cursor: pointer;
  padding: 8px;
  transition: all 0.2s ease;
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

.mobile-menu-toggle:hover {
  color: rgba(255, 255, 255, 0.8);
}

.mobile-menu {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px var(--space-6);
  display: none;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
  box-shadow: var(--shadow-md);
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  color: var(--gray-700);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 500;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a.active,
.mobile-menu a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

/* ========================================
   SELECTED/ACTIVE ITEMS
   Use accent teal for selected states
   ======================================== */

/* Selected table rows, list items, etc. */
.selected,
.is-selected,
tr.selected,
tr.is-selected {
  background-color: rgba(0, 107, 138, 0.08) !important; /* var(--accent) with 8% opacity */
  border-left: 3px solid var(--accent);
}

.selected:hover,
.is-selected:hover,
tr.selected:hover,
tr.is-selected:hover {
  background-color: rgba(0, 107, 138, 0.12) !important; /* var(--accent) with 12% opacity */
}

/* Selected items in cards or panels */
.card .selected,
.panel .selected {
  background-color: rgba(0, 107, 138, 0.08);
  border-left: 3px solid var(--accent);
  padding-left: calc(var(--space-4) - 3px);
}

/* ========================================
   IMPORTANT HIGHLIGHTS/CALLOUTS
   Use info blue for important information
   ======================================== */

.highlight,
.callout,
.notice,
.important {
  background-color: var(--info-bg);
  border: 1px solid var(--info-border);
  border-left: 4px solid var(--info-border);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-4) 0;
}

.highlight p:last-child,
.callout p:last-child,
.notice p:last-child,
.important p:last-child {
  margin-bottom: 0;
}

.highlight strong,
.callout strong,
.notice strong,
.important strong {
  color: var(--gray-800);
  font-weight: 600;
}

/* ========================================
   CANONICAL BUTTON SYSTEM
   All button variants using color tokens from :root
   ======================================== */

/* Base button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-family);
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
  border: none;
  text-decoration: none;
  box-sizing: border-box;
  background: transparent;
  color: var(--text-main);
  border-radius: 4px;
  transform: translateY(-1px); /* tiny optical centering tweak for labels */
}

/* Button size variants */
.btn-sm {
  padding: 10px 16px;
  font-size: 1rem; /* 16px */
  line-height: 1;
}

.btn-xs {
  padding: 5px 10px;
  font-size: 1rem; /* match base button font for readability */
  line-height: 1;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.125rem;
  line-height: 1;
}

/* Touch button variant - no border for section headers */
.btn-touch {
  border: none;
}

/* Touch Arrow button - Touch style with right-pointing arrow */
.btn-touch-arrow {
  border: none;
  gap: 6px;
}

.btn-touch-arrow::after {
  content: '→';
  display: inline-block;
  margin-left: 6px;
  font-size: 1em;
  line-height: 1;
  flex-shrink: 0;
}

/* Prevent touch from removing border on tertiary buttons */
.btn-tertiary.btn-touch {
  border: none;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Icon button */
.btn-icon {
  padding: 6px;
  min-width: auto;
  width: auto;
  height: auto;
}

/* Primary button */
.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-primary:active {
  background: var(--accent-dark);
}

.btn-primary:focus,
.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


/* Secondary button */
.btn-secondary {
  background: color-mix(in srgb, var(--color-gray-200) 90%, transparent);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--gray-200);
  color: var(--text-main);
}

.btn-secondary:active {
  background: var(--bg-subtle);
}

.btn-secondary:focus,
.btn-secondary:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* Ghost button */
.btn-ghost {
  background: transparent;
  color: var(--text-main);
  font-weight: 500;
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.btn-ghost:active {
  background: var(--bg-surface);
}

.btn-ghost:focus,
.btn-ghost:focus-visible {
  outline: 2px solid var(--border-subtle);
  outline-offset: 2px;
}

/* Outline button */
.btn-outline {
  background: transparent;
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--text-inverse);
}

.btn-outline:active {
  background: var(--primary-hover);
}

.btn-outline:focus,
.btn-outline:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Tertiary button */
.btn-tertiary {
  background: var(--color-gray-200);
  color: var(--text-main);
  box-shadow: none;
}

.btn-tertiary:hover:not(:disabled) {
  background: var(--color-gray-300);
}

.btn-tertiary:active:not(:disabled) {
  background: var(--color-gray-300);
}

.btn-tertiary:focus {
  outline: 2px solid var(--color-gray-400);
  outline-offset: 2px;
}

.btn-tertiary:focus-visible:not(:disabled) {
  background: var(--color-gray-300);
  outline: 2px solid var(--color-gray-400);
  outline-offset: 2px;
}

/* Danger button */
.btn-danger {
  background: var(--error);
  color: var(--text-inverse);
}

.btn-danger:hover {
  background: var(--error);
}

.btn-danger:active {
  background: var(--error);
}

.btn-danger:focus,
.btn-danger:focus-visible {
  outline: 2px solid var(--error);
  outline-offset: 2px;
}

/* Button disabled state - applies to all variants */
.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-ghost:disabled,
.btn-touch:disabled,
.btn-touch-arrow:disabled,
.btn-outline:disabled,
.btn-danger:disabled,
.btn-tertiary:disabled {
  opacity: 1;
  cursor: not-allowed;
  pointer-events: none;
}

/* Disabled states */
.btn-primary:disabled {
  background: var(--bg-subtle);
  color: var(--gray-500);
}

.btn-secondary:disabled {
  background: var(--bg-subtle);
  color: var(--gray-500);
}

.btn-ghost:disabled {
  background: transparent;
  color: var(--gray-500);
}

.btn-touch:disabled {
  background: transparent;
  color: var(--gray-500);
}

.btn-touch-arrow:disabled {
  background: transparent;
  color: var(--gray-500);
}

.btn-outline:disabled {
  background: transparent;
  color: var(--gray-500);
}

.btn-danger:disabled {
  background: var(--bg-subtle);
  color: var(--gray-500);
}

.btn-tertiary:disabled,
.btn-tertiary[aria-disabled="true"] {
  background: var(--gray-200);
  color: var(--gray-400);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 1;
}


/* Button combinations - size + variant */
.btn-primary.btn-sm,
.btn-secondary.btn-sm,
.btn-ghost.btn-sm,
.btn-touch.btn-sm,
.btn-touch-arrow.btn-sm,
.btn-outline.btn-sm,
.btn-danger.btn-sm,
.btn-tertiary.btn-sm {
  padding: 8px 16px;
}

.btn-primary.btn-xs,
.btn-secondary.btn-xs,
.btn-ghost.btn-xs,
.btn-touch.btn-xs,
.btn-touch-arrow.btn-xs,
.btn-outline.btn-xs,
.btn-danger.btn-xs,
.btn-tertiary.btn-xs {
  padding: 5px 10px;
}

.btn-primary.btn-icon,
.btn-secondary.btn-icon,
.btn-ghost.btn-icon,
.btn-touch.btn-icon,
.btn-touch-arrow.btn-icon,
.btn-outline.btn-icon,
.btn-danger.btn-icon,
.btn-tertiary.btn-icon {
  padding: 6px;
}

.btn-primary.btn-lg,
.btn-secondary.btn-lg,
.btn-ghost.btn-lg,
.btn-touch.btn-lg,
.btn-touch-arrow.btn-lg,
.btn-outline.btn-lg,
.btn-danger.btn-lg,
.btn-tertiary.btn-lg {
  padding: 14px 32px;
}

.btn-primary.btn-full,
.btn-secondary.btn-full,
.btn-ghost.btn-full,
.btn-touch.btn-full,
.btn-touch-arrow.btn-full,
.btn-outline.btn-full,
.btn-danger.btn-full,
.btn-tertiary.btn-full {
  width: 100%;
}

/* Button spacing utilities */
.button-spaced {
  margin-left: 8px;
}

/* Utility class for hiding elements */
.hidden {
  display: none !important;
}

/* ========================================
   LEGACY COMPONENT CLASSES
   Reusable styling that can be applied instantly to any page
   Colors deferred - use CSS variables for easy color updates later
   ======================================== */

/* Legacy Form Container */
.form-legacy,
.form-minimal,
.login-card {
  background: transparent;
  padding: 40px;
  box-shadow: none;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.login-minimal,
.register-minimal,
.forgot-password-minimal,
.reset-password-minimal {
  background: transparent;
  padding: 16px;
  box-shadow: none;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

/* Shared form container styles - standardized across modals, contact, and pricing */
.contact-form-section,
.pricing-plan {
  padding: 24px;
  background: transparent;
  box-shadow: none;
}

/* Legacy Form Header */
.form-legacy .form-header,
.form-minimal .form-header,
.login-minimal .form-header,
.register-minimal .form-header,
.forgot-password-minimal .form-header,
.reset-password-minimal .form-header,
.login-card .form-header {
  text-align: center;
  margin-bottom: 32px;
}

.form-legacy .form-header h2,
.form-minimal .form-header h2,
.login-minimal .form-header h2,
.register-minimal .form-header h2,
.forgot-password-minimal .form-header h2,
.reset-password-minimal .form-header h2,
.login-card .form-header h2 {
  color: var(--text-main);
  font-size: 24px;
  font-weight: 700;
}

.form-legacy .form-header p,
.form-minimal .form-header p,
.login-minimal .form-header p,
.register-minimal .form-header p,
.forgot-password-minimal .form-header p,
.reset-password-minimal .form-header p,
.login-card .form-header p {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
}

/* Legacy Form Group */
.form-legacy .form-group,
.form-minimal .form-group,
.login-minimal .form-group,
.register-minimal .form-group,
.forgot-password-minimal .form-group,
.reset-password-minimal .form-group,
.login-card .form-group {
  margin-bottom: 24px;
}

.form-legacy .form-group label,
.form-minimal .form-group label,
.login-minimal .form-group label,
.register-minimal .form-group label,
.forgot-password-minimal .form-group label,
.reset-password-minimal .form-group label,
.login-card .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-main);
  font-size: 1rem;
}

/* Legacy Form Row (for side-by-side fields) */
.form-legacy .form-row,
.form-minimal .form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.form-legacy .form-row .form-group,
.form-minimal .form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .form-legacy .form-row,
  .form-minimal .form-row {
    gap: 0;
  }
}

/* Legacy Input Fields - REMOVED: Use canonical .form-input, .form-select, .form-textarea classes instead */
/* Legacy styles conflicted with canonical system. Forms should use canonical classes regardless of container. */

/* Legacy Checkbox Label */
.form-legacy .checkbox-label,
.form-minimal .checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-legacy .checkbox-label input[type="checkbox"],
.form-minimal .checkbox-label input[type="checkbox"] {
  width: auto;
  margin-right: 12px;
}

/* .submit-btn and .cancel-btn are now layout wrappers only */
/* They are used in combination with canonical .btn classes */
/* Layout properties are defined in landing.css and dashboard.css where needed */

/* Legacy Error Message */
.form-legacy .error-message,
.form-minimal .error-message,
.login-minimal .error-message,
.register-minimal .error-message,
.forgot-password-minimal .error-message,
.reset-password-minimal .error-message,
.login-card .error-message,
.message-error {
  background: var(--error-light);
  color: var(--error);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 14px;
  border: 1px solid var(--error);
}

/* Legacy Success Message */
.form-legacy .success-message,
.form-minimal .success-message,
.login-minimal .success-message,
.register-minimal .success-message,
.forgot-password-minimal .success-message,
.reset-password-minimal .success-message,
.login-card .success-message,
.message-success {
  background: var(--success-green-light);
  color: var(--success);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 14px;
  border: 1px solid var(--success);
}

/* Registration message styles */
.registration-message {
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid;
}

.registration-message-error {
  background-color: var(--error-light);
  color: var(--error);
  border-color: var(--error);
}

.registration-message-success {
  background-color: var(--success-green-light);
  color: var(--success);
  border-color: var(--success);
}

/* Legacy Loading State */
.form-legacy .loading,
.form-minimal .loading,
.login-minimal .loading,
.register-minimal .loading,
.forgot-password-minimal .loading,
.reset-password-minimal .loading,
.login-card .loading {
  display: none;
  text-align: center;
  margin-top: 16px;
}

.form-legacy .loading.show,
.form-minimal .loading.show,
.login-minimal .loading.show,
.register-minimal .loading.show,
.forgot-password-minimal .loading.show,
.reset-password-minimal .loading.show,
.login-card .loading.show {
  display: block;
}

/* Form validation states - works with canonical .form-input class */
.form-group input.valid,
.form-input.valid {
  border-color: var(--success-green);
}

.form-group input.invalid,
.form-input.invalid {
  border-color: var(--danger);
}



/* Legacy Submit Button */
.form-legacy .submit-btn,
.form-minimal .submit-btn,
.login-minimal .submit-btn,
.register-minimal .submit-btn,
.forgot-password-minimal .submit-btn,
.reset-password-minimal .submit-btn,
.login-card .submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  background: var(--accent, #006B8A);
  color: var(--white);
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  min-width: 100px;
  border-radius: 4px;
}

.form-legacy .submit-btn:hover,
.form-minimal .submit-btn:hover,
.login-minimal .submit-btn:hover,
.register-minimal .submit-btn:hover,
.forgot-password-minimal .submit-btn:hover,
.reset-password-minimal .submit-btn:hover,
.login-card .submit-btn:hover {
  background: var(--accent-dark, #005a73);
}

.form-legacy .submit-btn:disabled,
.form-minimal .submit-btn:disabled,
.login-minimal .submit-btn:disabled,
.register-minimal .submit-btn:disabled,
.forgot-password-minimal .submit-btn:disabled,
.reset-password-minimal .submit-btn:disabled,
.login-card .submit-btn:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Form-minimal submit button layout */
.form-minimal .submit-btn,
.login-minimal .submit-btn,
.register-minimal .submit-btn,
.forgot-password-minimal .submit-btn,
.reset-password-minimal .submit-btn,
.login-card .submit-btn {
  width: 100%;
}

/* Password input wrapper with toggle button */
.form-minimal .password-input-wrapper,
.login-minimal .password-input-wrapper,
.register-minimal .password-input-wrapper,
.forgot-password-minimal .password-input-wrapper,
.reset-password-minimal .password-input-wrapper,
.login-card .password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-minimal .password-input-wrapper input,
.login-minimal .password-input-wrapper input,
.register-minimal .password-input-wrapper input,
.forgot-password-minimal .password-input-wrapper input,
.reset-password-minimal .password-input-wrapper input,
.login-card .password-input-wrapper input {
  padding-right: 45px;
}

.form-minimal .password-toggle,
.login-minimal .password-toggle,
.register-minimal .password-toggle,
.forgot-password-minimal .password-toggle,
.reset-password-minimal .password-toggle,
.login-card .password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  transition: color 0.2s ease;
  z-index: 1;
}

.form-minimal .password-toggle:hover,
.login-minimal .password-toggle:hover,
.register-minimal .password-toggle:hover,
.forgot-password-minimal .password-toggle:hover,
.reset-password-minimal .password-toggle:hover,
.login-card .password-toggle:hover {
  color: var(--text-main);
}

.form-minimal .password-toggle:focus,
.login-minimal .password-toggle:focus,
.register-minimal .password-toggle:focus,
.forgot-password-minimal .password-toggle:focus,
.reset-password-minimal .password-toggle:focus,
.login-card .password-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-minimal .password-toggle svg,
.login-minimal .password-toggle svg,
.register-minimal .password-toggle svg,
.forgot-password-minimal .password-toggle svg,
.reset-password-minimal .password-toggle svg,
.login-card .password-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  display: block;
}

/* Form link styles (register-link, login-link, forgot-password-link) */
.form-minimal .register-link,
.form-minimal .login-link,
.login-minimal .register-link,
.login-minimal .login-link,
.register-minimal .register-link,
.register-minimal .login-link,
.forgot-password-minimal .register-link,
.forgot-password-minimal .login-link,
.reset-password-minimal .register-link,
.reset-password-minimal .login-link,
.login-card .register-link,
.login-card .login-link {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  color: var(--text-muted);
  font-size: 1rem;
}

.form-minimal .register-link a,
.form-minimal .login-link a,
.login-minimal .register-link a,
.login-minimal .login-link a,
.register-minimal .register-link a,
.register-minimal .login-link a,
.forgot-password-minimal .register-link a,
.forgot-password-minimal .login-link a,
.reset-password-minimal .register-link a,
.reset-password-minimal .login-link a,
.login-card .register-link a,
.login-card .login-link a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 500;
}

.form-minimal .register-link a:hover,
.form-minimal .login-link a:hover,
.login-minimal .register-link a:hover,
.login-minimal .login-link a:hover,
.register-minimal .register-link a:hover,
.register-minimal .login-link a:hover,
.forgot-password-minimal .register-link a:hover,
.forgot-password-minimal .login-link a:hover,
.reset-password-minimal .register-link a:hover,
.reset-password-minimal .login-link a:hover,
.login-card .register-link a:hover,
.login-card .login-link a:hover {
  color: var(--link-color-hover);
  text-decoration: underline;
}

.form-minimal .forgot-password-link,
.login-minimal .forgot-password-link,
.login-card .forgot-password-link {
  margin-top: 8px;
  text-align: right;
}

.form-minimal .forgot-password-link a,
.login-minimal .forgot-password-link a,
.login-card .forgot-password-link a {
  color: var(--link-color);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.form-minimal .forgot-password-link a:hover,
.login-minimal .forgot-password-link a:hover,
.login-card .forgot-password-link a:hover {
  color: var(--link-color-hover);
  text-decoration: underline;
}

/* Legacy Cancel/Secondary Button */
.form-legacy .cancel-btn,
.form-minimal .cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: transparent;
  color: var(--gray-600);
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-sizing: border-box;
  min-width: 100px;
}

.form-legacy .cancel-btn:hover,
.form-minimal .cancel-btn:hover {
  background: var(--bg-surface);
  color: var(--gray-700);
}


.form-legacy .cancel-btn:disabled,
.form-minimal .cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}






/* ========================================
   LEGACY MODAL FORM STYLES
   ======================================== */

/* Forms within Legacy Modal Body */
.modal-body-legacy .form-legacy {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  max-width: 100%;
  margin: 0;
}

.modal-body-legacy .form-legacy .form-group {
  margin-bottom: 20px;
}

.modal-body-legacy .form-legacy .form-group:last-child {
  margin-bottom: 0;
}

.modal-body-legacy .form-legacy .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.875rem;
}

.modal-body-legacy .form-legacy .form-group input,
.modal-body-legacy .form-legacy .form-group select,
.modal-body-legacy .form-legacy .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--bg-surface);
  box-sizing: border-box;
  font-family: inherit;
}

.modal-body-legacy .form-legacy .form-group input:focus,
.modal-body-legacy .form-legacy .form-group select:focus,
.modal-body-legacy .form-legacy .form-group textarea:focus {
  outline: none;
  border-color: var(--border-accent);
}

.modal-body-legacy .form-legacy .form-group input::placeholder,
.modal-body-legacy .form-legacy .form-group textarea::placeholder {
  color: var(--text-soft);
  font-size: 0.875rem;
}

/* Legacy modal button styles removed - use canonical .btn system instead */

/* ========================================
   STATUS/ICON UTILITIES
   ======================================== */

/* Checkmark icon */
.checkmark-icon,
.icon-checkmark {
  color: var(--success);
}

.plus-icon,
.icon-plus {
  color: var(--success);
}

.status-on,
.status-enabled {
  color: var(--success);
}

.status-active {
  color: var(--success);
  font-weight: 600;
}

.status-inactive {
  color: var(--danger);
  font-weight: 600;
}

.status-pending {
  color: var(--warning);
  font-weight: 600;
}

.status-suspended {
  color: var(--warning);
  font-weight: 600;
}

.text-success,
.text-completed {
  color: var(--success);
}

.text-muted {
  color: var(--text-soft);
}

.text-unavailable {
  color: var(--text-soft);
  text-decoration: line-through;
}

/* ========================================
   TOAST/USER MESSAGE SYSTEM
   ======================================== */
#user-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  color: var(--white);
  font-weight: 500;
  font-size: 14px;
  z-index: 10000;
  max-width: 300px;
  box-shadow: 0 4px 12px var(--shadow-black-15);
  transition: all 0.3s ease;
  word-wrap: break-word;
  line-height: 1.5;
}

#user-message.user-message-success {
  background-color: var(--success);
  color: var(--text-inverse);
}

#user-message.user-message-error {
  background-color: var(--danger);
  color: var(--text-inverse);
}

#user-message.user-message-warning {
  background-color: var(--warning);
  color: var(--text-inverse);
}

#user-message.user-message-info {
  background-color: var(--info);
  color: var(--text-inverse);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #user-message {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* ========================================
   FORM UTILITIES
   ======================================== */
/* General form components - canonical source for all form styling */
/* Use these classes for forms outside of .form-legacy/.form-minimal containers */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin: 0;
  padding: 0;
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}

/* General form group input styles - REMOVED: Use canonical .form-input, .form-select, .form-textarea classes instead */
/* This rule conflicted with canonical classes due to specificity (0,1,1 vs 0,1,0) */
/* Forms should explicitly use .form-input, .form-select, .form-textarea classes */

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-main);
  font-size: 14px;
  margin: 0;
  padding: 0;
}

/* Canonical Form Input - Use this class for all text inputs */
.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 2px solid var(--gray-300);
  border-radius: 4px;
}

.form-input::placeholder {
  color: var(--gray-500);
  opacity: 1;
}

.form-input:focus {
  outline: none;
  border: 2px solid var(--border-focus);
}

.form-input:hover {
  border: 2px solid var(--border-strong);
}

.form-group-spacing {
  margin-bottom: 20px;
}

.form-group-flex {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-group-flex-spaced {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.form-group-flex-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.form-actions-spaced {
  margin-top: 24px;
}

/* Label utilities */
.label-inline {
  margin: 0;
  white-space: nowrap;
}

.label-flex {
  flex: 1;
  margin: 0;
}

.label-flex-right {
  flex: 1;
  margin: 0;
  text-align: right;
}

.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  background: var(--bg-surface);
  color: var(--text-main);
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  line-height: 1.5;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
}

.form-textarea::placeholder {
  color: var(--gray-500);
  opacity: 1;
}

.form-textarea:focus {
  outline: none;
  border: 2px solid var(--border-focus);
}

.form-textarea:hover {
  border: 2px solid var(--border-strong);
}

/* Canonical Form Select - Use this class for all select dropdowns */
.form-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
}

.form-select:focus {
  outline: none;
  border: 2px solid var(--border-focus);
}

.form-select:hover {
  border-color: var(--border-strong);
}

.form-input[required],
.form-textarea[required],
.form-select[required] {
  border-left: 4px solid var(--border-focus);
  padding-left: 14px;
}

.form-input[required]:focus,
.form-textarea[required]:focus,
.form-select[required]:focus {
  border-left-color: var(--border-focus);
}

.required-indicator {
  color: var(--primary);
  font-weight: bold;
  margin-left: 2px;
}

/* Form Help Text */
.form-help {
  font-size: 1rem;
  color: var(--text-soft);
  margin-top: 2px;
  line-height: 1.4;
}

/* Password Helper Text */
.password-helper-text {
  display: block;
  font-size: 0.875rem;
  color: var(--text-soft);
  margin-top: 4px;
  line-height: 1.4;
}

/* Form Error Messages */
.form-error {
  font-size: 1rem;
  color: var(--danger);
  margin-top: 4px;
  line-height: 1.4;
  display: block;
}

/* Form Actions (Button Row) */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-300);
}

/* Input with Icon (for form fields with SVG icons) */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  color: var(--gray-400);
  pointer-events: none;
  z-index: 1;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Icon positioning for textareas */
.input-with-icon .textarea-icon {
  top: 12px;
  align-self: flex-start;
}

/* Padding adjustment for inputs with icons */
.input-with-icon input,
.input-with-icon .form-input {
  padding-left: 40px;
}

/* Padding adjustment for textareas with icons */
.input-with-icon textarea,
.input-with-icon .form-textarea {
  padding-left: 40px;
}

/* Handle required fields with icons (adjust padding-left) */
.input-with-icon input[required],
.input-with-icon .form-input[required] {
  padding-left: 40px;
  border-left: 4px solid var(--border-focus);
}

.input-with-icon textarea[required],
.input-with-icon .form-textarea[required] {
  padding-left: 40px;
  border-left: 4px solid var(--border-focus);
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  background: var(--bg-surface);
  transition: all 0.2s ease;
  box-sizing: border-box;
  color: var(--text-main);
  flex: 1;
  min-width: 250px;
  border: 2px solid var(--border-subtle);
  border-radius: 4px;
}

.search-input:focus {
  outline: none;
  border: 2px solid var(--border-accent);
  box-shadow: 0 0 0 3px var(--shadow-teal-10);
}

.search-input::placeholder {
  color: var(--text-soft);
}

.input-score {
  width: 40px;
  padding: 4px;
  text-align: center;
  font-size: 16px;
  border-radius: 4px;
}

.input-date-small {
  width: 140px;
  padding: 4px 8px;
  font-size: 14px;
  border-radius: 4px;
}

.text-muted-form {
  margin-bottom: 12px;
  color: var(--text-main);
}

.link-inline {
  color: var(--link-color);
  text-decoration: underline;
  cursor: pointer;
}

/* ========================================
   MODAL SYSTEMS
   ======================================== */

/* ========================================
   MODAL OVERLAY (CANONICAL - UNIFIED & LEGACY ALIASES)
   ======================================== */
.modal-overlay-legacy,
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--overlay-strong);
  backdrop-filter: blur(2px);
  display: none !important; /* Hidden by default */
  justify-content: center;
  align-items: flex-start;
  padding-top: 0;
  z-index: 2000; /* Higher than navbar (1000) to appear above it when open */
  box-sizing: border-box;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Show modal when display: flex or block is set inline */
.modal-overlay-legacy.show,
.modal-overlay-legacy[style*="display: flex"],
.modal-overlay-legacy[style*="display:flex"],
.modal-overlay[style*="display: flex"],
.modal-overlay[style*="display:flex"],
.modal-overlay[style*="display: block"],
.modal-overlay[style*="display:block"] {
  display: flex !important;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* ========================================
   MODAL CONTENT (CANONICAL - UNIFIED & LEGACY ALIASES)
   ======================================== */
.modal-content-legacy,
.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 25px 50px -12px var(--shadow-black-25), 0 0 0 1px var(--shadow-black-05);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: modalSlideIn 0.2s ease-out;
  position: relative;
  pointer-events: auto; /* Ensure buttons and interactive elements are clickable */
}

/* Modal slide-in animation */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Show modal content when overlay is visible */
.modal-overlay-legacy.show .modal-content-legacy,
.modal-overlay-legacy[style*="display: flex"] .modal-content-legacy,
.modal-overlay-legacy[style*="display:flex"] .modal-content-legacy,
.modal-overlay[style*="display: flex"] .modal-content,
.modal-overlay[style*="display:flex"] .modal-content,
.modal-overlay[style*="display: block"] .modal-content,
.modal-overlay[style*="display:block"] .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Modal size variants removed - all modals use base 640px width */

/* ========================================
   MODAL HEADER (CANONICAL - UNIFIED & LEGACY ALIASES)
   ======================================== */
.modal-header-legacy,
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--gray-300);
  background: var(--bg-subtle);
}

.modal-header-legacy h2,
.modal-header-legacy h3,
.modal-header h2,
.modal-header h3 {
  color: var(--text-main);
  font-size: 20px;
  font-weight: 600;
  font-family: var(--font-family);
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.modal-header-legacy p,
.modal-header p {
  margin: 4px 0 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.modal-title-legacy,
.modal-title-section {
  flex: 1;
}

/* Guest modal header customizations */
.modal-header-legacy .modal-title-legacy {
  text-align: center;
}

.modal-header-legacy .modal-title-legacy h2 {
  font-size: 28px;
  font-weight: 700;
}

.modal-header-legacy .modal-title-legacy p {
  font-size: 16px;
}

/* Guest modal submit button */
.modal-body-legacy .form-legacy .submit-btn {
  width: 100%;
  margin-top: 8px;
}

/* ========================================
   SEARCH COMPONENTS
   ======================================== */
.search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}


.search-bar .btn {
  white-space: nowrap;
  min-height: 44px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.desktop-search-bar {
  display: block;
  margin-bottom: 24px;
}

.search-status {
  font-size: 14px;
  color: var(--gray-600);
  font-style: italic;
  margin-top: 8px;
}

.mobile-search-card {
  display: none;
  padding: 16px 0;
  margin-bottom: 24px;
}

.mobile-search-card .card-header {
  display: none !important;
}

.mobile-search-card .search-input-with-buttons {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.mobile-search-card .input-wrapper {
  position: relative;
  flex: 1;
}

.mobile-search-card .input-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--gray-500);
  pointer-events: none;
}

.mobile-search-card .input-wrapper input {
  padding: 12px 16px;
  width: 100%;
  border: 1px solid var(--gray-300);
  font-size: 16px;
  background: var(--white);
  transition: all 0.2s ease;
  height: 100%;
  box-sizing: border-box;
}

.mobile-search-card .input-wrapper input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.mobile-search-card .search-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .desktop-search-bar {
    display: none !important;
  }
  
  .mobile-search-card {
    display: block !important;
  }
  
  .mobile-search-card .search-input-with-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .mobile-search-card .search-buttons {
    width: 100%;
  }
  
  .mobile-search-card .search-buttons .btn {
    flex: 1;
  }
}

/* Responsive: Show desktop search bar on desktop, hide mobile search card */
@media (min-width: 769px) {
  .mobile-search-card {
    display: none !important;
  }
  
  .desktop-search-bar {
    display: block !important;
  }
}

/* ========================================
   MOBILE ACTION BAR (Base - Hidden on desktop)
   ======================================== */

/* Hide mobile action bar on desktop by default */
.mobile-action-bar {
  display: none;
}

/* ========================================
   NAVIGATION RESPONSIVE RULES (from base.css)
   ======================================== */

@media (max-width: 1200px) {
  /* Navigation */
  .navbar {
    border-bottom: none;
  }
  
  .nav-links {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  /* Adjust nav-container to position nav-actions and hamburger on the right */
  .nav-container {
    justify-content: flex-start;
    position: relative;
    padding: 0 var(--space-4);
    gap: 16px;
  }
  
  /* Give nav-organization more space below 1200px */
  .nav-organization {
    max-width: 75%;
    flex: 1 1 auto;
  }
  
  /* Group nav-actions and hamburger together on the right */
  .nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-right: 0;
    margin-left: auto;
    flex-shrink: 0;
  }
  
  /* Position hamburger immediately to the right of nav-actions */
  .mobile-menu-toggle {
    margin-left: 8px;
  }
  
  /* Sign In button - show only icon at 768px and below */
  .sign-in-btn {
    padding: 8px !important;
    min-width: auto !important;
  }
  
  .sign-in-btn .sign-in-text {
    display: none;
  }
  
  .sign-in-btn svg {
    display: block;
    width: 20px;
    height: 20px;
  }
  
  /* Button responsive rules (moved from base.css) */
}

@media (max-width: 768px) {
  /* Reduce nav-organization font size at 768px and below */
  .nav-organization {
    font-size: 20px;
    max-width: 88%;
    flex: 1 1 auto;
  }
  
  /* Hide nav-actions at 768px and below */
  .nav-actions {
    display: none !important;
  }
  
  /* Push mobile-menu-toggle to the right when nav-actions is hidden and make it smaller */
  .mobile-menu-toggle {
    margin-left: auto;
    font-size: 20px;
    padding: 6px;
  }
}

@media (max-width: 640px) {
  /* Match dashboard-controls padding at 640px */
  .nav-container {
    padding: 0 var(--space-3);
  }
}

/* ========================================
   MODAL CLOSE BUTTON (CANONICAL - UNIFIED & LEGACY ALIASES)
   ======================================== */
.modal-close-legacy,
.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-soft);
  padding: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  font-weight: 400;
  margin-left: auto;
  flex-shrink: 0;
}

.modal-close-legacy:hover,
.modal-close:hover {
  color: var(--text-muted);
  background: var(--bg-subtle);
  transform: scale(1.05);
}

.modal-close-legacy:focus,
.modal-close:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal-close-legacy:active,
.modal-close:active {
  transform: scale(0.95);
}

/* ========================================
   MODAL BODY (CANONICAL - UNIFIED & LEGACY ALIASES)
   ======================================== */
.modal-body-legacy,
.modal-body {
  padding: 16px 32px;
  overflow-y: auto;
  flex: 1;
  color: var(--text-main);
  line-height: 1.6;
}

/* Modal body typography */
.modal-body-legacy h3,
.modal-body h3 {
  color: var(--text-main);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

.modal-body-legacy h3:first-child,
.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body-legacy h4,
.modal-body h4 {
  color: var(--text-main);
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-body-legacy h4:first-child,
.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body-legacy p,
.modal-body p {
  margin: 8px 0;
  color: var(--text-main);
  font-size: 1rem;
}

.modal-body-legacy ul,
.modal-body-legacy ol,
.modal-body ul,
.modal-body ol {
  margin: 12px 0;
  padding-left: 24px;
}

.modal-body-legacy li,
.modal-body li {
  margin: 6px 0;
  color: var(--text-main);
  font-size: 1rem;
}

.modal-body-legacy .form-help,
.modal-body .form-help {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-soft);
  line-height: 1.4;
}

/* Modal body links - centralized */
.modal-body-legacy a,
.modal-body-legacy p a,
.modal-body-legacy li a,
.modal-body a,
.modal-body p a,
.modal-body li a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.modal-body-legacy a:hover,
.modal-body-legacy p a:hover,
.modal-body-legacy li a:hover,
.modal-body a:hover,
.modal-body p a:hover,
.modal-body li a:hover {
  color: var(--link-color-hover);
  text-decoration: underline;
}

.modal-body-legacy a:visited,
.modal-body-legacy p a:visited,
.modal-body-legacy li a:visited,
.modal-body a:visited,
.modal-body p a:visited,
.modal-body li a:visited {
  color: var(--link-color-visited);
}

.modal-body-legacy a:focus,
.modal-body-legacy p a:focus,
.modal-body-legacy li a:focus,
.modal-body a:focus,
.modal-body p a:focus,
.modal-body li a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ========================================
   MODAL FOOTER (CANONICAL - UNIFIED & LEGACY ALIASES)
   ======================================== */
.modal-footer-legacy,
.modal-footer {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 20px 28px 28px;
  margin-top: 12px;
  border-top: 1px solid var(--gray-300);
  background: var(--bg-subtle);
}

/* Modal footer variants */
.modal-footer-legacy.center,
.modal-footer.center {
  justify-content: center;
}

.modal-footer-legacy.space-between,
.modal-footer.space-between {
  justify-content: space-between;
}

/* Long modal (scrollable) footer styling */
/* When modal has scrollable content (detected via modal-list-scroll or overflow-y in style), ensure footer has prominent return button */
.modal-content:has(.modal-list-scroll) .modal-footer .modal-return-btn,
.modal-content:has(.modal-body[style*="overflow-y: auto"]) .modal-footer .modal-return-btn,
.modal-content:has(.modal-body[style*="overflow-y:auto"]) .modal-footer .modal-return-btn,
.modal-body[style*="overflow-y: auto"] ~ .modal-footer .modal-return-btn,
.modal-body[style*="overflow-y:auto"] ~ .modal-footer .modal-return-btn {
  width: 100%;
  justify-content: center;
}

/* Modal return button - prominent action for long modals */
.modal-return-btn {
  font-weight: 600;
  min-width: 140px;
}

/* Modal form styles - matching enhanced form styling */
.modal-body form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-body .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-body .form-group label,
.modal-body .form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-main);
  font-size: 14px;
  margin: 0;
  padding: 0;
}

/* Modal form fields - Use canonical .form-input, .form-select, .form-textarea classes */
/* Removed .modal-body .form-group input/select/textarea to eliminate specificity conflicts */
.modal-body .form-input,
.modal-body .form-textarea,
.modal-body .form-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 2px solid var(--gray-300);
  border-radius: 4px;
}

.modal-body .form-input:focus,
.modal-body .form-textarea:focus,
.modal-body .form-select:focus {
  outline: none;
  border: 2px solid var(--border-focus);
  box-shadow: 0 0 0 4px var(--shadow-gray-600-10);
  transform: translateY(-1px);
}

.modal-body .form-input:hover,
.modal-body .form-textarea:hover,
.modal-body .form-select:hover {
  border: 2px solid var(--border-strong);
}

.modal-body .form-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  line-height: 1.5;
}

.modal-body .form-input[required],
.modal-body .form-textarea[required],
.modal-body .form-select[required] {
  border-left: 4px solid var(--border-focus);
  padding-left: 14px;
}

.modal-body .form-input[required]:focus,
.modal-body .form-textarea[required]:focus,
.modal-body .form-select[required]:focus {
  border-left-color: var(--border-focus);
}

/* .form-help and .required-indicator are defined above - modal-body inherits them */

/* Modal content size utilities removed - all modals use base 640px width */

/* Modal body utilities */
.modal-body-no-padding {
  padding: 0;
}

.modal-list-scroll {
  max-height: 60vh;
  overflow-y: auto;
}

/* ========================================
   MODAL MODIFIER CLASSES
   ======================================== */

/* Modal subtitle - for secondary text in modal headers */
.modal-subtitle {
  margin: 4px 0 0 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}

/* Status badge in modal header title */
.modal-header h3 .status-active,
.modal-header h3 .status-inactive {
  margin-left: 12px;
  vertical-align: middle;
}

/* Modal location, manager, email, phone - for player info in modals */
.modal-location {
  margin: 4px 0 0 0;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 400;
}

.modal-manager {
  margin: 4px 0 0 0;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 500;
}

.modal-email {
  margin: 4px 0 0 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}

.modal-email a,
.modal-phone a {
  color: var(--link-color);
  text-decoration: none;
}

.modal-email a:hover,
.modal-phone a:hover {
  color: var(--link-color-hover);
  text-decoration: underline;
}

.modal-phone {
  margin: 4px 0 0 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}

/* Schedule Match Modal styles moved to dashboard.css */


/* ========================================
   CARD COMPONENT
   ======================================== */
.card {
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin-bottom: 24px;
  max-width: 100%;
  width: 100%;
}
.card:last-child {
  margin-bottom: 0;
}

/* Content page styles moved to landing.css */

/* ========================================
   DROPDOWN COMPONENTS
   ======================================== */

/* Dropdown container - base component */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown toggle button - used in org dropdown and other dropdowns */
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  background: var(--bg-elevated);
  color: var(--text-inverse);
  border: 2px solid var(--border-strong);
  padding: 8px 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-toggle:hover {
  background: var(--color-gray-600);
  border-color: var(--border-strong);
}

.dropdown-arrow {
  font-size: 16px;
  transition: transform 0.2s ease;
  color: var(--text-inverse);
  font-weight: bold;
}

/* Dropdown open state - arrow rotation */
.dropdown.open .dropdown-arrow,
.clickable.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown menu - appears below toggle */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown menu items */
.dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: var(--text-main);
}

.dropdown-item:hover {
  background: var(--bg-subtle);
}

/* Org dropdown toggle styles moved to dashboard.css */

/* Section toggle button - used in collapsible sections */
.section-toggle-btn {
  display: inline-block;
  visibility: visible;
  opacity: 1;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.section-toggle-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.section-header .section-toggle-btn,
h2.section-header .section-toggle-btn,
.section-header button.section-toggle-btn {
  display: inline-block;
  visibility: visible;
  opacity: 1;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
}

/* Banner components (onboarding-banner) moved to dashboard.css */

/* ========================================
   TEXT LANDING CONTAINER
   Narrow container for text content pages (700px reading width)
   ======================================== */

.text-landing-container {
  max-width: 700px;
  margin-inline: auto;
}

/* ========================================
   SECTION SPACING
   Base section class for consistent spacing across landing pages
   ======================================== */

.section {
  margin-bottom: 36px;
}

.section:last-child {
  margin-bottom: 0;
}

/* Apply consistent section spacing to landing pages (not dashboard pages) */
body:not(.dashboard-page) section:not(.hero):not(.additional-help-section) {
  margin-bottom: 36px;
}

body:not(.dashboard-page) section:not(.hero):not(.additional-help-section):last-of-type {
  margin-bottom: 0;
}

/* ========================================
   ADDITIONAL HELP SECTION
   Reusable component used across all pages (in footer.php)
   ======================================== */

.additional-help-section {
  padding-top: 16px;
  margin-bottom: 48px;
}

.additional-help-section .container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-right: 24px;
  padding-bottom: 0;
  padding-left: 24px;
}

.additional-help {
  text-align: center;
  max-width: 600px;
  width: 100%;
  margin: 0;
}

.additional-help p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.help-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   FOOTER
   ======================================== */

.footer-wrapper {
  width: 100%;
  margin-top: 0;
}

.footer {
  width: 100%;
  display: block;
  box-sizing: border-box;
  clear: both;
  background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
  color: var(--gray-300);
  padding: 32px 0 16px;
  margin: 0;
}

.footer .container {
  padding-bottom: 16px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand {
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 0;
}

.footer-brand .social-links {
  margin-top: 12px;
}

.footer-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}

.footer-description {
  color: var(--gray-300);
  line-height: 1.6;
  margin-bottom: 24px;
}

.footer-links-row {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links-row a {
  color: var(--gray-300);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.footer-links-row a:hover {
  color: var(--white);
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section ul li a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--white);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border-strong);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  color: var(--gray-300);
  font-size: 14px;
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-bottom-links a:hover {
  color: var(--white);
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-legal a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: var(--white);
}

.footer-legal span {
  color: var(--gray-300);
  font-size: 14px;
}

.copyright {
  color: var(--gray-300);
  font-size: 14px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 14px;
  background: var(--gray-800);
  color: var(--gray-300);
  text-decoration: none;
  transition: var(--transition);
}

.social-link svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  fill: currentColor;
}

.social-link:hover {
  background: var(--gray-600);
  color: var(--white);
  transform: translateY(-2px);
}

/* Footer responsive rules */
@media (max-width: 640px) {
  .additional-help-section {
    margin-bottom: 48px;
  }
  
  .footer-wrapper {
    margin-top: 0;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  
  .footer-brand {
    max-width: 100%;
  }
  
  .footer-links-row {
    justify-content: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}

/* ========================================
   @media (min-width: 1281px) - Desktop Enhancements
   ======================================== */

@media (min-width: 1281px) {
  /* Desktop-only visual enhancements (borders, shadows, etc.) */
  
  /* Card borders, backgrounds, and shadows - reintroduced for desktop */
  .card {
    border: 1px solid var(--gray-300);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
  }
  
  /* Form container borders, backgrounds, and shadows - reintroduced for desktop */
  .form-legacy,
  .form-minimal,
  .login-minimal,
  .register-minimal,
  .forgot-password-minimal,
  .reset-password-minimal,
  .login-card {
    background: var(--bg-surface);
    box-shadow: var(--shadow-lg);
  }
  
  .reset-password-minimal,
  .login-card {
    border: 1px solid var(--border-subtle);
  }
  
  .contact-form-section,
  .pricing-plan {
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    box-shadow: var(--shadow-lg);
  }
  
  /* Dropdown borders - reintroduced for desktop */
  .dropdown-menu {
    border: 1px solid var(--border-subtle);
  }
  
  /* Form input/textarea/select borders - reintroduced for desktop */
  .form-input,
  .form-textarea,
  .form-select {
    border: 2px solid var(--gray-300);
  }
  
  .form-input:hover,
  .form-textarea:hover,
  .form-select:hover {
    border: 2px solid var(--border-strong);
  }
  
  .search-input {
    border: 2px solid var(--border-subtle);
  }
  
  .modal-body .form-input,
  .modal-body .form-textarea,
  .modal-body .form-select {
    border: 2px solid var(--gray-300);
  }
  
  .modal-body .form-input:hover,
  .modal-body .form-textarea:hover,
  .modal-body .form-select:hover {
    border: 2px solid var(--border-strong);
  }
  
  /* Button borders - reintroduced for desktop */
  .btn {
    border: 2px solid transparent;
  }
  
  .btn-primary {
    border-color: var(--accent);
  }
  
  .btn-primary:hover {
    border-color: var(--accent-dark);
  }
  
  .btn-secondary {
    border: 2px solid var(--border-focus);
  }
  
  .btn-secondary:hover {
    border-color: var(--border-focus);
  }
  
  .btn-ghost {
    border: 2px solid var(--border-subtle);
  }
  
  .btn-ghost:hover {
    border-color: var(--border-subtle);
  }
  
  .btn-outline {
    border-color: var(--border-focus);
  }
  
  .btn-outline:hover {
    border-color: var(--border-focus);
  }
  
  .btn-outline:active {
    border-color: var(--border-focus);
  }
  
  .btn-tertiary {
    border: 2px solid var(--gray-300);
  }
  
  .btn-tertiary:hover:not(:disabled) {
    border-color: var(--gray-300);
  }
  
  .btn-tertiary:active:not(:disabled) {
    border-color: var(--gray-300);
  }
  
  .btn-tertiary:focus-visible:not(:disabled) {
    border-color: var(--gray-300);
  }
  
  .btn-tertiary.btn-touch {
    border: 2px solid var(--gray-300);
  }
  
  .btn-danger {
    border-color: var(--border-danger);
  }
  
  .btn-danger:hover {
    border-color: var(--border-danger);
  }
  
  /* Disabled button borders - reintroduced for desktop */
  .btn-primary:disabled {
    border-color: var(--border-subtle);
  }
  
  .btn-secondary:disabled {
    border-color: var(--border-subtle);
  }
  
  .btn-ghost:disabled {
    border-color: var(--border-subtle);
  }
  
  .btn-outline:disabled {
    border-color: var(--border-subtle);
  }
  
  .btn-danger:disabled {
    border-color: var(--border-subtle);
  }
  
  .btn-tertiary:disabled,
  .btn-tertiary[aria-disabled="true"] {
    border-color: var(--gray-300);
  }
  
  .form-legacy .cancel-btn,
  .form-minimal .cancel-btn {
    border: 1px solid var(--gray-300);
  }
  
  .form-legacy .cancel-btn:hover,
  .form-minimal .cancel-btn:hover {
    border-color: var(--gray-400);
  }
}

