/*
 * CSS for Veera Narasimha Yuva Committee - Admin Panel
 * FINAL VERSION: Includes styling for all forms, deed lists, and the new FCM Notification UI.
 */

/* General Styles */
body {
    font-family: 'Teko', sans-serif;
    margin: 0;
    background: #fff8e6; /* Soft Ochre background */
    color: #333;
    line-height: 1.6;
}

/* --- Header & Navigation (UPDATED FOR SPACING) --- */
header {
    background: #ffcc33; /* Rich Saffron/Gold */
    color: #000;
    padding: 15px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); 
}

.nav-container {
    width: 90%;
    margin: auto;
    display: flex;
    /* This ensures the logo stays on the left and links stay on the right */
    justify-content: space-between; 
    align-items: center;
}

.logo {
    font-size: 2.2em;
    margin: 0;
    color: #a30000; /* Deep Crimson */
}

nav {
    display: flex;
    align-items: center;
    /* FIX: This adds uniform space between all links and buttons */
    gap: 15px; 
}

nav a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    font-size: 1.1em;
    transition: color 0.3s ease;
    /* Prevents links from breaking into two lines */
    white-space: nowrap; 
}

nav a.active, nav a:hover {
    color: #a30000;
}

/* User Profile Container inside Nav */
#auth-nav-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.login-btn {
    background: #a30000; 
    color: #fff !important; 
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 700;
    /* Removed large margin-left as 'gap' handles it now */
    margin-left: 5px; 
}


/* --- User Icon Container (Matching dashboard.css) --- */
#user-icon {
    display: inline-flex; 
    width: 40px; 
    height: 40px;
    background: #fff;
    border-radius: 50%;
    border: 3px solid #a30000;
    overflow: hidden; 
    position: relative; 
    margin-right: 10px; 
    flex-shrink: 0;
}

/* --- The Photo Itself --- */
.user-photo {
    width: 100%; 
    height: 100%;
    object-fit: cover; 
    border-radius: 50%;
    display: block; 
}


/* --- Admin Section (Main Content Area) --- */
.admin-section {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    background: #fff; /* Clean white background for clarity */
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
}

.admin-section h2 {
    color: #a30000;
    font-size: 3em;
    margin-bottom: 25px;
    border-bottom: 3px solid #ffcc33; /* Saffron underline */
    padding-bottom: 10px;
}

.admin-section h3 {
    color: #cc0000;
    font-size: 2em;
    margin-top: 30px;
    margin-bottom: 15px;
    font-family: sans-serif;
}

/* --- 1. Admin Dashboard Card Styles --- */
.admin-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: #fff8f0;
    padding: 25px;
    border-radius: 8px;
    border-left: 6px solid #cc0000; 
    min-height: 180px; 
}

.dashboard-card h3 {
    color: #333;
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 500;
    font-family: 'Teko', sans-serif;
}

.dashboard-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-card li {
    font-size: 1.1em;
    color: #222;
    padding: 10px 0;
    border-bottom: 1px dashed #ffde7d;
    font-family: sans-serif;
}

.dashboard-card li:last-child {
    border-bottom: none;
}


/* --- 2. Notification Status Box (NEW) --- */
#notification-status-box {
    /* Styles for the box added to admin.html, ensuring shadow consistency */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* The core colors/display are handled by inline styles in admin.html, 
       and logic handles the green/red borders via JS style modification. */
}

/* --- 3. General Form Styles (Container and Input/Select Base) --- */

/* Apply consistent container styling to all forms */
#addDeedForm, #addEventForm, #addVideoDeedForm, 
#logMemberDonationForm, #logMemberEventForm {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 20px;
    background: #fff8f0; 
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
    
    /* CRITICAL FIX for Overflow Issue: */
    min-width: 0; 
    overflow: hidden; 
}

/* Apply consistent input/select styling to all forms */
#addDeedForm input,
#addVideoDeedForm input,
#addEventForm input,
#logMemberDonationForm input,
#logMemberEventForm select,
#memberSelect {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ffcc33;
    border-radius: 5px;
    font-size: 1.1em;
    font-family: sans-serif; 
    background: #fff;
    max-width: 600px; 
    width: 100%; 
}

/* FIX: Specifically target the event selection dropdown to handle long text (overflow) */
#logMemberEventForm select {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
}


/* --- 4. Form Button Styles (Specific Colors) --- */

/* Image Deed Button (Crimson - Primary) */
#addDeedForm button[type="submit"] {
    background: #a30000;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
}
#addDeedForm button[type="submit"]:hover {
    background: #cc0000;
}

/* Video Deed Button (Navy Blue - Distinct) */
#addVideoDeedForm button[type="submit"] {
    background: #3f51b5; /* Blue */
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
}
#addVideoDeedForm button[type="submit"]:hover {
    background: #30419e; /* Darker blue on hover */
}

/* Event Management Button (Navy Blue - Distinct) */
#addEventForm button[type="submit"] {
    background: #3f51b5; /* Blue (Matching Video Deed button) */
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
}

/* Member Donation Log Button (Crimson) */
#logMemberDonationForm button[type="submit"] {
    background: #a30000;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
}
#logMemberDonationForm button[type="submit"]:hover {
    background: #cc0000;
}

/* Member Event Log Button (Darker Crimson/Red) */
#logMemberEventForm button[type="submit"] {
    background: #cc0000;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
}
#logMemberEventForm button[type="submit"]:hover {
    background: #a30000;
}


/* --- Deeds/Events List Layout and Cards (Reusable) --- */
.deeds-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px;
}

.deed-card {
    background: #f8f8f8;
    border: 1px solid #ffde7d; /* Light saffron border */
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
}

.deed-card h4 {
    color: #333;
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
    font-family: 'Teko', sans-serif;
}

.deed-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
}

.deed-card button {
    font-family: sans-serif;
    background: #ff4d4d; /* Red Delete Button */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}


/* --- Footer --- */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    font-family: sans-serif;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
    }
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .admin-section {
        width: 95%;
        padding: 20px;
    }
    /* Apply to ALL input forms and make them stack */
    #addDeedForm, #addEventForm, #addVideoDeedForm, 
    #logMemberDonationForm, #logMemberEventForm { 
        flex-direction: column;
        align-items: stretch;
    }
    #addDeedForm button, #addEventForm button, #addVideoDeedForm button,
    #logMemberDonationForm button, #logMemberEventForm button {
        width: 100%;
    }
}

/* Public Report Specific Styles */
.admin-section {
    background: #fff;
    padding: 30px;
    margin: 40px auto;
    max-width: 1100px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.admin-section h2 {
    color: #a30000;
    font-family: 'Teko', sans-serif;
    font-size: 2.8em;
    border-bottom: 2px solid #ffcc33;
    margin-bottom: 30px;
}

/* Stats Cards */
.stats-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #fff8e6;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    border: 1px solid #ffde7d;
}

.stat-card h3 {
    margin: 0;
    font-size: 1.2em;
    color: #a30000;
}

.amount {
    font-size: 2em;
    font-weight: bold;
    font-family: 'Teko', sans-serif;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
}

table th {
    background: #a30000;
    color: white;
    text-align: left;
    padding: 12px;
    font-family: 'Teko', sans-serif;
    font-size: 1.3em;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-family: sans-serif;
    font-size: 1em;
}

table tr:nth-child(even) {
    background-color: #fafafa;
}

/* Custom Select Dropdown */
#publicYearFilter {
    padding: 8px 15px;
    border: 2px solid #a30000;
    border-radius: 5px;
    font-family: 'Teko', sans-serif;
    font-size: 1.2em;
    cursor: pointer;
}