/* GetHealthPro - Premium Health Monitoring CSS */

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --crisis: #991b1b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
}

.hidden {
    display: none !important;
}

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

.text-muted {
    color: var(--gray-500);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

/* Glass Card */
.glass-card,
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

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

.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Auth */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    max-width: 450px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.auth-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray-500);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-500);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

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

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.auth-divider span {
    padding: 0 1rem;
    color: var(--gray-400);
    font-size: 0.875rem;
    font-weight: 500;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Password Strength */
.password-strength {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    margin-top: 0.25rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: var(--danger);
}

.password-strength-bar.medium {
    width: 66%;
    background: var(--warning);
}

.password-strength-bar.strong {
    width: 100%;
    background: var(--success);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-success {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349, #f45c43);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* App Header */
.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-name {
    font-weight: 600;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Tab Navigation */
.tab-nav {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    margin: 1.5rem auto;
    max-width: 1400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.tab-nav-content {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding: 0.25rem;
}

.tab-btn {
    flex: 1;
    min-width: max-content;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: var(--shadow-md);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Monitor Display */
.monitor-display {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    color: white;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-2xl), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 4px solid #0d47a1;
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.monitor-header h2 {
    color: white;
    font-size: 1.25rem;
}

.monitor-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.monitor-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

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

.bp-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.bp-value {
    font-family: 'Courier New', monospace;
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -3px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.bp-value.bp-dia {
    font-size: 4rem;
    opacity: 0.9;
}

.bp-separator {
    font-size: 3rem;
    opacity: 0.7;
}

.bp-unit {
    display: block;
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.bp-secondary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reading-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 140px;
}

.reading-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.reading-value {
    font-size: 2rem;
    font-weight: 800;
}

.reading-unit {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
}

.status-badge.normal {
    background: var(--success-light);
    color: #065f46;
}

.status-badge.elevated {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.high1 {
    background: var(--warning-light);
    color: #92400e;
}

.status-badge.high2 {
    background: var(--danger-light);
    color: #991b1b;
}

.status-badge.crisis {
    background: #fecaca;
    color: var(--crisis);
    animation: pulse 1s infinite;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
}

.stat-content h4 {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

/* Recommendations */
.recommendations-list {
    list-style: none;
    padding-left: 0;
}

.recommendations-list li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--gray-600);
}

.recommendations-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Charts */
.chart-container {
    height: 300px;
    position: relative;
}

.chart-container-sm {
    height: 200px;
    margin-bottom: 1.5rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* BMI */
.bmi-result {
    text-align: center;
    padding: 2rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
    border-radius: var(--radius-lg);
}

.bmi-value-display {
    margin-bottom: 1rem;
}

.bmi-number {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary);
}

.bmi-label {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Guide */
.section-title {
    font-size: 1.125rem;
    margin: 2rem 0 1rem;
    color: var(--gray-700);
}

.section-title:first-of-type {
    margin-top: 0;
}

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

.category-card {
    padding: 1rem;
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.category-card h5 {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.category-range {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.category-advice {
    font-size: 0.75rem;
    opacity: 0.8;
}

.category-card.normal {
    background: var(--success-light);
    border-color: var(--success);
}

.category-card.elevated {
    background: #dbeafe;
    border-color: #3b82f6;
}

.category-card.high1 {
    background: var(--warning-light);
    border-color: var(--warning);
}

.category-card.high2 {
    background: var(--danger-light);
    border-color: var(--danger);
}

.category-card.crisis {
    background: #fecaca;
    border-color: var(--crisis);
}

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

.tip-card {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.tip-card h5 {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.tip-card ul {
    list-style: none;
    padding-left: 0;
}

.tip-card li {
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.tip-card li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* Settings */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section h4 {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.info-grid {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--gray-700);
}

.info-value {
    color: var(--gray-500);
}

.disclaimer {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning);
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.disclaimer p {
    margin-bottom: 0.5rem;
}

.disclaimer p:last-child {
    margin-bottom: 0;
}

/* Backup buttons */
.backup-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.backup-note {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-style: italic;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 1000;
    max-width: 350px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-content h3 {
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .app-header {
        padding: 0.5rem 1rem;
    }

    .logo-text,
    .user-name {
        display: none;
    }

    .tab-nav {
        margin: 1rem;
        border-radius: var(--radius-md);
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
    }

    .main-content {
        padding: 0 1rem 2rem;
    }

    .monitor-display {
        padding: 1.5rem;
    }

    .bp-value {
        font-size: 3rem;
    }

    .bp-value.bp-dia {
        font-size: 2.5rem;
    }

    .monitor-body {
        flex-direction: column;
        text-align: center;
    }

    .bp-secondary {
        flex-direction: row;
        justify-content: center;
    }

    .card-header-flex {
        flex-direction: column;
        align-items: stretch;
    }

    .card-actions {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
        transform: translateY(200px);
    }

    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .bp-secondary {
        flex-direction: column;
    }
}

/* Footer */
.app-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    text-align: center;
    margin-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.footer-content p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.footer-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-content a:hover {
    text-decoration: underline;
}

.footer-note {
    font-size: 0.75rem !important;
    color: var(--gray-400) !important;
}

/* ============================================
   PRINT STYLES
   ============================================ */
/* Hidden by default, shown via @media print OR .pdf-mode class */
.print-only {
    display: none;
}

/* When generating PDF, we must show it on screen for html2canvas to capture it */
.pdf-mode {
    display: block !important;
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: white;
    overflow-y: auto;
    padding: 20px;
}

/* ============================================
   WATER TRACKER STYLES
   ============================================ */
.water-progress-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out;
}

.water-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.water-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.water-goal {
    font-size: 0.875rem;
    opacity: 0.8;
}

.water-buttons {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.water-btn {
    flex: 1;
    min-width: 80px;
    padding: 0.75rem 0.5rem;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

@media print {

    /* Hide everything by default */
    body * {
        visibility: hidden;
    }

    /* Reset Body */
    body {
        background: white !important;
        color: black !important;
        margin: 0;
        padding: 0;
        overflow: visible;
        animation: none !important;
    }

    /* Show Print Container and its children */
    #print-report,
    #print-report * {
        visibility: visible;
    }

    #print-report {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 20px;
        background: white;
    }

    /* Print Typography */
    .print-header {
        text-align: center;
        margin-bottom: 2rem;
        border-bottom: 2px solid #000;
        padding-bottom: 1rem;
    }

    .print-header h1 {
        font-size: 24pt;
        margin-bottom: 0.5rem;
        color: #000;
    }

    .print-header p {
        font-size: 12pt;
        color: #444;
    }

    .print-section {
        margin-bottom: 2rem;
        page-break-inside: avoid;
    }

    .pdf-mode table {
        page-break-inside: auto;
    }
}

/* ============================================
   ANALYTICS DASHBOARD
   ============================================ */
/* PDF Generation Mode (Screen Styles) */
.pdf-mode {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10000 !important;
    background: white !important;
    overflow-y: auto !important;
    padding: 20px !important;
    visibility: visible !important;
}

.pdf-mode * {
    visibility: visible !important;
}

.analytics-dashboard {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.analytics-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.analytics-card {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.analytics-card h4 {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Score Card */
.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) 0%, #eee 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-color);
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 65px;
    height: 65px;
    background: white;
    border-radius: 50%;
    z-index: 0;
}

.score-circle span {
    position: relative;
    z-index: 1;
}

.score-label {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Trend Card */
.trend-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    height: 80px;
}

.trend-icon {
    font-size: 3rem;
    line-height: 1;
}

.trend-text {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Stats Card */
.rolling-avg-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.rolling-avg-row:last-child {
    border-bottom: none;
}

.rolling-avg-row span {
    color: #666;
}

.rolling-avg-row strong {
    color: var(--text-color);
    font-family: monospace;
    font-size: 1.1em;
}

@media (max-width: 768px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

.print-section h2 {
    font-size: 16pt;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: #000;
}

/* Stats Grid for Print */
.print-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
}

.print-stat-item {
    text-align: center;
}

.print-stat-value {
    font-size: 18pt;
    font-weight: bold;
    display: block;
}

.print-stat-label {
    font-size: 10pt;
    color: #666;
}

/* Recommendations */
.print-recommendations ul {
    list-style: none;
    padding-left: 0;
}

.print-recommendations li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.print-recommendations li::before {
    content: "•";
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Chart Image */
.print-chart-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border: 1px solid #eee;
    margin-bottom: 1rem;
}

/* Table */
.print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
}

.print-table th,
.print-table td {
    border: 1px solid #999;
    padding: 8px;
    text-align: left;
}

.print-table th {
    background-color: #f0f0f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    font-weight: bold;
}

.print-footer {
    margin-top: 3rem;
    text-align: center;
    font-size: 9pt;
    color: #666;
    border-top: 1px solid #ccc;
    padding-top: 1rem;
}