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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* ============ Auth Page ============ */
#auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: slideInUp 0.5s ease;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.logo p {
    color: #666;
    font-size: 14px;
}

.auth-form {
    display: none;
    animation: fadeIn 0.5s ease;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-switch {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.form-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.form-switch a:hover {
    text-decoration: underline;
}

/* ============ Buttons ============ */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-large {
    width: 100%;
    padding: 15px;
    font-size: 16px;
}

/* ============ Messages ============ */
.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    display: none;
}

.message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============ Dashboard ============ */
.dashboard-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    position: absolute;
    right: 20px;
}

.nav-user {
    color: #666;
    font-weight: 600;
}

.dashboard-container {
    display: flex;
    gap: 20px;
    min-height: auto;
}

/* ============ Sidebar ============ */
.sidebar {
    width: 250px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: #f0f0f0;
    color: #667eea;
    border-left-color: #667eea;
}

.sidebar-link span {
    font-size: 20px;
}

/* ============ Main Content ============ */
.main-content {
    flex: 1;
}

.page-header {
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 20px;
    border-radius: 10px;
}

.page-header h1 {
    font-size: 28px;
    color: white;
    margin-bottom: 5px;
}

.page-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.content-page {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

/* ============ Cards ============ */
.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.card.large-card {
    background: white;
}

/* ============ Stats Grid ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 40px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

/* ============ Checklist ============ */
.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.checklist-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.checklist-item.completed {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    border-color: #4caf50;
}

.prayer-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.checklist-item h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

/* ============ Recommendations ============ */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendations-list p,
.recommendation-item {
    background: #f9f9f9;
    padding: 12px;
    border-left: 4px solid #667eea;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.recommendation-item {
    animation: slideInLeft 0.5s ease;
}

/* ============ Activity List ============ */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.activity-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-user {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.activity-role {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.activity-prayers {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.prayer-badge {
    padding: 4px 8px;
    background: #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
}

.prayer-badge.completed {
    background: #4caf50;
    color: white;
}

.activity-time {
    font-size: 12px;
    color: #999;
}

/* ============ History Table ============ */
.history-table {
    overflow-x: auto;
}

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

.history-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.history-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.history-table tr:hover {
    background: #f9f9f9;
}

.prayer-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.prayer-status.yes {
    background: #d4edda;
    color: #155724;
}

.prayer-status.no {
    background: #f8d7da;
    color: #721c24;
}

/* ============ Profile ============ */
.profile-card {
    max-width: 500px;
}

.profile-info {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.profile-avatar {
    font-size: 80px;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-details {
    flex: 1;
    padding-top: 20px;
}

.profile-details p {
    margin-bottom: 15px;
    color: #666;
    font-size: 16px;
}

.profile-details strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.profile-details span {
    color: #667eea;
    font-weight: 600;
}

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

.loading::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

/* ============ Animations ============ */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes dots {
    0%,
    20% {
        content: '⠋';
    }
    40% {
        content: '⠙';
    }
    60% {
        content: '⠹';
    }
    80%,
    100% {
        content: '⠸';
    }
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .dashboard-wrapper {
        padding: 10px;
    }

    .dashboard-container {
        flex-direction: column;
        gap: 10px;
    }

    .sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }

    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-link {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }

    .stats-grid,
    .checklist-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-details {
        padding-top: 0;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .page-header h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .nav-container {
        flex-direction: column;
        gap: 10px;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
    }

    .btn-secondary {
        width: 100%;
    }

    .auth-card {
        padding: 20px 15px;
    }

    .logo h1 {
        font-size: 24px;
    }

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

    .checklist-item {
        padding: 15px;
    }

    .prayer-icon {
        font-size: 30px;
    }
}
