/* ══════════════════════════════════════════════════════════════════
   Bondal Family Platform — Design System
   LinkedIn-premium aesthetic: clean whites, forest green brand,
   refined typography, smooth interactions
══════════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ──────────────────────────────────────────────── */
:root {
  /* Brand */
  --brand:       #1a6b4a;
  --brand-dark:  #15573c;
  --brand-light: #e8f4ef;
  --brand-mid:   #b3d9c8;
  --brand-text:  #0e4530;

  /* Neutral palette */
  --ink:         #0a0a0a;
  --ink-2:       #1c1c1c;
  --mid:         #5f6368;
  --subtle:      #9aa0a6;
  --ghost:       #c4c9ce;

  /* Surfaces */
  --white:       #ffffff;
  --surface:     #f3f6f9;
  --surface-2:   #edf1f5;
  --border:      #dde2e8;
  --border-2:    #c8d0d8;

  /* Semantic */
  --success:     #27ae60;
  --success-bg:  #e9f7ef;
  --warn:        #f39c12;
  --warn-bg:     #fef9e7;
  --danger:      #e74c3c;
  --danger-bg:   #fdecea;
  --info:        #2980b9;
  --info-bg:     #ebf5fb;
  --gold:        #c8963a;
  --gold-bg:     #fdf5e6;

  /* Typography */
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --text-xs:  11px;
  --text-sm:  12px;
  --text-base:13px;
  --text-md:  14px;
  --text-lg:  16px;
  --text-xl:  18px;
  --text-2xl: 22px;
  --text-3xl: 28px;

  /* Spacing */
  --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;

  /* Layout */
  --nav-h:    56px;
  --max-feed: 680px;
  --max-wide: 1060px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);

  /* Transitions */
  --t-fast:   0.12s ease;
  --t-base:   0.18s ease;
  --t-slow:   0.28s ease;
}

/* ── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font-body); }
input, textarea, select { font-family: var(--font-body); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── NAVIGATION ─────────────────────────────────────────────────── */
.nav {
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 0 var(--sp-6);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: -0.2px;
}
.nav__brand:hover { text-decoration: none; opacity: 0.88; }

.nav__search {
  position: relative;
  flex: 0 1 260px;
  display: flex;
  align-items: center;
}
.nav__search-input {
  width: 100%;
  padding: 7px 36px 7px 14px;
  background: var(--surface);
  border: 1.5px solid transparent;
  border-radius: var(--r-full);
  font-size: var(--text-base);
  color: var(--ink);
  transition: border-color var(--t-base), background var(--t-base);
}
.nav__search-input:focus {
  background: var(--white);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,107,74,0.12);
  outline: none;
}
.nav__search-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--subtle);
  display: flex;
  align-items: center;
  padding: 4px;
}
.nav__search-btn:hover { color: var(--brand); }

.nav__links {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 16px;
  border-radius: var(--r-md);
  font-size: 11px;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast);
  border-bottom: 2px solid transparent;
  letter-spacing: 0.01em;
}
.nav__link svg { opacity: 0.7; transition: opacity var(--t-fast); }
.nav__link:hover { color: var(--ink); background: var(--surface); text-decoration: none; }
.nav__link:hover svg { opacity: 1; }
.nav__link--on { color: var(--brand); border-bottom-color: var(--brand); }
.nav__link--on svg { opacity: 1; }

.nav__actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.nav__action-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mid);
  background: none;
  border: none;
  transition: background var(--t-fast), color var(--t-fast);
  text-decoration: none;
}
.nav__action-btn:hover { background: var(--surface-2); color: var(--ink); }

.nav__badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--r-full);
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--white);
}

.nav__profile { position: relative; }
.nav__profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: var(--r-full);
  border: none;
  background: none;
  color: var(--mid);
  transition: background var(--t-fast);
}
.nav__profile-btn:hover { background: var(--surface-2); }
.nav__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.nav__avatar-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }

.nav__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  overflow: hidden;
  animation: dropIn 0.14s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.nav__dropdown-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav__dropdown-head strong { font-size: var(--text-base); color: var(--ink); font-weight: 600; }
.nav__dropdown-head span   { font-size: var(--text-sm); color: var(--subtle); }

.nav__dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: var(--text-base);
  color: var(--ink-2);
  text-decoration: none;
  transition: background var(--t-fast);
}
.nav__dropdown-item:hover { background: var(--surface); text-decoration: none; }
.nav__dropdown-item--danger { color: var(--danger); }
.nav__dropdown-item--danger:hover { background: var(--danger-bg); }
.nav__dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ── BANNERS ─────────────────────────────────────────────────────── */
.urgent-banner {
  background: var(--gold-bg);
  border-bottom: 2px solid var(--gold);
  padding: 12px var(--sp-6);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-base);
  font-weight: 500;
  color: #7a5a00;
}
.urgent-banner__icon { font-size: 18px; }
.urgent-banner__msg  { flex: 1; }
.urgent-banner__dismiss {
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 5px 14px;
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: opacity var(--t-fast);
}
.urgent-banner__dismiss:hover { opacity: 0.88; }

.broadcast-banner {
  background: var(--brand);
  color: #fff;
  padding: 10px var(--sp-6);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-base);
}
.broadcast-banner__icon { font-size: 16px; }
.broadcast-banner button { background: rgba(255,255,255,0.2); border: none; color: #fff; width: 24px; height: 24px; border-radius: 50%; font-size: 16px; line-height: 1; margin-left: auto; }

/* ── LAYOUT SCAFFOLDS ────────────────────────────────────────────── */
.page-3col {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4);
  display: grid;
  grid-template-columns: 230px minmax(0, var(--max-feed)) 260px;
  gap: var(--sp-5);
  align-items: start;
}
.page-1col {
  max-width: var(--max-feed);
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4);
}
.page-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4);
}
@media (max-width: 960px) {
  .page-3col { grid-template-columns: 1fr; }
  .page-3col .sidebar-left,
  .page-3col .sidebar-right { display: none; }
}

/* ── CARD ────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: var(--sp-3); }
.card__body { padding: var(--sp-4) var(--sp-5); }
.card__head { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border); }
.card__foot { padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--border); background: var(--surface); }

/* ── FEED COMPOSER ───────────────────────────────────────────────── */
.composer { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-4); margin-bottom: var(--sp-3); }
.composer__row { display: flex; align-items: center; gap: var(--sp-3); }
.composer__input {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid transparent;
  border-radius: var(--r-full);
  padding: 9px 16px;
  font-size: var(--text-base);
  color: var(--ink);
  transition: border-color var(--t-base), background var(--t-base);
  cursor: pointer;
}
.composer__input:focus { background: var(--white); border-color: var(--brand); cursor: text; outline: none; }
.composer__actions { display: flex; gap: 2px; padding-top: var(--sp-3); border-top: 1px solid var(--border); margin-top: var(--sp-3); }
.composer__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--mid);
  background: none;
  border: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.composer__btn:hover { background: var(--surface-2); color: var(--ink); }

/* ── POST CARD ───────────────────────────────────────────────────── */
.post { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: var(--sp-3); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow var(--t-base); }
.post:hover { box-shadow: var(--shadow-md); }
.post__head { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); }
.post__meta .post__name { font-size: var(--text-base); font-weight: 600; color: var(--ink); }
.post__meta .post__relation { font-size: var(--text-sm); color: var(--subtle); }
.post__meta .post__time { font-size: var(--text-xs); color: var(--ghost); margin-top: 1px; }
.post__body { padding: 0 var(--sp-5) var(--sp-4); font-size: var(--text-md); line-height: 1.65; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.post__media { width: 100%; max-height: 480px; object-fit: cover; }
.post__video { width: 100%; max-height: 360px; background: #000; display: block; }
.post__reactions-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px var(--sp-5); border-top: 1px solid var(--border); font-size: var(--text-xs); color: var(--subtle); }
.post__actions { display: flex; border-top: 1px solid var(--border); }
.post__action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--mid);
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  transition: background var(--t-fast), color var(--t-fast);
}
.post__action-btn:last-child { border-right: none; }
.post__action-btn:hover { background: var(--surface); color: var(--ink); }
.post__action-btn--active { color: var(--brand); }

/* ── BADGES ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}
.badge--administrator { background: #fef3e2; color: #92650a; }
.badge--editor        { background: var(--brand-light); color: var(--brand-text); }
.badge--member        { background: var(--surface-2); color: var(--mid); }
.badge--active        { background: var(--success-bg); color: var(--success); }
.badge--pending       { background: var(--warn-bg); color: #7a5a00; }
.badge--deactivated   { background: var(--danger-bg); color: var(--danger); }

/* ── AVATAR ──────────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar--sm  { width: 28px; height: 28px; font-size: 11px; }
.avatar--md  { width: 38px; height: 38px; font-size: 14px; }
.avatar--lg  { width: 52px; height: 52px; font-size: 18px; }
.avatar--xl  { width: 80px; height: 80px; font-size: 26px; }
.avatar img  { width: 100%; height: 100%; object-fit: cover; }

/* ── BUTTONS ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--r-md);
  font-size: var(--text-base);
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); text-decoration: none; }
.btn--primary   { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn--danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--danger:hover  { opacity: 0.88; }
.btn--ghost     { background: none; border-color: transparent; }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--border); color: var(--ink); }
.btn--sm        { padding: 6px 14px; font-size: var(--text-sm); }
.btn--full      { width: 100%; }
.btn--icon      { padding: 8px; border-radius: 50%; width: 36px; height: 36px; }
.btn:disabled   { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--white);
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--t-base), background var(--t-base);
  font-family: var(--font-body);
}
.btn-google:hover { border-color: var(--brand); background: var(--brand-light); text-decoration: none; }

/* ── FORM CONTROLS ───────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--mid);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--text-md);
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,107,74,0.12);
  outline: none;
}
.form-control::placeholder { color: var(--ghost); }
.form-control--error { border-color: var(--danger); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa0a6' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint { font-size: var(--text-xs); color: var(--subtle); margin-top: 4px; }
.form-error { font-size: var(--text-xs); color: var(--danger); margin-top: 4px; }

.input-reveal-wrap { position: relative; }
.input-reveal-wrap .form-control { padding-right: 40px; }
.input-reveal-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--subtle); padding: 4px; }
.input-reveal-btn:hover { color: var(--brand); }

/* ── ALERTS ──────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: var(--text-base);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.alert--info    { background: var(--info-bg);    border: 1px solid #a9cfe0; color: #1a5276; }
.alert--warn    { background: var(--warn-bg);    border: 1px solid #f5d79e; color: #7a5a00; }
.alert--success { background: var(--success-bg); border: 1px solid #a9dfbf; color: #1e8449; }
.alert--error   { background: var(--danger-bg);  border: 1px solid #f1a9a0; color: #a93226; }

/* ── TOAST NOTIFICATIONS ─────────────────────────────────────────── */
.toast {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  right: 20px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-base);
  font-weight: 500;
  max-width: 380px;
  animation: slideInRight 0.2s ease;
}
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.toast--success { background: var(--success); color: #fff; }
.toast--error   { background: var(--danger);  color: #fff; }
.toast__icon { font-size: 16px; flex-shrink: 0; }
.toast__close { background: rgba(255,255,255,0.25); border: none; color: #fff; width: 22px; height: 22px; border-radius: 50%; font-size: 14px; line-height: 1; margin-left: auto; flex-shrink: 0; }
.toast__close:hover { background: rgba(255,255,255,0.4); }

/* ── DIVIDER ─────────────────────────────────────────────────────── */
.divider-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: var(--text-sm);
  color: var(--subtle);
}
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── AUTH PAGES ──────────────────────────────────────────────────── */
.auth-body { background: var(--surface); min-height: 100vh; display: flex; align-items: stretch; }
.auth-wrap { display: flex; min-height: 100vh; width: 100%; }

.auth-hero {
  flex: 1;
  background: linear-gradient(160deg, var(--brand) 0%, #0e4530 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10);
  min-height: 100vh;
}
.auth-hero__inner { max-width: 360px; color: #fff; }
.auth-hero__logo  { margin-bottom: var(--sp-6); }
.auth-hero__title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: var(--sp-4);
}
.auth-hero__title em { font-style: italic; color: rgba(255,255,255,0.75); }
.auth-hero__tagline { font-size: var(--text-lg); color: rgba(255,255,255,0.65); line-height: 1.55; margin-bottom: var(--sp-8); }
.auth-hero__stats { display: flex; gap: var(--sp-6); }
.auth-hero__stat strong { display: block; font-size: var(--text-2xl); font-weight: 700; color: #fff; font-family: var(--font-display); }
.auth-hero__stat span   { font-size: var(--text-sm); color: rgba(255,255,255,0.55); }

.auth-form-panel { flex: 0 0 480px; display: flex; align-items: center; justify-content: center; padding: var(--sp-8); background: var(--white); }
.auth-form-wrap  { width: 100%; max-width: 360px; }
.auth-form-header { margin-bottom: var(--sp-6); }
.auth-form-title { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.auth-form-sub   { font-size: var(--text-base); color: var(--mid); }
.auth-form-footer { font-size: var(--text-sm); color: var(--mid); margin-top: var(--sp-4); text-align: center; }
.auth-form-footer--muted { color: var(--ghost); font-size: var(--text-xs); margin-top: var(--sp-2); }

@media (max-width: 768px) {
  .auth-hero  { display: none; }
  .auth-form-panel { flex: 1; }
}

/* ── SIDEBAR ─────────────────────────────────────────────────────── */
.sidebar-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-bottom: var(--sp-3); box-shadow: var(--shadow-sm); }
.sidebar-card__head { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); }
.sidebar-card__title { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--subtle); }
.sidebar-card__body { padding: var(--sp-3) var(--sp-4); }

/* ── FAMILY TREE PAGE ────────────────────────────────────────────── */
.tree-wrap { height: calc(100vh - var(--nav-h) - 60px); display: flex; flex-direction: column; }
.tree-toolbar { background: var(--white); border-bottom: 1px solid var(--border); padding: var(--sp-2) var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.tree-canvas { flex: 1; overflow: hidden; position: relative; cursor: grab; background: var(--surface); background-image: radial-gradient(circle, rgba(180,190,200,0.25) 1px, transparent 1px); background-size: 24px 24px; }
.tree-canvas.dragging { cursor: grabbing; }

.tree-panel {
  position: absolute;
  top: 0; right: 0;
  width: 300px;
  height: 100%;
  background: var(--white);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform var(--t-slow) cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  z-index: 50;
  box-shadow: var(--shadow-lg);
}
.tree-panel--open { transform: translateX(0); }

/* ── ADMIN TABLE ─────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
.data-table th { text-align: left; padding: 10px 14px; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--subtle); border-bottom: 2px solid var(--border); background: var(--surface); }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--ink-2); vertical-align: middle; }
.data-table tr:hover td { background: var(--surface); }
.data-table tr:last-child td { border-bottom: none; }

/* ── PAGINATION ──────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; padding: var(--sp-4) 0; }
.pagination__btn {
  width: 34px; height: 34px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-base);
  color: var(--ink);
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t-fast);
}
.pagination__btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pagination__btn--active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination__btn--disabled { opacity: 0.4; pointer-events: none; }

/* ── SPINNER ─────────────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PROFILE HERO ────────────────────────────────────────────────── */
.profile-hero { height: 120px; background: linear-gradient(135deg, var(--brand) 0%, #0e4530 100%); position: relative; }
.profile-hero__avatar { position: absolute; bottom: -28px; left: var(--sp-5); border: 3px solid var(--white); border-radius: 50%; }

/* ── FOOTER ──────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); padding: 10px var(--sp-6); margin-top: auto; }
.site-footer__inner { max-width: var(--max-wide); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; font-size: var(--text-sm); color: rgba(255,255,255,0.3); gap: var(--sp-4); }
.site-footer__logout { color: rgba(255,255,255,0.5); font-size: var(--text-sm); }
.site-footer__logout:hover { color: #fff; }

/* ── UTILITY ─────────────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
.text-muted  { color: var(--subtle); }
.text-danger { color: var(--danger); }
.text-brand  { color: var(--brand); }
.text-sm     { font-size: var(--text-sm); }
.text-xs     { font-size: var(--text-xs); }
.fw-600      { font-weight: 600; }
.mt-1 { margin-top: var(--sp-1); } .mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mb-2 { margin-bottom: var(--sp-2); } .mb-4 { margin-bottom: var(--sp-4); }
.gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.w-full { width: 100%; }
