/* Munhe Volunteer Attendance App Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Devanagari', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--gray-50);
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    background: var(--white);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    background: var(--white);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

/* Navigation */
.app-nav {
    background: var(--white);
    padding: 0.5rem;
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--gray-200);
    scrollbar-width: none;
}

.app-nav::-webkit-scrollbar {
    display: none;
}

.nav-btn {
    flex: 1;
    min-width: 80px;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-btn span:first-child {
    font-size: 1.25rem;
}

.nav-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

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

/* Main Content */
.app-main {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.section-header p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.current-date {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.5rem;
}

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

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--gray-300);
}

.stat-card.present {
    border-left-color: var(--success);
}

.stat-card.absent {
    border-left-color: var(--warning);
}

.stat-card.hours {
    border-left-color: var(--primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card.present .stat-icon {
    background: var(--success-light);
}

.stat-card.absent .stat-icon {
    background: var(--warning-light);
}

.stat-card.hours .stat-icon {
    background: var(--primary-light);
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1;
}

.stat-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* Recent Activity */
.recent-activity {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.recent-activity h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

.activity-item.checkout {
    border-left-color: var(--gray-400);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.activity-item.checkout .activity-icon {
    background: var(--gray-200);
}

.activity-details {
    flex: 1;
}

.activity-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.875rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.activity-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.activity-status.in {
    background: var(--success-light);
    color: var(--success);
}

.activity-status.out {
    background: var(--gray-200);
    color: var(--gray-600);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray-400);
    font-size: 0.875rem;
}

/* Quick Check-in */
.quick-checkin {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--gray-400);
}

.volunteer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.volunteer-card {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

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

.volunteer-card.checked-in {
    border-color: var(--success);
    background: var(--success-light);
}

.volunteer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1.5rem;
    color: var(--white);
    font-weight: 600;
}

.volunteer-card.checked-in .volunteer-avatar {
    background: linear-gradient(135deg, var(--success), #059669);
}

.volunteer-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.volunteer-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background: var(--gray-200);
    color: var(--gray-600);
    display: inline-block;
}

.volunteer-card.checked-in .volunteer-status {
    background: var(--success);
    color: var(--white);
}

/* Manual Check-in */
.manual-checkin {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.manual-checkin h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-700);
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Volunteers List */
.volunteers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.volunteer-list-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.volunteer-list-item:hover {
    box-shadow: var(--shadow-md);
}

.volunteer-list-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
    font-weight: 600;
    flex-shrink: 0;
}

.volunteer-list-info {
    flex: 1;
    min-width: 0;
}

.volunteer-list-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.volunteer-list-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.volunteer-list-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem;
    border: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-small:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

/* Reports */
.report-filters {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.report-results {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table th,
.report-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.report-table th {
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-50);
    font-size: 0.875rem;
}

.report-table td {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.report-table tr:hover {
    background: var(--gray-50);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlide 0.3s ease;
}

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

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

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.btn-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.modal form {
    padding: 1.25rem;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--gray-800);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 1001;
}

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

.toast-icon {
    width: 24px;
    height: 24px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .app-main {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .stat-info h3 {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .volunteer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .report-filters {
        grid-template-columns: 1fr;
    }

    .volunteer-list-item {
        flex-wrap: wrap;
    }

    .volunteer-list-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 0.75rem 1rem;
    }

    .logo-text h1 {
        font-size: 1rem;
    }

    .logo-text p {
        font-size: 0.625rem;
    }

    .nav-btn {
        padding: 0.5rem;
        font-size: 0.625rem;
    }

    .nav-btn span:first-child {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Print styles */
@media print {
    .app-header,
    .app-nav,
    .btn-primary,
    .btn-secondary,
    .btn-icon,
    .modal {
        display: none !important;
    }

    .app-main {
        padding: 0;
    }

    .section {
        display: block !important;
    }

    .report-results {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}