*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{--navy:#1a2744;--navy-dark:#0f1729;--navy-mid:#243460;--gold:#c9a84c;--gold-light:#e8cc80;--gold-pale:#f5e9c8;--cream:#f8f4ec;--white:#ffffff;--text-dark:#1a1a2e;--text-med:#4a4a6a;--text-light:#7a7a9a;--shadow-sm:0 2px 8px rgba(0,0,0,.12);--shadow-md:0 4px 24px rgba(0,0,0,.18);--shadow-lg:0 8px 48px rgba(0,0,0,.24);--radius:6px;--ease:0.3s ease}
html{scroll-behavior:smooth}
body{font-family:'Lato',system-ui,sans-serif;color:var(--text-dark);line-height:1.6}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
h1,h2,h3{font-family:'Cinzel',Georgia,serif;line-height:1.2}

/* ── AUTH PAGES (login / signup) ─────────────────────────────────────────── */
body.auth-page{
  background:var(--navy-dark);
  background-image:radial-gradient(ellipse at 28% 65%,rgba(36,52,96,.9) 0%,transparent 58%),
                   radial-gradient(ellipse at 72% 18%,rgba(201,168,76,.07) 0%,transparent 52%);
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:2rem 1rem}
.auth-card{
  background:var(--white);
  border-radius:12px;
  padding:2.5rem 2.75rem;
  width:100%;
  max-width:460px;
  box-shadow:0 24px 64px rgba(0,0,0,.5)}
.auth-logo{
  display:flex;
  align-items:center;
  gap:.75rem;
  justify-content:center;
  text-decoration:none;
  margin-bottom:1.5rem}
.auth-logo img{
  width:40px;height:40px;
  object-fit:contain;
  filter:brightness(0) saturate(100%) invert(14%) sepia(40%) saturate(900%) hue-rotate(200deg)}
.auth-logo-text{text-align:center}
.auth-lodge-name{
  font-family:'Cinzel',serif;
  font-size:.9rem;font-weight:700;
  color:var(--navy);line-height:1.15}
.auth-lodge-sub{
  font-size:.65rem;letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--gold)}
.auth-divider{
  height:1px;
  background:linear-gradient(to right,transparent,rgba(201,168,76,.55),transparent);
  margin-bottom:1.75rem}
.auth-title{
  font-family:'Cinzel',serif;
  font-size:1.45rem;font-weight:700;
  color:var(--navy);
  text-align:center;margin-bottom:.3rem}
.auth-subtitle{
  text-align:center;
  color:var(--text-med);
  font-size:.875rem;
  margin-bottom:1.75rem}
.form-group{margin-bottom:1.1rem}
.form-group label{
  display:block;
  font-size:.78rem;font-weight:700;
  letter-spacing:.06em;text-transform:uppercase;
  color:var(--text-med);margin-bottom:.4rem}
.form-group input{
  width:100%;
  padding:.75rem 1rem;
  border:1.5px solid #d8dae0;
  border-radius:var(--radius);
  font-family:'Lato',sans-serif;
  font-size:.95rem;color:var(--text-dark);
  background:var(--white);
  transition:border-color var(--ease),box-shadow var(--ease)}
.form-group input:focus{
  outline:none;
  border-color:var(--navy);
  box-shadow:0 0 0 3px rgba(26,39,68,.1)}
.form-group textarea{
  width:100%;
  padding:.75rem 1rem;
  border:1.5px solid #d8dae0;
  border-radius:var(--radius);
  font-family:'Lato',sans-serif;
  font-size:.95rem;color:var(--text-dark);
  background:var(--white);
  resize:vertical;
  transition:border-color var(--ease),box-shadow var(--ease)}
.form-group textarea:focus{
  outline:none;
  border-color:var(--navy);
  box-shadow:0 0 0 3px rgba(26,39,68,.1)}
.field-hint{
  font-size:.76rem;color:var(--text-light);
  margin-top:.3rem;line-height:1.4}
.lodge-pw-hint{
  display:flex;align-items:flex-start;gap:.5rem;
  background:var(--gold-pale);
  border:1px solid rgba(201,168,76,.45);
  border-radius:var(--radius);
  padding:.65rem .85rem;
  margin-top:.4rem;
  font-size:.8rem;color:var(--text-med);line-height:1.45}
.lodge-pw-hint::before{content:'🔑';font-size:1rem;flex-shrink:0;margin-top:.05rem}
.auth-error{
  background:#fff3f3;
  border:1px solid #fcc;
  border-left:3px solid #e53935;
  color:#c62828;
  padding:.7rem .9rem;border-radius:var(--radius);
  font-size:.875rem;margin-bottom:1rem}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  padding:.875rem 1.875rem;
  font-family:'Lato',sans-serif;
  font-size:.875rem;font-weight:700;
  letter-spacing:.1em;text-transform:uppercase;
  text-decoration:none;border-radius:var(--radius);
  border:2px solid transparent;
  transition:all var(--ease);cursor:pointer}
.btn-block{width:100%}
.btn-gold{background:var(--gold);color:var(--navy-dark);border-color:var(--gold)}
.btn-gold:hover{background:var(--gold-light);border-color:var(--gold-light);transform:translateY(-1px);box-shadow:0 4px 16px rgba(201,168,76,.38)}
.btn-gold:disabled{opacity:.6;cursor:not-allowed;transform:none;box-shadow:none}
.auth-switch{
  text-align:center;font-size:.875rem;
  color:var(--text-med);margin-top:1.25rem}
.auth-switch a{color:var(--navy);font-weight:700;text-decoration:underline}
.auth-switch a:hover{color:var(--gold)}
.auth-back{
  display:block;text-align:center;
  font-size:.78rem;color:var(--text-light);
  margin-top:.6rem}
.auth-back:hover{color:var(--text-med)}

/* ── MEMBERS / PORTAL PAGE ──────────────────────────────────────────────── */
body.members-page{background:#eef0f5;min-height:100vh}

/* Portal navbar */
.portal-nav{
  position:fixed;top:0;left:0;right:0;z-index:1000;
  background:rgba(15,23,41,.97);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(201,168,76,.25);
  height:64px;display:flex;align-items:center}
.portal-nav-inner{
  max-width:1100px;margin:0 auto;
  padding:0 1.5rem;width:100%;
  display:flex;align-items:center;justify-content:space-between;gap:1rem}
.portal-brand{display:flex;align-items:center;gap:.65rem;text-decoration:none}
.portal-brand img{
  width:36px;height:36px;object-fit:contain;
  filter:brightness(0) invert(1)}
.portal-brand-name{
  font-family:'Cinzel',serif;font-size:.85rem;font-weight:700;
  color:var(--white);line-height:1.1}
.portal-brand-sub{
  font-size:.62rem;letter-spacing:.1em;
  text-transform:uppercase;color:var(--gold)}
.portal-user-area{display:flex;align-items:center;gap:.9rem;min-width:0}
.portal-greeting{
  font-size:.82rem;color:rgba(255,255,255,.6)}
.portal-greeting strong{color:var(--gold-light);font-weight:600}
.btn-portal-calendar{
  background:rgba(201,168,76,.12);
  border-color:rgba(201,168,76,.38);
  color:var(--gold-light)}
.btn-portal-calendar:hover{background:rgba(201,168,76,.2);border-color:rgba(201,168,76,.55)}
.btn-logout{
  padding:.38rem .85rem;
  background:transparent;
  color:rgba(255,255,255,.6);
  border:1px solid rgba(255,255,255,.2);
  border-radius:4px;
  font-family:'Lato',sans-serif;
  font-size:.75rem;font-weight:700;
  letter-spacing:.07em;text-transform:uppercase;
  cursor:pointer;
  transition:all var(--ease)}
.btn-logout:hover{
  border-color:rgba(255,255,255,.5);
  color:var(--white);background:rgba(255,255,255,.07)}

/* Page content */
.portal-page{padding-top:64px;min-height:100vh}

/* Forum banner */
.forum-banner{
  background:linear-gradient(135deg,var(--navy-dark) 0%,var(--navy-mid) 100%);
  border-bottom:3px solid var(--gold);
  padding:2.25rem 0 2rem}
.forum-banner .inner{
  max-width:740px;margin:0 auto;padding:0 1.5rem;
  display:flex;align-items:center;gap:1.25rem}
.forum-banner-icon{
  width:52px;height:52px;object-fit:contain;flex-shrink:0;
  filter:brightness(0) invert(1) sepia(1) saturate(1.4) hue-rotate(5deg);
  opacity:.9}
.forum-banner h1{
  font-family:'Cinzel',serif;
  font-size:1.45rem;font-weight:700;
  color:var(--white);margin-bottom:.2rem}
.forum-banner p{font-size:.85rem;color:rgba(255,255,255,.55)}

/* Main forum area */
.forum-main{
  max-width:740px;margin:0 auto;
  padding:2rem 1.5rem 4rem}

/* Compose card */
.compose-card{
  background:var(--white);
  border-radius:10px;
  padding:1.4rem 1.5rem;
  box-shadow:var(--shadow-sm);
  border:1px solid rgba(0,0,0,.07);
  margin-bottom:2rem}
.compose-label{
  font-size:.75rem;font-weight:700;
  letter-spacing:.1em;text-transform:uppercase;
  color:var(--text-light);margin-bottom:.75rem}
.compose-card textarea{
  width:100%;min-height:88px;
  padding:.8rem 1rem;
  border:1.5px solid #d8dae0;
  border-radius:var(--radius);
  font-family:'Lato',sans-serif;
  font-size:.95rem;color:var(--text-dark);
  resize:vertical;
  transition:border-color var(--ease)}
.compose-card textarea:focus{outline:none;border-color:var(--navy)}
.compose-footer{
  display:flex;align-items:center;
  justify-content:space-between;
  margin-top:.65rem}
.char-count{font-size:.75rem;color:var(--text-light)}
.char-count.warn{color:#e65100}
.char-count.over{color:#e53935;font-weight:700}
.btn-post{
  padding:.55rem 1.35rem;
  background:var(--navy);color:var(--white);
  border:none;border-radius:var(--radius);
  font-family:'Lato',sans-serif;
  font-size:.82rem;font-weight:700;
  letter-spacing:.06em;text-transform:uppercase;
  cursor:pointer;transition:all var(--ease)}
.btn-post:hover{background:var(--navy-mid);transform:translateY(-1px);box-shadow:0 3px 10px rgba(26,39,68,.25)}
.btn-post:disabled{opacity:.5;cursor:not-allowed;transform:none;box-shadow:none}

/* Post error */
.post-error{
  font-size:.8rem;color:#e53935;
  margin-top:.5rem}

/* Posts feed */
.posts-section h2{
  font-family:'Lato',sans-serif;
  font-size:.75rem;font-weight:700;
  letter-spacing:.12em;text-transform:uppercase;
  color:var(--text-light);margin-bottom:1rem}
.posts-loading,.no-posts{
  text-align:center;padding:3rem 1rem;
  color:var(--text-light);font-size:.9rem;font-style:italic}
.post-card{
  background:var(--white);
  border-radius:10px;
  padding:1.2rem 1.4rem;
  box-shadow:var(--shadow-sm);
  border:1px solid rgba(0,0,0,.07);
  margin-bottom:.9rem;
  transition:box-shadow var(--ease)}
.post-card:hover{box-shadow:var(--shadow-md)}
.post-header{
  display:flex;align-items:center;
  justify-content:space-between;
  margin-bottom:.7rem}
.post-meta{display:flex;align-items:baseline;gap:.6rem}
.post-author{
  font-family:'Cinzel',serif;
  font-size:.88rem;font-weight:600;
  color:var(--navy)}
.post-time{font-size:.73rem;color:var(--text-light)}
.post-text{
  font-size:.95rem;color:var(--text-dark);
  line-height:1.7;
  white-space:pre-wrap;word-break:break-word}
.post-delete{
  background:none;border:none;
  color:var(--text-light);
  font-size:.72rem;cursor:pointer;
  padding:.2rem .45rem;border-radius:3px;
  transition:all var(--ease);flex-shrink:0}
.post-delete:hover{background:#fff3f3;color:#e53935}

/* Auth gate overlay (shown while checking auth) */
.auth-checking{
  position:fixed;inset:0;
  background:var(--navy-dark);
  display:flex;align-items:center;justify-content:center;
  z-index:9999}
.auth-checking p{color:rgba(255,255,255,.5);font-size:.9rem;letter-spacing:.05em}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media(max-width:600px){
  .auth-card{padding:1.75rem 1.35rem;border-radius:10px}
  .portal-greeting{display:none}
  .forum-main{padding:1.5rem 1rem 3rem}
  .compose-card,.post-card{padding:1rem 1.1rem}
  .forum-banner .inner{gap:.85rem}
  .forum-banner-icon{width:40px;height:40px}
  .forum-banner h1{font-size:1.2rem}
}

/* ── ADMIN PANEL ─────────────────────────────────────────────────────────── */
.btn-portal-link{
  display:inline-block;
  padding:.4rem 1rem;
  border:1px solid rgba(201,168,76,.4);
  border-radius:var(--radius);
  color:var(--gold-light);
  font-family:'Lato',sans-serif;
  font-size:.8rem;
  letter-spacing:.03em;
  transition:background var(--ease)}
.btn-portal-link:hover{background:rgba(201,168,76,.1)}

.admin-tabs{
  display:flex;
  gap:.5rem;
  padding:1.2rem 2rem .2rem;
  background:var(--navy-dark);
  border-bottom:1px solid rgba(255,255,255,.08)}
.admin-tab{
  padding:.55rem 1.4rem;
  border:1px solid rgba(201,168,76,.3);
  border-radius:var(--radius) var(--radius) 0 0;
  background:transparent;
  color:rgba(255,255,255,.55);
  font-family:'Lato',sans-serif;
  font-size:.85rem;
  cursor:pointer;
  transition:all var(--ease)}
.admin-tab:hover{color:var(--gold-light);background:rgba(201,168,76,.07)}
.admin-tab.active{background:var(--navy-mid);color:var(--gold-light);border-color:rgba(201,168,76,.6)}

.admin-panel{background:var(--cream);min-height:calc(100vh - 200px);padding:2rem 0 4rem}
.admin-panel-inner{max-width:800px;margin:0 auto;padding:0 1.5rem}

.admin-page .compose-card{margin-bottom:2rem}
.form-row{display:flex;gap:1rem;align-items:flex-end}
.form-row .form-group{margin-bottom:0}
.form-check{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem}
.form-check input[type=checkbox]{width:16px;height:16px;accent-color:var(--navy);cursor:pointer}
.form-check label{font-size:.9rem;color:var(--text-med);cursor:pointer;margin:0}
.form-actions{display:flex;gap:.75rem;align-items:center;margin-top:1rem}
.btn-cancel{
  padding:.6rem 1.2rem;
  border:1px solid #ccc;
  border-radius:var(--radius);
  background:var(--white);
  color:var(--text-med);
  font-family:'Lato',sans-serif;
  font-size:.9rem;
  cursor:pointer;
  transition:background var(--ease)}
.btn-cancel:hover{background:#f0f0f0}
.req{color:#c0392b}
.char-counter{font-size:.78rem;color:var(--text-light);text-align:right;margin-top:.25rem}
.loading-msg{text-align:center;color:var(--text-light);padding:2rem;font-style:italic}
select{
  width:100%;
  padding:.55rem .75rem;
  border:1px solid #d4c9b0;
  border-radius:var(--radius);
  background:var(--white);
  font-family:'Lato',sans-serif;
  font-size:.95rem;
  color:var(--text-dark)}
select:focus{outline:2px solid var(--gold);border-color:transparent}

/* Announcement admin cards */
.ann-admin-card{
  background:var(--white);
  border:1px solid #e0d9cc;
  border-left:4px solid var(--gold);
  border-radius:var(--radius);
  padding:1.1rem 1.25rem;
  margin-bottom:.85rem;
  transition:opacity var(--ease)}
.ann-admin-card.inactive{opacity:.6;border-left-color:#bbb}
.ann-card-header{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:.4rem}
.ann-card-title{font-family:'Cinzel',serif;font-size:1rem;margin-bottom:.35rem}
.ann-card-body{font-size:.9rem;color:var(--text-med);margin-bottom:.75rem;white-space:pre-wrap}
.ann-card-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.btn-sm{
  padding:.3rem .8rem;
  border-radius:4px;
  font-family:'Lato',sans-serif;
  font-size:.8rem;
  cursor:pointer;
  border:1px solid transparent;
  transition:all var(--ease)}
.btn-edit{background:#eaf2ff;color:#1a56a0;border-color:#c0d8f8}
.btn-edit:hover{background:#c0d8f8}
.btn-toggle{background:#e8f7ed;color:#196b36;border-color:#b0dfc0}
.btn-toggle:hover{background:#b0dfc0}
.btn-del{background:#fdecea;color:#b91c1c;border-color:#f5c0bd}
.btn-del:hover{background:#f5c0bd}

/* Category badges */
.ann-badge{display:inline-block;padding:.15rem .6rem;border-radius:10px;font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:capitalize}
.ann-badge-notice{background:#e8f0fe;color:#1a56a0}
.ann-badge-event{background:#e6f4ea;color:#196b36}
.ann-badge-alert{background:#fce8e6;color:#b31412}

/* Status / pin indicators */
.ann-status{font-size:.75rem;font-weight:700;padding:.1rem .5rem;border-radius:10px}
.ann-status.active{background:#d4edda;color:#155724}
.ann-status.hidden{background:#f8d7da;color:#721c24}
.ann-pinned{font-size:.75rem;color:var(--gold);font-weight:700}
.ann-date{font-size:.75rem;color:var(--text-light);margin-left:auto}

/* Admin user cards */
.admin-user-card{
  background:var(--white);
  border:1px solid #e0d9cc;
  border-left:4px solid var(--navy-mid);
  border-radius:var(--radius);
  padding:1rem 1.25rem;
  margin-bottom:.85rem;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem}
.admin-user-info{display:flex;flex-direction:column;gap:.2rem}
.admin-user-info strong{font-size:1rem}
.admin-user-email{font-size:.85rem;color:var(--text-med)}
.admin-user-uid{font-size:.75rem;color:var(--text-light);font-family:monospace;word-break:break-all}
.admin-user-since{font-size:.75rem;color:var(--text-light)}
.admin-hint{font-size:.85rem;color:var(--text-med);margin-bottom:1rem;line-height:1.5}

/* Success state re-use of auth-error */
.auth-error.success{background:#d4edda;border-color:#c3e6cb;color:#155724}

/* Event admin cards */
.ev-admin-card{
  background:var(--white);
  border:1px solid #e0d9cc;
  border-left:4px solid var(--navy-mid);
  border-radius:var(--radius);
  padding:1.1rem 1.25rem;
  margin-bottom:.85rem;
  transition:opacity var(--ease)}
.ev-admin-card.inactive{opacity:.6;border-left-color:#bbb}
.ev-admin-card.past{border-left-color:#ccc}
.ev-meta{font-size:.82rem;color:var(--text-med);display:flex;gap:.75rem;flex-wrap:wrap;margin-top:.25rem;margin-bottom:.6rem}

/* Event type badges */
.ev-type-badge{display:inline-block;padding:.15rem .6rem;border-radius:10px;font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:capitalize}
.ev-type-meeting{background:#e8f0fe;color:#1a56a0}
.ev-type-degree{background:#f3e8ff;color:#6b21a8}
.ev-type-special{background:#fef3c7;color:#92400e}
.ev-type-social{background:#e6f4ea;color:#196b36}
.ev-past-label{font-size:.72rem;color:#888;font-style:italic}

/* Bulk date list */
.bulk-date-list{
  border:1px solid #e0d9cc;
  border-radius:var(--radius);
  max-height:220px;
  overflow-y:auto;
  padding:.4rem .5rem}
.bulk-date-item{
  display:flex;align-items:center;gap:.6rem;
  padding:.4rem .5rem;border-radius:4px;cursor:pointer;
  font-size:.88rem;color:var(--text-dark)}
.bulk-date-item:hover{background:var(--cream)}
.bulk-date-item input{cursor:pointer;accent-color:var(--navy)}

/* News admin cards */
.news-admin-card{
  background:var(--white);
  border:1px solid #e0d9cc;
  border-left:4px solid var(--gold);
  border-radius:var(--radius);
  padding:1.1rem 1.25rem;
  margin-bottom:.85rem;
  transition:opacity var(--ease)}
.news-admin-card.inactive{opacity:.6;border-left-color:#bbb}
.news-admin-img-url{font-size:.75rem;color:var(--text-light);word-break:break-all;margin-bottom:.4rem;font-family:monospace}
.news-img-preview{max-height:130px;max-width:100%;border-radius:6px;display:block;object-fit:cover;border:1px solid #ddd}
.news-media-list{display:flex;flex-direction:column;gap:.5rem}
.news-media-row{display:flex;gap:.65rem;align-items:flex-start;border:1px solid #e4dccd;background:#fbf8f2;padding:.5rem;border-radius:8px}
.news-media-row{cursor:grab}
.news-media-row.is-dragging{opacity:.55}
.news-media-row.is-drop-target{border-color:var(--gold);box-shadow:0 0 0 2px rgba(201,168,76,.2)}
.news-media-drag{width:24px;height:24px;display:flex;align-items:center;justify-content:center;border:1px solid #d9cfbe;border-radius:6px;background:#fff;color:#9a8f79;font-size:1rem;line-height:1;flex-shrink:0;user-select:none;margin-top:2px}
.news-media-thumb{width:92px;height:68px;object-fit:cover;border-radius:6px;border:1px solid #ddd;flex-shrink:0;background:#f2efe8}
.news-media-meta{flex:1;min-width:0}
.news-media-actions{display:flex;gap:.4rem;align-items:center;margin-bottom:.35rem;flex-wrap:wrap}
.news-featured-pill{display:inline-block;padding:.15rem .55rem;border-radius:999px;background:#e7f6eb;color:#196b36;font-size:.72rem;font-weight:700;letter-spacing:.03em}
.news-media-alt-label{display:block;font-size:.75rem;color:var(--text-light);margin-bottom:.2rem}
.news-media-alt{width:100%;padding:.36rem .5rem;border:1px solid #cec5b5;border-radius:6px;background:#fff;font-family:'Lato',sans-serif;font-size:.84rem;color:var(--text-dark)}
/* History admin photo rows */
.hist-photo-row{display:flex;align-items:center;gap:.6rem;margin-bottom:.45rem;padding:.4rem .5rem;background:#f8f8fb;border-radius:6px;border:1px solid #e4e4ee}
.hist-photo-thumb{width:56px;height:44px;object-fit:cover;border-radius:4px;flex-shrink:0;border:1px solid #ddd;background:#eee}
.hist-photo-caption{flex:1;min-width:0;font-size:.82rem;padding:.3rem .5rem;border:1px solid #ccc;border-radius:4px;background:#fff;font-family:'Lato',sans-serif}
.file-input{display:block;width:100%;padding:.35rem 0;font-size:.9rem;color:var(--text);cursor:pointer}

/* Photo admin cards */
.photo-admin-card{background:var(--white);border:1px solid #e0d9cc;border-left:4px solid var(--gold);border-radius:var(--radius);padding:.75rem 1rem;margin-bottom:.75rem;display:flex;gap:1rem;align-items:flex-start;transition:opacity var(--ease)}
.photo-admin-card.inactive{opacity:.6;border-left-color:#bbb}
.photo-admin-thumb{width:90px;height:68px;object-fit:cover;border-radius:4px;flex-shrink:0;border:1px solid #ddd}
.photo-admin-no-img{width:90px;height:68px;border-radius:4px;flex-shrink:0;background:var(--cream);border:1px solid #ddd;display:flex;align-items:center;justify-content:center;font-size:.8rem;color:var(--text-light)}
.photo-admin-body{flex:1;min-width:0}

/* Community admin cards — same layout as photo cards */
.comm-admin-card{background:var(--white);border:1px solid #e0d9cc;border-left:4px solid var(--gold);border-radius:var(--radius);padding:.75rem 1rem;margin-bottom:.75rem;display:flex;gap:1rem;align-items:flex-start;transition:opacity var(--ease)}
.comm-admin-card.inactive{opacity:.6;border-left-color:#bbb}

/* ── MEMBER PROFILE PAGE ─────────────────────────────────────────────────── */
.profile-page-inner{max-width:780px;margin:2.5rem auto;padding:0 1.25rem}

.profile-card{
  background:var(--white);border:1px solid #e0d9cc;border-radius:var(--radius);
  padding:1.75rem;display:flex;align-items:flex-start;gap:1.5rem;
  box-shadow:var(--shadow-sm);margin-bottom:1.25rem;position:relative}
.profile-avatar{
  width:90px;height:90px;flex-shrink:0;border-radius:50%;overflow:hidden;
  background:var(--navy);display:flex;align-items:center;justify-content:center;
  font-family:'Cinzel',serif;font-size:1.75rem;color:var(--gold);
  border:3px solid var(--gold-pale)}
.profile-avatar img{width:100%;height:100%;object-fit:cover}
.profile-header-info{flex:1}
.profile-header-info h1{font-size:1.45rem;font-weight:700;color:var(--navy);margin-bottom:.35rem}
.profile-badges{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:.35rem}
.degree-badge{
  display:inline-block;padding:.2rem .65rem;font-size:.75rem;font-weight:700;
  letter-spacing:.05em;text-transform:uppercase;border-radius:20px;
  background:var(--navy);color:var(--gold-light);font-family:'Cinzel',serif}
.profile-year{font-size:.84rem;color:var(--text-light)}
.btn-edit-profile{
  position:absolute;top:1.25rem;right:1.25rem;background:transparent;
  border:1px solid var(--gold);color:var(--gold);font-size:.82rem;font-weight:600;
  padding:.35rem .85rem;border-radius:20px;cursor:pointer;
  transition:background var(--ease),color var(--ease)}
.btn-edit-profile:hover{background:var(--gold);color:var(--white)}

.profile-details{display:grid;grid-template-columns:1fr 260px;gap:1.25rem;margin-bottom:1.5rem}
.profile-section{
  background:var(--white);border:1px solid #e0d9cc;border-radius:var(--radius);
  padding:1.25rem 1.5rem;box-shadow:var(--shadow-sm)}
.profile-section h3{
  font-family:'Cinzel',serif;font-size:.95rem;color:var(--navy);
  margin-bottom:.75rem;padding-bottom:.5rem;border-bottom:1px solid var(--gold-pale)}
.profile-section h4{
  font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;
  color:var(--text-light);margin-bottom:.3rem}
.profile-section p,.detail-val{font-size:.9rem;color:var(--text-med);line-height:1.6;margin-bottom:.75rem}
.profile-section p:last-child,.detail-val:last-child{margin-bottom:0}
.profile-empty-prompt{
  text-align:center;padding:3rem 1.5rem;background:var(--white);
  border:2px dashed #ddd;border-radius:var(--radius)}
.profile-empty-prompt p{color:var(--text-light);margin-bottom:1.1rem;font-size:.95rem}

.profile-edit-card{
  background:var(--white);border:1px solid #e0d9cc;border-radius:var(--radius);
  padding:1.75rem;box-shadow:var(--shadow-sm)}
.profile-edit-card h2{
  font-family:'Cinzel',serif;font-size:1.1rem;color:var(--navy);margin-bottom:1.25rem}
.avatar-upload-row{display:flex;align-items:center;gap:1.25rem;margin-bottom:1.25rem}
.avatar-upload-preview{
  width:72px;height:72px;border-radius:50%;overflow:hidden;background:var(--navy);
  display:flex;align-items:center;justify-content:center;
  font-family:'Cinzel',serif;font-size:1.3rem;color:var(--gold);
  border:3px solid var(--gold-pale);flex-shrink:0}
.avatar-upload-preview img{width:100%;height:100%;object-fit:cover}

/* ── MEMBER DIRECTORY ────────────────────────────────────────────────────── */
.portal-member-tabs{
  display:flex;gap:.4rem;padding:.85rem 1.25rem .4rem;
  border-bottom:2px solid #e0d9cc;background:var(--white);
  position:sticky;top:0;z-index:10}
.member-tab{
  background:none;border:none;cursor:pointer;padding:.5rem 1.2rem;
  border-radius:20px;font-size:.85rem;font-weight:600;color:var(--text-med);
  font-family:'Lato',sans-serif;transition:background var(--ease),color var(--ease)}
.member-tab:hover{background:var(--cream)}
.member-tab.active{background:var(--navy);color:var(--gold-light)}
.dir-main{max-width:820px;margin:2rem auto;padding:0 1.25rem}
.dir-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(175px,1fr));
  gap:1rem;margin-top:1rem}
.member-dir-card{
  background:var(--white);border:1px solid #e0d9cc;border-radius:var(--radius);
  padding:1.25rem 1rem;text-align:center;box-shadow:var(--shadow-sm);
  transition:transform var(--ease),box-shadow var(--ease)}
.member-dir-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md)}
.dir-card-avatar{
  width:64px;height:64px;border-radius:50%;margin:0 auto .75rem;overflow:hidden;
  background:var(--navy);display:flex;align-items:center;justify-content:center;
  font-family:'Cinzel',serif;font-size:1.2rem;color:var(--gold);
  border:2px solid var(--gold-pale)}
.dir-card-avatar img{width:100%;height:100%;object-fit:cover}
.dir-card-name{font-weight:700;color:var(--navy);font-size:.95rem;margin-bottom:.3rem}
.dir-card-degree{
  display:inline-block;padding:.15rem .55rem;font-size:.7rem;font-weight:700;
  text-transform:uppercase;letter-spacing:.04em;border-radius:20px;
  background:var(--gold-pale);color:var(--navy);font-family:'Cinzel',serif;
  margin-bottom:.4rem}
.dir-card-offices{font-size:.78rem;color:var(--text-light);line-height:1.4;margin-top:.3rem}
.dir-empty{text-align:center;padding:3rem 1rem;color:var(--text-light)}
.dir-empty a{color:var(--gold);text-decoration:underline}

@media(max-width:680px){
  .profile-card{flex-direction:column;align-items:center;text-align:center}
  .btn-edit-profile{position:static;margin-top:.75rem}
  .profile-badges{justify-content:center}
  .profile-details{grid-template-columns:1fr}
}

@media(max-width:600px){
  .form-row{flex-direction:column}
  .admin-tabs{padding:.75rem 1rem .2rem}
  .admin-tab{padding:.45rem .9rem;font-size:.78rem}
  .admin-panel-inner{padding:0 .9rem}
  .admin-user-card{flex-direction:column}
  .portal-nav{height:auto;min-height:64px}
  .portal-nav-inner{padding:.75rem .9rem;flex-wrap:wrap}
  .portal-user-area{flex-wrap:wrap;justify-content:flex-end;gap:.55rem .6rem}
  .portal-page{padding-top:108px}
  .portal-greeting{width:100%;text-align:right}
  .calendar-sub-modal-inner{padding:1.8rem 1.2rem 1.25rem}
  .calendar-sub-actions{flex-direction:column}
  .calendar-sub-actions .btn-post,
  .calendar-sub-actions .btn-cancel{width:100%}
}

/* ── OFFICE / BODY BADGES ────────────────────────────────────────────────── */
.badge-row{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:.75rem}
.badge-row:last-child{margin-bottom:0}
.office-badge{
  display:inline-block;padding:.2rem .65rem;font-size:.75rem;font-weight:700;
  letter-spacing:.04em;border-radius:20px;
  background:var(--navy);color:var(--gold-light);font-family:'Cinzel',serif}
.body-badge{
  display:inline-block;padding:.2rem .65rem;font-size:.75rem;font-weight:600;
  letter-spacing:.03em;border-radius:20px;
  background:#e6f4ea;color:#196b36;border:1px solid #c3e6cb}

/* Badge-picker (edit form) */
.badge-picker{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.15rem}
.badge-opt{
  display:inline-flex;align-items:center;
  padding:.3rem .75rem;border-radius:20px;cursor:pointer;
  font-size:.82rem;font-weight:600;
  border:1.5px solid #d8dae0;color:var(--text-med);background:var(--white);
  user-select:none;transition:background var(--ease),border-color var(--ease),color var(--ease)}
.badge-opt:hover{border-color:var(--navy-mid);color:var(--navy)}
.badge-opt input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}
.badge-opt:has(input:checked){background:var(--navy);border-color:var(--navy);color:var(--gold-light)}
.badge-opt-body:has(input:checked){background:#e6f4ea;border-color:#a3d9b1;color:#196b36}

/* ── MEMBER PROFILE MODAL ────────────────────────────────────────────────── */
.member-modal-backdrop{
  position:fixed;inset:0;background:rgba(10,16,35,.55);
  z-index:9000;display:flex;align-items:center;justify-content:center;
  padding:1rem;overflow-y:auto}
.member-modal{
  background:var(--white);border-radius:var(--radius);
  width:100%;max-width:660px;position:relative;
  box-shadow:0 12px 48px rgba(0,0,0,.28);
  animation:modalIn .18s ease;
  display:flex;overflow:hidden;max-height:85vh}
@keyframes modalIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
.member-modal-close{
  position:absolute;top:.75rem;right:.85rem;
  background:none;border:none;cursor:pointer;
  font-size:1.4rem;line-height:1;color:var(--text-light);
  transition:color var(--ease)}
.member-modal-close:hover{color:var(--navy)}
.modal-photo-col{
  width:33.333%;flex-shrink:0;
  background:var(--navy);overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  font-family:'Cinzel',serif;font-size:3.5rem;color:var(--gold);
  min-height:320px}
.modal-photo-col img{width:100%;height:100%;object-fit:cover;display:block}
.modal-content-col{flex:1;overflow-y:auto;position:relative;display:flex;flex-direction:column}
.modal-content-inner{padding:2.5rem 1.75rem 1.75rem 1.5rem}
.modal-content-inner h2{font-size:1.25rem;color:var(--navy);margin-bottom:.4rem}
.member-modal-badges{display:flex;flex-wrap:wrap;gap:.35rem}
.member-modal-body{margin-top:.5rem}
.member-modal-section{margin-bottom:1.1rem}
.member-modal-section:last-child{margin-bottom:0}
.member-modal-section h4{
  font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;
  color:var(--text-light);margin-bottom:.4rem}
.member-modal-section p{font-size:.9rem;color:var(--text-med);line-height:1.6;margin:0}
@media(max-width:520px){
  .member-modal{flex-direction:column;max-height:90vh}
  .modal-photo-col{width:100%;min-height:0;height:200px}
}

/* Calendar subscription modal */
.calendar-sub-modal{
  background:var(--white);border-radius:var(--radius);
  width:100%;max-width:540px;position:relative;
  box-shadow:0 12px 48px rgba(0,0,0,.28);
  animation:modalIn .18s ease}
.calendar-sub-modal-inner{padding:2rem 1.75rem 1.6rem}
.calendar-sub-modal-inner h2{font-size:1.2rem;color:var(--navy);margin-bottom:.45rem}
.calendar-sub-intro{font-size:.92rem;color:var(--text-med);line-height:1.6;margin-bottom:1rem}
.calendar-sub-note{
  padding:.75rem .9rem;border-radius:10px;margin-bottom:1rem;
  background:rgba(201,168,76,.12);border:1px solid rgba(201,168,76,.26);
  color:var(--navy);font-size:.84rem;line-height:1.5}
.calendar-sub-status{font-size:.84rem;color:var(--text-light);margin-bottom:.9rem}
.calendar-sub-status.success{color:#196b36}
.calendar-sub-status.error{color:#b02a37}
.calendar-sub-url{
  width:100%;padding:.7rem .8rem;margin-bottom:1rem;
  border:1px solid #d4c9b0;border-radius:var(--radius);
  background:#fbfaf6;color:var(--text-dark);font-size:.84rem}
.calendar-sub-actions{display:flex;gap:.75rem;flex-wrap:wrap;margin-bottom:.95rem}
.calendar-sub-actions .btn-post,
.calendar-sub-actions .btn-cancel{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.calendar-sub-help{font-size:.82rem;color:var(--text-light);line-height:1.55;margin:0}

/* Directory card — clickable pointer */
.member-dir-card{cursor:pointer}

/* Public profile toggle in edit form */
.public-toggle-row{
  background:var(--cream);border:1px solid #e0d9cc;border-radius:var(--radius);
  padding:1rem 1.25rem;margin-bottom:1rem}
.public-toggle-row label{
  display:flex;align-items:flex-start;gap:.75rem;cursor:pointer}
.public-toggle-row input[type=checkbox]{
  width:18px;height:18px;flex-shrink:0;margin-top:.15rem;
  accent-color:var(--navy);cursor:pointer}
.public-toggle-row strong{
  font-size:.9rem;color:var(--navy);display:block;margin-bottom:.2rem}
.public-toggle-row p{
  font-size:.78rem;color:var(--text-light);margin:0;line-height:1.5}
