/* =========================================================
   GEN CRM – Main Stylesheet
   Primary: #69509c | IBM Plex Sans
   ========================================================= */

:root {
  --primary:        #69509c;
  --primary-dark:   #523d7a;
  --primary-light:  #8a6db8;
  --primary-bg:     #f4f1f9;
  --accent:         #e8521a;

  --gray-50:        #f8f8f9;
  --gray-100:       #f0eff4;
  --gray-200:       #e2e0ea;
  --gray-300:       #c8c4d6;
  --gray-400:       #9993ae;
  --gray-500:       #6b657e;
  --gray-700:       #3a3548;
  --gray-900:       #1a1626;

  --sidebar-w:      240px;
  --topbar-h:       56px;
  --radius:         6px;
  --radius-lg:      10px;
  --shadow:         0 1px 3px rgba(30,20,60,.08), 0 4px 16px rgba(30,20,60,.06);
  --shadow-md:      0 4px 20px rgba(30,20,60,.12);

  --font:           'IBM Plex Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--gray-700);
  background: var(--gray-50);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =========================================================
   AUTH PAGES
   ========================================================= */

.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--gray-50);
}

.auth-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.auth-panel {
  width: 460px;
  min-width: 460px;
  padding: 60px 56px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
}

.auth-bg {
  flex: 1;
  background: var(--primary);
  position: relative;
  overflow: hidden;
}

.auth-bg__pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.05) 0%, transparent 50%),
    repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255,255,255,.02) 40px, rgba(255,255,255,.02) 80px);
}

.auth-brand {
  margin-bottom: 40px;
}

.auth-logo {
  height: 40px;
  display: block;
  margin-bottom: 12px;
}

.auth-subtitle {
  color: var(--gray-400);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: .02em;
}

.auth-heading {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.auth-desc {
  color: var(--gray-400);
  margin-bottom: 24px;
  font-size: 13px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--gray-300);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.input-row {
  display: flex;
  gap: 8px;
}
.input-row .form-input { flex: 1; }

/* =========================================================
   APP LAYOUT
   ========================================================= */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--gray-900);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .2s ease;
}

.sidebar__brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.sidebar__logo {
  height: 30px;
  filter: brightness(0) invert(1);
  opacity: .9;
}

.sidebar__nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-section {
  padding: 20px 20px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.65);
  font-size: 13.5px;
  font-weight: 400;
  transition: color .15s, background .15s;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.nav-item svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: .7;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
  text-decoration: none;
}

.nav-item--active {
  color: #fff !important;
  background: rgba(105, 80, 156, .35) !important;
  border-left-color: var(--primary-light);
}

.nav-item--active svg { opacity: 1; }

.sidebar__footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar__user { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }

.sidebar__user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar__user-name {
  font-size: 13px;
  color: rgba(255,255,255,.85);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-role {
  font-size: 11px;
  color: rgba(255,255,255,.4);
}

.sidebar__logout {
  color: rgba(255,255,255,.4);
  padding: 6px;
  border-radius: 4px;
  transition: color .15s;
  flex-shrink: 0;
}

.sidebar__logout svg { width: 16px; height: 16px; display: block; }
.sidebar__logout:hover { color: rgba(255,255,255,.8); text-decoration: none; }

/* Main content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar__menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--gray-500);
}

.topbar__menu-btn svg { width: 20px; height: 20px; display: block; }

.topbar__title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
}

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

/* Page content */
.page-content {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
}

/* Flash messages */
.flash-container {
  padding: 0 24px;
  margin-top: 12px;
}

.flash {
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 8px;
  border-left: 3px solid;
  transition: opacity .4s;
}

.flash--success {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #166534;
}

.flash--error {
  background: #fff1f2;
  border-color: #f87171;
  color: #991b1b;
}

.flash--info {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  white-space: nowrap;
  text-decoration: none !important;
  line-height: 1.4;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn--secondary {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--gray-200);
}
.btn--secondary:hover { background: var(--gray-200); }

.btn--ghost {
  background: transparent;
  color: var(--gray-500);
  border-color: var(--gray-200);
}
.btn--ghost:hover { background: var(--gray-100); color: var(--gray-700); }

.btn--danger {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}
.btn--danger:hover { background: #fca5a5; }

.btn--sm  { padding: 5px 12px; font-size: 12.5px; }
.btn--full { width: 100%; justify-content: center; }

/* =========================================================
   FORMS
   ========================================================= */

.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group--sm { max-width: 160px; }
.form-group--wide { grid-column: span 2; }

.form-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gray-500);
  letter-spacing: .02em;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-input,
.form-select,
.form-textarea {
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: var(--font);
  color: var(--gray-700);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(105,80,156,.12);
}

.form-input--search {
  padding-left: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239993ae' stroke-width='1.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 16px;
}

.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.form-link { font-size: 12.5px; color: var(--primary); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.form-section {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.form-section__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.required { color: #e53e3e; }

.auth-form .form-group { margin-bottom: 16px; }

/* Tags / Checkboxes */
.tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-checkbox { cursor: pointer; }
.tag-checkbox input { display: none; }

.tag-checkbox__label {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 99px;
  font-size: 12.5px;
  color: var(--gray-500);
  transition: all .15s;
  cursor: pointer;
}

.tag-checkbox input:checked + .tag-checkbox__label {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
}

/* Autocomplete */
.autocomplete-dropdown {
  position: absolute;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 200px;
  overflow-y: auto;
  z-index: 200;
  min-width: 280px;
}

.autocomplete-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
}

.autocomplete-item:hover { background: var(--primary-bg); }
.autocomplete-item:last-child { border-bottom: none; }

/* =========================================================
   TABLES
   ========================================================= */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  background: #fff;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.table td {
  padding: 11px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--gray-50); }

.table-link { color: var(--gray-700); font-weight: 500; }
.table-link:hover { color: var(--primary); }
.table-link--strong { font-weight: 600; }

.table-actions { text-align: right; white-space: nowrap; }
.action-link { font-size: 12.5px; color: var(--primary); cursor: pointer; background: none; border: none; font-family: var(--font); }
.action-link:hover { text-decoration: underline; }
.action-link--danger { color: #dc2626; }

/* =========================================================
   BADGES
   ========================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 500;
}

.badge--member    { background: #ede9fb; color: var(--primary-dark); }
.badge--supporter { background: #dbeafe; color: #1d4ed8; }
.badge--applicant { background: #fef3c7; color: #92400e; }
.badge--contact   { background: var(--gray-100); color: var(--gray-500); }

.tag {
  display: inline-flex;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  background: var(--gray-100);
  color: var(--gray-500);
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.stat-card--members::before    { background: var(--primary); }
.stat-card--supporters::before { background: #3b82f6; }
.stat-card--applicants::before { background: #f59e0b; }
.stat-card--contacts::before   { background: var(--gray-300); }
.stat-card--regions::before    { background: #10b981; }

.stat-card__value {
  font-size: 32px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-card__label {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

.dashboard-section { margin-bottom: 28px; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-700);
}

.nameday-list { display: flex; flex-wrap: wrap; gap: 8px; }
.nameday-badge {
  padding: 4px 14px;
  background: var(--primary-bg);
  color: var(--primary-dark);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
}

/* =========================================================
   MEMBER DETAIL
   ========================================================= */

.member-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.member-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}

.member-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.member-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.detail-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.detail-card--full { grid-column: span 2; }

.detail-card__title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}

.detail-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.detail-list { display: flex; flex-direction: column; gap: 8px; }

.detail-item {
  display: flex;
  gap: 12px;
  font-size: 13.5px;
}

.detail-item dt {
  min-width: 150px;
  color: var(--gray-400);
  font-weight: 400;
  flex-shrink: 0;
}

.detail-item dd { color: var(--gray-700); }

/* =========================================================
   FILTER BAR
   ========================================================= */

.filter-bar { margin-bottom: 16px; }
.filter-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-form .form-input { max-width: 280px; }
.filter-form .form-select { max-width: 180px; }

/* =========================================================
   PAGINATION
   ========================================================= */

.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}

.pagination__btn {
  padding: 5px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--gray-500);
  text-decoration: none;
}

.pagination__btn:hover { background: var(--gray-100); text-decoration: none; }
.pagination__info { font-size: 13px; color: var(--gray-400); }

/* =========================================================
   DOCUMENTS UPLOAD
   ========================================================= */

.doc-upload-form {
  background: var(--gray-50);
  border: 1px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 14px;
}

.doc-upload-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.doc-upload-row .form-input[type="text"] { max-width: 220px; }
.doc-upload-row .form-select { max-width: 160px; }
.doc-upload-row input[type="file"] { flex: 1; min-width: 0; }

/* =========================================================
   ORGANIZATIONS
   ========================================================= */

.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.org-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow .15s, border-color .15s;
}

.org-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.org-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.org-card__meta {
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  justify-content: space-between;
}

/* =========================================================
   UTILITIES
   ========================================================= */

.text-muted  { color: var(--gray-400); }
.text-center { text-align: center; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar--open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,.3);
  }

  .main-content {
    margin-left: 0;
  }

  .topbar__menu-btn { display: block; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .detail-card--full { grid-column: 1; }
}

@media (max-width: 600px) {
  .auth-panel {
    width: 100%;
    min-width: 0;
    padding: 40px 28px;
  }

  .auth-bg { display: none; }

  .page-content { padding: 16px; }

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

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

  .form-group--sm { max-width: 100%; }
  .form-group--wide { grid-column: 1; }
}

/* =========================================================
   ORGANIZATIONS – Leadership & Cards
   ========================================================= */

.org-page { max-width: 1100px; }

.org-section { margin-bottom: 32px; }

.org-section__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.org-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

/* Leadership grid */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.leadership-grid--sm {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.leadership-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none !important;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.leadership-card:not(.leadership-card--static):hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.leadership-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.leadership-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leadership-card__info { flex: 1; min-width: 0; }

.leadership-card__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leadership-card__role {
    font-size: 11.5px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 2px;
}

.leadership-card__contact {
    font-size: 11.5px;
    color: var(--gray-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Leader cards – vedení strany */
.leader-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.leader-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 18px 18px 14px;
    text-decoration: none !important;
    color: inherit;
    transition: box-shadow .15s, border-color .15s;
}

.leader-card:hover {
    box-shadow: 0 4px 20px rgba(105,80,156,.15);
    text-decoration: none;
}

.leader-card__top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.leader-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.leader-card__avatar--empty {
    background: var(--gray-200);
    color: var(--gray-400);
}

.leader-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leader-card__role {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .05em;
    line-height: 1.4;
}

.leader-card__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.3;
}

.leader-card__contact {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leader-card__link {
    font-size: 12px;
    color: var(--primary);
    margin-top: 8px;
    text-decoration: none;
    font-weight: 500;
}

.leader-card__link:hover { text-decoration: underline; }

/* Org cards – updated */
.org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.org-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    text-decoration: none !important;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.org-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.org-card__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.org-card__leadership {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.org-card__leader {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 12.5px;
}

.org-card__leader-label {
    color: var(--gray-400);
    font-size: 11px;
    min-width: 95px;
    flex-shrink: 0;
}

.org-card__leader-name {
    color: var(--gray-700);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.org-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
}

.org-card__count { font-size: 12px; color: var(--gray-400); }
.org-card__arrow { font-size: 13px; color: var(--primary); font-weight: 700; }

/* Photo upload */
.photo-upload-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.photo-upload-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 8px;
}

.photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
}

.photo-preview--empty {
    background: var(--gray-200);
    color: var(--gray-400);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-file-input { display: none; }

.photo-upload-controls {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Member avatar photo */
.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    border-left: 3px solid;
    font-size: 13.5px;
}

.alert--info {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* Form select sm */
.form-select--sm {
    padding: 5px 10px;
    font-size: 13px;
    height: auto;
}

/* Hidden */
.hidden { display: none !important; }
