/* ============================================
   Desert Falcons Collective — Member Portal
   Dark luxury app aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Inter:wght@300;400;500;600&display=swap');

/* -------------------- Variables -------------------- */
:root {
  --deep-black: #0A0A0A;
  --sidebar-bg: #080808;
  --card-bg: #111111;
  --card-bg-hover: #161616;
  --royal-green: #1E4A3B;
  --royal-green-light: #2A6350;
  --metallic-silver: #C0C0C0;
  --desert-gold: #B8915A;
  --desert-gold-light: #D4A96A;
  --white: #FFFFFF;
  --text-secondary: rgba(255,255,255,0.6);
  --text-muted: rgba(255,255,255,0.35);
  --border: rgba(255,255,255,0.06);
  --border-mid: rgba(255,255,255,0.1);
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --sidebar-width: 260px;
  --topbar-h: 64px;
  --transition: 0.2s ease;
}

/* -------------------- Reset -------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--deep-black);
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* -------------------- Login Page -------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: fixed;
  inset: 0;
  background-image: url('../images/founders-hero.jpg');
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.85) 60%, #0A0A0A 100%);
}

.login-corner {
  position: fixed;
  width: 20px;
  height: 20px;
  z-index: 10;
  opacity: 0.4;
}
.login-corner::before,
.login-corner::after {
  content: '';
  position: absolute;
  background: var(--desert-gold);
}
.login-corner--tl { top: 24px; left: 24px; }
.login-corner--tl::before { top: 0; left: 0; width: 1px; height: 14px; }
.login-corner--tl::after  { top: 0; left: 0; width: 14px; height: 1px; }
.login-corner--tr { top: 24px; right: 24px; }
.login-corner--tr::before { top: 0; right: 0; width: 1px; height: 14px; }
.login-corner--tr::after  { top: 0; right: 0; width: 14px; height: 1px; }
.login-corner--bl { bottom: 24px; left: 24px; }
.login-corner--bl::before { bottom: 0; left: 0; width: 1px; height: 14px; }
.login-corner--bl::after  { bottom: 0; left: 0; width: 14px; height: 1px; }
.login-corner--br { bottom: 24px; right: 24px; }
.login-corner--br::before { bottom: 0; right: 0; width: 1px; height: 14px; }
.login-corner--br::after  { bottom: 0; right: 0; width: 14px; height: 1px; }

.login-card {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 420px;
  padding: 3rem 2.5rem;
  background: rgba(8,8,8,0.9);
  border: 1px solid var(--border-mid);
  backdrop-filter: blur(20px);
}

.login-logo {
  text-align: center;
  margin-bottom: 2.5rem;
}
.login-logo .logo-text {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--white);
}
.login-logo .logo-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.4em;
  color: var(--desert-gold);
  text-transform: uppercase;
  margin-top: 0.25rem;
}
.login-logo .logo-divider {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--desert-gold);
  margin: 1rem auto 0;
  opacity: 0.4;
}

.login-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.5rem;
  text-align: center;
}
.login-sub {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* -------------------- Form Elements -------------------- */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.form-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-mid);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 0.75rem 1rem;
  min-height: 48px;
  transition: border-color var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  border-radius: 0;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--desert-gold);
  background: rgba(184,145,90,0.04);
}
.form-input.error { border-color: rgba(180,60,60,0.5); }

/* ── Select dropdowns — consistent across all browsers & mobile ── */
select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(255,255,255,0.04);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23808080' stroke-width='1.5'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 16px 16px;
  padding-right: 2.5rem;
  cursor: pointer;
  touch-action: manipulation;
}
select.form-input option {
  background: #111111;
  color: #ffffff;
}
select.form-input:focus {
  border-color: var(--desert-gold);
  background-color: rgba(184,145,90,0.04);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23B8915A' stroke-width='1.5'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
}

/* Mobile touch target minimum */
@media (max-width: 768px) {
  .form-input, select.form-input {
    min-height: 52px;
    font-size: 1rem; /* Prevents iOS zoom on focus */
  }
}

.form-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  cursor: pointer;
}
.form-checkbox input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--desert-gold);
  cursor: pointer;
}
.form-link {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  color: var(--desert-gold);
  text-transform: uppercase;
  transition: opacity var(--transition);
}
.form-link:hover { opacity: 0.7; }

.btn-primary {
  width: 100%;
  padding: 0.875rem 2rem;
  background: var(--desert-gold);
  color: #0A0A0A;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  transition: background var(--transition), opacity var(--transition);
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--desert-gold-light); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  padding: 0.875rem 2rem;
  background: transparent;
  color: var(--desert-gold);
  border: 1px solid rgba(184,145,90,0.3);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
}
.btn-secondary:hover {
  border-color: var(--desert-gold);
  background: rgba(184,145,90,0.06);
}

.form-alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid;
}
.form-alert--error {
  background: rgba(180,60,60,0.08);
  border-color: rgba(180,60,60,0.3);
  color: rgba(220,100,100,0.9);
}
.form-alert--success {
  background: rgba(30,74,59,0.1);
  border-color: rgba(30,74,59,0.3);
  color: var(--royal-green-light);
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
.login-footer a { color: var(--desert-gold); }

/* -------------------- Portal Layout -------------------- */
.portal-layout {
  display: flex;
  min-height: 100vh;
}

/* -------------------- Sidebar -------------------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 1.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo a { display: block; }
.sidebar-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--white);
  display: block;
}
.sidebar-logo .logo-sub {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.35em;
  color: var(--desert-gold);
  display: block;
  margin-top: 0.15rem;
}
.sidebar-logo .logo-tag {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  display: block;
  margin-top: 0.5rem;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}
.sidebar-section {
  padding: 0.5rem 1.5rem 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.sidebar-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.03);
}
.sidebar-link.active {
  color: var(--desert-gold);
  background: rgba(184,145,90,0.06);
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--desert-gold);
}
.sidebar-link .nav-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  flex-shrink: 0;
}
.sidebar-link.active .nav-icon { opacity: 1; }

.sidebar-member {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
}
.sidebar-member-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--royal-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  flex-shrink: 0;
}
.member-avatar.gold { background: rgba(184,145,90,0.2); color: var(--desert-gold); }
.member-avatar.silver { background: rgba(192,192,192,0.15); color: var(--metallic-silver); }
.sidebar-member-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-member-role { font-size: 0.75rem; color: var(--text-muted); }
.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
}
.btn-logout:hover { color: rgba(220,100,100,0.8); }

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

/* -------------------- Topbar -------------------- */
.portal-topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: var(--deep-black);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hamburger-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger-btn span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--white);
  transition: all 0.25s ease;
}
.topbar-welcome {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--white);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.topbar-member-since {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* -------------------- Page Content -------------------- */
.portal-content {
  padding: 2rem;
  flex: 1;
}

.page-header {
  margin-bottom: 2rem;
}
.page-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.25rem;
}
.page-subtitle {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  color: rgba(184,145,90,0.6);
  text-transform: uppercase;
}

/* -------------------- Role Badges -------------------- */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 2px;
  font-weight: 500;
}
.role-badge.engineer { background: rgba(30,74,59,0.25); color: #2A6350; border: 1px solid rgba(30,74,59,0.4); }
.role-badge.designer { background: rgba(184,145,90,0.15); color: var(--desert-gold); border: 1px solid rgba(184,145,90,0.3); }
.role-badge.investor { background: rgba(192,192,192,0.1); color: var(--metallic-silver); border: 1px solid rgba(192,192,192,0.25); }
.role-badge.admin { background: rgba(255,255,255,0.08); color: var(--white); border: 1px solid rgba(255,255,255,0.2); }

/* -------------------- Status Badges -------------------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
}
.status-badge.complete { background: rgba(30,74,59,0.2); color: #2A6350; border: 1px solid rgba(30,74,59,0.3); }
.status-badge.in-progress { background: rgba(184,145,90,0.12); color: var(--desert-gold); border: 1px solid rgba(184,145,90,0.25); }
.status-badge.pending { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid var(--border-mid); }

/* -------------------- Type Badges -------------------- */
.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
}
.type-badge.pdf    { background: rgba(220,80,60,0.12); color: rgba(220,120,100,0.9); border: 1px solid rgba(220,80,60,0.2); }
.type-badge.excel  { background: rgba(30,130,80,0.12); color: rgba(60,180,110,0.9); border: 1px solid rgba(30,130,80,0.2); }
.type-badge.ppt    { background: rgba(220,110,40,0.12); color: rgba(230,150,80,0.9); border: 1px solid rgba(220,110,40,0.2); }
.type-badge.image  { background: rgba(80,80,200,0.12); color: rgba(130,130,220,0.9); border: 1px solid rgba(80,80,200,0.2); }
.type-badge.video  { background: rgba(150,40,200,0.12); color: rgba(180,100,220,0.9); border: 1px solid rgba(150,40,200,0.2); }
.type-badge.audio  { background: rgba(40,150,200,0.12); color: rgba(80,180,220,0.9); border: 1px solid rgba(40,150,200,0.2); }
.type-badge.written { background: rgba(184,145,90,0.12); color: var(--desert-gold); border: 1px solid rgba(184,145,90,0.2); }

/* -------------------- Cards -------------------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: border-color var(--transition);
}
.card:hover { border-color: rgba(255,255,255,0.1); }
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.75rem;
}
.card-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--white);
  line-height: 1.3;
}
.card-meta {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.card-body {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* -------------------- Dashboard Grid -------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dashboard-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dashboard-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.dashboard-section-title {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.3em;
  color: rgba(184,145,90,0.85);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid rgba(184,145,90,0.2);
}

/* -------------------- Activity Feed -------------------- */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem;
  background: rgba(255,255,255,0.02);
  border-left: 2px solid var(--border);
  transition: border-color var(--transition);
}
.activity-item:hover { border-left-color: var(--desert-gold); }
.activity-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--royal-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: rgba(255,255,255,0.8);
  flex-shrink: 0;
}
.activity-content { flex: 1; min-width: 0; }
.activity-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.25rem;
}
.activity-time {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* -------------------- Quick Links -------------------- */
.quick-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.quick-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.quick-link:hover {
  border-color: rgba(184,145,90,0.25);
  color: var(--white);
  background: rgba(184,145,90,0.04);
}
.quick-link-icon { font-size: 1rem; flex-shrink: 0; }
.quick-link-label { font-size: 0.8125rem; }

/* -------------------- Events Strip -------------------- */
.events-strip {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.event-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.25rem;
  transition: border-color var(--transition);
}
.event-card:hover { border-color: rgba(255,255,255,0.1); }
.event-date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(184,145,90,0.25);
  background: rgba(184,145,90,0.06);
  margin-bottom: 0.75rem;
}
.event-date-day {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--desert-gold);
  line-height: 1;
}
.event-date-mon {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: var(--desert-gold);
  text-transform: uppercase;
}
.event-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.35rem;
}
.event-type { margin-bottom: 0.5rem; }
.event-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* -------------------- RSVP Button -------------------- */
.btn-rsvp {
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid rgba(184,145,90,0.35);
  color: var(--desert-gold);
  background: transparent;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-rsvp:hover {
  background: rgba(184,145,90,0.1);
  border-color: var(--desert-gold);
}
.btn-rsvp.going {
  background: rgba(30,74,59,0.2);
  border-color: rgba(30,74,59,0.4);
  color: #2A6350;
  cursor: default;
}

/* -------------------- Resources Grid -------------------- */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.resource-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color var(--transition);
}
.resource-card:hover { border-color: rgba(255,255,255,0.1); }
.resource-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
}
.resource-meta {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.btn-download {
  margin-top: auto;
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--border-mid);
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition);
  cursor: pointer;
  text-align: center;
  display: block;
}
.btn-download:hover {
  border-color: rgba(184,145,90,0.35);
  color: var(--desert-gold);
}

/* -------------------- Announcements -------------------- */
.announcement-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  padding: 1.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all var(--transition);
}
.announcement-item:hover { border-color: rgba(255,255,255,0.1); border-left-color: var(--border-mid); }
.announcement-item.pinned { border-left-color: var(--desert-gold); }
.announcement-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.announcement-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--white);
}
.announcement-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.announcement-preview {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.announcement-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: none;
}
.announcement-item.expanded .announcement-body { display: block; }
.announcement-item.expanded .announcement-preview { display: none; }
.pin-icon {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: var(--desert-gold);
  text-transform: uppercase;
  background: rgba(184,145,90,0.1);
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(184,145,90,0.2);
}

/* -------------------- Filter Tabs -------------------- */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.filter-tab {
  padding: 0.6rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.filter-tab:hover { color: var(--text-secondary); }
.filter-tab.active {
  color: var(--desert-gold);
  border-bottom-color: var(--desert-gold);
}

/* -------------------- Updates Cards -------------------- */
.updates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.update-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: border-color var(--transition);
}
.update-card:hover { border-color: rgba(255,255,255,0.1); }
.update-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 1rem;
}
.update-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--white);
}
.update-meta {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.update-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* -------------------- Discussions -------------------- */
.discussions-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
}
.category-sidebar {
  position: sticky;
  top: calc(var(--topbar-h) + 2rem);
  height: fit-content;
}
.category-link {
  display: block;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}
.category-link:hover { color: var(--text-secondary); }
.category-link.active {
  color: var(--desert-gold);
  border-left-color: var(--desert-gold);
}

.thread-list { display: flex; flex-direction: column; gap: 0.75rem; }
.thread-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.thread-item:hover {
  border-color: rgba(255,255,255,0.1);
  background: var(--card-bg-hover);
}
.thread-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.thread-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
}
.thread-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.thread-preview {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.25rem;
}
.unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--desert-gold);
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}

.thread-detail {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-top: -0.75rem;
}
.thread-detail.open { display: block; }
.reply-list { margin-bottom: 1.5rem; }
.reply-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
}
.reply-item:last-child { border-bottom: none; }
.reply-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}
.reply-author {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}
.reply-form textarea {
  width: 100%;
  min-height: 80px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-mid);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
  margin-bottom: 0.75rem;
}
.reply-form textarea:focus { border-color: var(--desert-gold); }

.btn-create-thread {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: rgba(184,145,90,0.1);
  border: 1px solid rgba(184,145,90,0.3);
  color: var(--desert-gold);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-create-thread:hover { background: rgba(184,145,90,0.18); border-color: var(--desert-gold); }

/* -------------------- Directory -------------------- */
.directory-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.search-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-mid);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 0.65rem 1rem;
  outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--desert-gold); }
.search-input::placeholder { color: var(--text-muted); }
.role-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-mid);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  padding: 0.65rem 1rem;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}
.role-select:focus { border-color: var(--desert-gold); }
.role-select option { background: #111; color: var(--white); }

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.member-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  transition: border-color var(--transition);
}
.member-card:hover { border-color: rgba(255,255,255,0.1); }
.member-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--royal-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  margin: 0 auto 0.875rem;
}
.member-card-name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.member-card-location {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.5rem;
}
.member-card-since {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* -------------------- Founders Updates -------------------- */
.founders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}
.founders-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: border-color var(--transition);
}
.founders-card:hover { border-color: rgba(255,255,255,0.1); }
.founders-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.founders-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--white);
}
.founders-card-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 0.75rem;
}
.founders-card-meta {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* -------------------- Modal -------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: #0E0E0E;
  border: 1px solid var(--border-mid);
  max-width: 560px;
  width: 100%;
  padding: 2.5rem;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.3s ease;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color var(--transition);
  line-height: 1;
  padding: 0.25rem;
}
.modal-close:hover { color: var(--white); }
.modal-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.modal-subtitle {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

/* Onboarding steps */
.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 2rem;
}
.onboarding-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.step-num {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(184,145,90,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--desert-gold);
  flex-shrink: 0;
}
.step-content .step-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.2rem;
}
.step-content .step-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* -------------------- Full-width sections -------------------- */
.section-block {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.section-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

/* -------------------- Loading State -------------------- */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 2px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.loading-text {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
  padding: 2rem;
}

/* -------------------- Overlay / Sidebar mobile -------------------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 99;
}

/* -------------------- Mobile Responsive -------------------- */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .events-strip { grid-template-columns: 1fr 1fr; }
  .resources-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 101;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .portal-main { margin-left: 0; }
  .hamburger-btn { display: flex; }
  .portal-content { padding: 1.25rem; }
  .portal-topbar { padding: 0 1.25rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .events-strip { grid-template-columns: 1fr; }
  .resources-grid { grid-template-columns: 1fr; }
  .discussions-layout { grid-template-columns: 1fr; }
  .category-sidebar { position: static; }
  .members-grid { grid-template-columns: repeat(2, 1fr); }
  .founders-grid { grid-template-columns: 1fr; }
  .directory-controls { flex-direction: column; }
  .filter-tabs { flex-wrap: wrap; }
  .topbar-member-since { display: none; }
}

@media (max-width: 480px) {
  .members-grid { grid-template-columns: 1fr; }
  .login-card { padding: 2rem 1.5rem; }
}

/* -------------------- Utilities -------------------- */
.text-gold { color: var(--desert-gold); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.hidden { display: none !important; }
[data-role] { display: none; }

/* ============================================================
   SUPPLEMENTAL STYLES — Events, Resources, Directory, Founder
   ============================================================ */

/* -------------------- Events Page (full list view) -------------------- */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.event-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
}
.event-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 0.625rem 0.75rem;
  border: 1px solid rgba(184,145,90,0.3);
  background: rgba(184,145,90,0.06);
  flex-shrink: 0;
}
.event-day {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--desert-gold);
  line-height: 1;
}
.event-month {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: var(--desert-gold);
  text-transform: uppercase;
  margin-top: 2px;
}
.event-body {
  flex: 1;
  min-width: 0;
}
.event-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.35rem 0 0.6rem;
}
.event-time {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.event-rsvp {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.btn-going {
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid rgba(30,74,59,0.4);
  color: #3A8060;
  background: rgba(30,74,59,0.12);
  cursor: default;
}

/* -------------------- Resources — horizontal card layout -------------------- */
.resource-card {
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}
.resource-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  width: 44px;
  text-align: center;
}
.resource-info { flex: 1; min-width: 0; }
.resource-cat {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.resource-date {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.resource-action { flex-shrink: 0; }
.btn-download.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* -------------------- Directory -------------------- */
.directory-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.directory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.member-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(30,74,59,0.2);
  border: 1px solid rgba(30,74,59,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--desert-green);
  margin: 0 auto 0.75rem;
}
.member-card-avatar.investor {
  background: rgba(192,192,192,0.08);
  border-color: rgba(192,192,192,0.25);
  color: #B8B8B8;
}
.member-card-avatar.designer,
.member-card-avatar.core-board {
  background: rgba(184,145,90,0.1);
  border-color: rgba(184,145,90,0.3);
  color: var(--desert-gold);
}
.member-card {
  text-align: center;
  padding: 1.5rem 1rem;
}
.member-card-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.member-card-location {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}
.member-card-since {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.4rem;
}

/* -------------------- Founder's Updates -------------------- */
.founders-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.founder-page-header {
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.founder-header-badge {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.founder-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  transition: border-color var(--transition);
}
.founder-card:hover { border-color: rgba(255,255,255,0.1); }
.founder-card-type-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 48px;
  text-align: center;
  padding-top: 2px;
}
.founder-card-content { flex: 1; min-width: 0; }
.founder-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.founder-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--white);
  flex: 1;
}
.founder-card-date {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.founder-card-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.founder-card-link {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--desert-gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(184,145,90,0.3);
  padding-bottom: 1px;
  transition: border-color var(--transition);
}
.founder-card-link:hover { border-color: var(--desert-gold); }

/* -------------------- Responsive additions -------------------- */
@media (max-width: 900px) {
  .directory-grid { grid-template-columns: repeat(2, 1fr); }
  .event-card { flex-wrap: wrap; }
  .event-rsvp { width: 100%; }
  .resource-card { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .directory-grid { grid-template-columns: 1fr 1fr; }
  .event-date-block { display: none; }
}

/* ============================================================
   DASHBOARD — Compact Event Row + Resource Row
   ============================================================ */

.dash-event-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background var(--transition);
}
.dash-event-row:last-child { border-bottom: none; }
.dash-event-row:hover { background: rgba(255,255,255,0.02); }

.dash-event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
  flex-shrink: 0;
}
.dash-event-day {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--desert-gold);
  line-height: 1;
}
.dash-event-mon {
  font-family: var(--font-mono);
  font-size: 0.45rem;
  letter-spacing: 0.2em;
  color: rgba(184,145,90,0.6);
  text-transform: uppercase;
}
.dash-event-info { flex: 1; min-width: 0; }
.dash-event-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-event-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.dash-event-datestr {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.dash-event-rsvp {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--desert-gold);
  text-decoration: none;
  border: 1px solid rgba(184,145,90,0.3);
  padding: 0.35rem 0.75rem;
  transition: all var(--transition);
  white-space: nowrap;
}
.dash-event-rsvp:hover {
  background: rgba(184,145,90,0.08);
  border-color: var(--desert-gold);
}

/* -------------------- Dashboard Resource Rows -------------------- */
.dash-resource-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background var(--transition);
}
.dash-resource-row:last-child { border-bottom: none; }
.dash-resource-row:hover { background: rgba(255,255,255,0.02); }

.dash-resource-icon {
  font-size: 1.375rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.dash-resource-info { flex: 1; min-width: 0; }
.dash-resource-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-resource-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dash-resource-date {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
}
.dash-resource-dl {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  transition: all var(--transition);
}
.dash-resource-dl:hover {
  border-color: rgba(184,145,90,0.4);
  color: var(--desert-gold);
}
.dash-resource-soon {
  font-family: var(--font-mono);
  font-size: 0.45rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Update resources-grid on dashboard to single column list */
#recentResources.resources-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

/* ============================================================
   DASHBOARD — Announcement Card + Mini Events (col 1)
   ============================================================ */

.dash-announcement {
  background: rgba(184,145,90,0.04);
  border: 1px solid rgba(184,145,90,0.18);
  border-left: 3px solid var(--desert-gold);
  padding: 1.25rem;
}
.dash-announce-pin {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--desert-gold);
  margin-bottom: 0.5rem;
}
.dash-announce-title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 0.3rem;
}
.dash-announce-date {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.dash-announce-body {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.dash-announce-link {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--desert-gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(184,145,90,0.3);
  padding-bottom: 1px;
  transition: border-color var(--transition);
}
.dash-announce-link:hover { border-color: var(--desert-gold); }

/* -------------------- Mini Events (col 1) -------------------- */
.dash-events-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
}
.dash-mini-event {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background var(--transition);
}
.dash-mini-event:last-child { border-bottom: none; }
.dash-mini-event:hover { background: rgba(255,255,255,0.02); }
.dash-mini-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 34px;
  flex-shrink: 0;
}
.dash-mini-day {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--desert-gold);
  line-height: 1;
}
.dash-mini-mon {
  font-family: var(--font-mono);
  font-size: 0.4rem;
  letter-spacing: 0.2em;
  color: rgba(184,145,90,0.55);
  text-transform: uppercase;
}
.dash-mini-info { flex: 1; min-width: 0; }
.dash-mini-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-mini-badge { line-height: 1; }

/* ============================================================
   SETTINGS PAGE
   ============================================================ */

.settings-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 680px;
}

.settings-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 2rem;
}

.settings-card-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.settings-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.settings-card-sub {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.settings-save-btn {
  margin-top: 0.5rem;
  width: auto;
  padding: 0.625rem 1.75rem;
  font-size: 0.75rem;
}

.settings-role-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.settings-role-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ────────────────────────────────
   Notification Rows
──────────────────────────────── */

.notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.notif-info { flex: 1; }

.notif-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.2rem;
}

.notif-desc {
  font-size: 0.775rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ────────────────────────────────
   Toggle Switch
──────────────────────────────── */

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  transition: background var(--transition), border-color var(--transition);
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}

.toggle-switch input:checked + .toggle-track {
  background: rgba(30,74,59,0.7);
  border-color: var(--royal-green-light);
}

.toggle-switch input:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
  background: #4ade80;
}

/* ────────────────────────────────
   Account rows
──────────────────────────────── */

.settings-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.btn-secondary {
  padding: 0.5rem 1.25rem;
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn-secondary:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--white);
}

/* ============================================================
   ANALYTICS WIDGET (Dashboard — Admin Only)
   ============================================================ */

.analytics-block {
  margin-top: 0;
}

.analytics-period {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .analytics-grid { grid-template-columns: repeat(2, 1fr); }
}

.analytics-stat {
  background: var(--card-bg);
  padding: 1.25rem 1rem;
  text-align: center;
}

.analytics-stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: var(--desert-gold);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.analytics-stat-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ────────────────────────────────
   Analytics bar tables
──────────────────────────────── */

.analytics-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 680px) {
  .analytics-tables { grid-template-columns: 1fr; }
}

.analytics-table-block {}

.analytics-table-title {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.analytics-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.analytics-row:last-child { border-bottom: none; }

.analytics-row-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  width: 120px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-row-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  overflow: hidden;
}

.analytics-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--royal-green), var(--royal-green-light));
  border-radius: 2px;
  min-width: 4px;
  transition: width 0.6s ease;
}

.analytics-row-count {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--desert-gold);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

/* ============================================================
   ADMIN ACTIONS (inline management buttons on cards)
   ============================================================ */

.admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
}

.admin-btn {
  padding: 0.35rem 0.875rem;
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.admin-btn:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--white);
}

.admin-btn--danger {
  border-color: rgba(220, 60, 60, 0.3);
  color: rgba(220, 60, 60, 0.7);
}

.admin-btn--danger:hover {
  border-color: rgba(220, 60, 60, 0.7);
  color: rgb(220, 60, 60);
}

/* -- Avatar Upload -------------------------------- */
.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}
.avatar-preview-wrap { flex-shrink: 0; }
.member-avatar--lg {
  width: 72px !important;
  height: 72px !important;
  font-size: 1.4rem !important;
  overflow: hidden;
}
.avatar-upload-controls { display: flex; flex-direction: column; align-items: flex-start; }

/* -- DFC Logo Image (Portal) ------------------- */
.nav-logo-img--portal {
    height: 40px;
    width: auto;
    display: block;
    margin-bottom: 4px;
}
.sidebar-logo .logo-tag {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}


/* ============================================================
   Arabic / RTL Overrides  (html.ar class set by portal-i18n.js)
   ============================================================ */

html.ar {
  direction: rtl;
}

/* Sidebar flips to right side */
html.ar .sidebar {
  right: 0;
  left: auto;
  border-right: none;
  border-left: 1px solid var(--border);
}

html.ar .portal-main {
  margin-left: 0;
  margin-right: 260px;
}

html.ar .sidebar-nav a {
  flex-direction: row-reverse;
}

html.ar .nav-icon {
  margin-right: 0;
  margin-left: 0.75rem;
}

html.ar .sidebar-member-info {
  flex-direction: row-reverse;
}

html.ar .btn-logout {
  flex-direction: row-reverse;
}

/* Topbar */
html.ar .topbar-left {
  flex-direction: row-reverse;
}

html.ar .topbar-right {
  flex-direction: row-reverse;
}

html.ar .topbar-welcome {
  direction: rtl;
}

/* Page header */
html.ar .page-header {
  text-align: right;
}

html.ar .page-header[style*="justify-content"] {
  flex-direction: row-reverse;
}

/* Forms */
html.ar .form-label {
  text-align: right;
  display: block;
}

html.ar .form-row-inline {
  flex-direction: row-reverse;
}

/* Modals */
html.ar .modal {
  text-align: right;
}

/* Dashboard */
html.ar .dashboard-grid {
  direction: rtl;
}

html.ar .section-block-header {
  flex-direction: row-reverse;
}

html.ar .dash-event-row {
  flex-direction: row-reverse;
}

html.ar .dash-mini-event {
  flex-direction: row-reverse;
}

html.ar .dash-resource-row {
  flex-direction: row-reverse;
}

html.ar .quick-links {
  direction: rtl;
}

html.ar .analytics-row {
  flex-direction: row-reverse;
}

html.ar .analytics-tables {
  direction: rtl;
}

html.ar .onboarding-step {
  flex-direction: row-reverse;
  text-align: right;
}

/* Announcements */
html.ar .announcement-header {
  flex-direction: row-reverse;
}

html.ar .admin-actions {
  justify-content: flex-end;
}

/* Discussions */
html.ar .discussions-layout {
  flex-direction: row-reverse;
}

html.ar .thread-meta {
  flex-direction: row-reverse;
}

html.ar .thread-header {
  flex-direction: row-reverse;
}

html.ar .reply-item {
  flex-direction: row-reverse;
}

/* Resources */
html.ar .resource-card {
  flex-direction: row-reverse;
}

html.ar .resource-meta {
  flex-direction: row-reverse;
}

html.ar .filter-tabs {
  direction: rtl;
}

/* Directory */
html.ar .directory-controls {
  flex-direction: row-reverse;
}

html.ar .member-card {
  text-align: center;
}

/* Events */
html.ar .event-card {
  flex-direction: row-reverse;
}

html.ar .event-body {
  text-align: right;
}

html.ar .event-meta {
  flex-direction: row-reverse;
}

/* Founder updates */
html.ar .founder-card {
  flex-direction: row-reverse;
}

html.ar .founder-card-content {
  text-align: right;
}

html.ar .founder-card-header {
  flex-direction: row-reverse;
}

/* Project updates */
html.ar .update-card {
  text-align: right;
}

html.ar .update-header {
  flex-direction: row-reverse;
}

/* Settings */
html.ar .settings-layout {
  direction: rtl;
}

html.ar .notif-row {
  flex-direction: row-reverse;
}

html.ar .settings-account-row {
  flex-direction: row-reverse;
}

html.ar .avatar-upload-row {
  flex-direction: row-reverse;
}

html.ar .settings-card-header {
  text-align: right;
}

/* Applications */
html.ar .app-header {
  flex-direction: row-reverse;
}

html.ar .app-actions {
  flex-direction: row-reverse;
}

html.ar .app-field {
  text-align: right;
}

html.ar .app-meta {
  flex-direction: row-reverse;
}

html.ar .app-stats {
  flex-direction: row-reverse;
}

/* Login */
html.ar .login-footer {
  direction: rtl;
}

/* Language toggle button */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  margin-left: 0.75rem;
  line-height: 1;
  white-space: nowrap;
}

.lang-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

html.ar .lang-toggle {
  margin-left: 0;
  margin-right: 0.75rem;
}

/* Login-page fixed language toggle */
.login-lang-toggle {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  right: auto;
  z-index: 200;
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.login-lang-toggle:hover {
  background: rgba(184, 145, 90, 0.15);
  border-color: rgba(184, 145, 90, 0.7);
  color: #B8915A;
}

html.ar .login-lang-toggle {
  left: 1.25rem;
  right: auto;
}

/* Mobile RTL adjustments */
@media (max-width: 1024px) {
  html.ar .sidebar {
    right: -260px;
    left: auto;
    transform: none;
  }
  html.ar .sidebar.open {
    right: 0;
    left: auto;
  }
  html.ar .portal-main {
    margin-right: 0;
    margin-left: 0;
  }
}

/* ── Global RTL text alignment ──
   Only set direction here — text-align:right is handled by
   html.ar { direction:rtl } (default start = right in RTL).
   The old wildcard * selector was crushing text-align:center
   on explicitly centred elements, so it has been removed. */
html.ar .portal-content {
  direction: rtl;
}

/* ── Preserve centre-alignment for elements that are
   text-align:center in LTR — must stay centred in RTL ── */

/* Member cards (grid cards) */
html.ar .member-card,
html.ar .member-card * {
  text-align: center;
}

/* Analytics stats */
html.ar .analytics-stat,
html.ar .analytics-stat-value {
  text-align: center;
}

/* Loading / empty-state text */
html.ar .loading-text {
  text-align: center;
}

/* Download button (resource cards) */
html.ar .btn-download {
  text-align: center;
}

/* Icon columns in cards */
html.ar .resource-icon,
html.ar .founder-card-type-icon,
html.ar .dash-resource-icon {
  text-align: center;
}

/* Login logo block */
html.ar .login-logo {
  text-align: center;
}

/* Announcement cards */
html.ar .announcement-item {
  direction: rtl;
  text-align: right;
}
html.ar .announcement-header {
  justify-content: flex-end;
}
html.ar .announcement-preview,
html.ar .announcement-body {
  text-align: right;
}

/* Update cards */
html.ar .update-card {
  direction: rtl;
}
html.ar .update-title {
  text-align: right;
}
html.ar .update-meta {
  text-align: right;
}
html.ar .update-body {
  text-align: right;
}

/* Thread items */
html.ar .thread-item {
  direction: rtl;
}
html.ar .thread-title {
  text-align: right;
}
html.ar .thread-preview {
  text-align: right;
}

/* Founder page header: text-align:center in LTR — keep centred in RTL */
html.ar .founder-page-header {
  text-align: center;
}

/* Founder cards */
html.ar .founder-card-title,
html.ar .founder-card-date,
html.ar .founder-card-body {
  text-align: right;
}

/* Event cards */
html.ar .event-title,
html.ar .event-desc {
  text-align: right;
}

/* Resource cards */
html.ar .resource-title,
html.ar .resource-meta {
  text-align: right;
}
html.ar .resource-card {
  direction: rtl;
}

/* Dashboard sections */
html.ar .dash-announce-title,
html.ar .dash-announce-body {
  text-align: right;
}
html.ar .dash-mini-info,
html.ar .dash-event-info,
html.ar .dash-resource-info {
  text-align: right;
}
html.ar .activity-content {
  text-align: right;
}
html.ar .activity-desc,
html.ar .activity-time {
  text-align: right;
}

/* Settings */
html.ar .notif-title,
html.ar .notif-desc {
  text-align: right;
}

/* Modal text */
html.ar .modal-title,
html.ar .modal-subtitle {
  text-align: right;
}
html.ar .step-content,
html.ar .step-title,
html.ar .step-desc {
  text-align: right;
}

/* Login page */
html.ar .login-card {
  direction: rtl;
  text-align: right;
}
/* login-title / login-sub / login-footer are text-align:center in LTR — keep centred */
html.ar .login-title,
html.ar .login-sub,
html.ar .login-footer {
  text-align: center;
}
html.ar .form-checkbox {
  flex-direction: row-reverse;
  justify-content: flex-end;
}
html.ar .form-row-inline {
  text-align: right;
}

/* Admin actions always LTR (buttons look better) */
html.ar .admin-actions {
  direction: ltr;
  text-align: left;
  justify-content: flex-start;
}

/* Sidebar text */
html.ar .sidebar-member-name,
html.ar .sidebar-member-role {
  text-align: right;
}
html.ar .logo-tag {
  text-align: right;
}

/* Applications page */
html.ar .app-name,
html.ar .app-email,
html.ar .app-field {
  text-align: right;
}
html.ar .notes-label {
  text-align: right;
}
html.ar .notif-info {
  text-align: right;
}

/* Settings card */
html.ar .settings-card {
  direction: rtl;
}

/* RTL Overrides — auto-generated */

/* Sidebar active indicator: left:0 → right:0 */
html.ar .sidebar-link.active::before {
  left: auto;
  right: 0;
}

/* Activity item: border-left → border-right */
html.ar .activity-item {
  border-left: none;
  border-right: 2px solid var(--border);
}
html.ar .activity-item:hover {
  border-right-color: var(--desert-gold);
  border-left-color: transparent;
}

/* Announcement item: border-left → border-right */
html.ar .announcement-item {
  border-left: none;
  border-right: 3px solid transparent;
}
html.ar .announcement-item:hover {
  border-right-color: var(--border-mid);
}
html.ar .announcement-item.pinned {
  border-right-color: var(--desert-gold);
}

/* Dash announcement: border-left → border-right */
html.ar .dash-announcement {
  border-left: none;
  border-right: 3px solid var(--desert-gold);
}

/* Category link: border-left → border-right */
html.ar .category-link {
  border-left: none;
  border-right: 2px solid transparent;
}
html.ar .category-link.active {
  border-right-color: var(--desert-gold);
}

/* Unread dot: right:1.25rem → left:1.25rem */
html.ar .unread-dot {
  right: auto;
  left: 1.25rem;
}

/* Modal close button: right:1.5rem → left:1.5rem */
html.ar .modal-close {
  right: auto;
  left: 1.5rem;
}

/* Select dropdown: background-position right → left */
html.ar select.form-input {
  background-position: left 0.85rem center;
  padding-right: 1rem;
  padding-left: 2.5rem;
}

/* Login corner positions: swap tl/tr/bl/br */
html.ar .login-corner--tl { left: auto; right: 24px; }
html.ar .login-corner--tl::before { left: auto; right: 0; }
html.ar .login-corner--tl::after  { left: auto; right: 0; }
html.ar .login-corner--tr { right: auto; left: 24px; }
html.ar .login-corner--tr::before { right: auto; left: 0; }
html.ar .login-corner--tr::after  { right: auto; left: 0; }
html.ar .login-corner--bl { left: auto; right: 24px; }
html.ar .login-corner--bl::before { left: auto; right: 0; }
html.ar .login-corner--bl::after  { left: auto; right: 0; }
html.ar .login-corner--br { right: auto; left: 24px; }
html.ar .login-corner--br::before { right: auto; left: 0; }
html.ar .login-corner--br::after  { right: auto; left: 0; }

/* lang-toggle: margin-left → margin-right (already set above via html.ar .lang-toggle) */

/* Avatar upload controls: align-items flex-start → flex-end */
html.ar .avatar-upload-controls {
  align-items: flex-end;
}
