/* ==============================================
   MOYER SCIENTIFIC RESEARCH - COMMON STYLES
   Shared CSS for all service and dashboard pages
   ============================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

.hidden {
    display: none !important;
}

/* ==============================================
   NAVIGATION HEADER
   ============================================== */

.nav-header {
    background: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.logo-image {
    height: 40px;
    width: auto;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.credits-badge {
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
}

/* ==============================================
   BUTTONS
   ============================================== */

.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

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

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #27ae60;
}

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

.btn-danger {
    background: #e74c3c;
}

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

.btn-warning {
    background: #f39c12;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ==============================================
   CARDS
   ============================================== */

.card {
    background: white;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card h2, .card h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

.card h2 {
    font-size: 1.8rem;
}

.card h3 {
    font-size: 1.4rem;
}

/* ==============================================
   FORMS
   ============================================== */

.form-group {
    margin-bottom: 1rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-help {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

/* ==============================================
   MESSAGES
   ============================================== */

.error, .success, .info, .warning {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #a3cfbb;
}

.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

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

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* ==============================================
   GRID LAYOUTS
   ============================================== */

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

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

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

/* ==============================================
   SERVICE STATUS BADGES
   ============================================== */

.service-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

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

.status-wip {
    background: #fff3cd;
    color: #856404;
}

.status-beta {
    background: #d1ecf1;
    color: #0c5460;
}

/* ==============================================
   STATS/METRICS
   ============================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stat-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.2s;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* ==============================================
   PRICING/COST INFO
   ============================================== */

.cost-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin: 1rem 0;
}

.cost-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
}

.cost-label {
    color: #666;
    font-size: 0.9rem;
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .nav-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .logo-section {
        justify-content: center;
    }
    
    .nav-actions {
        justify-content: center;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* ==============================================
   UTILITY CLASSES
   ============================================== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.flex {
    display: flex;
}

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

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ==============================================
   ANIMATIONS
   ============================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.pulse {
    animation: pulse 2s infinite;
}
