/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
}

.header h1 {
    color: #212529;
    margin-bottom: 20px;
    font-size: 2em;
}

/* Navigation Tabs */
.tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 16px;
    border: 1px solid #e9ecef;
    background: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #495057;
}

.tab-btn:hover {
    background: #f8f9fa;
}

.tab-btn.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* Tab Content */
.tab-content {
    display: none;
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid #e9ecef;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    color: #212529;
    margin-bottom: 25px;
    font-size: 1.8em;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    margin: 0;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #0d6efd;
    color: white;
}

.btn-primary:hover {
    background: #0b5ed7;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: #ffffff;
    color: #212529;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.stat-card h3 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Yogi Cards */
.yogis-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.yogi-card,
.class-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.yogi-card:hover,
.class-card:hover {
    background: #f8f9fa;
}

.yogi-card h3 {
    color: #212529;
    margin-bottom: 10px;
}

.yogi-card p,
.class-card p {
    color: #666;
    margin: 5px 0;
    font-size: 0.95em;
}

.yogi-actions,
.class-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.yogi-actions .btn,
.class-actions .btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 16px;
    font-size: 0.9em;
}

.class-stats {
    background: #ffffff;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 4px solid #0d6efd;
}

.class-stats h4 {
    color: #212529;
    margin-bottom: 8px;
}

.attendance-count {
    font-size: 1.5em;
    font-weight: bold;
    color: #0d6efd;
}

/* Classes List */
.classes-list {
    display: grid;
    gap: 20px;
}

.attendance-list {
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.attendance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

/* Yogi Check-in List */
.yogi-checkin-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

.yogi-checkin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.yogi-checkin-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.yogi-checkin-item.checked-in {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.yogi-checkin-item.checked-in:hover {
    background: #c3e6cb;
}

.yogi-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.yogi-info strong {
    color: #667eea;
    font-size: 1.1em;
}

.classes-remaining {
    font-size: 0.85em;
    color: #666;
}

.yogi-checkin-item .btn {
    white-space: nowrap;
}

/* Analytics */
.analytics-section {
    margin-bottom: 40px;
}

.analytics-section h3 {
    color: #212529;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.analytics-card {
    background: #ffffff;
    color: #212529;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.analytics-card h4 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.analytics-card .value {
    font-size: 2em;
    font-weight: bold;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    padding: 32px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid #e9ecef;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    color: #212529;
    margin-bottom: 25px;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,.15);
}

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

label {
    font-weight: 500;
    color: #666;
    margin-bottom: 5px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
}

.success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2e7d32;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #667eea;
}

.empty-state p {
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .header h1 {
        font-size: 1.5em;
    }
    .header {
        padding: 16px;
        margin-bottom: 16px;
    }
    .tab-content {
        padding: 16px;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

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

    .modal-content {
        padding: 30px 20px;
    }
}
