/* =============================================
   Sadaat Welfare Society - Custom Styles
   Color Palette:
   Primary: Deep Green #006400
   Accent: Gold #D4AF37
   Background: Off-White #F4F7F6
   ============================================= */

/* Google Font - Urdu */
@import url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu:wght@400;600;700&display=swap');

:root {
    --primary: #006400;
    --primary-dark: #004d00;
    --primary-light: #e8f5e9;
    --accent: #D4AF37;
    --accent-dark: #b8960c;
    --bg: #F4F7F6;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --white: #ffffff;
    --danger: #dc3545;
    --success: #198754;
    --warning: #ffc107;
    --border: #dee2e6;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --radius: 12px;
}

/* Base */
* { box-sizing: border-box; }

body {
    font-family: 'Noto Nastaliq Urdu', 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    line-height: 1.8;
}

/* Navbar */
.bg-primary-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    box-shadow: 0 2px 10px rgba(0,100,0,0.3);
}

.navbar-brand .site-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent) !important;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: var(--accent) !important;
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    padding: 1.5rem 0;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-header .card-title {
    color: var(--accent);
    margin: 0;
}

/* Stat Cards (Dashboard) */
.stat-card {
    border-radius: var(--radius);
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.stat-card.green { background: linear-gradient(135deg, #006400, #228B22); }
.stat-card.gold  { background: linear-gradient(135deg, #b8960c, #D4AF37); }
.stat-card.blue  { background: linear-gradient(135deg, #1A5276, #2980B9); }
.stat-card.red   { background: linear-gradient(135deg, #922B21, #E74C3C); }

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-dark);
    border-radius: 8px;
    font-weight: 600;
}

.btn-accent:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--text-dark);
}

/* Tables */
.table {
    border-radius: var(--radius);
    overflow: hidden;
}

.table thead th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    border: none;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
}

.table tbody tr:hover {
    background-color: var(--primary-light);
}

.table-responsive {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid var(--border);
    padding: 0.6rem 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0,100,0,0.15);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

/* Badges */
.badge-status-approved { background: #d4edda; color: #155724; }
.badge-status-pending  { background: #fff3cd; color: #856404; }
.badge-status-suspended{ background: #f8d7da; color: #721c24; }

/* Avatar */
.avatar-circle {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.avatar-circle-sm {
    width: 30px;
    height: 30px;
    background: var(--accent);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Notifications */
.notification-dropdown {
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border: none;
}

.notif-badge {
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-light-blue { background-color: #e8f4fd !important; }

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #001a00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo h1 {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.login-logo .subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Footer */
.footer-custom {
    background: var(--primary-dark);
    color: #ffffff;
    margin-top: auto;
}

/* Sidebar (Admin) */
@media (min-width: 992px) {
    .admin-layout {
        display: flex;
        gap: 1.5rem;
    }
    .admin-sidebar {
        width: 240px;
        flex-shrink: 0;
    }
    .admin-content {
        flex: 1;
        min-width: 0;
    }
}

/* Contribution Grid (Month View) */
.month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.month-cell {
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.month-cell.paid {
    background: #d4edda;
    color: #155724;
    border: 1.5px solid #c3e6cb;
}

.month-cell.unpaid {
    background: #f8d7da;
    color: #721c24;
    border: 1.5px solid #f5c6cb;
}

.month-cell.pending {
    background: #fff3cd;
    color: #856404;
    border: 1.5px solid #ffeeba;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    left: 1rem;
    z-index: 9999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stat-card .stat-value { font-size: 1.4rem; }
    .main-wrapper { padding: 1rem 0; }
    .card { border-radius: 10px; }
    .login-card { padding: 1.5rem; }
    body { font-size: 14px; }
}

/* Print styles */
@media print {
    .navbar, .footer-custom, .btn, .no-print { display: none !important; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    body { background: white; }
}
