/* Anvia Health Platform - Clean Professional Design */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    color: #212529;
    line-height: 1.5;
}

/* Dashboard Container */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #dee2e6;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #212529;
}

.btn-logout {
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1px solid #6c757d;
    border-radius: 4px;
    color: #6c757d;
    cursor: pointer;
    font-size: 0.875rem;
}

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

/* Summary Cards */
.summary-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.big-number {
    font-size: 4rem;
    font-weight: 700;
    color: #212529;
    line-height: 1;
}

.card-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Sensor Status */
.sensor-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sensor-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #212529;
}

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

.sensor-box {
    padding: 0.75rem;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    font-size: 0.875rem;
}

.sensor-green {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sensor-yellow {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.sensor-red {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Test Connection */
.test-connection-section {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.btn-connect-garmin {
    padding: 0.75rem 2rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
}

.btn-connect-garmin:hover {
    background: #218838;
}

.connection-success {
    margin-top: 1rem;
    padding: 1rem;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
    font-weight: 500;
}

/* Participants Section */
.participants-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

.btn-add {
    padding: 0.5rem 1.25rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-add:hover {
    background: #0056b3;
}

/* Participants Table */
.participants-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.participants-table thead {
    background: #f8f9fa;
}

.participants-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.participants-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

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

.empty-state {
    text-align: center;
    color: #6c757d;
    padding: 2rem !important;
}

/* Badges (5 Pillars) */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-green {
    background: #d4edda;
    color: #155724;
}

.badge-good {
    background: #d4edda;
    color: #155724;
}

.badge-yellow {
    background: #fff3cd;
    color: #856404;
}

.badge-fair {
    background: #fff3cd;
    color: #856404;
}

.badge-red {
    background: #f8d7da;
    color: #721c24;
}

.badge-poor {
    background: #f8d7da;
    color: #721c24;
}

.badge-none {
    background: #e9ecef;
    color: #6c757d;
}

.link-view {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.link-view:hover {
    text-decoration: underline;
}

/* Login Page Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.login-box {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 3rem;
    max-width: 400px;
    margin: 4rem auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.login-box h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

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

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

.form-group input {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.875rem;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    width: 100%;
    padding: 0.75rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
    text-decoration: none;
    display: block;
    text-align: center;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    color: #adb5bd;
    font-size: 0.75rem;
}

.help-text {
    text-align: center;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 1.5rem;
    line-height: 1.6;
}

#loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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