/* shared-styles.css - Complete styling for all pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f8fbf8;
    line-height: 1.6;
    color: #333;
}

/* ===== LOGIN PAGE STYLES ===== */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a472a, #2e8b57);
    padding: 20px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
}

.login-header h2 {
    color: #1a472a;
    margin-bottom: 10px;
    text-align: center;
    font-size: 1.8rem;
}

.login-header p {
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a472a;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #2e8b57;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.8rem;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1a472a, #2e8b57);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.login-btn:hover {
    transform: translateY(-2px);
}

/* User Switcher */
.user-switcher {
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
}

.user-switcher h3 {
    color: #1a472a;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
}

.saved-users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-btn {
    width: 100%;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.user-btn:hover {
    background: #e0f0e0;
    border-color: #2e8b57;
    transform: translateY(-2px);
}

.user-info strong {
    color: #1a472a;
    display: block;
    margin-bottom: 5px;
}

.user-info small {
    color: #666;
    font-size: 0.8rem;
}

/* Month Quick Access */
.month-quick-access {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.month-quick-access h3 {
    color: #1a472a;
    margin-bottom: 15px;
    text-align: center;
}

.month-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.month-btn {
    padding: 10px 15px;
    background: #e8f5e9;
    border: 2px solid #2e8b57;
    border-radius: 6px;
    color: #1a472a;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.month-btn:hover {
    background: #2e8b57;
    color: white;
}

/* ===== MONTH PAGE STYLES ===== */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: linear-gradient(135deg, #1a472a, #2e8b57);
    color: white;
    padding: 20px;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

#current-user {
    font-weight: 600;
    font-size: 1.1rem;
}

.user-actions-header {
    display: flex;
    gap: 10px;
}

.switch-user-btn, .logout-btn-header {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.switch-user-btn:hover, .logout-btn-header:hover {
    background: rgba(255,255,255,0.3);
}

.header-content {
    text-align: center;
}

.header-content h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Month Navigation */
.month-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 0 20px;
    gap: 15px;
}

.nav-btn {
    padding: 12px 20px;
    background: #d4af37;
    color: #1a472a;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.month-jump select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
}

.month-jump select:focus {
    outline: none;
    border-color: #2e8b57;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.info-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.info-section h2 {
    color: #1a472a;
    margin-bottom: 10px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #2e8b57, #4caf50);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Progress Section */
.progress-section {
    margin-bottom: 25px;
}

.progress-info {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.progress-bar-container {
    width: 100%;
    background: #d9f7e1;
    border-radius: 12px;
    overflow: hidden;
    height: 20px;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #2e8b57, #4caf50);
    transition: width 0.5s ease;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.controls button {
    padding: 8px 15px;
    font-size: 0.9rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    background: #1a472a;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.controls button:hover {
    background: #2e8b57;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Table Section */
.table-section {
    overflow-x: auto;
    margin-top: 20px;
}

.month-header {
    text-align: center;
    margin: 20px 0;
    color: #1a472a;
    font-size: 1.5rem;
    font-weight: bold;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: center;
    font-size: 0.95rem;
}

th {
    background: linear-gradient(135deg, #1a472a, #2e8b57);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr:nth-child(even) { background: #f0f8f0; }
tbody tr:nth-child(odd) { background: #ffffff; }
tbody tr:hover { background: #e0f0e0; transition: 0.2s; }

/* Day Type Colors */
.saturday { background: #e3f2fd !important; font-weight: bold; color: #1565c0; }
.sunday { background: #e8f5e9 !important; font-weight: bold; color: #1a472a; }
.weekday { background: #fffaf0 !important; }
.murajae { background: #fff3e0 !important; font-style: italic; }

/* Status Cells */
.status, .status-cell { 
    cursor: pointer; 
    position: relative; 
}

.status::after, .status-cell::after {
    content: "\25A1";
    display: inline-block;
    margin-left: 6px;
    font-size: 1.1rem;
    vertical-align: middle;
    color: #ccc;
}

.status.done::after, .status-cell.done::after {
    content: "\2713";
    color: #2e8b57;
    font-weight: bold;
}

/* Celebration Modal */
.celebration-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.celebration-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    animation: popIn 0.5s ease-out;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    color: white;
}

.celebration-emoji {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.celebration-message {
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: bold;
}

.celebration-submessage {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.celebration-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.celebration-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: 0.3s;
}

.celebration-btn.primary {
    background: white;
    color: #667eea;
}

.celebration-btn.secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.celebration-btn:hover {
    transform: scale(1.05);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: #1a472a;
    color: white;
    margin-top: auto;
}

/* Animations */
@keyframes popIn {
    0% { transform: scale(0.5) rotate(-5deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .month-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .user-actions-header {
        width: 100%;
        justify-content: center;
    }
    
    th, td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .celebration-content {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .celebration-message {
        font-size: 1.4rem;
    }
    
    .login-container {
        padding: 30px 20px;
    }
    
    .celebration-actions {
        flex-direction: column;
    }
}


/* ===== HIDAR ENHANCED FEATURES ===== */

/* Enhanced Status Cells for Hidar */
.status-cell {
    cursor: pointer; 
    position: relative; 
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-height: 60px;
    justify-content: center;
}

.page-indicator {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    border: 2px solid #ccc;
    transition: all 0.3s ease;
    background: white;
}

.status-cell.done .page-indicator {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.status-cell .completion-date {
    font-size: 0.7rem;
    color: var(--gray);
    max-width: 80px;
    text-align: center;
    line-height: 1.2;
}

.status-cell.early .completion-date {
    color: var(--success);
    font-weight: 600;
}

.status-cell.late .completion-date {
    color: var(--danger);
    font-weight: 600;
}

.status-cell.extended .completion-date {
    color: var(--warning);
    font-weight: 600;
}

/* Calendar Modal */
.calendar-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.calendar-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalPopIn 0.3s ease-out;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.calendar-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-calendar {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

.calendar-body {
    padding: 20px;
}

.calendar-info {
    margin-bottom: 15px;
    text-align: center;
}

.surah-info {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.month-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.month-tab {
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.month-tab.active {
    background: var(--primary-color);
    color: white;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 20px;
}

.calendar-day {
    padding: 10px 5px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border: 1px solid var(--light-gray);
}

.calendar-day:hover {
    background: var(--hover-color);
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
}

.calendar-day.other-month {
    color: var(--gray);
    opacity: 0.5;
}

.calendar-actions {
    display: flex;
    gap: 10px;
}

.calendar-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-cancel {
    background: var(--light-gray);
    color: var(--dark);
}

.calendar-cancel:hover {
    background: var(--gray);
    color: white;
}

.calendar-confirm {
    background: var(--primary-color);
    color: white;
}

.calendar-confirm:hover {
    background: var(--secondary-color);
}

/* Enhanced Celebration Modal */
.celebration-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.celebration-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    animation: popIn 0.5s ease-out;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    color: white;
}

.celebration-emoji {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.celebration-message {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.celebration-submessage {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.celebration-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.celebration-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.celebration-btn.primary {
    background: white;
    color: #667eea;
}

.celebration-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.celebration-btn:hover {
    transform: scale(1.05);
}

/* Animations */
@keyframes popIn {
    0% { transform: scale(0.5) rotate(-5deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes modalPopIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Responsive for Hidar features */
@media (max-width: 768px) {
    .page-indicator {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .status-cell .completion-date {
        font-size: 0.65rem;
    }
    
    .calendar-content {
        max-width: 95%;
    }
    
    .month-selector {
        flex-direction: column;
        gap: 8px;
    }
    
    .celebration-content {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .celebration-message {
        font-size: 1.4rem;
    }
    
    .celebration-actions {
        flex-direction: column;
    }
}



















/* ADD THESE STYLES TO YOUR EXISTING shared-styles.css */

/* Enhanced Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

.notification.success { background: linear-gradient(135deg, #4CAF50, #45a049); }
.notification.error { background: linear-gradient(135deg, #f44336, #d32f2f); }
.notification.warning { background: linear-gradient(135deg, #ff9800, #f57c00); }
.notification.info { background: linear-gradient(135deg, #2196F3, #1976D2); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}





/* Enhanced Month Navigation */
.month-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 0 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 20px;
    background: #d4af37;
    color: #1a472a;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.month-jump select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 150px;
}

.month-jump select:focus {
    outline: none;
    border-color: #2e8b57;
}

/* Enhanced User Buttons in Login */
.user-btn {
    width: 100%;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    margin: 5px 0;
}

.user-btn:hover {
    background: #e0f0e0;
    border-color: #2e8b57;
    transform: translateY(-2px);
}

.user-btn strong {
    color: #1a472a;
    display: block;
    margin-bottom: 5px;
}

.user-btn small {
    color: #666;
    font-size: 0.8rem;
}

/* Enhanced Status Cells */
.status {
    cursor: pointer;
    position: relative;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.status::after {
    content: "□";
    font-size: 1.2rem;
    color: #ccc;
    transition: all 0.3s ease;
}

.status.done::after {
    content: "✓";
    color: #2e8b57;
    font-weight: bold;
}

.status:hover::after {
    transform: scale(1.2);
}

/* Enhanced Table Responsiveness */
@media (max-width: 768px) {
    .month-navigation {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .month-jump {
        width: 100%;
    }
    
    .month-jump select {
        width: 100%;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 8px 5px;
    }
}

/* Print Styles */
@media print {
    .user-actions-header,
    .controls,
    .month-navigation,
    .celebration-modal {
        display: none !important;
    }
    
    .app-header {
        background: white !important;
        color: black !important;
    }
    
    .stat-card {
        background: #f8f9fa !important;
        color: black !important;
    }
}



