/**
 * HOA Management Dashboard Styles
 * 
 * Comprehensive styling for the owner dashboard interface
 * Based on starter-templates/dashboard.html design patterns
 * 
 * @package HOA_Management_For_WordPress
 * @since 1.0.0
 */

/* ===== PREVENT SIDEBAR FLASH ON PAGE LOAD ===== */
/* Apply collapsed state immediately if set in localStorage */
html.hoa-sidebar-should-collapse .hoa-sidebar {
    width: var(--hoa-sidebar-collapsed-width);
}

html.hoa-sidebar-should-collapse .hoa-logo-container,
html.hoa-sidebar-should-collapse .hoa-logo-text {
    display: none;
}

html.hoa-sidebar-should-collapse .hoa-profile-link {
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

html.hoa-sidebar-should-collapse .hoa-user-info {
    display: none;
}

html.hoa-sidebar-should-collapse .hoa-nav-item {
    justify-content: center;
    padding: 0.75rem;
    margin: 0 0.25rem 0.25rem 0.25rem;
}

html.hoa-sidebar-should-collapse .hoa-nav-text,
html.hoa-sidebar-should-collapse .hoa-nav-section-title {
    display: none;
}

html.hoa-sidebar-should-collapse .hoa-main-content {
    margin-left: var(--hoa-sidebar-collapsed-width);
}

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* Color Palette */
    --hoa-primary: #3b82f6;
    --hoa-primary-dark: #2563eb;
    --hoa-primary-light: #60a5fa;
    --hoa-secondary: #64748b;
    --hoa-success: #10b981;
    --hoa-warning: #f59e0b;
    --hoa-danger: #ef4444;
    --hoa-info: #06b6d4;
    
    /* Grayscale */
    --hoa-white: #ffffff;
    --hoa-gray-50: #f9fafb;
    --hoa-gray-100: #f3f4f6;
    --hoa-gray-200: #e5e7eb;
    --hoa-gray-300: #d1d5db;
    --hoa-gray-400: #9ca3af;
    --hoa-gray-500: #6b7280;
    --hoa-gray-600: #4b5563;
    --hoa-gray-700: #374151;
    --hoa-gray-800: #1f2937;
    --hoa-gray-900: #111827;
    
    /* Layout */
    --hoa-sidebar-width: 264px;
    --hoa-sidebar-collapsed-width: 80px;
    --hoa-header-height: 64px;
    --hoa-border-radius: 8px;
    --hoa-border-radius-lg: 12px;
    --hoa-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --hoa-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --hoa-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Typography */
    --hoa-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --hoa-font-size-xs: 0.75rem;
    --hoa-font-size-sm: 0.875rem;
    --hoa-font-size-base: 1rem;
    --hoa-font-size-lg: 1.125rem;
    --hoa-font-size-xl: 1.25rem;
    --hoa-font-size-2xl: 1.5rem;
    --hoa-font-size-3xl: 1.875rem;
    
    /* Transitions */
    --hoa-transition: all 0.3s ease;
    --hoa-transition-fast: all 0.15s ease;
}

/* ===== RESET & BASE STYLES ===== */
.hoa-dashboard-body {
    margin: 0;
    padding: 0;
    font-family: var(--hoa-font-family);
    font-size: var(--hoa-font-size-base);
    line-height: 1.5;
    color: var(--hoa-gray-900);
    background-color: var(--hoa-gray-50);
    overflow-x: hidden;
}

.hoa-dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR STYLES ===== */
.hoa-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--hoa-sidebar-width);
    height: 100vh;
    background-color: var(--hoa-white);
    box-shadow: var(--hoa-shadow-lg);
    z-index: 10;
    transition: var(--hoa-transition);
    display: flex;
    flex-direction: column;
}

.hoa-sidebar.hoa-sidebar-collapsed {
    width: var(--hoa-sidebar-collapsed-width);
}

/* Sidebar Header */
.hoa-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--hoa-gray-200);
    min-height: var(--hoa-header-height);
}

.hoa-logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.hoa-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

.hoa-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--hoa-primary);
    color: var(--hoa-white);
    border-radius: var(--hoa-border-radius);
    flex-shrink: 0;
}

/* Custom Logo in Sidebar */
.hoa-logo-container .hoa-sidebar-logo {
    max-width: 120px;
    max-height: 60px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.hoa-logo-text {
    font-size: var(--hoa-font-size-lg);
    font-weight: 700;
    color: var(--hoa-gray-800);
    margin: 0;
    text-align: center;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    transition: var(--hoa-transition);
}

.hoa-sidebar-collapsed .hoa-logo-text {
    display: none;
}

.hoa-sidebar-collapsed .hoa-logo-container {
    display: none;
}

.hoa-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: none;
    border: none;
    color: var(--hoa-gray-500);
    cursor: pointer;
    border-radius: var(--hoa-border-radius);
    transition: var(--hoa-transition-fast);
}

.hoa-sidebar-toggle:hover {
    background-color: var(--hoa-gray-100);
    color: var(--hoa-gray-700);
}

.hoa-sidebar-toggle:focus {
    outline: 2px solid var(--hoa-primary);
    outline-offset: 2px;
}

/* User Profile Section */
.hoa-user-profile {
    padding: 1rem;
    border-bottom: 1px solid var(--hoa-gray-200);
}

.hoa-profile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    text-decoration: none;
    color: inherit;
    border-radius: var(--hoa-border-radius);
    transition: var(--hoa-transition-fast);
}

.hoa-sidebar-collapsed .hoa-profile-link {
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.hoa-sidebar-collapsed .hoa-user-info {
    display: none;
}

.hoa-profile-link:hover {
    background-color: var(--hoa-gray-50);
}

.hoa-user-avatar {
    position: relative;
    flex-shrink: 0;
}

.hoa-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--hoa-gray-200);
}

.hoa-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--hoa-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--hoa-gray-200);
}

.hoa-avatar-placeholder .hoa-icon {
    color: var(--hoa-gray-400);
}

.hoa-user-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--hoa-success);
    border: 2px solid var(--hoa-white);
}

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

.hoa-user-name {
    font-size: var(--hoa-font-size-sm);
    font-weight: 600;
    color: var(--hoa-gray-900);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hoa-user-address {
    font-size: var(--hoa-font-size-xs);
    color: var(--hoa-gray-500);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pending Address Change Indicator */
.hoa-address-pending .hoa-user-address {
    color: var(--hoa-warning, #f59e0b);
}

.hoa-address-pending .hoa-avatar-img,
.hoa-address-pending .hoa-avatar-placeholder {
    border-color: var(--hoa-warning, #f59e0b);
}

.hoa-pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--hoa-warning, #f59e0b);
    background-color: rgba(245, 158, 11, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    margin-left: 0.25rem;
    white-space: nowrap;
    vertical-align: middle;
}

.hoa-pending-badge .hoa-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.hoa-sidebar-collapsed .hoa-pending-badge {
    display: none;
}

/* Navigation Menu */
.hoa-nav-menu {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.hoa-nav-section {
    margin-bottom: 1.5rem;
}

.hoa-nav-section:last-child {
    margin-bottom: 0;
}

.hoa-nav-section-title {
    font-size: var(--hoa-font-size-xs);
    font-weight: 600;
    color: var(--hoa-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
    padding: 0 1rem;
}

.hoa-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin: 0 0.5rem 0.25rem 0.5rem;
    color: var(--hoa-gray-600);
    text-decoration: none;
    border-radius: var(--hoa-border-radius);
    transition: var(--hoa-transition-fast);
    font-size: var(--hoa-font-size-sm);
    font-weight: 500;
}

.hoa-nav-item:hover {
    background-color: var(--hoa-gray-50);
    color: var(--hoa-gray-900);
}

.hoa-nav-item.hoa-nav-active {
    background-color: var(--hoa-primary);
    color: var(--hoa-white);
}

.hoa-nav-item.hoa-nav-active .hoa-nav-icon {
    color: var(--hoa-white);
}

.hoa-sidebar-collapsed .hoa-nav-item {
    justify-content: center;
    padding: 0.75rem;
    margin: 0 0.25rem 0.25rem 0.25rem;
}

.hoa-nav-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--hoa-gray-400);
    transition: var(--hoa-transition-fast);
}

.hoa-nav-item:hover .hoa-nav-icon {
    color: var(--hoa-gray-600);
}

.hoa-nav-text {
    transition: var(--hoa-transition);
}

.hoa-sidebar-collapsed .hoa-nav-text {
    display: none;
}

.hoa-sidebar-collapsed .hoa-nav-section-title {
    display: none;
}

/* Sidebar Footer */
.hoa-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--hoa-gray-200);
}

.hoa-logout-link {
    color: var(--hoa-gray-600);
}

.hoa-logout-link:hover {
    background-color: var(--hoa-gray-50);
    color: var(--hoa-danger);
}

.hoa-logout-link:hover .hoa-nav-icon {
    color: var(--hoa-danger);
}

/* ===== MAIN CONTENT AREA ===== */
.hoa-main-content {
    flex: 1;
    margin-left: var(--hoa-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--hoa-transition);
}

.hoa-sidebar-collapsed + .hoa-main-content {
    margin-left: var(--hoa-sidebar-collapsed-width);
}

/* Dashboard Header */
.hoa-dashboard-header {
    background-color: var(--hoa-white);
    box-shadow: var(--hoa-shadow-sm);
    z-index: 5;
}

.hoa-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.hoa-page-title {
    font-size: var(--hoa-font-size-xl);
    font-weight: 600;
    color: var(--hoa-gray-900);
    margin: 0;
}

.hoa-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hoa-header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    color: var(--hoa-gray-400);
    cursor: pointer;
    border-radius: 50%;
    transition: var(--hoa-transition-fast);
}

.hoa-header-btn:hover {
    background-color: var(--hoa-gray-100);
    color: var(--hoa-gray-600);
}

.hoa-header-btn:focus {
    outline: 2px solid var(--hoa-primary);
    outline-offset: 2px;
}

/* Header button with notification badge */
.hoa-header-btn {
    position: relative;
}

.hoa-notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background-color: var(--hoa-danger);
    color: var(--hoa-white);
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
}

/* Mobile Menu Toggle */
.hoa-mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    color: var(--hoa-gray-600);
    cursor: pointer;
    border-radius: var(--hoa-border-radius);
    margin-right: 0.75rem;
    transition: var(--hoa-transition-fast);
}

.hoa-mobile-menu-toggle:hover {
    background-color: var(--hoa-gray-100);
    color: var(--hoa-gray-900);
}

.hoa-mobile-menu-toggle:focus {
    outline: 2px solid var(--hoa-primary);
    outline-offset: 2px;
}

.hoa-header-left {
    display: flex;
    align-items: center;
}

/* Mobile Sidebar Overlay */
.hoa-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hoa-sidebar-overlay.hoa-active {
    display: block;
    opacity: 1;
}

/* Prevent body scroll when mobile sidebar is open */
body.hoa-sidebar-overlay-active {
    overflow: hidden;
}

/* Dashboard Main Content */
.hoa-dashboard-main {
    flex: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* FULL WIDTH layout for vote detail page - NO CONSTRAINTS */
.hoa-dashboard-main--wide {
    max-width: none !important;
    margin: 0 !important;
    padding: 2rem;
    width: 100% !important;
}

/* Welcome Banner - Uses branding colors via CSS custom properties */
.hoa-welcome-banner {
    background-color: var(--hoa-welcome-bg, var(--hoa-primary-tint, rgba(59, 130, 246, 0.1)));
    border: 1px solid var(--hoa-welcome-border, var(--hoa-primary-light, #60a5fa));
    border-radius: var(--hoa-border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.hoa-welcome-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.hoa-welcome-icon {
    flex-shrink: 0;
    color: var(--hoa-primary);
}

.hoa-welcome-title {
    font-size: var(--hoa-font-size-lg);
    font-weight: 500;
    color: var(--hoa-welcome-text, var(--hoa-primary-dark, #2563eb));
    margin: 0 0 0.5rem 0;
}

.hoa-welcome-description {
    font-size: var(--hoa-font-size-sm);
    color: var(--hoa-welcome-text, var(--hoa-primary-dark, #2563eb));
    margin: 0;
}

/* Stats Grid */
.hoa-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.hoa-stat-card {
    background-color: var(--hoa-white);
    border-radius: var(--hoa-border-radius-lg);
    box-shadow: var(--hoa-shadow);
    overflow: hidden;
    transition: var(--hoa-transition);
}

.hoa-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hoa-shadow-lg);
}

.hoa-stat-content {
    display: flex;
    align-items: center;
    padding: 1.5rem;
}

.hoa-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--hoa-border-radius);
    margin-right: 1.25rem;
    flex-shrink: 0;
}

.hoa-stat-icon-blue {
    background-color: #dbeafe;
    color: #2563eb;
}

.hoa-stat-icon-green {
    background-color: #d1fae5;
    color: var(--hoa-success);
}

.hoa-stat-icon-yellow {
    background-color: #fef3c7;
    color: var(--hoa-warning);
}

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

.hoa-stat-label {
    font-size: var(--hoa-font-size-sm);
    font-weight: 500;
    color: var(--hoa-gray-500);
    margin: 0 0 0.25rem 0;
}

.hoa-stat-value {
    font-size: var(--hoa-font-size-2xl);
    font-weight: 600;
    color: var(--hoa-gray-900);
    margin: 0;
}

/* Clickable Stat Cards */
.hoa-stat-card-clickable {
    cursor: pointer;
    transition: var(--hoa-transition-fast);
}

.hoa-stat-card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--hoa-shadow-md);
    border-color: var(--hoa-primary);
}

.hoa-stat-card-clickable:focus {
    outline: 2px solid var(--hoa-primary);
    outline-offset: 2px;
}

.hoa-stat-card-clickable:active {
    transform: translateY(0);
}

/* Tabs Container */
.hoa-tabs-container {
    border-bottom: 1px solid var(--hoa-gray-200);
    margin-bottom: 1.5rem;
}

.hoa-tabs-nav {
    display: flex;
    gap: 2rem;
    margin-bottom: -1px;
}

.hoa-tab-button {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 1rem 0.25rem;
    font-size: var(--hoa-font-size-sm);
    font-weight: 500;
    color: var(--hoa-gray-500);
    cursor: pointer;
    transition: var(--hoa-transition-fast);
    white-space: nowrap;
}

.hoa-tab-button:hover {
    color: var(--hoa-gray-700);
    border-bottom-color: var(--hoa-gray-300);
}

.hoa-tab-button.hoa-tab-active {
    color: var(--hoa-primary);
    border-bottom-color: var(--hoa-primary);
}

.hoa-tab-button:focus {
    outline: 2px solid var(--hoa-primary);
    outline-offset: 2px;
}

/* Content Grid */
.hoa-content-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hoa-content-card {
    display: flex;
    flex-direction: column;
    background-color: var(--hoa-white);
    border: 1px solid var(--hoa-gray-200);
    border-radius: var(--hoa-radius-lg, 0.75rem);
    transition: var(--hoa-transition-fast);
    padding: 1rem 1.25rem;
}

.hoa-content-card:hover {
    border-color: var(--hoa-gray-300);
    box-shadow: var(--hoa-shadow-sm);
}

/* Card Header */
.hoa-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0;
    margin-bottom: 0.5rem;
    border-bottom: none;
}

.hoa-card-title-section {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

/* Card Type Icon */
.hoa-card-type-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hoa-gray-100);
    border-radius: var(--hoa-radius-md, 0.5rem);
    color: var(--hoa-gray-500);
}

.hoa-card-type-icon svg {
    width: 20px;
    height: 20px;
}

/* Type-specific icon colors */
.hoa-card-announcement .hoa-card-type-icon {
    background: #fef3c7;
    color: #d97706;
}

.hoa-card-vote .hoa-card-type-icon {
    background: #dbeafe;
    color: #2563eb;
}

.hoa-card-document .hoa-card-type-icon {
    background: #d1fae5;
    color: #059669;
}

.hoa-card-title {
    font-size: var(--hoa-font-size-base, 1rem);
    font-weight: 600;
    color: var(--hoa-gray-900);
    margin: 0;
    line-height: 1.4;
}

.hoa-card-title a {
    color: inherit;
    text-decoration: none;
}

.hoa-card-title a:hover {
    color: var(--hoa-primary);
    text-decoration: underline;
}

.hoa-card-meta {
    font-size: var(--hoa-font-size-sm);
    color: var(--hoa-gray-500);
    margin: 0;
}

/* Badges */
.hoa-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: var(--hoa-font-size-xs);
    font-weight: 500;
    border-radius: 9999px;
    flex-shrink: 0;
}

.hoa-badge-new {
    background-color: var(--hoa-primary-tint, rgba(59, 130, 246, 0.1));
    color: var(--hoa-primary-dark, #1e40af);
}

.hoa-badge-active {
    background-color: #d1fae5;
    color: #065f46;
}

/* Card Body */
.hoa-card-body {
    margin-left: 52px; /* Align with title (40px icon + 12px gap) */
}

.hoa-card-excerpt {
    font-size: var(--hoa-font-size-sm, 0.875rem);
    color: var(--hoa-gray-600);
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

/* Card Meta (file type, size, etc.) */
.hoa-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: var(--hoa-font-size-xs, 0.75rem);
    color: var(--hoa-gray-500);
    margin-bottom: 0.5rem;
}

.hoa-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hoa-meta-item svg {
    width: 14px;
    height: 14px;
}

/* Card Content (legacy) */
.hoa-card-content {
    padding: 1.5rem;
}

.hoa-card-text {
    color: var(--hoa-gray-700);
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

/* Card Footer */
.hoa-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    margin-left: 52px; /* Align with title */
}

.hoa-card-date {
    font-size: var(--hoa-font-size-xs, 0.75rem);
    color: var(--hoa-gray-500);
}

.hoa-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.hoa-card-tags {
    display: flex;
    gap: 0.5rem;
}

.hoa-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: var(--hoa-font-size-xs);
    font-weight: 500;
    border-radius: 9999px;
}

.hoa-tag-gray {
    background-color: var(--hoa-gray-100);
    color: var(--hoa-gray-800);
}

.hoa-tag-green {
    background-color: #d1fae5;
    color: #065f46;
}

.hoa-card-action {
    background: none;
    border: none;
    color: var(--hoa-primary);
    font-size: var(--hoa-font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--hoa-transition-fast);
}

.hoa-card-action:hover {
    color: var(--hoa-primary-dark);
}

/* Voting Options */
.hoa-voting-options {
    margin: 1rem 0;
}

.hoa-vote-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.hoa-vote-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hoa-radio {
    width: 1rem;
    height: 1rem;
    accent-color: var(--hoa-primary);
}

.hoa-vote-label {
    font-size: var(--hoa-font-size-sm);
    font-weight: 500;
    color: var(--hoa-gray-700);
    cursor: pointer;
}

.hoa-vote-percentage {
    font-size: var(--hoa-font-size-sm);
    color: var(--hoa-gray-500);
}

/* Card Actions */
.hoa-card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.hoa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: var(--hoa-font-size-sm);
    font-weight: 500;
    border-radius: var(--hoa-border-radius);
    border: none;
    cursor: pointer;
    transition: var(--hoa-transition-fast);
    text-decoration: none;
}

.hoa-btn-primary {
    background-color: var(--hoa-primary);
    color: var(--hoa-white);
    box-shadow: var(--hoa-shadow-sm);
}

.hoa-btn-primary:hover {
    background-color: var(--hoa-primary-dark);
}

.hoa-btn-primary:focus {
    outline: 2px solid var(--hoa-primary);
    outline-offset: 2px;
}

/* Document Grid */
.hoa-document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.hoa-document-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--hoa-gray-200);
    border-radius: var(--hoa-border-radius);
    transition: var(--hoa-transition-fast);
}

.hoa-document-item:hover {
    border-color: var(--hoa-gray-300);
    background-color: var(--hoa-gray-50);
}

.hoa-document-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--hoa-primary-tint, rgba(59, 130, 246, 0.1));
    color: var(--hoa-primary);
    border-radius: var(--hoa-border-radius);
    flex-shrink: 0;
}

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

.hoa-document-name {
    font-size: var(--hoa-font-size-sm);
    font-weight: 500;
    color: var(--hoa-gray-900);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hoa-document-meta {
    font-size: var(--hoa-font-size-xs);
    color: var(--hoa-gray-500);
    margin: 0;
}

.hoa-document-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: none;
    border: none;
    color: var(--hoa-primary);
    cursor: pointer;
    border-radius: var(--hoa-border-radius);
    transition: var(--hoa-transition-fast);
    flex-shrink: 0;
}

.hoa-document-download:hover {
    background-color: #dbeafe;
    color: var(--hoa-primary-dark);
}

.hoa-document-download:focus {
    outline: 2px solid var(--hoa-primary);
    outline-offset: 2px;
}

/* Empty State */
.hoa-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    background-color: var(--hoa-gray-50);
    border-radius: var(--hoa-border-radius-lg);
    border: 2px dashed var(--hoa-gray-200);
}

.hoa-empty-icon {
    color: var(--hoa-gray-300);
    margin-bottom: 1.5rem;
}

.hoa-empty-icon svg {
    width: 64px;
    height: 64px;
}

.hoa-empty-title {
    font-size: var(--hoa-font-size-lg);
    font-weight: 600;
    color: var(--hoa-gray-700);
    margin: 0 0 0.5rem 0;
}

.hoa-empty-description {
    font-size: var(--hoa-font-size-sm);
    color: var(--hoa-gray-500);
    margin: 0 0 1.5rem 0;
    max-width: 400px;
}

.hoa-empty-action {
    margin-top: 0.5rem;
}

/* Action Required Section */
.hoa-action-required {
    background-color: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--hoa-border-radius-lg);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.hoa-action-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.hoa-action-title-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hoa-action-icon {
    color: #d97706;
}

.hoa-action-title {
    font-size: var(--hoa-font-size-base);
    font-weight: 600;
    color: #92400e;
    margin: 0;
}

.hoa-action-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background-color: #d97706;
    color: white;
    font-size: var(--hoa-font-size-xs);
    font-weight: 600;
    border-radius: 12px;
}

.hoa-action-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hoa-action-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--hoa-white);
    border-radius: var(--hoa-border-radius);
    text-decoration: none;
    transition: var(--hoa-transition-fast);
}

.hoa-action-item:hover {
    background-color: var(--hoa-gray-50);
    transform: translateX(4px);
}

.hoa-action-item:focus {
    outline: 2px solid #d97706;
    outline-offset: 2px;
}

.hoa-action-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: #fef3c7;
    color: #d97706;
    border-radius: var(--hoa-border-radius);
    flex-shrink: 0;
}

.hoa-action-item-content {
    flex: 1;
    min-width: 0;
}

.hoa-action-item-title {
    font-size: var(--hoa-font-size-sm);
    font-weight: 500;
    color: var(--hoa-gray-900);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hoa-action-item-description {
    font-size: var(--hoa-font-size-xs);
    color: var(--hoa-gray-500);
    margin: 0.125rem 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hoa-action-deadline {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--hoa-font-size-xs);
    color: #b45309;
    white-space: nowrap;
}

.hoa-action-arrow {
    color: var(--hoa-gray-400);
    flex-shrink: 0;
}

/* Urgency levels */
.hoa-urgency-high .hoa-action-item-icon {
    background-color: #fee2e2;
    color: var(--hoa-danger);
}

.hoa-urgency-high .hoa-action-deadline {
    color: var(--hoa-danger);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    /* Show mobile menu toggle on tablet and below */
    .hoa-mobile-menu-toggle {
        display: flex;
    }
    
    /* Sidebar slides in from left as overlay */
    .hoa-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 100;
        box-shadow: var(--hoa-shadow-lg);
    }
    
    .hoa-sidebar.hoa-sidebar-open {
        transform: translateX(0);
    }
    
    /* Main content takes full width */
    .hoa-main-content {
        margin-left: 0;
    }
    
    .hoa-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .hoa-dashboard-main {
        padding: 1rem;
    }
    
    .hoa-header-content {
        padding: 1rem;
    }
    
    .hoa-tabs-nav {
        gap: 1rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .hoa-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hoa-document-grid {
        grid-template-columns: 1fr;
    }
    
    /* Content card responsive - keep icon inline but allow footer to wrap */
    .hoa-card-body {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .hoa-card-footer {
        margin-left: 0;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .hoa-card-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .hoa-welcome-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hoa-stat-content {
        padding: 1rem;
    }
    
    .hoa-card-content {
        padding: 1rem;
    }
    
    .hoa-vote-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    /* Dark mode support can be added here in future iterations */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --hoa-gray-400: #666666;
        --hoa-gray-500: #555555;
        --hoa-gray-600: #444444;
    }
}

/* Focus indicators for keyboard navigation */
.hoa-nav-item:focus,
.hoa-tab-button:focus,
.hoa-card-action:focus {
    outline: 2px solid var(--hoa-primary);
    outline-offset: 2px;
}

/* Screen reader only content */
.hoa-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;
}

/* ===== UTILITY CLASSES ===== */
.hoa-icon {
    flex-shrink: 0;
}

.hoa-hidden {
    display: none !important;
}

.hoa-visible {
    display: block !important;
}

/* ===== PROFILE PAGE STYLES ===== */
.hoa-profile-messages {
    padding: 1rem 1.25rem;
    border-radius: var(--hoa-border-radius);
    margin-bottom: 1.5rem;
}

.hoa-message-success {
    background-color: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.hoa-message-error {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.hoa-notice {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--hoa-border-radius);
    margin-bottom: 1.5rem;
}

.hoa-notice-warning {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
}

.hoa-notice-icon {
    flex-shrink: 0;
    color: #d97706;
}

.hoa-notice-content {
    flex: 1;
}

.hoa-notice-content strong {
    display: block;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.hoa-notice-content p {
    margin: 0.25rem 0;
    color: #92400e;
    font-size: var(--hoa-font-size-sm);
}

.hoa-notice-meta {
    font-size: var(--hoa-font-size-xs);
    color: #b45309;
}

.hoa-profile-form {
    max-width: 800px;
}

.hoa-form-section {
    background: var(--hoa-white);
    border-radius: var(--hoa-border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--hoa-shadow-sm);
    border: 1px solid var(--hoa-gray-200);
}

.hoa-form-section-readonly {
    background: var(--hoa-gray-50);
}

.hoa-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--hoa-font-size-lg);
    font-weight: 600;
    color: var(--hoa-gray-800);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--hoa-gray-200);
}

.hoa-section-title svg {
    color: var(--hoa-primary);
}

.hoa-form-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    border-radius: var(--hoa-border-radius);
    font-size: var(--hoa-font-size-sm);
    color: #92400e;
    margin-bottom: 1rem;
}

.hoa-form-notice svg {
    flex-shrink: 0;
    color: #d97706;
}

.hoa-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.hoa-form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

.hoa-form-group {
    display: flex;
    flex-direction: column;
}

.hoa-form-group-wide {
    grid-column: span 2;
}

.hoa-form-label {
    font-size: var(--hoa-font-size-sm);
    font-weight: 500;
    color: var(--hoa-gray-700);
    margin-bottom: 0.375rem;
}

.hoa-required {
    color: var(--hoa-danger);
}

.hoa-form-input,
.hoa-form-select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem !important;
    text-indent: 0 !important;
    border: 1px solid var(--hoa-gray-300);
    border-radius: var(--hoa-border-radius);
    font-size: var(--hoa-font-size-base);
    color: var(--hoa-gray-800);
    background: var(--hoa-white);
    background-image: none;
    transition: var(--hoa-transition-fast);
}

.hoa-form-input:focus,
.hoa-form-select:focus {
    outline: none;
    border-color: var(--hoa-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.hoa-form-input-disabled {
    background: var(--hoa-gray-100);
    color: var(--hoa-gray-500);
    cursor: not-allowed;
}

.hoa-form-help {
    font-size: var(--hoa-font-size-xs);
    color: var(--hoa-gray-500);
    margin-top: 0.25rem;
}

.hoa-form-static {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: var(--hoa-font-size-sm);
    color: var(--hoa-gray-700);
}

.hoa-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: var(--hoa-font-size-xs);
    font-weight: 500;
}

.hoa-status-active {
    background: #d1fae5;
    color: #065f46;
}

.hoa-status-inactive {
    background: var(--hoa-gray-100);
    color: var(--hoa-gray-600);
}

.hoa-link-inline {
    color: var(--hoa-primary);
    text-decoration: none;
    font-size: var(--hoa-font-size-sm);
}

.hoa-link-inline:hover {
    text-decoration: underline;
}

.hoa-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.hoa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--hoa-border-radius);
    font-size: var(--hoa-font-size-base);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--hoa-transition-fast);
    border: none;
}

.hoa-btn-primary {
    background: var(--hoa-primary);
    color: var(--hoa-white);
}

.hoa-btn-primary:hover {
    background: var(--hoa-primary-dark);
}

.hoa-btn-primary:disabled {
    background: var(--hoa-gray-400);
    cursor: not-allowed;
}

.hoa-btn-secondary {
    background: var(--hoa-white);
    color: var(--hoa-gray-700);
    border: 1px solid var(--hoa-gray-300);
}

.hoa-btn-secondary:hover {
    background: var(--hoa-gray-50);
}

.hoa-btn-loading .hoa-spinner {
    animation: hoa-spin 1s linear infinite;
}

@keyframes hoa-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Profile page responsive */
@media (max-width: 768px) {
    .hoa-form-row {
        grid-template-columns: 1fr;
    }
    
    .hoa-form-row-3 {
        grid-template-columns: 1fr;
    }
    
    .hoa-form-group-wide {
        grid-column: span 1;
    }
    
    .hoa-form-actions {
        flex-direction: column;
    }
    
    .hoa-btn {
        width: 100%;
    }
}

/* ===== VOTING PAGES ===== */

/* Page Header */
.hoa-page-header {
    margin-bottom: 1.5rem;
}

.hoa-page-title {
    font-size: var(--hoa-font-size-2xl);
    font-weight: 700;
    color: var(--hoa-gray-900);
    margin: 0 0 0.5rem 0;
}

.hoa-page-description {
    font-size: var(--hoa-font-size-base);
    color: var(--hoa-gray-600);
    margin: 0;
}

/* Breadcrumb */
.hoa-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--hoa-font-size-sm);
}

.hoa-breadcrumb a {
    color: var(--hoa-gray-600);
    text-decoration: none;
}

.hoa-breadcrumb a:hover {
    color: var(--hoa-primary);
}

.hoa-breadcrumb-separator {
    color: var(--hoa-gray-400);
}

.hoa-breadcrumb span[aria-current="page"] {
    color: var(--hoa-gray-900);
    font-weight: 500;
}

/* Votes Grid */
.hoa-votes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Vote Card */
.hoa-vote-card {
    background: var(--hoa-white);
    border: 1px solid var(--hoa-gray-200);
    border-radius: var(--hoa-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--hoa-transition-fast);
}

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

.hoa-vote-card-voted {
    border-color: var(--hoa-success);
    border-width: 2px;
}

.hoa-vote-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--hoa-gray-100);
}

.hoa-vote-card-title-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.hoa-vote-card-title {
    font-size: var(--hoa-font-size-lg);
    font-weight: 600;
    color: var(--hoa-gray-900);
    margin: 0;
    line-height: 1.4;
}

.hoa-vote-card-title a {
    color: inherit;
    text-decoration: none;
}

.hoa-vote-card-title a:hover {
    color: var(--hoa-primary);
}

.hoa-vote-card-body {
    padding: 1.25rem;
    flex: 1;
}

.hoa-vote-card-description {
    font-size: var(--hoa-font-size-sm);
    color: var(--hoa-gray-600);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.hoa-vote-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hoa-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--hoa-font-size-xs);
    color: var(--hoa-gray-500);
}

.hoa-meta-item svg {
    flex-shrink: 0;
}

.hoa-vote-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--hoa-gray-100);
    background: var(--hoa-gray-50);
}

.hoa-vote-card-footer .hoa-btn {
    width: 100%;
    box-sizing: border-box;
}

/* Vote Detail Page - FULL WIDTH */
.hoa-vote-detail {
    /* max-width removed to allow full width layout */
}

.hoa-vote-detail-header {
    margin-bottom: 2rem;
}

.hoa-vote-detail-title-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hoa-vote-detail-title {
    font-size: var(--hoa-font-size-2xl);
    font-weight: 700;
    color: var(--hoa-gray-900);
    margin: 0;
}

.hoa-vote-detail-badges {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.hoa-vote-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.hoa-vote-detail-description {
    background: var(--hoa-gray-50);
    border-radius: var(--hoa-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.hoa-vote-description-content {
    color: var(--hoa-gray-700);
    line-height: 1.6;
}

.hoa-vote-description-content p:last-child {
    margin-bottom: 0;
}

/* Section Title */
.hoa-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--hoa-font-size-lg);
    font-weight: 600;
    color: var(--hoa-gray-900);
    margin: 0 0 1rem 0;
}

/* Document List */
.hoa-vote-detail-documents {
    margin-bottom: 2rem;
}

.hoa-document-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hoa-document-list-item {
    margin: 0;
}

.hoa-document-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--hoa-white);
    border: 1px solid var(--hoa-gray-200);
    border-radius: var(--hoa-radius-md);
    color: var(--hoa-gray-700);
    text-decoration: none;
    transition: var(--hoa-transition-fast);
}

.hoa-document-link:hover {
    background: var(--hoa-gray-50);
    border-color: var(--hoa-primary);
    color: var(--hoa-primary);
}

/* Vote Form */
.hoa-vote-detail-form {
    background: var(--hoa-white);
    border: 1px solid var(--hoa-gray-200);
    border-radius: var(--hoa-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.hoa-vote-options {
    border: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.hoa-vote-option {
    display: block;
    cursor: pointer;
    margin-bottom: 0.75rem;
}

.hoa-vote-option:last-child {
    margin-bottom: 0;
}

.hoa-vote-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hoa-vote-option-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--hoa-gray-50);
    border: 2px solid var(--hoa-gray-200);
    border-radius: var(--hoa-radius-md);
    transition: var(--hoa-transition-fast);
}

.hoa-vote-option:hover .hoa-vote-option-content {
    border-color: var(--hoa-primary);
    background: var(--hoa-white);
}

.hoa-vote-option input:checked + .hoa-vote-option-content {
    border-color: var(--hoa-primary);
    background: rgba(var(--hoa-primary-rgb, 59, 130, 246), 0.05);
}

.hoa-vote-option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--hoa-gray-300);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: var(--hoa-transition-fast);
}

.hoa-vote-option input:checked + .hoa-vote-option-content .hoa-vote-option-radio {
    border-color: var(--hoa-primary);
}

.hoa-vote-option input:checked + .hoa-vote-option-content .hoa-vote-option-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--hoa-primary);
    border-radius: 50%;
}

.hoa-vote-option-text {
    font-size: var(--hoa-font-size-base);
    color: var(--hoa-gray-700);
}

.hoa-vote-form-actions {
    display: flex;
    gap: 1rem;
}

/* Vote Results */
.hoa-vote-detail-results {
    background: var(--hoa-white);
    border: 1px solid var(--hoa-gray-200);
    border-radius: var(--hoa-radius-lg);
    padding: 1.5rem;
}

.hoa-vote-your-choice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(var(--hoa-success-rgb, 34, 197, 94), 0.1);
    border-radius: var(--hoa-radius-md);
    margin-bottom: 1.5rem;
}

.hoa-vote-your-choice-label {
    font-size: var(--hoa-font-size-sm);
    color: var(--hoa-gray-600);
}

.hoa-vote-your-choice-value {
    font-weight: 600;
    color: var(--hoa-success);
}

.hoa-vote-results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hoa-vote-result-item {
    padding: 1rem;
    background: var(--hoa-gray-50);
    border-radius: var(--hoa-radius-md);
}

.hoa-vote-result-user-choice {
    background: rgba(var(--hoa-success-rgb, 34, 197, 94), 0.05);
    border: 1px solid var(--hoa-success);
}

.hoa-vote-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.hoa-vote-result-text {
    font-size: var(--hoa-font-size-sm);
    font-weight: 500;
    color: var(--hoa-gray-700);
}

.hoa-vote-result-your-vote {
    font-size: var(--hoa-font-size-xs);
    color: var(--hoa-success);
    font-weight: 600;
    margin-left: 0.5rem;
}

.hoa-vote-result-count {
    font-size: var(--hoa-font-size-xs);
    color: var(--hoa-gray-500);
}

.hoa-vote-result-bar {
    height: 8px;
    background: var(--hoa-gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.hoa-vote-result-bar-fill {
    height: 100%;
    background: var(--hoa-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.hoa-vote-result-user-choice .hoa-vote-result-bar-fill {
    background: var(--hoa-success);
}

.hoa-vote-results-summary {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--hoa-gray-200);
    font-size: var(--hoa-font-size-sm);
    color: var(--hoa-gray-600);
}

/* Vote Confirmation */
.hoa-vote-detail-confirmation {
    text-align: center;
    padding: 3rem 2rem;
}

.hoa-vote-confirmation-message svg {
    color: var(--hoa-success);
    margin-bottom: 1rem;
}

.hoa-vote-confirmation-message h3 {
    font-size: var(--hoa-font-size-xl);
    font-weight: 600;
    color: var(--hoa-gray-900);
    margin: 0 0 0.5rem 0;
}

.hoa-vote-confirmation-message p {
    color: var(--hoa-gray-600);
    margin: 0;
}

/* Results List Page */
.hoa-results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hoa-result-card {
    background: var(--hoa-white);
    border: 1px solid var(--hoa-gray-200);
    border-radius: var(--hoa-radius-lg);
    overflow: hidden;
}

.hoa-result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--hoa-gray-100);
}

.hoa-result-card-title-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hoa-result-card-title {
    font-size: var(--hoa-font-size-base);
    font-weight: 600;
    color: var(--hoa-gray-900);
    margin: 0;
}

.hoa-result-card-title a {
    color: inherit;
    text-decoration: none;
}

.hoa-result-card-title a:hover {
    color: var(--hoa-primary);
}

.hoa-result-card-date {
    font-size: var(--hoa-font-size-xs);
    color: var(--hoa-gray-500);
}

.hoa-result-card-body {
    padding: 1.25rem;
}

.hoa-result-winner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hoa-result-winner-label {
    font-size: var(--hoa-font-size-sm);
    color: var(--hoa-gray-600);
}

.hoa-result-winner-value {
    font-weight: 600;
    color: var(--hoa-success);
}

.hoa-result-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.hoa-result-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--hoa-font-size-xs);
    color: var(--hoa-gray-500);
}

/* Mini Results Bars */
.hoa-result-mini-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hoa-result-mini-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.hoa-result-mini-bar-label {
    font-size: var(--hoa-font-size-xs);
    color: var(--hoa-gray-600);
}

.hoa-result-mini-bar-value {
    font-size: var(--hoa-font-size-xs);
    font-weight: 600;
    color: var(--hoa-gray-700);
}

.hoa-result-mini-bar-track {
    height: 6px;
    background: var(--hoa-gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.hoa-result-mini-bar-fill {
    height: 100%;
    background: var(--hoa-primary);
    border-radius: 3px;
}

.hoa-result-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--hoa-gray-100);
    background: var(--hoa-gray-50);
}

.hoa-result-card-footer .hoa-btn {
    width: 100%;
    box-sizing: border-box;
}

/* Button Sizes */
.hoa-btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: var(--hoa-font-size-sm);
}

.hoa-btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: var(--hoa-font-size-base);
}

/* Screen Reader Only */
.hoa-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;
}

/* Badge Variants */
.hoa-badge-active {
    background: rgba(var(--hoa-primary-rgb, 59, 130, 246), 0.1);
    color: var(--hoa-primary);
}

.hoa-badge-closed {
    background: var(--hoa-gray-100);
    color: var(--hoa-gray-600);
}

.hoa-badge-success {
    background: rgba(var(--hoa-success-rgb, 34, 197, 94), 0.1);
    color: var(--hoa-success);
}

.hoa-badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.hoa-badge-locked {
    background: rgba(239, 68, 68, 0.1);
    color: var(--hoa-danger, #ef4444);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.hoa-badge-locked svg {
    flex-shrink: 0;
}

/* ===== ELIGIBILITY NOTICES ===== */

/* Vote card eligibility notice (compact) */
.hoa-vote-eligibility-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--hoa-border-radius);
    margin-bottom: 0.75rem;
    font-size: var(--hoa-font-size-sm);
}

.hoa-vote-eligibility-notice svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.hoa-eligibility-locked {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--hoa-danger, #ef4444);
}

.hoa-eligibility-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #b45309;
}

/* Vote detail eligibility notice (expanded) */
.hoa-vote-eligibility-notice--detail {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    flex-direction: row;
    align-items: flex-start;
}

.hoa-eligibility-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

.hoa-eligibility-locked .hoa-eligibility-icon {
    background: rgba(239, 68, 68, 0.15);
}

.hoa-eligibility-warning .hoa-eligibility-icon {
    background: rgba(245, 158, 11, 0.15);
}

.hoa-eligibility-content {
    flex: 1;
}

.hoa-eligibility-title {
    margin: 0 0 0.5rem 0;
    font-size: var(--hoa-font-size-lg);
    font-weight: 600;
}

.hoa-eligibility-message {
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.hoa-eligibility-requirements {
    margin: 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.hoa-eligibility-requirements li {
    margin-bottom: 0.25rem;
}

/* Locked vote card styling */
.hoa-vote-card-locked {
    opacity: 0.85;
    border-color: rgba(239, 68, 68, 0.3);
}

.hoa-vote-card-locked .hoa-vote-card-title a {
    color: var(--hoa-gray-600);
}

/* Warning vote card styling */
.hoa-vote-card-warning {
    border-color: rgba(245, 158, 11, 0.3);
}

/* Locked vote detail styling */
.hoa-vote-detail-locked {
    /* Subtle visual indication */
}

/* Voting Pages Responsive */
@media (max-width: 768px) {
    .hoa-votes-grid {
        grid-template-columns: 1fr;
    }
    
    .hoa-vote-detail-title-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hoa-vote-detail-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hoa-vote-form-actions {
        flex-direction: column;
    }
    
    .hoa-vote-form-actions .hoa-btn {
        width: 100%;
    }
    
    .hoa-result-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hoa-result-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ===== DOCUMENTS LIST ===== */

/* Search Input */
.hoa-document-search {
    position: relative;
}

.hoa-search-input {
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--hoa-gray-300);
    border-radius: var(--hoa-radius-md);
    font-size: var(--hoa-font-size-sm);
    width: 200px;
    transition: var(--hoa-transition-fast);
}

.hoa-search-input:focus {
    outline: none;
    border-color: var(--hoa-primary);
    box-shadow: 0 0 0 3px rgba(var(--hoa-primary-rgb, 59, 130, 246), 0.1);
}

.hoa-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hoa-gray-400);
    pointer-events: none;
}

/* Document Type Filter */
.hoa-document-filter {
    display: flex;
    align-items: center;
}

.hoa-filter-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--hoa-gray-300);
    border-radius: var(--hoa-radius-md);
    font-size: var(--hoa-font-size-sm);
    background: var(--hoa-white);
    cursor: pointer;
    appearance: none;
    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='%236b7280' 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 0.75rem center;
    transition: var(--hoa-transition-fast);
}

.hoa-filter-select:focus {
    outline: none;
    border-color: var(--hoa-primary);
    box-shadow: 0 0 0 3px rgba(var(--hoa-primary-rgb, 59, 130, 246), 0.1);
}

.hoa-filter-select:hover {
    border-color: var(--hoa-gray-400);
}

/* Documents List */
.hoa-documents-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hoa-document-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--hoa-white);
    border: 1px solid var(--hoa-gray-200);
    border-radius: var(--hoa-radius-lg);
    transition: var(--hoa-transition-fast);
}

.hoa-document-item:hover {
    border-color: var(--hoa-gray-300);
    box-shadow: var(--hoa-shadow-sm);
}

.hoa-document-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hoa-gray-100);
    border-radius: var(--hoa-radius-md);
    color: var(--hoa-gray-500);
}

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

.hoa-document-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.hoa-document-title {
    font-size: var(--hoa-font-size-base);
    font-weight: 600;
    color: var(--hoa-gray-900);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hoa-document-description {
    font-size: var(--hoa-font-size-sm);
    color: var(--hoa-gray-600);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.hoa-document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: var(--hoa-font-size-xs);
    color: var(--hoa-gray-500);
}

.hoa-document-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hoa-document-type {
    padding: 0.125rem 0.375rem;
    background: var(--hoa-gray-100);
    border-radius: var(--hoa-radius-sm);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.025em;
}

.hoa-document-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Button with icon and text */
.hoa-btn svg {
    flex-shrink: 0;
}

.hoa-btn-text {
    display: inline;
}

/* No Results */
.hoa-no-results {
    padding: 2rem;
}

/* Nav Count Badge */
.hoa-nav-count {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    background: var(--hoa-gray-200);
    border-radius: var(--hoa-radius-full);
    font-size: var(--hoa-font-size-xs);
    font-weight: 500;
    color: var(--hoa-gray-600);
}

.hoa-nav-item:hover .hoa-nav-count,
.hoa-nav-active .hoa-nav-count {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
}

/* Collapsible Nav Sections */
.hoa-nav-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.hoa-nav-section-toggle:hover {
    background: var(--hoa-gray-100);
}

.hoa-nav-section-toggle .hoa-nav-section-title {
    font-size: var(--hoa-font-size-xs);
    font-weight: 600;
    color: var(--hoa-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hoa-nav-chevron {
    color: var(--hoa-gray-400);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.hoa-nav-collapsible.hoa-nav-collapsed .hoa-nav-chevron {
    transform: rotate(-90deg);
}

.hoa-nav-section-items {
    overflow: hidden;
    transition: max-height 0.2s ease, opacity 0.2s ease;
    max-height: 500px;
    opacity: 1;
    padding-top: 0.25rem;
}

.hoa-nav-collapsible.hoa-nav-collapsed .hoa-nav-section-items {
    max-height: 0;
    opacity: 0;
}

/* Override old h3 styles for collapsible sections */
.hoa-nav-collapsible .hoa-nav-section-title {
    margin: 0;
    padding: 0;
}

/* Category Links in Document Meta */
.hoa-document-categories {
    display: inline;
}

.hoa-meta-label {
    color: var(--hoa-gray-500);
    margin-right: 0.25rem;
}

.hoa-category-link {
    color: var(--hoa-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.hoa-category-link:hover {
    color: var(--hoa-primary-dark);
    text-decoration: underline;
}

/* Documents Responsive */
@media (max-width: 768px) {
    /* Header layout: wrap to two rows on mobile */
    .hoa-header-content {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .hoa-header-left {
        flex: 1;
        min-width: 0;
    }
    
    .hoa-header-right {
        width: 100%;
        display: flex;
        gap: 0.5rem;
        order: 3;
    }
    
    .hoa-document-filter {
        flex: 1;
        min-width: 0;
    }
    
    .hoa-filter-select {
        width: 100%;
    }
    
    .hoa-document-search {
        flex: 1;
        min-width: 0;
    }
    
    .hoa-search-input {
        width: 100%;
    }
    
    /* Document items */
    .hoa-document-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hoa-document-icon {
        width: 32px;
        height: 32px;
    }
    
    /* Document actions: side-by-side buttons on mobile */
    .hoa-document-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }
    
    .hoa-document-actions .hoa-btn {
        flex: 1;
        justify-content: center;
        padding: 0.5rem 0.75rem;
    }
    
    .hoa-btn-text {
        display: none;
    }
}

/* ===== TOAST NOTIFICATIONS ===== */
.hoa-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    min-width: 300px;
    max-width: 500px;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hoa-toast-show {
    transform: translateX(0);
}

.hoa-toast-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.hoa-toast-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.hoa-toast-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.hoa-toast-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.hoa-toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hoa-toast-message {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.hoa-toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.hoa-toast-close:hover {
    opacity: 1;
}

/* ===== SKIP LINKS (Accessibility) ===== */
.hoa-skip-links {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 1000;
}

.hoa-skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: top 0.3s ease;
}

.hoa-skip-link:focus {
    top: 10px;
}

@media (max-width: 640px) {
    .hoa-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* ===== NOTIFICATIONS DROPDOWN ===== */
.hoa-notifications-dropdown {
    position: fixed;
    width: 380px;
    max-height: 480px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1001;
    display: none;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hoa-notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.hoa-notifications-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.hoa-notifications-actions {
    display: flex;
    gap: 8px;
}

.hoa-mark-all-read,
.hoa-clear-all-notifications {
    background: none;
    border: none;
    color: var(--hoa-primary, #2563eb);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.hoa-clear-all-notifications {
    color: #dc2626;
}

.hoa-mark-all-read:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

.hoa-clear-all-notifications:hover {
    background-color: rgba(220, 38, 38, 0.1);
}

.hoa-notifications-list {
    max-height: 360px;
    overflow-y: auto;
}

.hoa-notifications-loading,
.hoa-notifications-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 0.875rem;
}

.hoa-notifications-error {
    color: #dc2626;
}

.hoa-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: var(--hoa-primary, #2563eb);
    border-radius: 50%;
    animation: hoa-spin 0.8s linear infinite;
}

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

.hoa-notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    position: relative;
    transition: background-color 0.15s ease;
}

.hoa-notification-item:hover {
    background-color: #f9fafb;
}

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

.hoa-notification-unread {
    background-color: #eff6ff;
}

.hoa-notification-unread:hover {
    background-color: #dbeafe;
}

.hoa-notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #6b7280;
}

.hoa-notification-icon-document {
    background-color: #dbeafe;
    color: #2563eb;
}

.hoa-notification-icon-vote {
    background-color: #d1fae5;
    color: #059669;
}

.hoa-notification-icon-announcement {
    background-color: #fef3c7;
    color: #d97706;
}

.hoa-notification-icon-account {
    background-color: #e0e7ff;
    color: #4f46e5;
}

.hoa-notification-icon-security {
    background-color: #fee2e2;
    color: #dc2626;
}

.hoa-notification-icon-system {
    background-color: #f3f4f6;
    color: #6b7280;
}

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

.hoa-notification-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hoa-notification-message {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hoa-notification-time {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
}

.hoa-notification-link {
    position: absolute;
    inset: 0;
}

.hoa-notification-delete {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 4px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    z-index: 1;
}

.hoa-notification-delete:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

.hoa-notifications-footer {
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    background: #f9fafb;
}

.hoa-notifications-empty {
    color: #6b7280;
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    .hoa-notifications-dropdown {
        width: calc(100vw - 20px);
        right: 10px !important;
        left: 10px !important;
        max-height: 70vh;
    }
}

/* ===== PROFILE PICTURE UPLOAD ===== */
.hoa-profile-picture-section {
    margin-bottom: 2rem;
}

.hoa-profile-picture-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--hoa-gray-50);
    border-radius: 12px;
    border: 1px solid var(--hoa-gray-200);
}

.hoa-profile-picture-preview {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.hoa-profile-picture-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid var(--hoa-white);
    border-radius: 50%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.hoa-profile-picture-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.5);
    color: var(--hoa-white);
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 50%;
}

.hoa-profile-picture-preview:hover .hoa-profile-picture-overlay {
    opacity: 1;
}

.hoa-profile-picture-overlay svg {
    width: 24px;
    height: 24px;
}

.hoa-profile-picture-overlay span {
    font-size: 0.75rem;
    font-weight: 500;
}

.hoa-profile-picture-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hoa-profile-picture-actions .hoa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hoa-btn-danger-outline {
    background: transparent;
    border: 1px solid var(--hoa-danger, #dc2626);
    color: var(--hoa-danger, #dc2626);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hoa-btn-danger-outline:hover {
    background: var(--hoa-danger, #dc2626);
    color: var(--hoa-white);
}

.hoa-btn-danger-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Screen reader only class */
.hoa-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;
}

@media (max-width: 640px) {
    .hoa-profile-picture-container {
        padding: 1rem;
    }
    
    .hoa-profile-picture-preview {
        width: 120px;
        height: 120px;
    }
    
    .hoa-profile-picture-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hoa-profile-picture-actions .hoa-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== PROFILE PICTURE CROP MODAL ===== */
/* Base modal styles used by the crop modal */
.hoa-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.hoa-modal[style*="display: block"] {
    display: flex !important;
}

.hoa-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hoa-modal-content {
    position: relative;
    background: var(--hoa-white, #ffffff);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
    animation: hoaModalSlideIn 0.2s ease-out;
}

.hoa-crop-modal-content {
    max-width: 500px;
    width: 90vw;
}

@keyframes hoaModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hoa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--hoa-gray-200, #e5e7eb);
}

.hoa-modal-header h3,
.hoa-modal-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--hoa-gray-900, #111827);
}

.hoa-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--hoa-gray-500, #6b7280);
    transition: all 0.15s ease;
}

.hoa-modal-close:hover {
    background: var(--hoa-gray-100, #f3f4f6);
    color: var(--hoa-gray-700, #374151);
}

.hoa-modal-body {
    padding: 1.5rem;
}

.hoa-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.5rem 1.5rem;
}

.hoa-modal-footer .hoa-btn {
    width: 100%;
    justify-content: center;
}

.hoa-crop-instructions {
    text-align: center;
    color: var(--hoa-gray-600);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.hoa-crop-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.hoa-crop-area {
    position: relative;
    width: 300px;
    height: 300px;
    overflow: hidden;
    background: var(--hoa-gray-900);
    border-radius: 8px;
    cursor: grab;
    touch-action: none;
}

.hoa-crop-area:active {
    cursor: grabbing;
}

#hoa-crop-image {
    position: absolute;
    max-width: none;
    max-height: none;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.hoa-crop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.hoa-crop-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    border: 2px solid var(--hoa-white);
    pointer-events: none;
}

.hoa-crop-controls {
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.hoa-zoom-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 300px;
}

.hoa-zoom-control svg {
    flex-shrink: 0;
    color: var(--hoa-gray-500);
}

.hoa-zoom-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--hoa-gray-200);
    border-radius: 3px;
    outline: none;
}

.hoa-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--hoa-primary, #2563eb);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.hoa-zoom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.hoa-zoom-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--hoa-primary, #2563eb);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

@media (max-width: 480px) {
    .hoa-crop-area {
        width: 250px;
        height: 250px;
    }
    
    .hoa-crop-circle {
        width: 160px;
        height: 160px;
    }
}

/* ==========================================================================
   Vote Detail - Single Column Layout (Full Width)
   ========================================================================== */

/* Row container - single column, full width */
.hoa-vote-content-row {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

/* All columns full width */
.hoa-vote-content-col {
    width: 100%;
}

/* Form column card styling */
.hoa-vote-content-col--form .hoa-vote-detail-form,
.hoa-vote-content-col--form .hoa-vote-detail-results,
.hoa-vote-content-col--form .hoa-vote-detail-confirmation {
    background: var(--hoa-card-bg, #ffffff);
    border: 1px solid var(--hoa-border-color, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

/* Document panel styling - MUST fill its parent column */
.hoa-document-panel {
    width: 100%;
    box-sizing: border-box;
    background: var(--hoa-card-bg, #ffffff);
    border: 1px solid var(--hoa-border-color, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1.5rem;
    position: sticky;
    top: 1rem;
}

/* Ensure the document column itself fills available space */
.hoa-vote-content-col--docs {
    display: flex;
    flex-direction: column;
}

/* PDF Viewer container */
.hoa-pdf-viewer {
    display: flex;
    flex-direction: column;
    background: #525659;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
    height: 1250px;
}

.hoa-pdf-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem;
    background: #3a3d40;
}

.hoa-pdf-iframe {
    width: 100%;
    height: 700px;
    border: none;
    background: #525659;
    display: block;
}

@media (min-width: 1024px) {
    .hoa-pdf-iframe {
        height: 800px;
    }
}

/* Document downloads */
.hoa-document-downloads {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hoa-btn-block {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
}

.hoa-btn-light {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.hoa-btn-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.hoa-vote-document-panel .hoa-section-title {
    margin-bottom: 1rem;
}

/* Document Tabs */
.hoa-document-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--hoa-border-color, #e5e7eb);
    padding-bottom: 0.75rem;
}

.hoa-document-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--hoa-border-color, #e5e7eb);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--hoa-text-secondary, #6b7280);
}

.hoa-document-tab:hover {
    background: var(--hoa-bg-hover, #f3f4f6);
    color: var(--hoa-text-primary, #111827);
}

.hoa-document-tab.active {
    background: var(--hoa-primary, #2563eb);
    color: #ffffff;
    border-color: var(--hoa-primary, #2563eb);
}

/* Document Preview Container */
.hoa-document-preview-container {
    background: #f9fafb;
    border: 1px solid var(--hoa-border-color, #e5e7eb);
    border-radius: 0.5rem;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

/* ==========================================================================
   Native PDF Viewer (Desktop)
   ========================================================================== */
.hoa-pdf-viewer-desktop {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 600px;
    min-height: 500px;
    position: relative;
    background: #525659;
    border-radius: 0.5rem;
    overflow: hidden;
}

.hoa-pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #323639;
    border-bottom: 1px solid #474a4d;
    flex-shrink: 0;
}

.hoa-pdf-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hoa-pdf-open-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.hoa-pdf-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #525659;
}

/* Mobile: Hide desktop viewer, show mobile UI */
.hoa-pdf-viewer-mobile {
    display: none;
}

@media (max-width: 1024px) {
    .hoa-pdf-viewer-desktop {
        display: none;
    }
    
    .hoa-pdf-viewer-mobile {
        display: block;
    }
}

/* ==========================================================================
   Native PDF Viewer (Mobile/Tablet)
   ========================================================================== */
.hoa-pdf-mobile-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px dashed var(--hoa-border-color, #cbd5e1);
    border-radius: 0.75rem;
    text-align: center;
    min-height: 200px;
}

.hoa-pdf-mobile-preview svg {
    color: var(--hoa-primary, #2563eb);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.hoa-pdf-mobile-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--hoa-text-primary, #1e293b);
    margin: 0 0 0.25rem 0;
}

.hoa-pdf-mobile-hint {
    font-size: 0.875rem;
    color: var(--hoa-text-secondary, #64748b);
    margin: 0 0 1.25rem 0;
}

.hoa-pdf-mobile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--hoa-primary, #2563eb);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.hoa-pdf-mobile-btn:hover {
    background: var(--hoa-primary-dark, #1d4ed8);
    color: #ffffff;
    transform: translateY(-1px);
}

.hoa-pdf-mobile-btn svg {
    color: currentColor;
    margin-bottom: 0;
    opacity: 1;
}

/* ==========================================================================
   PDF.js Fullscreen Mode
   ========================================================================== */
.hoa-pdfjs-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.hoa-pdfjs-fullscreen .hoa-pdfjs-toolbar {
    padding: 0.75rem 1rem;
}

.hoa-pdfjs-fullscreen .hoa-pdfjs-iframe {
    height: calc(100vh - 48px);
}

/* Hide body scroll when fullscreen is active */
body.hoa-fullscreen-active {
    overflow: hidden !important;
}

/* ==========================================================================
   Legacy PDF iframe styles (fallback)
   ========================================================================== */
.hoa-pdf-iframe-container {
    width: 100%;
    height: 500px;
    min-height: 400px;
}

.hoa-pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0.5rem;
}

@media (min-width: 1024px) {
    .hoa-pdf-iframe-container {
        height: 600px;
    }
}

/* PDF loading and error states */
.hoa-pdf-loading,
.hoa-pdf-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--hoa-text-secondary, #6b7280);
}

.hoa-pdf-error svg {
    color: var(--hoa-danger, #dc2626);
}

/* ==========================================================================
   Image Preview with PhotoSwipe
   ========================================================================== */
.hoa-image-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 400px;
    background: #f9fafb;
}

.hoa-image-preview img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 0.375rem;
}

/* PhotoSwipe gallery link */
.hoa-photoswipe-item {
    position: relative;
    display: inline-block;
    cursor: zoom-in;
    text-decoration: none;
}

.hoa-photoswipe-item:hover .hoa-preview-image {
    opacity: 0.9;
}

.hoa-photoswipe-item:focus {
    outline: 2px solid var(--hoa-primary, #2563eb);
    outline-offset: 4px;
    border-radius: 0.375rem;
}

/* Zoom hint overlay */
.hoa-image-zoom-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 9999px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.hoa-photoswipe-item:hover .hoa-image-zoom-hint,
.hoa-photoswipe-item:focus .hoa-image-zoom-hint {
    opacity: 1;
}

.hoa-image-zoom-hint svg {
    flex-shrink: 0;
}

/* No Preview State */
.hoa-document-no-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--hoa-text-secondary, #6b7280);
    text-align: center;
    padding: 2rem;
}

.hoa-document-no-preview svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Document Actions */
.hoa-document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.hoa-document-actions .hoa-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

/* ==========================================================================
   Responsive: Tablet - Stack layout
   ========================================================================== */
@media (max-width: 1024px) {
    .hoa-vote-detail-layout.has-documents {
        grid-template-columns: 1fr;
    }
    
    /* On tablet: Vote form comes FIRST (order: 1), Documents SECOND (order: 2) */
    .hoa-vote-form-panel {
        order: 1;
    }
    
    .hoa-vote-document-panel {
        order: 2;
        position: static;
    }
    
    /* Reduce PDF viewer height on tablet */
    .hoa-pdfjs-viewer-container {
        height: 450px;
    }
}

/* ==========================================================================
   Responsive: Mobile - Compact layout with fixed height viewer
   ========================================================================== */
@media (max-width: 640px) {
    /* Fix mobile clipping - ensure proper box-sizing and overflow */
    .hoa-vote-detail,
    .hoa-vote-detail-layout,
    .hoa-vote-form-panel,
    .hoa-vote-document-panel {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .hoa-vote-document-panel {
        padding: 0.75rem;
        margin-left: 0;
        margin-right: 0;
    }
    
    .hoa-document-preview-container {
        min-height: 300px;
        overflow: hidden;
    }
    
    /* Mobile PDF viewer - fixed smaller height */
    .hoa-pdfjs-viewer-container {
        height: 350px;
        min-height: 300px;
    }
    
    .hoa-pdfjs-toolbar {
        padding: 0.375rem 0.5rem;
    }
    
    .hoa-pdfjs-fullscreen-btn .hoa-fullscreen-text {
        display: none; /* Hide text, show only icon on mobile */
    }
    
    .hoa-pdfjs-fullscreen-btn {
        padding: 0.5rem;
    }
    
    /* Image preview adjustments */
    .hoa-image-preview {
        min-height: 300px;
        padding: 0.75rem;
    }
    
    .hoa-image-preview img {
        max-height: 350px;
    }
    
    .hoa-image-zoom-hint {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }
    
    .hoa-document-tabs {
        flex-wrap: wrap;
    }
    
    .hoa-document-tab {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .hoa-document-actions {
        flex-direction: row;
    }
    
    .hoa-document-actions .hoa-btn {
        flex: 1;
        min-width: 0;
    }
}

/* ==========================================================================
   Document List Inline Preview
   ========================================================================== */

/* Document item structure with preview - preserve original layout */
.hoa-documents-list .hoa-document-item {
    display: flex;
    flex-direction: column;
}

.hoa-documents-list .hoa-document-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure document info takes available space, buttons stay right */
.hoa-documents-list .hoa-document-row .hoa-document-info {
    flex: 1;
    min-width: 0;
}

.hoa-documents-list .hoa-document-row .hoa-document-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* File type icon colors */
.hoa-document-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: var(--hoa-gray-100, #f3f4f6);
}

.hoa-document-icon svg {
    width: 24px;
    height: 24px;
}

.hoa-document-icon-pdf {
    background: #fef2f2;
    color: #dc2626;
}

.hoa-document-icon-doc,
.hoa-document-icon-docx {
    background: #eff6ff;
    color: #2563eb;
}

.hoa-document-icon-xls,
.hoa-document-icon-xlsx {
    background: #f0fdf4;
    color: #16a34a;
}

.hoa-document-icon-ppt,
.hoa-document-icon-pptx {
    background: #fff7ed;
    color: #ea580c;
}

.hoa-document-icon-jpg,
.hoa-document-icon-jpeg,
.hoa-document-icon-png,
.hoa-document-icon-gif,
.hoa-document-icon-webp {
    background: #fdf4ff;
    color: #a855f7;
}

.hoa-document-icon-zip,
.hoa-document-icon-rar {
    background: #fefce8;
    color: #ca8a04;
}

.hoa-document-icon-txt,
.hoa-document-icon-csv {
    background: #f8fafc;
    color: #64748b;
}

.hoa-document-icon-mp3,
.hoa-document-icon-wav {
    background: #fef3c7;
    color: #d97706;
}

.hoa-document-icon-mp4,
.hoa-document-icon-mov {
    background: #ecfeff;
    color: #0891b2;
}

/* Preview toggle button states */
.hoa-preview-toggle[aria-expanded="true"] .hoa-preview-icon-eye,
.hoa-preview-toggle[aria-expanded="true"] .hoa-preview-text {
    display: none;
}

.hoa-preview-toggle[aria-expanded="true"] .hoa-preview-icon-close,
.hoa-preview-toggle[aria-expanded="true"] .hoa-close-text {
    display: inline-flex !important;
}

.hoa-preview-toggle[aria-expanded="false"] .hoa-preview-icon-close,
.hoa-preview-toggle[aria-expanded="false"] .hoa-close-text {
    display: none;
}

/* Inline preview container - full width */
.hoa-document-preview-container {
    border-top: 1px solid var(--hoa-gray-200, #e5e7eb);
    background: var(--hoa-gray-50, #f9fafb);
    padding: 1rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.hoa-document-preview-content {
    border-radius: 0.5rem;
    overflow: hidden;
    background: #525659;
    width: 100%;
}

/* PDF preview in document list - full width */
.hoa-inline-pdf-viewer {
    display: flex;
    flex-direction: column;
    background: #525659;
    border-radius: 0.5rem;
    overflow: hidden;
    width: 100%;
}

.hoa-inline-pdf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #3a3d40;
    color: #ffffff;
}

.hoa-inline-pdf-toolbar-title {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.hoa-inline-pdf-toolbar-actions {
    display: flex;
    gap: 0.5rem;
}

.hoa-inline-pdf-toolbar .hoa-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.hoa-inline-pdf-iframe {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    max-height: 800px;
    border: none;
    background: #525659;
    display: block;
}

/* Image preview in document list */
.hoa-inline-image-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--hoa-gray-100, #f3f4f6);
    border-radius: 0.5rem;
}

.hoa-inline-image-preview img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 0.375rem;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.hoa-inline-image-preview img:hover {
    transform: scale(1.02);
}

.hoa-inline-image-toolbar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Loading state */
.hoa-preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--hoa-gray-500, #6b7280);
}

.hoa-preview-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--hoa-gray-300, #d1d5db);
    border-top-color: var(--hoa-primary, #2563eb);
    border-radius: 50%;
    animation: hoa-spin 0.8s linear infinite;
    margin-right: 0.75rem;
}

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

/* Responsive adjustments for inline preview */
@media (max-width: 768px) {
    .hoa-document-row {
        flex-wrap: wrap;
    }
    
    .hoa-inline-pdf-iframe {
        height: 350px;
    }
    
    .hoa-inline-image-preview img {
        max-height: 300px;
    }
    
    .hoa-inline-pdf-toolbar {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .hoa-inline-pdf-toolbar-title {
        max-width: 100%;
    }
}

/* ==========================================================================
   Announcements List & Detail Pages
   ========================================================================== */

/* Announcements List */
.hoa-announcements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hoa-announcement-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--hoa-white);
    border: 1px solid var(--hoa-gray-200);
    border-radius: var(--hoa-radius-lg, 0.75rem);
    transition: var(--hoa-transition-fast);
}

.hoa-announcement-item:hover {
    border-color: var(--hoa-gray-300);
    box-shadow: var(--hoa-shadow-sm);
}

.hoa-announcement-item.hoa-announcement-priority-high {
    border-left: 3px solid #f59e0b;
}

.hoa-announcement-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    border-radius: var(--hoa-radius-md, 0.5rem);
    color: #d97706;
}

.hoa-announcement-priority-high .hoa-announcement-icon {
    background: #fee2e2;
    color: #dc2626;
}

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

.hoa-announcement-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.hoa-announcement-title {
    font-size: var(--hoa-font-size-base, 1rem);
    font-weight: 600;
    color: var(--hoa-gray-900);
    margin: 0;
}

.hoa-announcement-title a {
    color: inherit;
    text-decoration: none;
}

.hoa-announcement-title a:hover {
    color: var(--hoa-primary);
    text-decoration: underline;
}

.hoa-announcement-excerpt {
    font-size: var(--hoa-font-size-sm, 0.875rem);
    color: var(--hoa-gray-600);
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.hoa-announcement-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: var(--hoa-font-size-xs, 0.75rem);
    color: var(--hoa-gray-500);
}

.hoa-announcement-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-self: center;
}

/* Announcement Detail */
.hoa-announcement-detail {
    background: var(--hoa-white);
    border: 1px solid var(--hoa-gray-200);
    border-radius: var(--hoa-radius-lg, 0.75rem);
    overflow: hidden;
}

.hoa-announcement-detail-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--hoa-gray-100);
}

.hoa-announcement-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.hoa-badge-category {
    background-color: var(--hoa-gray-100);
    color: var(--hoa-gray-700);
}

.hoa-announcement-detail-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--hoa-gray-900);
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.hoa-announcement-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: var(--hoa-font-size-sm, 0.875rem);
    color: var(--hoa-gray-500);
}

.hoa-announcement-detail-content {
    padding: 2rem;
    font-size: var(--hoa-font-size-base, 1rem);
    line-height: 1.7;
    color: var(--hoa-gray-700);
}

.hoa-announcement-detail-content p {
    margin: 0 0 1rem 0;
}

.hoa-announcement-detail-content p:last-child {
    margin-bottom: 0;
}

.hoa-announcement-detail-content h2,
.hoa-announcement-detail-content h3,
.hoa-announcement-detail-content h4 {
    color: var(--hoa-gray-900);
    margin: 1.5rem 0 0.75rem 0;
}

.hoa-announcement-detail-content ul,
.hoa-announcement-detail-content ol {
    margin: 0 0 1rem 1.5rem;
}

.hoa-announcement-detail-content li {
    margin-bottom: 0.5rem;
}

.hoa-announcement-detail-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--hoa-gray-100);
    background: var(--hoa-gray-50);
}

/* Responsive */
@media (max-width: 768px) {
    .hoa-announcement-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hoa-announcement-actions {
        align-self: flex-start;
        width: 100%;
    }
    
    .hoa-announcement-actions .hoa-btn {
        width: 100%;
        justify-content: center;
    }
    
    .hoa-announcement-detail-header,
    .hoa-announcement-detail-content,
    .hoa-announcement-detail-footer {
        padding: 1rem 1.25rem;
    }
    
    .hoa-announcement-detail-title {
        font-size: 1.25rem;
    }
}
