/* ============================================================
   Sandpiper Resort Co-Op - Resident Portal Styles
   Coastal branding | Mobile-first | 55+ accessible (WCAG AA)
   ============================================================ */

:root {
  /* === PRIMARY: Gulf Sunset Coral === */
  --color-primary: #D9766C;
  --color-primary-dark: #C4635A;
  --color-primary-light: #E89990;

  /* === SECONDARY: Hale Navy === */
  --color-secondary: #434C56;
  --color-secondary-light: #5A6575;

  /* === ACCENT: Gulf Aqua === */
  --color-accent: #ADBCB3;
  --color-accent-dark: #8FA69A;

  /* === GOLD: Sandy Dune === */
  --color-gold: #C4A882;
  --color-gold-dark: #A8905E;

  /* === STATUS === */
  --color-success: #5A9E6F;
  --color-warning: #D4A04A;
  --color-error: #C54B4B;

  /* === BACKGROUNDS === */
  --bg-body: #F7F4EF;
  --bg-white: #FDFCFA;
  --bg-light: #EFEEE5;
  --bg-shell: #F5EDE0;

  /* === TEXT === */
  --text-dark: #2C2C2C;
  --text-body: #3A3A3A;
  --text-muted: #5C5C5C;
  --text-light: #8A8A8A;
  --text-white: #FDFCFA;

  /* === BORDERS === */
  --border-light: #E5DDD3;
  --border-medium: #D1C7B8;

  /* === SHADOWS === */
  --shadow-sm: 0 1px 3px rgba(67,76,86,0.06);
  --shadow-md: 0 4px 12px rgba(67,76,86,0.08);
  --shadow-lg: 0 10px 30px rgba(67,76,86,0.1);

  /* === RADII === */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* === FONTS === */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* === LAYOUT === */
  --nav-height: 64px;
  --max-width: 900px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════ */

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  padding: 24px;
}

.login-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-brand-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
}

.login-brand-icon svg {
  width: 100%;
  height: 100%;
}

.login-card h1 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.login-card .login-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.login-divider {
  width: 40px;
  height: 2px;
  background: var(--color-gold);
  margin: 16px auto 28px;
  border: none;
}

.login-error {
  background: rgba(197, 75, 75, 0.08);
  border: 1px solid rgba(197, 75, 75, 0.2);
  color: var(--color-error);
  font-size: 0.9rem;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  display: none;
}

.login-error.visible {
  display: block;
}

.login-form .form-group {
  margin-bottom: 16px;
  text-align: left;
}

.login-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.login-form input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 14px 16px;
  min-height: 48px;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-body);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.login-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217, 118, 108, 0.15);
}

.btn-login {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 14px 24px;
  min-height: 52px;
  border: none;
  border-radius: 50px;
  background: var(--color-primary);
  color: var(--text-white);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 8px;
}

.btn-login:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-help {
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

.login-help a {
  color: var(--color-primary);
  font-weight: 600;
}

.login-footer {
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════ */

.resident-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 252, 250, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  height: var(--nav-height);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-dark);
}

.nav-brand-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.nav-brand-icon svg {
  width: 100%;
  height: 100%;
}

.nav-brand-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-dark);
}

.nav-brand-text span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-user-info {
  text-align: right;
  line-height: 1.3;
  display: none;
}

.nav-user-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.nav-user-unit {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  min-height: 40px;
  border: 2px solid var(--border-medium);
  border-radius: 50px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.nav-logout:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

@media (min-width: 640px) {
  .nav-user-info {
    display: block;
  }
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════ */

.resident-main {
  min-height: calc(100vh - var(--nav-height) - 60px);
  min-height: calc(100dvh - var(--nav-height) - 60px);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ═══════════════════════════════════════════════════════════
   DIRECTORY TOOLBAR
   ═══════════════════════════════════════════════════════════ */

.directory-header {
  padding: 24px 0 0;
}

.directory-header h1 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.directory-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.directory-toolbar {
  position: sticky;
  top: var(--nav-height);
  z-index: 50;
  background: var(--bg-body);
  padding: 16px 0 12px;
}

.search-wrapper {
  position: relative;
}

.search-wrapper svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-light);
  pointer-events: none;
}

.search-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 14px 16px 14px 48px;
  min-height: 52px;
  border: 2px solid var(--border-medium);
  border-radius: 50px;
  background: var(--bg-white);
  color: var(--text-body);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217, 118, 108, 0.15);
}

.search-input::placeholder {
  color: var(--text-light);
}

.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  min-height: 44px;
  border-radius: 50px;
  border: 2px solid var(--border-medium);
  background: var(--bg-white);
  color: var(--text-body);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary);
}

.chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--text-white);
}

.sort-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
}

.sort-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.sort-toggle .chip {
  padding: 6px 14px;
  min-height: 36px;
  font-size: 0.82rem;
}

/* --- Unit label on cards --- */

.card-unit-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.unit-label {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--color-secondary);
  color: var(--text-white);
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════
   DIRECTORY SUMMARY
   ═══════════════════════════════════════════════════════════ */

.directory-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   RESIDENT CARDS
   ═══════════════════════════════════════════════════════════ */

.resident-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-bottom: 24px;
}

.resident-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.resident-card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 18px 14px;
}

.unit-badge {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-white);
  background: var(--color-primary);
  min-width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  padding: 0 6px;
}

.card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: inline-flex;
}
.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-avatar .avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--text-white);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
}

.card-name-area {
  flex: 1;
  min-width: 0;
}

.resident-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.2;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.type-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  text-transform: capitalize;
}

.type-shareholder {
  background: rgba(217, 118, 108, 0.1);
  color: var(--color-primary-dark);
}

.type-homeowner {
  background: rgba(196, 168, 130, 0.15);
  color: var(--color-gold-dark);
}

.type-renter {
  background: rgba(173, 188, 179, 0.2);
  color: var(--color-accent-dark);
}

.board-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(67, 76, 86, 0.08);
  color: var(--color-secondary);
}

/* --- Contact Actions --- */

.card-actions {
  border-top: 1px solid var(--border-light);
  padding: 12px 18px 14px;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.action-row + .action-row {
  margin-top: 4px;
}

.action-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 14px;
  min-height: 44px;
  min-width: 44px;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.action-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.action-call {
  background: rgba(90, 158, 111, 0.1);
  color: #4A8E5F;
}

.action-call:hover {
  background: var(--color-success);
  color: white;
}

.action-text {
  background: rgba(37, 99, 235, 0.08);
  color: #2563EB;
}

.action-text:hover {
  background: #2563EB;
  color: white;
}

.action-email {
  background: rgba(217, 118, 108, 0.08);
  color: var(--color-primary);
}

.action-email:hover {
  background: var(--color-primary);
  color: white;
}

.no-contact {
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
  padding: 4px 0;
}

/* ═══════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0 32px;
}

.page-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.page-buttons {
  display: flex;
  gap: 4px;
}

.page-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════
   LOADING & EMPTY STATES
   ═══════════════════════════════════════════════════════════ */

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 12px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.empty-state h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════ */

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success {
  background: var(--color-success);
  color: white;
}

.toast-error {
  background: var(--color-error);
  color: white;
}

.toast-info {
  background: var(--color-secondary);
  color: white;
}

.toast-icon {
  margin-right: 4px;
}

/* ═══════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  padding: 16px;
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.2s;
}

.modal-overlay.visible .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-dark);
}

.modal-close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1.3rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-light);
  color: var(--text-body);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  min-height: 48px;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--text-white);
  border-color: var(--color-primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--text-body);
  border-color: var(--border-medium);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-danger {
  background: var(--color-error);
  color: white;
  border-color: var(--color-error);
}

.btn-danger:hover:not(:disabled) {
  background: #A83A3A;
  border-color: #A83A3A;
}

.btn-sm {
  font-size: 0.82rem;
  padding: 8px 16px;
  min-height: 38px;
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════ */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  min-height: 48px;
  -webkit-appearance: none;
  appearance: none;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217, 118, 108, 0.15);
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

select.form-control {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235C5C5C' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.form-check input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.form-check label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  margin-bottom: 0;
}

.form-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.form-section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════
   VIEW PROFILE GRID
   ═══════════════════════════════════════════════════════════ */

.view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.view-field {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.view-field:last-child,
.view-field:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
}

.view-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.view-value {
  font-size: 0.95rem;
  color: var(--text-body);
  word-break: break-word;
}

.view-value.empty {
  color: var(--text-light);
  font-style: italic;
}

.view-field.full-width {
  grid-column: 1 / -1;
}

/* --- Status Dots --- */

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.status-active {
  background: var(--color-success);
}

.status-inactive {
  background: var(--color-error);
}

/* --- Card Management Buttons (board members) --- */

.card-manage {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.card-manage-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.card-manage-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(217, 118, 108, 0.05);
}

.card-manage-btn svg {
  width: 15px;
  height: 15px;
}

/* --- Directory Header with Add Button --- */

.directory-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.directory-header-row .btn {
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Active Filter Toggle --- */

.active-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 0 4px;
}

.active-filter label {
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.active-filter input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* --- Confirm Delete Styles --- */

.confirm-message {
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.6;
  padding: 8px 0;
}

.confirm-message strong {
  color: var(--text-dark);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

.resident-footer {
  text-align: center;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  font-size: 0.75rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE: TABLET+
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 640px) {
  .resident-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .login-card {
    padding: 48px 44px;
  }
}

@media (min-width: 768px) {
  .directory-header h1 {
    font-size: 1.75rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE: SMALL MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .view-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    max-width: 100%;
    max-height: 95vh;
    max-height: 95dvh;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 16px 18px;
  }

  .modal-body {
    padding: 18px;
  }

  .modal-footer {
    padding: 14px 18px;
  }

  .modal-footer .btn {
    flex: 1;
  }

  .directory-header-row {
    flex-direction: column;
    gap: 12px;
  }

  .directory-header-row .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .login-card {
    padding: 36px 24px;
    border-radius: var(--radius-lg);
  }

  .card-header {
    padding: 14px 14px 10px;
  }

  .card-actions {
    padding: 10px 14px 12px;
  }

  .action-btn .btn-label {
    display: none;
  }

  .action-btn {
    padding: 10px;
  }

  .nav-brand-text {
    font-size: 0.9rem;
  }

  .nav-brand-text span {
    display: none;
  }

  .nav-links {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   NAV LINKS
   ═══════════════════════════════════════════════════════════ */

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--color-primary);
  background: rgba(217,118,108,0.08);
}

.nav-link.active {
  color: var(--color-primary);
  background: rgba(217,118,108,0.1);
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-more-btn {
  border: none;
  cursor: pointer;
  background: none;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 150;
  padding: 6px 0;
  margin-top: 4px;
}

.nav-dropdown-menu.open {
  display: block;
}

.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  transition: background 0.15s;
}

.nav-dropdown-item:hover {
  background: rgba(217,118,108,0.06);
  color: var(--color-primary);
}

.nav-dropdown-item.active {
  color: var(--color-primary);
  font-weight: 600;
  background: rgba(217,118,108,0.08);
}

@media (max-width: 640px) {
  .nav-container {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 8px;
  }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    border-top: 1px solid var(--border-light);
    padding-top: 8px;
    margin-top: 2px;
  }
  .nav-link {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
  .resident-nav {
    height: auto;
  }
}

/* ═══════════════════════════════════════════════════════════
   PAGE TITLES
   ═══════════════════════════════════════════════════════════ */

.page-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 24px 0 4px;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION PAGE
   ═══════════════════════════════════════════════════════════ */

.push-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  margin-bottom: 32px;
}

.push-composer.card {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 6px;
}

.char-count {
  display: block;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 4px;
}

.form-actions {
  margin-top: 20px;
}

.form-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* iPhone Preview */
.push-preview-wrap {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
}

.iphone-preview {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 40px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

.iphone-notch {
  width: 120px;
  height: 28px;
  background: #000;
  border-radius: 0 0 16px 16px;
  margin: -16px auto 0;
  position: relative;
  z-index: 2;
}

.iphone-time {
  text-align: center;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  font-weight: 600;
  margin: 8px 0 16px;
}

.iphone-notification {
  background: rgba(255,255,255,0.95);
  border-radius: 14px;
  padding: 12px;
  backdrop-filter: blur(20px);
}

.iphone-notif-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.iphone-notif-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.iphone-notif-icon svg {
  width: 100%;
  height: 100%;
}

.iphone-notif-app {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  letter-spacing: 0.02em;
  flex: 1;
}

.iphone-notif-time {
  font-size: 11px;
  color: #999;
}

.iphone-notif-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2px;
  line-height: 1.3;
}

.iphone-notif-body {
  font-size: 13px;
  color: #444;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Confirm Preview */
.confirm-preview {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}

.confirm-preview strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.confirm-preview p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Push Result Stats */
.push-result-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 16px 0;
}

.push-stat {
  text-align: center;
}

.push-stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
}

.push-stat-success .push-stat-num {
  color: var(--color-success);
}

.push-stat-fail .push-stat-num {
  color: var(--color-error);
}

.push-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* History */
.push-history {
  margin-bottom: 32px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  transition: box-shadow 0.2s;
}

.history-card:hover {
  box-shadow: var(--shadow-sm);
}

.history-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.history-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.history-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.status-sent {
  background: rgba(90,158,111,0.12);
  color: var(--color-success);
}

.status-failed {
  background: rgba(197,75,75,0.12);
  color: var(--color-error);
}

.status-pending {
  background: rgba(212,160,74,0.12);
  color: var(--color-warning);
}

.history-card-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.history-card-meta {
  font-size: 0.8rem;
  color: var(--text-light);
}

.history-card-meta .text-danger {
  color: var(--color-error);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state h2, .empty-state h3 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  margin-bottom: 8px;
}

.empty-state p {
  margin-bottom: 16px;
}

.loading {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .push-layout {
    grid-template-columns: 1fr;
  }
  .push-preview-wrap {
    position: static;
    order: -1;
  }
  .iphone-preview {
    max-width: 300px;
    margin: 0 auto;
  }
}

/* ═══════════════════════════════════════════════════════════
   MODULE TOGGLE SWITCHES
   ═══════════════════════════════════════════════════════════ */

.module-toggles {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  user-select: none;
}

.toggle-row:last-child {
  border-bottom: none;
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: relative;
  width: 48px;
  height: 28px;
  background: var(--border-medium);
  border-radius: 28px;
  transition: background 0.25s;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-input:checked + .toggle-slider {
  background: var(--color-primary);
}

.toggle-input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

.toggle-input:focus-visible + .toggle-slider {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.form-section-note {
  font-size: 0.82rem;
  color: var(--text-light);
  margin: -8px 0 12px;
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════ */

/* Welcome Banner */
.welcome-banner {
  position: relative;
  background: linear-gradient(135deg, var(--bg-shell) 0%, rgba(217,118,108,0.08) 50%, rgba(173,188,179,0.12) 100%);
  border-radius: 20px;
  padding: 32px;
  margin: 20px 0 24px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.welcome-content {
  position: relative;
  z-index: 2;
}

.welcome-art {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 260px;
  height: 130px;
  opacity: 0.6;
}

.welcome-art svg {
  width: 100%;
  height: 100%;
}

.welcome-name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin: 0 0 6px;
  line-height: 1.2;
}

.welcome-meta {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.welcome-date {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
  margin: 0;
}

/* Dashboard Cards */
.dash-card {
  background: var(--bg-white);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.dash-card-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 16px;
}

.dash-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Weather + Tides Grid */
.weather-tides-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  margin-bottom: 8px;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.weather-icon {
  flex-shrink: 0;
}

.weather-main-info {
  flex: 1;
}

.weather-temp {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
}

.weather-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.weather-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.weather-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.weather-stat-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weather-stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.sun-times {
  display: flex;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.sun-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Tides */
.tide-list {
  display: flex;
  flex-direction: column;
}

.tide-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.tide-item:last-child {
  border-bottom: none;
}

.tide-item.next {
  background: rgba(217,118,108,0.06);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 -12px;
  border-bottom: none;
}

.tide-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  min-width: 40px;
  text-align: center;
}

.tide-high {
  background: rgba(66,165,245,0.12);
  color: #1976D2;
}

.tide-low {
  background: rgba(90,158,111,0.12);
  color: var(--color-success);
}

.tide-time {
  flex: 1;
  font-weight: 500;
  color: var(--text-body);
}

.tide-height {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.tide-next-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: 0.05em;
}

.marine-stats {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.marine-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Forecast Strip */
.forecast-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 4px 0 8px;
  scrollbar-width: none;
}

.forecast-strip::-webkit-scrollbar {
  display: none;
}

.forecast-day {
  min-width: 90px;
  flex-shrink: 0;
  text-align: center;
  padding: 16px 12px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  scroll-snap-align: start;
  transition: box-shadow 0.2s;
}

.forecast-day:first-child {
  background: rgba(217,118,108,0.06);
  border-color: rgba(217,118,108,0.2);
}

.forecast-day-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 8px;
}

.forecast-icon {
  margin-bottom: 8px;
}

.forecast-icon svg {
  display: inline-block;
}

.forecast-temps {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 0.9rem;
}

.forecast-high {
  font-weight: 700;
  color: var(--text-dark);
}

.forecast-low {
  color: var(--text-light);
}

.forecast-rain {
  font-size: 0.75rem;
  color: #42A5F5;
  margin-top: 4px;
}

/* Dashboard Sections */
.dash-section {
  margin-top: 28px;
}

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dash-section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.dash-section h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 12px;
}

/* Announcements */
.dash-announcement {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.dash-announcement:last-child {
  border-bottom: none;
}

.pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.announcement-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 4px;
}

.announcement-snippet {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.announcement-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.cat-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--bg-light);
  color: var(--text-muted);
}

.cat-hurricane { background: rgba(197,75,75,0.12); color: var(--color-error); }
.cat-safety { background: rgba(212,160,74,0.12); color: var(--color-warning); }
.cat-maintenance { background: rgba(90,158,111,0.12); color: var(--color-success); }
.cat-board { background: rgba(67,76,86,0.1); color: var(--color-secondary); }
.cat-event { background: rgba(217,118,108,0.1); color: var(--color-primary); }

/* Events */
.dash-event {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.dash-event:last-child {
  border-bottom: none;
}

.event-date-circle {
  width: 52px;
  height: 52px;
  min-width: 52px;
  background: var(--color-primary);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
}

.event-day {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.event-month {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.event-info {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.event-details {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Quick Links */
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-body);
  transition: all 0.2s;
}

.quick-link:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

.quick-link-icon {
  width: 40px;
  height: 40px;
  color: var(--color-primary);
}

.quick-link-icon svg {
  width: 100%;
  height: 100%;
}

.quick-link-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-body);
}

/* Skeleton Loaders */
.skeleton-loader {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
  height: 14px;
  background: var(--border-light);
  border-radius: 7px;
  margin-bottom: 12px;
}

.skeleton-line.wide { width: 80%; }
.skeleton-line.medium { width: 55%; }
.skeleton-line.short { width: 35%; }

.skeleton-box {
  width: 90px;
  height: 120px;
  background: var(--border-light);
  border-radius: 14px;
  flex-shrink: 0;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Dashboard Responsive */
@media (max-width: 768px) {
  .weather-tides-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .welcome-banner {
    padding: 24px 20px;
    border-radius: 16px;
  }
  .welcome-name {
    font-size: 1.4rem;
  }
  .welcome-art {
    display: none;
  }
  .weather-temp {
    font-size: 2.8rem;
  }
  .quick-links-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .quick-link {
    padding: 20px 12px;
  }
  .dash-card {
    padding: 20px 16px;
  }
}

/* ═══════════════════════════════════════════════════════════
   TROLLEY PAGE
   ═══════════════════════════════════════════════════════════ */

.trolley-hero {
  position: relative;
  background: linear-gradient(135deg, var(--bg-shell) 0%, rgba(173,188,179,0.15) 50%, rgba(196,168,130,0.1) 100%);
  border-radius: 20px;
  padding: 32px;
  margin: 20px 0 24px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.trolley-hero-content {
  position: relative;
  z-index: 2;
}

.trolley-hero-art {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 240px;
  height: 140px;
  opacity: 0.7;
}

.trolley-hero-art svg {
  width: 100%;
  height: 100%;
}

.trolley-hero-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin: 0 0 4px;
  line-height: 1.2;
}

.trolley-hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

.trolley-stats {
  display: flex;
  gap: 28px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.trolley-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trolley-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.trolley-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
}

.trolley-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.trolley-actions .btn {
  font-size: 0.9rem;
  padding: 10px 20px;
  min-height: 44px;
}

/* Route Card */
.trolley-route-card {
  margin-top: 0;
}

.trolley-route-desc {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.65;
  margin: 0 0 24px;
}

.route-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: 0 10px;
  margin: 28px 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.route-line {
  position: absolute;
  top: 6px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--border-medium);
  z-index: 0;
}

.route-stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
  min-width: 65px;
  flex-shrink: 0;
}

.route-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 2px solid var(--color-secondary);
  flex-shrink: 0;
}

.route-dot.active {
  width: 16px;
  height: 16px;
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(217,118,108,0.15);
}

.route-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 72px;
  line-height: 1.3;
}

.route-label.active {
  font-weight: 700;
  color: var(--color-primary);
}

.route-direction {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-light);
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* How to Ride */
.howto-steps {
  display: flex;
  gap: 20px;
}

.howto-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 16px 8px;
}

.howto-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.howto-icon {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}

.howto-icon svg {
  width: 100%;
  height: 100%;
}

.howto-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-body);
  line-height: 1.4;
}

/* Tips */
.tip-list {
  display: flex;
  flex-direction: column;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.tip-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tip-item:first-child {
  padding-top: 0;
}

.tip-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-primary);
  margin-top: 2px;
}

.tip-icon svg {
  width: 100%;
  height: 100%;
}

.tip-text {
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.5;
}

/* Bonus Card (Water Taxi) */
.bonus-card {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.bonus-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: rgba(217,118,108,0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.bonus-icon svg {
  width: 100%;
  height: 100%;
}

.bonus-info {
  flex: 1;
  min-width: 200px;
}

.bonus-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 2px;
}

.bonus-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.bonus-details {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bonus-dot {
  color: var(--text-light);
}

.btn-sm {
  font-size: 0.8rem;
  padding: 8px 16px;
  min-height: 36px;
  flex-shrink: 0;
}

/* Trolley Responsive */
@media (max-width: 640px) {
  .trolley-hero {
    padding: 24px 20px;
    border-radius: 16px;
  }
  .trolley-hero-title {
    font-size: 1.35rem;
  }
  .trolley-hero-art {
    display: none;
  }
  .trolley-actions {
    flex-direction: column;
  }
  .trolley-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .howto-steps {
    flex-direction: column;
    gap: 4px;
  }
  .howto-step {
    flex-direction: row;
    text-align: left;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
  }
  .howto-step:last-child {
    border-bottom: none;
  }
  .howto-label {
    font-size: 0.88rem;
  }
  .bonus-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .bonus-card .btn-sm {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   CSV IMPORT / EXPORT ACTIONS
   ============================================================ */

.directory-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.csv-actions {
  display: flex;
  gap: 8px;
}

.csv-actions .btn svg {
  vertical-align: -2px;
}

/* Import modal results */
.import-success {
  display: flex;
  gap: 24px;
  justify-content: center;
  padding: 24px 0;
}

.import-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.import-stat .stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
}

.import-stat .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.import-errors {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg-light);
}

.import-error-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.import-error-row:last-child {
  border-bottom: none;
}

.import-error-row ul {
  margin: 4px 0 0 20px;
  color: var(--color-error);
  font-size: 0.85rem;
}

.import-warnings {
  margin-top: 16px;
  padding: 12px;
  background: rgba(196, 168, 130, 0.12);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.import-warnings ul {
  margin: 0 0 0 20px;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .directory-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .csv-actions {
    width: 100%;
  }
  .csv-actions .btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 6px 10px;
  }
  .directory-actions > .btn-primary {
    width: 100%;
  }
  .import-success {
    gap: 16px;
  }
  .import-stat .stat-number {
    font-size: 1.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   EVENTS PAGE
   ═══════════════════════════════════════════════════════════ */

.events-month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 0;
}

.events-month-label {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  min-width: 180px;
  text-align: center;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 32px;
}

.event-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.event-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.event-snippet {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-arrow {
  flex-shrink: 0;
  color: var(--text-light);
}

.event-detail-date {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.event-detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-body);
  padding: 6px 0;
}

.event-detail-desc {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════
   DOCUMENTS PAGE
   ═══════════════════════════════════════════════════════════ */

.doc-category-group {
  margin-bottom: 28px;
}

.doc-category-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  text-transform: capitalize;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-gold);
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text-body);
  transition: all 0.2s;
}

.doc-item:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary-light);
}

.doc-icon {
  flex-shrink: 0;
}

.doc-info {
  flex: 1;
  min-width: 0;
}

.doc-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.doc-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.doc-meta {
  font-size: 0.78rem;
  color: var(--text-light);
}

.doc-download {
  flex-shrink: 0;
  color: var(--color-primary);
}

/* ═══════════════════════════════════════════════════════════
   REPORT ISSUE PAGE
   ═══════════════════════════════════════════════════════════ */

.issue-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.issue-cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
}

.issue-cat-btn:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary);
}

.issue-cat-btn.active {
  border-color: var(--color-primary);
  background: rgba(217,118,108,0.06);
  color: var(--color-primary);
}

.issue-cat-btn svg {
  color: var(--color-primary);
}

.photo-upload-row {
  display: flex;
  gap: 12px;
}

.photo-upload-btn {
  cursor: pointer;
}

.photo-preview {
  width: 100px;
  height: 100px;
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-light);
  font-size: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.photo-preview:hover {
  border-color: var(--color-primary);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════
   ISLAND GUIDE PAGE
   ═══════════════════════════════════════════════════════════ */

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 32px;
}

.guide-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.guide-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.guide-card-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}

.guide-card-info {
  flex: 1;
  min-width: 0;
}

.guide-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.guide-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-light);
}

.guide-cat-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: capitalize;
}

/* ═══════════════════════════════════════════════════════════
   RESOURCES PAGE
   ═══════════════════════════════════════════════════════════ */

.resource-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.resource-number-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-body);
  transition: all 0.2s;
}

.resource-number-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary-light);
}

.resource-number-card.emergency {
  border-color: var(--color-error);
  background: rgba(197,75,75,0.04);
}

.resource-num-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.resource-num-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.resource-num-phone {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
}

.resource-schedule-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.resource-schedule-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.schedule-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.schedule-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.schedule-days {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
}

.resource-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.resource-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-body);
  transition: all 0.2s;
}

.resource-link-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary-light);
}

.resource-link-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.resource-link-info {
  flex: 1;
  min-width: 0;
}

.resource-link-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.resource-link-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.resource-external {
  color: var(--text-light);
  font-size: 1rem;
  flex-shrink: 0;
}

.resource-bridges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
}

.bridge-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.bridge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bridge-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.bridge-route {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-light);
  color: var(--text-muted);
}

.bridge-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bridge-detail {
  font-size: 0.9rem;
  color: var(--text-body);
}

.bridge-note {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(196,168,130,0.1);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--color-gold-dark);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE: NEW PAGES
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .issue-categories {
    grid-template-columns: 1fr 1fr;
  }
  .photo-upload-row {
    flex-wrap: wrap;
  }
  .photo-preview {
    width: 80px;
    height: 80px;
  }
  .resource-numbers {
    grid-template-columns: 1fr;
  }
  .resource-schedule-cards {
    grid-template-columns: 1fr;
  }
  .resource-links-grid {
    grid-template-columns: 1fr;
  }
  .resource-bridges {
    grid-template-columns: 1fr;
  }
  .event-card {
    padding: 14px;
  }
}
