/* Marathon Diet - Main Stylesheet */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Authentication Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 28px;
}

.auth-subtitle {
    text-align: center;
    color: #6c757d;
    margin-bottom: 32px;
}

.auth-form-fields {
    margin-bottom: 24px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

.form-group small {
    display: block;
    margin-top: 4px;
    color: #6c757d;
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

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

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

/* Google OAuth Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    background: white;
    color: #3c4043;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #c0c4c7;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
    color: #3c4043;
    text-decoration: none;
}

.btn-google svg {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

.oauth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.oauth-divider::before,
.oauth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.oauth-divider span {
    padding: 0 16px;
    background: white;
}

.auth-links {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background-color: #fee;
    color: #c53030;
    border: 1px solid #fed7d7;
}

.alert-success {
    background-color: #f0fff4;
    color: #22543d;
    border: 1px solid #c6f6d5;
}

/* Custom Checkbox Styling */
.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-label:hover input ~ .checkmark {
    border-color: #667eea;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-link {
    color: #667eea !important;
    text-decoration: none;
    font-weight: 600;
}

.auth-link:hover {
    text-decoration: underline !important;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.nav-brand {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin: 0;
}

.nav-menu {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
    background: #f8f9ff;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.dashboard-header h2 {
    color: #2c3e50;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-user {
    background: #e3f2fd;
    color: #1565c0;
}

.role-moderator {
    background: #fff3e0;
    color: #ef6c00;
}

.role-administrator {
    background: #fce4ec;
    color: #c2185b;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.dashboard-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.dashboard-card h3 {
    margin-bottom: 16px;
    color: #2c3e50;
}

.account-details p {
    margin-bottom: 8px;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.system-status p {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

.status-online {
    background: #22c55e;
}

.status-offline {
    background: #ef4444;
}

/* Admin Panel */
.admin-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.admin-header h2 {
    color: #2c3e50;
    margin-bottom: 8px;
}

.admin-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    margin-bottom: 24px;
    overflow: hidden;
}

.admin-section h3 {
    background: #f8f9fa;
    padding: 16px 24px;
    margin: 0;
    border-bottom: 1px solid #e9ecef;
    color: #2c3e50;
}

.table-container {
    overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.admin-table select {
    padding: 4px 8px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 24px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-card h4 {
    margin-bottom: 8px;
    color: #6c757d;
    font-size: 14px;
    text-transform: uppercase;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 16px;
        padding: 1rem;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Dashboard Hero Mobile Fixes */
    .dashboard-hero {
        padding: 2rem 0 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        text-align: center;
    }
    
    .hero-text h2 {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3;
    }
    
    .hero-text p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .hero-stats {
        padding: 1.5rem !important;
        margin: 0 auto;
        max-width: 280px;
    }
    
    /* Quick Actions Mobile */
    .quick-actions {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }
    
    .action-card {
        padding: 1.5rem !important;
        text-align: center;
    }
    
    .action-icon {
        font-size: 2.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .action-title {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .action-description {
        font-size: 0.85rem !important;
        line-height: 1.4;
    }
    
    /* Dashboard Cards Mobile */
    .dashboard-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .dashboard-card h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    /* Container padding for mobile */
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    /* Auth container mobile fixes */
    .auth-container {
        padding: 1rem;
    }
    
    .auth-form {
        padding: 2rem 1.5rem;
        max-width: 100%;
        margin: 0;
    }
}

/* Additional mobile responsiveness for small screens */
@media (max-width: 480px) {
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
    }
    
    .nav-link {
        display: block;
        text-align: center;
        padding: 0.75rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .hero-text h2 {
        font-size: 1.5rem !important;
    }
    
    .hero-stats {
        padding: 1rem !important;
        max-width: 260px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .auth-form {
        padding: 1.5rem 1rem;
    }
    
    .auth-form h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}