/* Global styles and variables */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    
    --success: #10b981;
    --success-bg: #d1fae5;
    --success-border: #34d399;
    
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --warning-border: #fbbf24;
    
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --danger-border: #f87171;
    
    --dark: #1f2937;
    --light-bg: #f3f4f6;
    --card-bg: #ffffff;
    --text-muted: #6b7280;
    
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--light-bg);
    color: var(--dark);
    font-size: 1.15rem; /* Increased base font size for elderly accessibility */
    line-height: 1.6;
    padding-bottom: 2rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark);
}

/* Accessibility and button sizes */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.form-control, .form-select {
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    background-color: #f9fafb;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    background-color: #fff;
}

/* Card layout */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    background-color: var(--card-bg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: transparent;
    border-bottom: 2px solid var(--light-bg);
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Single scroll header spacing */
.building-header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: white;
    padding: 2.5rem 1rem;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.building-logo {
    max-height: 80px;
    object-fit: contain;
    border-radius: 50%;
    background-color: white;
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Announcements Slider styling */
.announcement-carousel {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.2);
}

.announcement-item p {
    font-size: 1.3rem;
    font-weight: 500;
    margin: 0;
}

/* Dues 12-Month Grid System */
.dues-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 992px) {
    .dues-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dues-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tarık'ın Notu: 12 ayın kutusu mobilde alt alta uzamasın diye 2'li (2 sütunlu) yerleşim yaptım. Kutuları da biraz ufaltarak sığdırdım. */
@media (max-width: 480px) {
    .dues-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .due-box {
        padding: 1rem 0.5rem;
    }
    .due-box-month {
        font-size: 1.1rem;
    }
    .due-box-status-icon {
        font-size: 1.25rem;
    }
    .due-box-status-text {
        font-size: 0.85rem;
    }
}

/* Individual monthly boxes */
.due-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border-radius: 16px;
    border: 2px solid transparent;
    text-align: center;
    cursor: default;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.due-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.due-box-month {
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.due-box-status-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.due-box-status-text {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Green: Paid */
.due-box-paid {
    background-color: var(--success-bg);
    color: var(--success);
    border-color: var(--success-border);
}

/* Yellow: Partial */
.due-box-partial {
    background-color: var(--warning-bg);
    color: var(--warning);
    border-color: var(--warning-border);
}

/* Red: Unpaid */
.due-box-unpaid {
    background-color: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-border);
}

/* Custom Tooltip Styling for Dues */
.tooltip-custom-inner {
    text-align: left;
    max-width: 320px;
    padding: 12px;
    font-size: 1.05rem;
}

/* Public Financial Stats Card */
.stat-card {
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 100%;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-val {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
}

/* Admin accordion header customizations */
.admin-accordion .accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.admin-accordion .accordion-button {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark);
    padding: 1.5rem;
    background-color: var(--card-bg);
}

.admin-accordion .accordion-button:not(.collapsed) {
    background-color: var(--primary-light);
    color: var(--primary);
    box-shadow: none;
}

.admin-accordion .accordion-body {
    background-color: var(--card-bg);
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--light-bg);
}

/* Profile photo preview */
.profile-preview-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
}

.profile-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Auth Pages Styling */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, rgb(90, 92, 234) 0%, rgb(32, 45, 142) 90.1%);
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 2.5rem 2rem;
}

/* Quick action badge */
.badge-large {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}