/* Shared business controls, scoped to the main content (never QA or navigation).
   Feature-specific layout remains owned by each module. */
.club-components {
  --canvas: #f5f7f9;
  --surface: #fafcfb;
  --surface-raised: #fff;
  --surface-muted: #f2f6f3;
  --ink: #263c36;
  --text: #3f584a;
  --muted: #64786e;
  --line: #e5ece7;
  --line-strong: #cbd9d0;
  --primary: #327d5c;
  --primary-dark: #28664b;
  --primary-soft: #eaf6ee;
  --success: #2f704f;
  --success-soft: #edf7f0;
  --pending: #8a6129;
  --pending-soft: #fff7e9;
  --danger: #b0443b;
  --danger-soft: #fff0ee;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 3px 12px #36584a04;
  --shadow-panel: 0 10px 26px #36584a0a;
  /* Compatibility aliases used by the existing permission-table controls. */
  --accent: var(--primary);
  --border: var(--line);
  --text-primary: var(--ink);
  --text-secondary: var(--muted);
  color: var(--text);
  font-family: "Microsoft YaHei UI","PingFang SC","Segoe UI",sans-serif;
  font-size: 14px;
  line-height: 1.65;
}
.club-components [hidden] { display: none !important; }
.club-components :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
  outline: 3px solid #94d7b9; outline-offset: 3px;
}
.club-components .panel { border-color: var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.club-components .panel h1 { color: var(--ink); font-size: clamp(22px,2.2vw,28px); font-weight: 600; line-height: 1.4; }
.club-components .panel h2 { color: var(--ink); font-size: 19px; font-weight: 600; line-height: 1.5; }
.club-components .section-head p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.club-components :is(.button,button:not([class]),button.primary) {
  border-radius: 10px; border-color: var(--line-strong); font-weight: 500;
  font-family: inherit; font-size: 13px; gap: 7px; line-height: 1.5;
  box-shadow: none; text-decoration: none; white-space: normal; overflow-wrap: anywhere;
  transition: background .18s,border-color .18s,color .18s,transform .18s;
}
.club-components .button:not(.primary):not(.danger):not(.subtle-danger):not(.light) { background: #fff; color: #4e6b59; }
.club-components .button.ghost:not(.light) { background: #f4f8f5; border-color: #dfe9e2; }
.club-components .button:hover:not(:disabled):not(.primary):not(.danger):not(.subtle-danger):not(.light) { background: #edf5ef; border-color: #9fc4ae; color: #28664b; }
.club-components :is(.button,button).primary { background: var(--primary); border-color: var(--primary); color: white; }
.club-components :is(.button,button).primary:hover:not(:disabled) { background: var(--primary-dark); color: white; }
.club-components .button.small { border-radius: 8px; font-size: 12px; }
.club-components .button.tiny { border-radius: 7px; font-size: 11px; }
.club-components table .button { white-space: nowrap; overflow-wrap: normal; }
.club-components :is(.button,button).danger { background: var(--danger-soft); color: #a33e35; border: 1px solid #edc3bd; }
.club-components :is(.button,button).danger:hover:not(:disabled) { background: #fbe1dc; border-color: #d99489; color: #92362f; }
.club-components :is(.button,button).subtle-danger { color: #a33e35; }
.club-components :is(button,input,select,textarea):disabled { cursor: not-allowed; opacity: .6; }
.club-components button:disabled:hover { transform: none; }
.club-components :is(.button,button)[aria-busy="true"] { cursor: progress; }
.club-components :is(label,.field-label) { font-weight: 550; }
/* Do not change dimensions/appearance of hidden, checkbox, radio, range or color inputs. */
.club-components :is(input:not([type]),input[type="text"],input[type="email"],input[type="password"],input[type="search"],input[type="tel"],input[type="url"],input[type="number"],input[type="date"],input[type="datetime-local"],input[type="time"],input[type="file"],select,textarea) {
  min-width: 0; max-width: 100%; border-color: #d5e2d9; border-radius: 10px;
  color: var(--ink); background-color: #fafcfb; font-weight: 400;
  box-shadow: none; transition: border-color .18s,background-color .18s;
}
.club-components :is(input,textarea)::placeholder { color: #74877b; opacity: 1; }
.club-components :is(input,select,textarea):focus { border-color: #6aaf87; box-shadow: none; }
.club-components :is(input,textarea)[readonly] { background-color: #f2f5f3; color: #61776a; }
.club-components :is(input,select,textarea)[aria-invalid="true"] { border-color: #c77163; background-color: #fff8f6; }
.club-components select { padding-right: 34px; }
.club-components select[multiple], .club-components select[size]:not([size="1"]) { background-image: none; padding-right: 12px; }
.club-components textarea { line-height: 1.8; }
.club-components input[type="file"] { padding: 7px 9px; font-size: 12px; }
.club-components input[type="file"]::file-selector-button {
  padding: 6px 10px; margin-right: 10px; border: 1px solid #d4e4d9;
  border-radius: 7px; background: #edf5ef; color: #3d7552; font: inherit; cursor: pointer;
}
.club-components input:is([type="checkbox"],[type="radio"]) { accent-color: var(--primary); }
.club-components .toggle-switch input { inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; }
.club-components .toggle-switch input:focus-visible + .toggle-track { outline: 3px solid #94d7b9; outline-offset: 3px; }
.club-components .toggle-switch input:disabled + .toggle-track { opacity: .5; cursor: not-allowed; }
.club-components .toggle-switch input:checked + .toggle-track { background: var(--primary); }
.club-components :is(.table-wrap,.table-shell) { border-color: var(--line); border-radius: 12px; }
.club-components :is(.table-wrap,.table-scroll,.matrix-scroll) { scrollbar-width: thin; scrollbar-color: #bfd4c6 #f4f7f5; }
.club-components :is(.table-wrap,.table-scroll,.matrix-scroll):focus-visible { outline-offset: -3px; }
.club-components :is(.table-wrap,.table-scroll,.matrix-scroll)::-webkit-scrollbar { height: 8px; width: 8px; }
.club-components :is(.table-wrap,.table-scroll,.matrix-scroll)::-webkit-scrollbar-thumb { background: #bfd4c6; border-radius: 8px; }
.club-components :is(.table-wrap,.table-scroll,.matrix-scroll) th { background: #f2f6f3; color: #61776a; font-weight: 550; border-bottom-color: #dce7df; }
.club-components :is(.table-wrap,.table-scroll,.matrix-scroll) td { border-bottom-color: #eaf0ec; }
.club-components :is(.table-wrap,.table-scroll,.matrix-scroll) tbody tr:hover { background: #f7faf8; }
.club-components .tbl-sticky tbody tr:hover :is(.col-app-actions,.col-mem-act) { background: #f7faf8; }
.club-components .tbl-sticky thead th:is(.col-app-actions,.col-mem-act,.col-mem-comm) { z-index: 4; }
.club-table-hint { display: flex; gap: 8px; align-items: center; padding: 8px 2px; color: #61776a; font-size: 11px; line-height: 1.6; }
.club-table-hint span:first-child { font-size: 15px; color: #6e9c80; }
.club-components .badge { border-radius: 7px; font-size: 12px; font-weight: 500; min-height: 24px; }
.club-components .badge-grade { color: #77608e; background: #f1ecf7; }
.club-components :is(.flash,.notice) { padding: 14px 17px; border-radius: 12px; line-height: 1.8; font-size: 13px; box-shadow: none; overflow-wrap: anywhere; }
.club-components .flash.success { background: #edf7f0; border-color: #cee6d6; color: #326847; }
.club-components :is(.notice,.flash.warning) { background: #fff8ed; border-color: #efdfbe; color: #855e28; }
.club-components .flash.danger { background: #fff1ee; border-color: #efcdc5; color: #a34437; }
.club-components .flash.info { background: #f1f4fb; border-color: #dce3f0; color: #526689; }
.club-flash-label { display: inline-block; font-weight: 600; margin-right: 9px; }
.club-components .empty-inline { border-radius: 12px; background: #f7f9f8; font-size: 13px; line-height: 1.8; }
.club-components .empty-state { color: var(--muted); border-radius: 16px; }
@media (max-width: 600px) {
  .club-components :is(.actions,.form-actions) { flex-wrap: wrap; }
  .club-components :is(.button,button:not([class]),button.primary) { min-height: 40px; }
  /* Keep compact table tools compact; ordinary form fields use 16px to avoid iOS zoom. */
  .club-components :is(input,select,textarea):not(.tbl-input):not(.tbl-select) { font-size: 16px; }
  .club-components input[type="file"] { font-size: 12px; }
  .club-components :is(.flash,.notice) { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .club-components :is(.button,button,input,select,textarea,.toggle-track), .club-components .toggle-track::after { transition: none !important; }
}
