/* Shared Styles for Multi-Page Attendance Tool */

/* Reset and Base Styles */
* {
    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%);
    min-height: 100vh;
    color: #333;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.app-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: fit-content;
}

.logo-section i {
    font-size: 2rem;
    color: #667eea;
}

.logo-section h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.subtitle {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* Navigation Styles */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-1px);
}

.nav-item.active {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-item i {
    font-size: 1.1rem;
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: fit-content;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
}

.user-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #667eea;
}

.auth-controls {
    display: flex;
    gap: 0.5rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.page-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Content Cards */
.content-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.section-header h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    font-weight: 600;
}

.section-header i {
    font-size: 1.5rem;
    color: #667eea;
}

/* Welcome Page Styles */
.welcome-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 140px);
}

.welcome-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.welcome-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1.5rem;
}

.welcome-card h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
}

.welcome-card > p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.action-card {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-5px);
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
}

.action-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
    display: block;
}

.action-card h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.action-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

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

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

/* Status Indicator */
.status-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    border-radius: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

.status-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-icon {
    color: #27ae60;
    font-size: 0.9rem;
}

.status-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert System */
.alert-container {
    position: fixed;
    top: 100px;
    right: 2rem;
    z-index: 9998;
    max-width: 400px;
}

.alert {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
    position: relative;
    cursor: pointer;
}

.alert-success {
    border-left-color: #27ae60;
    background: linear-gradient(90deg, rgba(39, 174, 96, 0.1) 0%, white 10%);
}

.alert-error {
    border-left-color: #e74c3c;
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.1) 0%, white 10%);
}

.alert-info {
    border-left-color: #3498db;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.1) 0%, white 10%);
}

.alert-warning {
    border-left-color: #f39c12;
    background: linear-gradient(90deg, rgba(243, 156, 18, 0.1) 0%, white 10%);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Visibility Controls */
.admin-only {
    display: none;
}

.checkin-only {
    display: none;
}

.user-admin .admin-only,
.user-mentor .admin-only {
    display: flex;
}

.user-admin .action-card.admin-only,
.user-mentor .action-card.admin-only {
    display: block;
}

.user-checkin-only .checkin-only {
    display: flex;
}

.user-checkin-only .action-card.checkin-only {
    display: block;
}

/* Hide admin areas from checkin-only users */
.user-checkin-only .admin-only {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .main-nav {
        order: 2;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .user-actions {
        order: 1;
    }
    
    .nav-item span {
        display: none;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .welcome-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .page-header h2 {
        font-size: 2rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-section h1 {
        font-size: 1.2rem;
    }
    
    .subtitle {
        display: none;
    }
    
    .welcome-card h2 {
        font-size: 1.8rem;
    }
    
    .welcome-card > p {
        font-size: 1rem;
    }
    
    .action-card {
        padding: 1.5rem 1rem;
    }
}
