/* ==========================================================================
   Ohr Chabad Community Portal — Stylesheet
   A sidebar-based SPA for yishuv community management.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Custom Properties
   -------------------------------------------------------------------------- */

:root {
  --color-primary: #10151D;
  --color-primary-light: #1a2030;
  --color-secondary: #333231;
  --color-gold: #A4832A;
  --color-gold-text: #7B6118;
  --color-gold-dark: #6A5214;
  --color-gold-light: #C4A24E;
  --color-text: #53504C;
  --color-text-light: #6e6b66;
  --color-text-muted: #807c76;
  --color-bg: #ffffff;
  --color-bg-warm: #E8E4DA;
  --color-bg-cream: #F5F3EE;
  --color-bg-dark: #10151D;
  --color-border: #d6d2c9;
  --color-white: #ffffff;
  --color-success: #2e7d52;
  --color-success-bg: #eaf5ef;
  --color-warning: #b8860b;
  --color-warning-bg: #fdf6e3;
  --color-error: #b83232;
  --color-error-bg: #fdeaea;
  --color-info: #2a6496;
  --color-info-bg: #e8f0f8;
  --font-heading: 'Cormorant', Georgia, serif;
  --font-body: 'Quicksand', sans-serif;
  --font-display: 'Poppins', sans-serif;
  --max-width: 1200px;
  --header-height: 60px;
  --sidebar-width: 260px;
  --sidebar-collapsed: 70px;
  --transition: 0.3s ease;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --radius: 3px;
  --radius-lg: 6px;
}


/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-gold-dark);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}


/* --------------------------------------------------------------------------
   3. Hebrew Mark
   -------------------------------------------------------------------------- */

.bsd {
  position: fixed;
  top: 8px;
  right: 14px;
  font-family: 'Alef', serif;
  font-size: 13px;
  color: var(--color-text-muted);
  z-index: 9999;
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
  line-height: 1;
}


/* --------------------------------------------------------------------------
   4. Login Screen
   -------------------------------------------------------------------------- */

.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-cream);
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(164, 131, 42, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(16, 21, 29, 0.03) 0%, transparent 60%);
  padding: 20px;
}

.login__card {
  width: 100%;
  max-width: 400px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 48px 40px 40px;
  text-align: center;
}

.login__brand {
  margin-bottom: 32px;
}

.login__logo-img {
  display: block;
  margin: 0 auto 12px;
  max-width: 280px;
  height: auto;
}

.login__subtitle {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 300;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.login__desc {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 28px;
}

.login__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.login__btn:hover {
  background: var(--color-bg-cream);
  border-color: var(--color-text-muted);
  box-shadow: var(--shadow-sm);
}

.login__btn:active {
  transform: scale(0.99);
}

.login__google-icon {
  flex-shrink: 0;
}

.login__note {
  margin-top: 20px;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}


/* --------------------------------------------------------------------------
   5. App Layout
   -------------------------------------------------------------------------- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "sidebar content"
    "sidebar content";
  min-height: 100vh;
}


/* --------------------------------------------------------------------------
   6. Sidebar
   -------------------------------------------------------------------------- */

.sidebar {
  grid-area: sidebar;
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: var(--color-primary);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
}

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

.sidebar__logo-link {
  display: block;
  text-decoration: none;
}

.sidebar__logo-link:hover {
  opacity: 0.85;
}

.sidebar__logo-img {
  display: block;
  max-width: 160px;
  height: auto;
}

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

.sidebar__menu {
  list-style: none;
  padding: 0 8px;
}

.sidebar__section-label {
  padding: 8px 16px 6px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 2px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
  border-left: 3px solid transparent;
}

.sidebar__link:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar__link.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--color-gold);
}

.sidebar__link.active .sidebar__icon {
  color: var(--color-gold);
}

.sidebar__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition), color var(--transition);
}

.sidebar__link:hover .sidebar__icon {
  opacity: 1;
}

.sidebar__link.active .sidebar__icon {
  opacity: 1;
}

.sidebar__badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--color-gold);
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  line-height: 20px;
  text-align: center;
}

.sidebar__divider {
  height: 1px;
  margin: 8px 20px;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar__menu--admin {
  padding-top: 4px;
}

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

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border-radius: var(--radius);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition);
}

.sidebar__user:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar__user-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sidebar__user-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.sidebar__user-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: capitalize;
  line-height: 1.3;
}

.sidebar__logout {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.4);
  transition: all var(--transition);
}

.sidebar__logout:hover {
  color: var(--color-error);
  background: rgba(255, 255, 255, 0.05);
}


/* --------------------------------------------------------------------------
   7. Mobile Header
   -------------------------------------------------------------------------- */

.app-header {
  display: none;
  grid-area: content;
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--header-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 0 16px;
  align-items: center;
  gap: 12px;
}

.app-header__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: var(--color-secondary);
  transition: background var(--transition);
}

.app-header__toggle:hover {
  background: var(--color-bg-cream);
}

.app-header__title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-primary);
  letter-spacing: 0.5px;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-header__notif {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: var(--color-text);
  transition: background var(--transition);
}

.app-header__notif:hover {
  background: var(--color-bg-cream);
}

.app-header__notif-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-error);
  border: 2px solid var(--color-white);
}


/* --------------------------------------------------------------------------
   8. Sidebar Overlay (mobile)
   -------------------------------------------------------------------------- */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(16, 21, 29, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}


/* --------------------------------------------------------------------------
   9. Main Content
   -------------------------------------------------------------------------- */

.app-content {
  grid-area: content;
  padding: 32px 40px;
  min-height: 100vh;
  overflow-y: auto;
}

.app-content__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

/* Page wrapper used by rendered pages */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  animation: pageIn 0.25s ease;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page__header {
  margin-bottom: 28px;
}

.page__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page__subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 4px;
}


/* --------------------------------------------------------------------------
   10. Typography
   -------------------------------------------------------------------------- */

h1, .h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 300;
  color: var(--color-primary);
  line-height: 1.2;
  letter-spacing: 0.5px;
}

h2, .h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  line-height: 1.4;
}

h3, .h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-secondary);
  line-height: 1.4;
}

h4, .h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.4;
}

p {
  margin-bottom: 16px;
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

small, .text-sm {
  font-size: 13px;
}

.text-xs {
  font-size: 11px;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-gold {
  color: var(--color-gold);
}

.text-success {
  color: var(--color-success);
}

.text-error {
  color: var(--color-error);
}

.text-warning {
  color: var(--color-warning);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 1px;
}

.font-heading {
  font-family: var(--font-heading);
}

.font-display {
  font-family: var(--font-display);
}


/* --------------------------------------------------------------------------
   11. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary button — gold bg, white text */
.btn--primary {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}

.btn--primary:hover {
  background: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
}

.btn--primary:active {
  background: var(--color-gold-dark);
  color: var(--color-white);
  border-color: var(--color-gold-dark);
}

/* Secondary button — outlined */
.btn--secondary {
  background: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
}

.btn--secondary:hover {
  background: var(--color-gold);
  color: var(--color-white);
}

.btn--secondary:active {
  background: var(--color-gold-dark);
  color: var(--color-white);
  border-color: var(--color-gold-dark);
}

/* Ghost button — minimal, no border */
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: transparent;
  letter-spacing: 0.5px;
}

.btn--ghost:hover {
  background: var(--color-bg-cream);
  color: var(--color-primary);
}

/* Danger button */
.btn--danger {
  background: var(--color-error);
  color: var(--color-white);
  border-color: var(--color-error);
}

.btn--danger:hover {
  background: transparent;
  color: var(--color-error);
  border-color: var(--color-error);
}

/* Success button */
.btn--success {
  background: var(--color-success);
  color: var(--color-white);
  border-color: var(--color-success);
}

.btn--success:hover {
  background: transparent;
  color: var(--color-success);
  border-color: var(--color-success);
}

/* Small button */
.btn--sm {
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 1px;
}

/* Large button */
.btn--lg {
  padding: 14px 32px;
  font-size: 14px;
}

/* Icon-only button */
.btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
}

.btn--icon.btn--sm {
  width: 30px;
  height: 30px;
}

/* Button group */
.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}


/* --------------------------------------------------------------------------
   12. Forms
   -------------------------------------------------------------------------- */

.form-group {
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-label--required::after {
  content: ' *';
  color: var(--color-error);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-secondary);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(164, 131, 42, 0.1);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background: var(--color-bg-cream);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.form-input--error,
.form-select--error,
.form-textarea--error {
  border-color: var(--color-error);
}

.form-input--error:focus,
.form-select--error:focus,
.form-textarea--error:focus {
  box-shadow: 0 0 0 3px rgba(184, 50, 50, 0.1);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

.form-select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2353504C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.form-error {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-error);
  line-height: 1.4;
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  cursor: pointer;
}

.form-check__input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid var(--color-border);
  border-radius: 2px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  background: var(--color-white);
}

.form-check__input[type="radio"] {
  border-radius: 50%;
}

.form-check__input:checked {
  background: var(--color-gold);
  border-color: var(--color-gold);
}

.form-check__input:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 4px;
  height: 8px;
  border: solid var(--color-white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-check__input[type="radio"]:checked::after {
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 50%;
  background: var(--color-white);
  transform: none;
}

.form-check__input:focus {
  box-shadow: 0 0 0 3px rgba(164, 131, 42, 0.15);
}

.form-check__label {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.5;
  cursor: pointer;
}

/* Toggle switch */
.form-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.form-toggle__track {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--color-border);
  border-radius: 11px;
  transition: background var(--transition);
  flex-shrink: 0;
}

.form-toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.form-toggle__input:checked + .form-toggle__track {
  background: var(--color-gold);
}

.form-toggle__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--color-white);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform var(--transition);
}

.form-toggle__input:checked + .form-toggle__track::after {
  transform: translateX(18px);
}

.form-toggle__label {
  font-size: 14px;
  color: var(--color-text);
}

/* Inline form row */
.form-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.form-row > .form-group {
  flex: 1;
}

/* Search input */
.form-search {
  position: relative;
}

.form-search .form-input {
  padding-left: 38px;
}

.form-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  pointer-events: none;
}


/* --------------------------------------------------------------------------
   13. Cards
   -------------------------------------------------------------------------- */

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card--flat {
  box-shadow: none;
  border: 1px solid var(--color-border);
}

.card--flat:hover {
  box-shadow: none;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.card__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card__body {
  /* No special styles needed */
}

.card__footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* Compact card variant */
.card--compact {
  padding: 16px;
}

.card--compact .card__header {
  margin-bottom: 12px;
  padding-bottom: 12px;
}

/* Clickable card */
.card--clickable {
  cursor: pointer;
}

.card--clickable:hover {
  box-shadow: var(--shadow-md);
}

.card--clickable:active {
  transform: translateY(1px);
}


/* --------------------------------------------------------------------------
   14. Data Table
   -------------------------------------------------------------------------- */

.data-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  padding: 12px 16px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
  user-select: none;
}

.data-table th.sortable {
  cursor: pointer;
  position: relative;
  padding-right: 28px;
}

.data-table th.sortable::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--color-border);
  transition: all var(--transition);
}

.data-table th.sortable:hover::after {
  border-top-color: var(--color-text-muted);
}

.data-table th.sorted-asc::after {
  border-top: none;
  border-bottom: 5px solid var(--color-gold);
}

.data-table th.sorted-desc::after {
  border-top-color: var(--color-gold);
}

.data-table td {
  padding: 12px 16px;
  color: var(--color-text);
  border-bottom: 1px solid rgba(214, 210, 201, 0.5);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(245, 243, 238, 0.5);
}

.data-table tbody tr:hover {
  background: rgba(232, 228, 218, 0.4);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Row actions */
.data-table__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.data-table__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  transition: all var(--transition);
}

.data-table__action:hover {
  color: var(--color-gold);
  background: var(--color-bg-cream);
}

.data-table__action--danger:hover {
  color: var(--color-error);
  background: var(--color-error-bg);
}

/* Empty state */
.data-table__empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--color-text-muted);
}

.data-table__empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--color-border);
}

.data-table__empty-text {
  font-size: 14px;
}


/* --------------------------------------------------------------------------
   15. Badges & Status
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.badge--active,
.badge--success,
.badge--paid {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.badge--pending,
.badge--warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.badge--overdue,
.badge--error,
.badge--rejected {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.badge--info,
.badge--new {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.badge--neutral {
  background: var(--color-bg-cream);
  color: var(--color-text-muted);
}

.badge--gold {
  background: rgba(164, 131, 42, 0.1);
  color: var(--color-gold-text);
}

/* Dot-style status indicator */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text);
}

.status-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot--active::before {
  background: var(--color-success);
}

.status-dot--pending::before {
  background: var(--color-warning);
}

.status-dot--overdue::before {
  background: var(--color-error);
}

.status-dot--info::before {
  background: var(--color-info);
}

.status-dot--inactive::before {
  background: var(--color-text-muted);
}


/* --------------------------------------------------------------------------
   16. Toast Notifications
   -------------------------------------------------------------------------- */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
  max-width: 380px;
  width: 100%;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--color-border);
  pointer-events: auto;
  animation: toastIn 0.35s ease;
  transition: all 0.25s ease;
  min-width: 280px;
}

.toast.removing {
  animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
}

.toast--success {
  border-left-color: var(--color-success);
}

.toast--error {
  border-left-color: var(--color-error);
}

.toast--warning {
  border-left-color: var(--color-warning);
}

.toast--info {
  border-left-color: var(--color-info);
}

.toast__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.toast--success .toast__icon {
  color: var(--color-success);
}

.toast--error .toast__icon {
  color: var(--color-error);
}

.toast--warning .toast__icon {
  color: var(--color-warning);
}

.toast--info .toast__icon {
  color: var(--color-info);
}

.toast__content {
  flex: 1;
  min-width: 0;
}

.toast__title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 2px;
  line-height: 1.4;
}

.toast__message {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.4;
}

.toast__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  transition: all var(--transition);
  margin: -2px -4px 0 0;
}

.toast__close:hover {
  color: var(--color-text);
  background: var(--color-bg-cream);
}


/* --------------------------------------------------------------------------
   17. Modal
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 21, 29, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 24px;
  animation: modalBgIn 0.2s ease;
}

.modal-backdrop.closing {
  animation: modalBgOut 0.2s ease forwards;
}

@keyframes modalBgIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalBgOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.modal {
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: modalIn 0.25s ease;
  overflow: hidden;
}

.modal-backdrop.closing .modal {
  animation: modalOut 0.2s ease forwards;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}

.modal--sm {
  max-width: 420px;
}

.modal--lg {
  max-width: 800px;
}

.modal--full {
  max-width: 95vw;
  max-height: 90vh;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.modal__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}

.modal__close:hover {
  color: var(--color-text);
  background: var(--color-bg-cream);
}

.modal__body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* Confirm dialog variant */
.modal--confirm .modal__body {
  text-align: center;
  padding: 32px 24px;
}

.modal--confirm .modal__footer {
  justify-content: center;
}


/* --------------------------------------------------------------------------
   18. Spinner / Loading
   -------------------------------------------------------------------------- */

.spinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--color-border);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner--sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.spinner--lg {
  width: 48px;
  height: 48px;
  border-width: 3px;
}

.spinner--white {
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: var(--color-white);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Loading overlay for sections */
.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px;
  color: var(--color-text-muted);
}

.loading-overlay__text {
  font-size: 13px;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--color-bg-cream) 25%, rgba(255, 255, 255, 0.6) 50%, var(--color-bg-cream) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

.skeleton--text {
  height: 14px;
  margin-bottom: 10px;
  width: 80%;
}

.skeleton--text:last-child {
  width: 50%;
}

.skeleton--title {
  height: 24px;
  width: 40%;
  margin-bottom: 16px;
}

.skeleton--avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton--card {
  height: 120px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}


/* --------------------------------------------------------------------------
   19. Dashboard
   -------------------------------------------------------------------------- */

/* Stats grid */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-card__label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 400;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.stat-card__value {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 300;
  color: var(--color-primary);
  line-height: 1.1;
}

.stat-card__change {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-card__change--up {
  color: var(--color-success);
}

.stat-card__change--down {
  color: var(--color-error);
}

.stat-card__icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: var(--radius);
  margin-bottom: 4px;
}

.stat-card__icon--gold {
  background: rgba(164, 131, 42, 0.1);
  color: var(--color-gold);
}

.stat-card__icon--success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.stat-card__icon--info {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.stat-card__icon--warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

/* Dashboard grid layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.dashboard-grid--full {
  grid-template-columns: 1fr;
}

/* Announcement feed on dashboard */
.announcement-feed {
  list-style: none;
}

.announcement-feed__item {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.announcement-feed__item:last-child {
  border-bottom: none;
}

.announcement-feed__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gold);
  flex-shrink: 0;
  margin-top: 6px;
}

.announcement-feed__dot--read {
  background: var(--color-border);
}

.announcement-feed__content {
  flex: 1;
  min-width: 0;
}

.announcement-feed__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-primary);
  margin-bottom: 2px;
  line-height: 1.4;
}

.announcement-feed__meta {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Upcoming events list */
.event-list {
  list-style: none;
}

.event-list__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.event-list__item:last-child {
  border-bottom: none;
}

.event-list__date {
  flex-shrink: 0;
  width: 48px;
  text-align: center;
  padding: 6px 4px;
  background: var(--color-bg-cream);
  border-radius: var(--radius);
}

.event-list__date-month {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.3;
}

.event-list__date-day {
  display: block;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  color: var(--color-primary);
  line-height: 1.2;
}

.event-list__info {
  flex: 1;
  min-width: 0;
}

.event-list__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-primary);
  margin-bottom: 2px;
  line-height: 1.4;
}

.event-list__time {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Quick action links on dashboard */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--color-bg-cream);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  transition: all var(--transition);
}

.quick-action:hover {
  background: var(--color-bg-warm);
  color: var(--color-primary);
}

.quick-action__icon {
  width: 18px;
  height: 18px;
  color: var(--color-gold);
  flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   20. Calendar
   -------------------------------------------------------------------------- */

.calendar {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.calendar__title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  color: var(--color-primary);
}

.calendar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.calendar__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  color: var(--color-text);
  transition: all var(--transition);
}

.calendar__nav-btn:hover {
  background: var(--color-bg-cream);
  color: var(--color-primary);
}

.calendar__today-btn {
  padding: 4px 12px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition);
}

.calendar__today-btn:hover {
  background: rgba(164, 131, 42, 0.08);
}

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar__weekday {
  padding: 10px 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.calendar__day {
  min-height: 90px;
  padding: 6px 8px;
  border-right: 1px solid rgba(214, 210, 201, 0.4);
  border-bottom: 1px solid rgba(214, 210, 201, 0.4);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}

.calendar__day:nth-child(7n) {
  border-right: none;
}

.calendar__day:hover {
  background: var(--color-bg-cream);
}

.calendar__day--outside {
  background: rgba(245, 243, 238, 0.4);
}

.calendar__day--outside .calendar__day-num {
  color: var(--color-border);
}

.calendar__day--today .calendar__day-num {
  background: var(--color-gold);
  color: var(--color-white);
}

.calendar__day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 4px;
}

.calendar__day-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar__event {
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity var(--transition);
}

.calendar__event:hover {
  opacity: 0.85;
}

.calendar__event--community {
  background: rgba(164, 131, 42, 0.15);
  color: var(--color-gold-text);
}

.calendar__event--meeting {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.calendar__event--holiday {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.calendar__event--deadline {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.calendar__event--more {
  font-size: 10px;
  color: var(--color-text-muted);
  padding: 1px 6px;
}


/* --------------------------------------------------------------------------
   21. Financial
   -------------------------------------------------------------------------- */

.finance-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.finance-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.finance-card__label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 400;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.finance-card__amount {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 400;
  color: var(--color-primary);
  line-height: 1.2;
}

.finance-card__amount--positive {
  color: var(--color-success);
}

.finance-card__amount--negative {
  color: var(--color-error);
}

.finance-card__trend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
}

.finance-card__trend--up {
  color: var(--color-success);
}

.finance-card__trend--down {
  color: var(--color-error);
}

/* Chart placeholder */
.chart-placeholder {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-container {
  width: 100%;
  height: 300px;
  position: relative;
}

/* Transaction list */
.transaction-list {
  list-style: none;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-item__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.transaction-item__icon--income {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.transaction-item__icon--expense {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.transaction-item__info {
  flex: 1;
  min-width: 0;
}

.transaction-item__name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-primary);
  line-height: 1.4;
}

.transaction-item__date {
  font-size: 12px;
  color: var(--color-text-muted);
}

.transaction-item__amount {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.transaction-item__amount--income {
  color: var(--color-success);
}

.transaction-item__amount--expense {
  color: var(--color-error);
}

/* Finance filters */
.finance-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.finance-filters .form-select {
  width: auto;
  min-width: 140px;
}


/* --------------------------------------------------------------------------
   22. Announcements
   -------------------------------------------------------------------------- */

.announcements {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.announcement-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  border-left: 4px solid transparent;
  transition: all var(--transition);
}

.announcement-card:hover {
  box-shadow: var(--shadow-md);
}

.announcement-card--unread {
  border-left-color: var(--color-gold);
  background: rgba(255, 255, 255, 1);
}

.announcement-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.announcement-card__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-primary);
  line-height: 1.4;
}

.announcement-card--unread .announcement-card__title {
  font-weight: 600;
}

.announcement-card__badge {
  flex-shrink: 0;
}

.announcement-card__excerpt {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.announcement-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.announcement-card__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.announcement-card__author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.announcement-card__author-img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

/* Announcement detail */
.announcement-detail {
  max-width: 720px;
}

.announcement-detail__header {
  margin-bottom: 24px;
}

.announcement-detail__title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 300;
  color: var(--color-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.announcement-detail__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.announcement-detail__body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text);
}

.announcement-detail__body p {
  margin-bottom: 16px;
}

.announcement-detail__body h3 {
  margin-top: 24px;
  margin-bottom: 12px;
}

/* Category filter pills */
.category-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.category-pill {
  padding: 6px 16px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg-cream);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-pill:hover {
  background: var(--color-bg-warm);
}

.category-pill.active {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}


/* --------------------------------------------------------------------------
   23. Payments
   -------------------------------------------------------------------------- */

.payments-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.payment-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  border-left: 4px solid transparent;
  transition: all var(--transition);
}

.payment-card:hover {
  box-shadow: var(--shadow-md);
}

.payment-card--due {
  border-left-color: var(--color-warning);
}

.payment-card--overdue {
  border-left-color: var(--color-error);
}

.payment-card--paid {
  border-left-color: var(--color-success);
}

.payment-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.payment-card__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-primary);
  line-height: 1.4;
}

.payment-card__amount {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.payment-card__due {
  font-size: 12px;
  color: var(--color-text-muted);
}

.payment-card__due--soon {
  color: var(--color-warning);
  font-weight: 500;
}

.payment-card__due--overdue {
  color: var(--color-error);
  font-weight: 500;
}

.payment-card__actions {
  margin-top: 14px;
}

/* Payment history list */
.payment-history {
  list-style: none;
}

.payment-history__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.payment-history__item:last-child {
  border-bottom: none;
}

.payment-history__info {
  flex: 1;
  min-width: 0;
}

.payment-history__desc {
  font-size: 14px;
  color: var(--color-primary);
  line-height: 1.4;
}

.payment-history__date {
  font-size: 12px;
  color: var(--color-text-muted);
}

.payment-history__amount {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
  white-space: nowrap;
}


/* --------------------------------------------------------------------------
   24. Aguda
   -------------------------------------------------------------------------- */

/* Accordion */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.accordion__item {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-primary);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}

.accordion__trigger:hover {
  background: var(--color-bg-cream);
}

.accordion__trigger-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform var(--transition);
}

.accordion__item.open .accordion__trigger-icon {
  transform: rotate(180deg);
}

.accordion__item.open .accordion__trigger {
  border-bottom: 1px solid var(--color-border);
}

.accordion__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion__item.open .accordion__content {
  max-height: 2000px;
}

.accordion__body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text);
}

.accordion__body p {
  margin-bottom: 12px;
}

.accordion__body ul,
.accordion__body ol {
  margin-bottom: 12px;
  padding-left: 24px;
  list-style: disc;
}

.accordion__body ol {
  list-style: decimal;
}

.accordion__body li {
  margin-bottom: 4px;
}

/* Discussion threads */
.discussion {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.discussion__thread {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.discussion__thread-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.discussion__thread-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.discussion__thread-info {
  flex: 1;
  min-width: 0;
}

.discussion__thread-author {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
  line-height: 1.3;
}

.discussion__thread-time {
  font-size: 12px;
  color: var(--color-text-muted);
}

.discussion__thread-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 12px;
}

.discussion__thread-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.discussion__action {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.discussion__action:hover {
  color: var(--color-gold);
}

/* Replies */
.discussion__replies {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  margin-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.discussion__reply {
  display: flex;
  gap: 10px;
}

.discussion__reply-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.discussion__reply-content {
  flex: 1;
  min-width: 0;
}

.discussion__reply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.discussion__reply-author {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
}

.discussion__reply-time {
  font-size: 11px;
  color: var(--color-text-muted);
}

.discussion__reply-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text);
}

/* New comment form */
.discussion__form {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.discussion__form-input {
  flex: 1;
}

/* Tab navigation for Aguda sections */
.aguda-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 24px;
}

.aguda-tab {
  padding: 10px 20px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.aguda-tab:hover {
  color: var(--color-text);
}

.aguda-tab.active {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
}


/* --------------------------------------------------------------------------
   25. Elections
   -------------------------------------------------------------------------- */

/* Voting booth */
.voting-booth {
  max-width: 600px;
  margin: 0 auto;
}

.voting-booth__card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  text-align: center;
}

.voting-booth__title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 300;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.voting-booth__desc {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}

.voting-booth__deadline {
  font-size: 13px;
  color: var(--color-warning);
  margin-bottom: 24px;
  font-weight: 500;
}

/* Candidate list */
.candidate-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.candidate {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--color-bg-cream);
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.candidate:hover {
  border-color: var(--color-border);
  background: var(--color-white);
}

.candidate.selected {
  border-color: var(--color-gold);
  background: rgba(164, 131, 42, 0.04);
}

.candidate__radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition);
}

.candidate.selected .candidate__radio {
  border-color: var(--color-gold);
}

.candidate.selected .candidate__radio::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gold);
}

.candidate__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.candidate__info {
  flex: 1;
  min-width: 0;
}

.candidate__name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
  line-height: 1.3;
}

.candidate__bio {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

/* Election results bar chart */
.results-chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.result-bar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-bar__name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-primary);
}

.result-bar__votes {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.result-bar__track {
  height: 24px;
  background: var(--color-bg-cream);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.result-bar__fill {
  height: 100%;
  background: var(--color-gold);
  border-radius: var(--radius);
  transition: width 0.8s ease;
  min-width: 2px;
}

.result-bar__fill--winner {
  background: var(--color-success);
}

.result-bar__percentage {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text);
}

/* Election status cards */
.election-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.election-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow var(--transition);
}

.election-card:hover {
  box-shadow: var(--shadow-md);
}

.election-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.election-card__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-primary);
}

.election-card__dates {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.election-card__stats {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--color-text);
}

.election-card__stat-label {
  color: var(--color-text-muted);
  margin-right: 4px;
}


/* --------------------------------------------------------------------------
   26. AI Search
   -------------------------------------------------------------------------- */

.ai-search {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
}

.ai-search__header {
  text-align: center;
  padding: 24px 0 20px;
  flex-shrink: 0;
}

.ai-search__title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 300;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.ai-search__subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Chat messages area */
.ai-search__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-message {
  display: flex;
  gap: 12px;
  max-width: 90%;
  animation: messageIn 0.3s ease;
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-message--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-message--assistant {
  align-self: flex-start;
}

.ai-message__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.ai-message--user .ai-message__avatar {
  background: var(--color-gold);
  color: var(--color-white);
}

.ai-message--assistant .ai-message__avatar {
  background: var(--color-primary);
  color: var(--color-gold);
}

.ai-message__bubble {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.7;
}

.ai-message--user .ai-message__bubble {
  background: var(--color-gold);
  color: var(--color-white);
  border-bottom-right-radius: 2px;
}

.ai-message--assistant .ai-message__bubble {
  background: var(--color-white);
  color: var(--color-text);
  border-bottom-left-radius: 2px;
  box-shadow: var(--shadow-sm);
}

.ai-message__bubble p {
  margin-bottom: 8px;
}

.ai-message__bubble p:last-child {
  margin-bottom: 0;
}

/* Source citations */
.ai-message__sources {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
}

.ai-message__sources-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.ai-message__source {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition);
}

.ai-message__source:hover {
  color: var(--color-gold-dark);
}

.ai-message__source-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
}

/* Typing indicator */
.ai-typing {
  display: flex;
  gap: 4px;
  padding: 8px 0;
  align-items: center;
}

.ai-typing__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: typingBounce 1.4s ease infinite;
}

.ai-typing__dot:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-typing__dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* Input area */
.ai-search__input-area {
  flex-shrink: 0;
  padding: 16px 0 8px;
  border-top: 1px solid var(--color-border);
}

.ai-search__form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.ai-search__input {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-secondary);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  outline: none;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  transition: border-color var(--transition);
}

.ai-search__input:focus {
  border-color: var(--color-gold);
}

.ai-search__input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

.ai-search__send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-gold);
  color: var(--color-white);
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: all var(--transition);
}

.ai-search__send:hover {
  background: var(--color-gold-dark);
}

.ai-search__send:disabled {
  background: var(--color-border);
  cursor: not-allowed;
}

/* Suggested queries */
.ai-search__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 16px 0;
}

.ai-search__suggestion {
  padding: 8px 16px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition);
}

.ai-search__suggestion:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: rgba(164, 131, 42, 0.04);
}


/* --------------------------------------------------------------------------
   27. Profile
   -------------------------------------------------------------------------- */

.profile {
  max-width: 720px;
}

.profile-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  margin-bottom: 24px;
}

.profile-card__header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.profile-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--color-bg-cream);
}

.profile-card__name {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 300;
  color: var(--color-primary);
  line-height: 1.2;
}

.profile-card__email {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.profile-card__role {
  margin-top: 6px;
}

.profile-card__details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.profile-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-detail__label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 400;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profile-detail__value {
  font-size: 14px;
  color: var(--color-text);
}

/* Notification preferences */
.notification-prefs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.notification-pref {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.notification-pref:last-child {
  border-bottom: none;
}

.notification-pref__info {
  flex: 1;
}

.notification-pref__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-primary);
  line-height: 1.4;
}

.notification-pref__desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}


/* --------------------------------------------------------------------------
   28. Admin
   -------------------------------------------------------------------------- */

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

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

/* Admin data table overrides */
.admin-table .data-table td {
  font-size: 13px;
}

.admin-table .data-table th {
  font-size: 10px;
}

/* Admin action buttons */
.admin-actions {
  display: flex;
  gap: 4px;
}

.admin-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  transition: all var(--transition);
}

.admin-action:hover {
  color: var(--color-gold);
  background: var(--color-bg-cream);
}

.admin-action--edit:hover {
  color: var(--color-info);
  background: var(--color-info-bg);
}

.admin-action--delete:hover {
  color: var(--color-error);
  background: var(--color-error-bg);
}

/* Admin stats row */
.admin-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-stat {
  font-size: 13px;
  color: var(--color-text-muted);
}

.admin-stat__value {
  font-weight: 600;
  color: var(--color-primary);
  margin-right: 4px;
}

/* Admin filters bar */
.admin-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-filters .form-input,
.admin-filters .form-select {
  width: auto;
  min-width: 160px;
  padding: 8px 12px;
  font-size: 13px;
}

.admin-filters .form-search {
  min-width: 240px;
}

.admin-filters .form-search .form-input {
  min-width: 0;
  width: 100%;
}

/* Admin form layout */
.admin-form {
  max-width: 600px;
}

.admin-form .form-group {
  margin-bottom: 24px;
}

/* Admin user row extras */
.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-cell__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.admin-user-cell__name {
  font-weight: 500;
  color: var(--color-primary);
}

.admin-user-cell__email {
  font-size: 12px;
  color: var(--color-text-muted);
}


/* --------------------------------------------------------------------------
   29. Utility Classes
   -------------------------------------------------------------------------- */

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.w-full { width: 100%; }

.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: 20px 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--color-text-muted);
}

.empty-state__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: var(--color-border);
}

.empty-state__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 6px;
}

.empty-state__desc {
  font-size: 14px;
  margin-bottom: 20px;
}


/* --------------------------------------------------------------------------
   30. Responsive — 1024px breakpoint (tablet/desktop transition)
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  /* Switch from sidebar layout to stacked */
  .app {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "content";
  }

  /* Show mobile header */
  .app-header {
    display: flex;
  }

  /* Sidebar becomes off-canvas */
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  /* Show overlay */
  .sidebar-overlay {
    display: block;
  }

  /* Adjust content area */
  .app-content {
    padding: 24px 20px;
    min-height: calc(100vh - var(--header-height));
  }

  /* Dashboard stats to 2 columns */
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Dashboard grid single column */
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  /* Finance summary to 2 columns */
  .finance-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Payments summary to 2 columns */
  .payments-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Calendar day min-height */
  .calendar__day {
    min-height: 70px;
  }

  /* AI search height */
  .ai-search {
    height: calc(100vh - var(--header-height) - 60px);
  }

  /* Profile card details single column */
  .profile-card__details {
    grid-template-columns: 1fr;
  }

  /* Move bsd to accommodate sidebar */
  .bsd {
    right: 10px;
    top: 6px;
    font-size: 12px;
  }
}


/* --------------------------------------------------------------------------
   31. Responsive — 768px breakpoint (mobile)
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  /* App content tighter padding */
  .app-content {
    padding: 16px 14px;
  }

  /* Typography scale down */
  h1, .h1 {
    font-size: 28px;
  }

  h2, .h2 {
    font-size: 16px;
  }

  /* Dashboard stats single column */
  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 16px;
  }

  .stat-card__value {
    font-size: 24px;
  }

  /* Finance summary single column */
  .finance-summary {
    grid-template-columns: 1fr;
  }

  /* Payments summary single column */
  .payments-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Calendar day small */
  .calendar__day {
    min-height: 50px;
    padding: 4px;
  }

  .calendar__day-num {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .calendar__event {
    font-size: 9px;
    padding: 1px 3px;
  }

  .calendar__weekday {
    font-size: 9px;
    padding: 6px 2px;
  }

  /* Quick actions single column */
  .quick-actions {
    grid-template-columns: 1fr;
  }

  /* Voting booth */
  .voting-booth__card {
    padding: 20px;
  }

  .voting-booth__title {
    font-size: 22px;
  }

  /* Candidate card */
  .candidate {
    padding: 12px;
    gap: 10px;
  }

  .candidate__avatar {
    width: 36px;
    height: 36px;
  }

  /* AI search */
  .ai-search__messages {
    padding: 8px 0;
  }

  .ai-message {
    max-width: 95%;
  }

  .ai-message__bubble {
    padding: 10px 14px;
    font-size: 13px;
  }

  /* Discussion replies margin */
  .discussion__replies {
    margin-left: 12px;
  }

  /* Profile card */
  .profile-card {
    padding: 20px;
  }

  .profile-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .profile-card__avatar {
    width: 56px;
    height: 56px;
  }

  .profile-card__name {
    font-size: 22px;
  }

  /* Login card mobile */
  .login__card {
    padding: 32px 24px 28px;
  }

  .login__title {
    font-size: 26px;
  }

  /* Toast mobile */
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  /* Modal mobile */
  .modal-backdrop {
    padding: 16px;
    align-items: flex-end;
  }

  .modal {
    max-height: 90vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .modal__header {
    padding: 16px 20px;
  }

  .modal__body {
    padding: 20px;
  }

  .modal__footer {
    padding: 12px 20px;
  }

  /* Form row stacked */
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  /* Page header stacked */
  .page__header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Admin filters stacked */
  .admin-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-filters .form-search {
    min-width: 0;
  }

  .admin-filters .form-input,
  .admin-filters .form-select {
    width: 100%;
    min-width: 0;
  }

  /* Table horizontal scroll hint */
  .data-table {
    font-size: 13px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }

  /* Finance filters stacked */
  .finance-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .finance-filters .form-select {
    width: 100%;
    min-width: 0;
  }

  /* Category pills scroll */
  .category-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .category-pill {
    flex-shrink: 0;
  }

  /* Aguda tabs scroll */
  .aguda-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .aguda-tab {
    padding: 8px 14px;
    font-size: 12px;
    flex-shrink: 0;
  }

  /* Election stats stacked */
  .election-card__stats {
    flex-direction: column;
    gap: 6px;
  }

  /* Announcement card meta stacked */
  .announcement-card__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Announcement detail */
  .announcement-detail__title {
    font-size: 24px;
  }

  .announcement-detail__meta {
    flex-direction: column;
    gap: 4px;
  }
}


/* --------------------------------------------------------------------------
   32. Responsive — 480px breakpoint (small mobile)
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
  .app-content {
    padding: 12px 10px;
  }

  h1, .h1 {
    font-size: 24px;
  }

  .card {
    padding: 16px;
  }

  .btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .btn--lg {
    padding: 12px 24px;
    font-size: 13px;
  }

  .stat-card__value {
    font-size: 20px;
  }

  .finance-card__amount {
    font-size: 22px;
  }

  .payment-card__amount {
    font-size: 20px;
  }
}


/* --------------------------------------------------------------------------
   33. Print Styles
   -------------------------------------------------------------------------- */

@media print {
  .sidebar,
  .app-header,
  .sidebar-overlay,
  .toast-container,
  .bsd,
  .btn,
  .modal-backdrop {
    display: none !important;
  }

  .app {
    display: block;
  }

  .app-content {
    padding: 0;
  }

  body {
    color: #000;
    background: #fff;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }

  .data-table th,
  .data-table td {
    border: 1px solid #ccc;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
