/* ============================================
   SYNQ Design System - Complete Stylesheet (Unified)
   Version: 2.0
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #1abc9c;
    --danger: #e74c3c;
    --warning: #f39c12;
    --success: #27ae60;
    --bg: #f8f9fa;
    --card: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e1e8ed;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ---------- Layout Containers ---------- */
.app-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .container { max-width: 720px; }
}
@media (min-width: 992px) {
    .container { max-width: 960px; }
}
@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}

/* ---------- Header & Navigation ---------- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--card);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem 0;
    row-gap: 0.5rem;
}

.nav-link {
    margin-left: 1.1rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
}

.nav-link.btn-primary {
    color: white;
    background: var(--gradient-primary);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    display: inline-block;
}

.user-welcome {
    margin-right: 1.5rem;
    color: var(--text-light);
}

/* Buton Sesiune nouă */
.btn-session-new {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    margin-left: 1rem;
}

.btn-session-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Session Counter */
.session-counter {
    background: var(--gradient-primary);
    padding: 0.35rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 1rem;
    color: white;
    border: none;
    transition: all 0.3s;
    display: inline-block;
}

.session-counter.limited {
    background: rgba(231, 76, 60, 0.9);
    animation: pulse-session 2s infinite;
}

@keyframes pulse-session {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.02); }
}

/* ---------- Buttons ---------- */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
}

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

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-play {
    background: var(--success);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-play:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-emergency {
    background: var(--danger);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 700;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
}

.btn-pro {
    background: #ffd700;
    color: var(--primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s;
}

.btn-pro:hover { transform: scale(1.05); }

.btn-loop {
    background: #f0f0f0;
    border: 2px solid var(--border);
    color: var(--text-light);
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-loop.active {
    background: var(--gradient-primary);
    border-color: #667eea;
    color: white;
}

.btn-loop:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-loop.queued {
    background: var(--gradient-primary);
    border-color: #667eea;
    color: white;
    animation: synq-queued-pulse 1.6s ease-in-out infinite;
}

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

.btn-loop:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.btn-print-session {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-print-session:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn-print-chart {
    background: #3498db;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

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

/* ---------- Forms & Inputs ---------- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
}

#state-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
}

.input-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

#char-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ---------- Icon Sections ---------- */
.icon-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: opacity 0.3s;
}

.icon-section h3 {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.icon-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
    position: relative;
}

.icon-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.icon-btn.active {
    border-color: #667eea;
    background: #f8f9ff;
}

.icon-btn .emoji {
    font-size: 2rem;
}

.icon-btn .label {
    font-size: 0.8rem;
    color: #2c3e50;
    font-weight: 500;
    text-align: center;
}

.repeat-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #667eea;
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.current-state-section {
    border-left: 4px solid #e74c3c;
}

.desired-state-section {
    border-left: 4px solid #27ae60;
}

/* ---------- Results Section ---------- */
#results-section {
    background: var(--card);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

#results-section.hidden {
    display: none !important;
}

#results-section:not(.hidden) {
    display: block;
}

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

.hidden {
    display: none !important;
}

/* Scores */
.scores-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.score-card {
    text-align: center;
    padding: 0.75rem;
    border-radius: 10px;
    background: var(--bg);
}

.score-card.anxiety { border-top: 3px solid var(--danger); }
.score-card.sync { border-top: 3px solid var(--accent); }

.score-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.25rem 0;
}

.score-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.score-bar > div {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
    width: 0%;
}

#anxiety-bar { background: var(--danger); }
#sync-bar { background: var(--accent); }

/* State Badge */
.state-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin: 1rem 0;
}

.state-critical { background: #fee; color: var(--danger); }
.state-anxious { background: #fff3e0; color: var(--warning); }
.state-neutral { background: #e3f2fd; color: var(--secondary); }
.state-calm { background: #e8f5e9; color: var(--success); }

/* Recommendations */
.recommendations-list {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
}

.recommendations-list li {
    margin: 0.5rem 0;
    margin-left: 1.5rem;
}

/* Audio Section */
.audio-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#duration-display {
    color: var(--text-light);
    font-size: 0.9rem;
}

.elapsed-time-display {
    color: var(--success);
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Waveform / Oscilloscope */
#waveform {
    width: 100%;
    height: 150px;
    margin-bottom: 1rem;
    background: #000000;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid #00ff00;
    box-shadow: inset 0 0 10px rgba(0,255,0,0.2);
}

#oscilloscope-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background-color: #000000;
    border-radius: 4px;
}

/* Repeat Indicator */
#repeat-indicator {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

/* Feedback */
#feedback-section {
    margin-top: 2rem;
    text-align: center;
}

.rating {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.rating button {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.rating button:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

/* ---------- Physio Explanation ---------- */
.physio-explanation {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f5e9 100%);
    border-radius: 15px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid #667eea;
}

.physio-explanation h3 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.physio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.physio-item {
    background: white;
    padding: 0.75rem;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 0;
}

.physio-item h4 {
    color: #667eea;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.physio-item p {
    color: #555;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.frequency-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ---------- History Section ---------- */
#history-section {
    background: var(--card);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.history-chart-container {
    margin-bottom: 1.5rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    min-height: 300px;
}

#progress-chart {
    width: 100%;
    height: auto;
    max-height: 300px;
}

/* Stats Summary */
.stats-summary-cards {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.stat-card-summary {
    text-align: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    min-width: 100px;
}

.stat-card-summary .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.stat-card-summary .stat-label {
    font-size: 0.75rem;
    color: #7f8c8d;
}

/* Detailed History */
.detailed-history {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border);
}

.detailed-history h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.3rem;
}

.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.session-detail-card {
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border);
}

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

.session-header {
    background: linear-gradient(135deg, #667eea10, #764ba210);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.session-date {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.session-scores {
    display: flex;
    gap: 1rem;
}

.score-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.score-badge.anxiety.critical { background: #fee; color: #e74c3c; }
.score-badge.anxiety.high { background: #fff3e0; color: #f39c12; }
.score-badge.anxiety.medium { background: #e3f2fd; color: #3498db; }
.score-badge.anxiety.low { background: #e8f5e9; color: #27ae60; }
.score-badge.sync { background: #e8f5e9; color: #27ae60; }

.session-content {
    padding: 1.5rem;
}

.session-input {
    background: #f8f9ff;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.input-label {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.input-text {
    color: #2c3e50;
    font-style: italic;
    font-size: 0.9rem;
    line-height: 1.5;
}

.session-states {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

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

.state-label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
}

.state-value {
    font-weight: 600;
    color: var(--primary);
}

.session-recommendations {
    background: #f8f9ff;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.rec-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #667eea;
}

.rec-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.rec-list li {
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
}

.rec-list li::before {
    content: '✨';
    position: absolute;
    left: 0;
}

.session-physio {
    background: #f0f4f8;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.physio-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #764ba2;
}

.steps-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.step-item {
    background: linear-gradient(135deg, #667eea20, #764ba220);
    padding: 0.5rem;
    border-radius: 8px;
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.step-item strong {
    font-size: 0.8rem;
    color: #667eea;
}

.step-item small {
    font-size: 0.7rem;
    color: #7f8c8d;
}

.fade-info {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #667eea;
    text-align: center;
}

.session-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-light);
}

.session-rating {
    background: #ffd70020;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: #f39c12;
}

.empty-history {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    background: #f8f9fa;
    border-radius: 12px;
}

/* ---------- Upgrade Section ---------- */
.upgrade-section {
    text-align: center;
    padding: 3rem 2rem;
}

.pro-card {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: var(--shadow-hover);
}

.pro-card h2 { margin-bottom: 1rem; }
.pro-card ul {
    text-align: left;
    margin: 1.5rem 0;
    list-style: none;
}
.pro-card li {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}
.pro-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ffd700;
    font-weight: bold;
}

/* ---------- Patient Info Banner ---------- */
.patient-info-banner {
    background: linear-gradient(135deg, #667eea20, #764ba220);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.session-separator {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, #764ba2, #667eea, transparent);
    margin: 1.5rem 0;
    border-radius: 2px;
}

/* ---------- Warning Banner ---------- */
.warning-banner {
    background: #fff3cd;
    color: #856404;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.warning-banner.danger {
    background: #f8d7da;
    color: #721c24;
}

.warning-banner a {
    color: inherit;
    font-weight: 600;
}

/* ---------- Auth Pages ---------- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    padding: 2rem;
}

.auth-box {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 450px;
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

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

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

/* Password strength meter */
.strength-meter {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 0.85rem;
    text-align: center;
    display: none;
}
.strength-meter.weak { display: block; background: #fee; color: var(--danger); }
.strength-meter.fair { display: block; background: #fff3e0; color: var(--warning); }
.strength-meter.good { display: block; background: #e3f2fd; color: var(--secondary); }
.strength-meter.strong { display: block; background: #e8f5e9; color: var(--success); }

/* ---------- Admin Panel ---------- */
.admin-body { background: #f5f6fa; }
.admin-nav {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.data-table th,
.data-table td {
    border: 1px solid var(--border);
    padding: 0.85rem 1rem;
    text-align: left;
}
.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}
.btn-reset {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}
.btn-reset-all {
    background: #f39c12;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #28a745;
}
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #e74c3c;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: white;
    padding: 35px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalPop 0.3s ease;
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
.modal-buttons {
    display: flex;
    gap: 15px;
}
.btn-save {
    background: var(--gradient-primary);
    color: white;
}
.btn-cancel {
    background: #e0e0e0;
    color: #333;
}

/* ---------- Print Styles ---------- */
@media print {
    .main-header, .player-controls, .btn-loop, .btn-emergency, .btn-play,
    .btn-primary, .btn-pro, .upgrade-section, .input-section, .audio-section,
    #feedback-section, .rating, #analyze-btn, .input-meta, .icon-section,
    .nav-link, #duration-display, #repeat-indicator, .waveform-container,
    #waveform, button, .btn, .btn-print-session, .btn-print-chart,
    .menu-toggle, .btn-session-new {
        display: none !important;
    }
    body {
        background: white;
        color: black;
        margin: 0;
        padding: 0;
        font-size: 12pt;
    }
    .app-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    #results-section {
        display: block !important;
        padding: 0;
        margin: 0;
        background: white;
        box-shadow: none;
    }
    .physio-item, .recommendations-list li, .score-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    @page {
        margin: 2cm;
        size: A4;
    }
    .print-header {
        display: block;
        text-align: center;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #667eea;
    }
    .print-footer {
        display: block;
        text-align: center;
        margin-top: 2rem;
        padding-top: 1rem;
        border-top: 1px solid #ccc;
        font-size: 0.8rem;
        color: #666;
    }
    .print-only {
        display: block;
    }
    .no-print {
        display: none !important;
    }
}

.print-only {
    display: none;
}

.page-break-before {
    page-break-before: always;
    break-before: page;
}
.page-break-after {
    page-break-after: always;
    break-after: page;
}
.page-break-inside-avoid {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* ---------- Mobile Responsive (Hamburger Menu) ---------- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text);
}

@media (max-width: 768px) {
    .app-container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }
    .main-header {
        padding: 1rem;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .logo {
        font-size: 1.2rem;
    }
    .menu-toggle {
        display: block;
        order: 2;
    }
    .nav-container {
        display: none;
        width: 100%;
        order: 3;
        flex-direction: column;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
        gap: 0.8rem;
    }
    .nav-container.active {
        display: flex;
    }
    .nav-container a,
    .nav-container span:not(.session-counter) {
        margin: 0 !important;
        padding: 0.8rem 1rem;
        width: 100%;
        text-align: center;
        border-radius: 10px;
        background: var(--bg);
    }
    .nav-container .session-counter {
        margin: 0 auto;
        display: block;
        width: auto;
        text-align: center;
        background: rgba(102, 126, 234, 0.15);
        backdrop-filter: blur(10px);
        color: var(--text);
        border: 1px solid rgba(102, 126, 234, 0.3);
        padding: 0.5rem 1rem;
    }
    .btn-primary {
        width: 100%;
        margin: 0.3rem 0;
    }
    .user-welcome {
        margin: 0;
        text-align: center;
        width: 100%;
        padding: 0.5rem;
        background: var(--bg);
        border-radius: 10px;
    }
    .scores-container {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .session-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .stats-summary-cards {
        flex-direction: column;
        align-items: center;
    }
    .player-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    .btn-play, .btn-emergency, .btn-pro {
        width: 100%;
        text-align: center;
    }
    /* Table to card on mobile */
    .data-table thead {
        display: none;
    }
    .data-table, .data-table tbody, .data-table tr, .data-table td {
        display: block;
        width: 100%;
    }
    .data-table tr {
        background: white;
        margin-bottom: 1rem;
        border-radius: 10px;
        box-shadow: var(--shadow);
        padding: 0.75rem;
    }
    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid var(--border);
    }
    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-light);
        margin-right: 1rem;
    }
}

/* ---------- Utilities ---------- */
.shake {
    animation: shake 0.5s;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}
.player-page {
            min-height: 100vh;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            color: white;
            display: flex;
            flex-direction: column;
        }
        .player-header {
            padding: 1rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(0,0,0,0.2);
        }
        .player-header .logo {
            font-size: 1.5rem;
            font-weight: 800;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .player-header a {
            color: white;
            text-decoration: none;
            opacity: 0.8;
        }
        .player-header a:hover {
            opacity: 1;
        }
        .player-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 2rem;
        }
        .session-info {
            text-align: center;
            margin-bottom: 3rem;
        }
        .session-info h1 {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }
        .session-info p {
            opacity: 0.7;
        }
        .visualizer-container {
            width: 100%;
            max-width: 600px;
            height: 300px;
            position: relative;
            margin-bottom: 3rem;
        }
        .visualizer {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
        }
        .bar {
            width: 8px;
            background: linear-gradient(to top, #667eea, #764ba2);
            border-radius: 4px;
            transition: height 0.1s ease;
        }
        .center-circle {
            position: absolute;
            width: 150px;
            height: 150px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
            display: flex;
            align-items: center;
            justify-content: center;
            animation: pulse 4s infinite;
        }
        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 0.5; }
            50% { transform: scale(1.1); opacity: 0.8; }
        }
        .breathing-indicator {
            font-size: 1.2rem;
            font-weight: 300;
            letter-spacing: 2px;
        }
        .player-controls {
            display: flex;
            align-items: center;
            gap: 2rem;
            margin-bottom: 2rem;
        }
        .control-btn {
            background: none;
            border: none;
            color: white;
            cursor: pointer;
            font-size: 1.5rem;
            opacity: 0.8;
            transition: opacity 0.2s, transform 0.2s;
        }
        .control-btn:hover {
            opacity: 1;
            transform: scale(1.1);
        }
        .play-btn {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
        }
        .play-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
        }
        .progress-container {
            width: 100%;
            max-width: 500px;
            margin-bottom: 2rem;
        }
        .progress-bar {
            width: 100%;
            height: 6px;
            background: rgba(255,255,255,0.1);
            border-radius: 3px;
            overflow: hidden;
            cursor: pointer;
        }
        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
            width: 0%;
            transition: width 0.1s linear;
        }
        .time-display {
            display: flex;
            justify-content: space-between;
            margin-top: 0.5rem;
            font-size: 0.9rem;
            opacity: 0.7;
        }
        .session-stats {
            display: flex;
            gap: 3rem;
            text-align: center;
        }
        .stat {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .stat-value {
            font-size: 2rem;
            font-weight: 700;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .stat-label {
            font-size: 0.9rem;
            opacity: 0.7;
            margin-top: 0.25rem;
        }
        .emergency-btn {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            background: #e74c3c;
            color: white;
            border: none;
            padding: 1rem 2rem;
            border-radius: 50px;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
            animation: pulse-red 2s infinite;
            display: none;
        }
        .emergency-btn.show {
            display: block;
        }
        @keyframes pulse-red {
            0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
            50% { box-shadow: 0 0 0 15px rgba(231, 76, 60, 0); }
        }
        .hidden {
            display: none !important;
        }
		.therapist-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 2rem;
        }
        
        .therapist-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid var(--border);
        }
        
        .therapist-header h1 {
            color: var(--primary);
        }
        
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }
        
        .stat-card {
            background: var(--card);
            padding: 1.5rem;
            border-radius: 15px;
            text-align: center;
            box-shadow: var(--shadow);
        }
        
        .stat-number {
            font-size: 2rem;
            font-weight: 700;
            color: #667eea;
        }
        
        .patient-card {
            background: var(--card);
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.3s;
            border: 1px solid var(--border);
        }
        
        .patient-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-hover);
        }
        
        .patient-info {
            flex: 2;
        }
        
        .patient-name {
            font-weight: 700;
            font-size: 1.1rem;
            color: var(--primary);
        }
        
        .patient-email {
            font-size: 0.85rem;
            color: var(--text-light);
        }
        
        .patient-stats {
            display: flex;
            gap: 1.5rem;
            flex: 1;
            justify-content: flex-end;
        }
        
        .patient-stat {
            text-align: center;
        }
        
        .patient-stat .value {
            font-weight: 700;
            color: #667eea;
        }
        
        .patient-stat .label {
            font-size: 0.7rem;
            color: var(--text-light);
        }
        
        .patient-actions {
            display: flex;
            gap: 0.5rem;
            margin-left: 1rem;
        }
        
        .btn-view {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            text-decoration: none;
            font-size: 0.85rem;
            transition: all 0.2s;
        }
        
        .btn-view:hover {
            transform: translateY(-2px);
        }
        
        .btn-delete {
            background: #e74c3c;
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            text-decoration: none;
            font-size: 0.85rem;
        }
        
        .btn-delete:hover {
            background: #c0392b;
        }
        
        .register-form {
            background: var(--card);
            padding: 1.5rem;
            border-radius: 15px;
            margin-bottom: 2rem;
            box-shadow: var(--shadow);
        }
        
        .register-form h3 {
            margin-bottom: 1rem;
            color: var(--primary);
        }
        
        .form-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin-bottom: 1rem;
        }
        
        .form-group {
            margin-bottom: 0;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 0.25rem;
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        .form-group input, .form-group select {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid var(--border);
            border-radius: 8px;
        }
        
        .btn-register {
            background: linear-gradient(135deg, #27ae60, #2ecc71);
            color: white;
            padding: 0.6rem 1.5rem;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
        }
        
        .btn-register:hover {
            transform: translateY(-2px);
        }
        
        .message {
            padding: 0.75rem;
            border-radius: 8px;
            margin-bottom: 1rem;
        }
        
        .message.success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        
        .message.error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        
        .empty-state {
            text-align: center;
            padding: 3rem;
            color: var(--text-light);
        }
        
        .info-note {
            background: #e8f4fd;
            color: #1976d2;
            padding: 0.75rem;
            border-radius: 10px;
            margin-bottom: 1.5rem;
            font-size: 0.85rem;
            text-align: center;
        }
        
        @media (max-width: 768px) {
            .patient-card {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.5rem;
            }
            
            .patient-stats {
                justify-content: flex-start;
                flex-wrap: wrap;
            }
            
            .patient-actions {
                margin-left: 0;
            }
        }
		.auth-container {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 2rem;
        }
        
        .auth-box {
            background: white;
            padding: 2rem;
            border-radius: 20px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.1);
            width: 100%;
            max-width: 500px;
        }
        
        .auth-box h1 {
            text-align: center;
            color: #333;
            margin-bottom: 0.5rem;
        }
        
        .auth-subtitle {
            text-align: center;
            color: #7f8c8d;
            margin-bottom: 2rem;
        }
        
        .form-group {
            margin-bottom: 1.5rem;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            color: #555;
            font-weight: 500;
        }
        
        .form-group input,
        .form-group select {
            width: 100%;
            padding: 0.75rem;
            border: 2px solid #e1e8ed;
            border-radius: 10px;
            font-size: 1rem;
            transition: all 0.3s;
        }
        
        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #667eea;
        }
        
        .password-wrapper {
            position: relative;
        }
        
        .toggle-password {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1.2rem;
            opacity: 0.6;
        }
        
        .toggle-password:hover {
            opacity: 1;
        }
        
        .strength-meter {
            height: 4px;
            margin-top: 0.5rem;
            border-radius: 2px;
            transition: all 0.3s;
        }
        
        .strength-meter.weak {
            background: #e74c3c;
            width: 33%;
        }
        
        .strength-meter.medium {
            background: #f39c12;
            width: 66%;
        }
        
        .strength-meter.strong {
            background: #27ae60;
            width: 100%;
        }
        
        .error-message {
            color: #e74c3c;
            font-size: 0.85rem;
            margin-top: 0.5rem;
        }
        
        .global-error {
            background: #fee;
            color: #c33;
            padding: 0.75rem;
            border-radius: 10px;
            margin-bottom: 1rem;
            text-align: center;
            display: none;
        }
        
        .checkbox-group {
            margin-bottom: 1.5rem;
        }
        
        .checkbox-group input {
            margin-right: 0.5rem;
        }
        
        .checkbox-group label {
            color: #555;
            font-size: 0.9rem;
        }
        
        .btn-submit {
            width: 100%;
            padding: 0.75rem;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s;
        }
        
        .btn-submit:hover {
            transform: translateY(-2px);
        }
        
        .btn-submit:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        
        .auth-footer {
            text-align: center;
            margin-top: 1.5rem;
            padding-top: 1rem;
            border-top: 1px solid #e1e8ed;
        }
        
        .auth-footer a {
            color: #667eea;
            text-decoration: none;
        }
        
        .auth-footer a:hover {
            text-decoration: underline;
        }
        
        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
        }
        
        .success-message {
            background: #efe;
            color: #27ae60;
            padding: 0.75rem;
            border-radius: 10px;
            margin-bottom: 1rem;
            text-align: center;
        }
        
        .info-note {
            background: #e8f4fd;
            color: #1976d2;
            padding: 0.75rem;
            border-radius: 10px;
            margin-bottom: 1.5rem;
            text-align: center;
            font-size: 0.85rem;
        }
        
        @media (max-width: 600px) {
            .form-row {
                grid-template-columns: 1fr;
                gap: 0;
            }
        }
		.icon-grid.two-rows {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .icon-grid.two-rows {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Container personaj */
.synq-character-section {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.synq-character-section h2 {
    text-align: center;
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 700;
}

.synq-character-section .subtitle {
    text-align: center;
    color: #666;
    font-size: 1em;
    margin-bottom: 25px;
    font-style: italic;
}

#synq-character-container {
    max-width: 400px;
    height: 500px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .synq-character-section {
        padding: 20px;
        margin: 20px 10px;
    }

    #synq-character-container {
        max-width: 300px;
        height: 400px;
    }
}
.continuous-timeline {
    display: flex;
    width: 100%;
    height: 60px;
    background: #1a1a2e;
    border-radius: 8px;
    overflow: hidden;
    margin: 10px 0;
    border: 1px solid #333;
}

.timeline-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    position: relative;
    transition: all 0.3s;
}

.timeline-segment.state {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.timeline-segment.goal {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.timeline-segment:hover {
    transform: scaleY(1.1);
    z-index: 10;
}

.segment-track {
    font-weight: bold;
    font-size: 11px;
}

.segment-beat {
    opacity: 0.8;
    font-size: 9px;
}

.segment-overlap {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffd700;
    color: #000;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: bold;
    z-index: 20;
}

.junction-info {
    background: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    margin: 5px 0;
    font-weight: bold;
}
.boxplot-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    padding: 20px;
    position: relative;
}
.boxplot-visual {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 60px;
}
.boxplot-line {
    position: absolute;
    height: 2px;
    background: #667eea;
    top: 50%;
    transform: translateY(-50%);
}
.boxplot-box {
    position: absolute;
    height: 40px;
    background: rgba(102, 126, 234, 0.3);
    border: 2px solid #667eea;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 4px;
}
.boxplot-whisker-end {
    position: absolute;
}
.boxplot-mean {
    position: absolute;
    cursor: pointer;
    z-index: 10;
}
.boxplot-mean div {
    transition: transform 0.2s;
}
.boxplot-mean:hover div {
    transform: scale(1.2) rotate(45deg);
}
.boxplot-label {
    position: absolute;
    font-size: 0.7rem;
    color: #7f8c8d;
    transform: translateX(-50%);
    white-space: nowrap;
}
.boxplot-label-mean {
    position: absolute;
    font-size: 0.75rem;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
}

#trendChart {
    display: block;
    width: 100% !important;
    height: 300px !important;
    min-height: 300px;
    background: #f8f9fa;
    border-radius: 8px;
}
/* Stiluri pentru printare */
@media print {
    .main-header, .btn-export, .btn-print, .nav-link, .stat-header a, .btn-back {
        display: none !important;
    }
    .stat-container {
        padding: 0 !important;
        margin: 0 !important;
    }
    .stat-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }
    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    @page {
        size: A4;
        margin: 1.5cm;
    }
    h1, h2, h3 {
        color: black !important;
    }
}
/* Ascunde complet sliderul de progres */
.progress-slider-container,
#progress-slider-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}
/* =========================================================================
   SYNQ — strat de utilitare pentru paginile de marketing (bilingv)
   Adăugat la combinarea SYNQ + MuzicaTerapeutica.ro. Nu atinge nicio clasă
   folosită de player-v2overlap.js / synq-character.js / chart.js mai sus.
   ========================================================================= */
:root{
  --mk-ink:#1a1a2e;
  --mk-ink-soft:#5b5d78;
  --mk-cream:#f7f7fb;
  --mk-paper:#ffffff;
  --mk-gold:#c79a3c;
  --mk-gold-light:#e4c589;
  --mk-border:#e4e4f0;
  --mk-purple:#667eea;
  --mk-purple-2:#764ba2;
  --mk-shadow:0 10px 30px rgba(26,26,46,.08);
  --mk-shadow-sm:0 3px 10px rgba(26,26,46,.06);
  --mk-maxw:1180px;
  --mk-danger:#e74c3c;
  --mk-success:#27ae60;
}
.container{width:92%;max-width:var(--mk-maxw);margin:0 auto}
.section{padding:4.5rem 0}
.section-tight{padding:2.5rem 0}
.section-alt{background:var(--mk-paper)}
.text-center{text-align:center}
.eyebrow{
  display:inline-block;letter-spacing:.14em;text-transform:uppercase;
  font-size:.72rem;font-weight:700;color:var(--mk-gold);margin-bottom:.75rem;
}
.lead{font-size:1.15rem;color:var(--mk-ink-soft);max-width:640px}
.center-col{margin-left:auto;margin-right:auto}
.mk-page h1{font-family:'Playfair Display',Georgia,serif}

/* ---------- Site header (pagini de marketing) ---------- */
.site-header{background:var(--mk-paper);box-shadow:var(--mk-shadow-sm);position:relative;z-index:20}
.site-header .top-bar{display:flex;align-items:center;flex-wrap:nowrap;padding:1rem 0;gap:.75rem}
.site-header .brand{font-weight:800;font-size:1.4rem;background:linear-gradient(135deg,var(--mk-purple) 0%,var(--mk-purple-2) 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;text-decoration:none;flex-shrink:0}
/* (25.08.2026) Totul din top-bar-actions rămâne pe un singur rând — ca pe
   paginile de marketing (index.php) — chiar și pe app.php, unde apar în plus
   contorul de sesiuni și butonul "Sesiune nouă". Dacă nu încape (ecran
   îngust), rândul devine scrollabil orizontal în loc să treacă pe 2 rânduri.
   IMPORTANT: butonul de meniu (.nav-toggle) stă în afara acestei zone
   scrollabile (vezi includes/header.php), tocmai ca să nu dispară din ecran
   odată cu scroll-ul — altfel pe tabletă/mobil nu mai există nicio cale să
   deschizi meniul de navigare. */
.top-bar-actions{display:flex;align-items:center;gap:.6rem;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;flex:1 1 auto;min-width:0}
.top-bar-actions::-webkit-scrollbar{display:none}
.top-bar-actions>*{flex-shrink:0}
/* (25.08.2026) Copia din meniul hamburger a acelorași butoane (vezi
   includes/header.php — $synqTopBarActionsHtml e afișat de 2 ori). Rămâne
   ascunsă pe desktop; devine vizibilă doar în media query-ul de mai jos,
   când rândul de lângă SYNQ e ascuns cu totul, ca butoanele să nu mai
   depindă de scroll orizontal pe tabletă/mobil. */
.top-bar-actions-mobile{display:none}
.lang-switch{font-weight:700;border:1px solid var(--mk-border);border-radius:999px;padding:.35rem .8rem;font-size:.8rem;color:var(--mk-ink);text-decoration:none}
.lang-switch:hover{background:var(--mk-cream);text-decoration:none}
.user-welcome{font-size:.85rem;color:var(--mk-ink-soft);font-weight:600}
.nav-toggle{display:none;background:none;border:none;font-size:1.4rem;cursor:pointer;flex-shrink:0}
.site-header .nav-bar{border-top:1px solid var(--mk-border);background:var(--mk-cream)}
.nav-wrap{display:flex}
.nav-links{display:flex;gap:1.5rem;flex-wrap:wrap;padding:.75rem 0}
.nav-links a{font-size:.88rem;font-weight:600;color:var(--mk-ink-soft);text-decoration:none}
.nav-links a:hover,.nav-links a.active{color:var(--mk-purple)}
@media (max-width:860px){
  .nav-toggle{display:block}
  .nav-bar{display:none}
  .nav-bar.open{display:block}
  /* Rândul de lângă SYNQ (scrollabil) dispare complet — pe ecran îngust,
     aceleași butoane apar doar în meniul hamburger, stivuite vertical, ca
     să fie toate vizibile fără scroll ascuns. */
  .top-bar-actions{display:none}
  /* Doar aici (ecran îngust) brand-ul are voie să se micșoreze/trunchieze —
     pe desktop rămâne întotdeauna la mărimea lui naturală (flex-shrink:0,
     mai sus). Fără asta, textul lung "SYNQ (SYNchronizationQantum)" ar
     împinge singur butonul de meniu în afara ecranului, la fel ca bug-ul
     semnalat. */
  .site-header .brand{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .nav-wrap{flex-direction:column}
  .top-bar-actions-mobile{
    display:flex;flex-direction:column;align-items:stretch;gap:.6rem;
    padding:1rem 0;border-bottom:1px solid var(--mk-border);
  }
  .top-bar-actions-mobile .btn,
  .top-bar-actions-mobile .lang-switch,
  .top-bar-actions-mobile .btn-session-new{width:100%;text-align:center;justify-content:center}
  .top-bar-actions-mobile .user-welcome,
  .top-bar-actions-mobile .session-counter{text-align:center}
  .top-bar-actions .btn-sm{padding:.5rem 1rem;font-size:.8rem}
}

/* ---------- Buttons (marketing) ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.85rem 1.6rem;border-radius:999px;font-weight:600;font-size:.98rem;border:2px solid transparent;cursor:pointer;transition:.2s ease;text-decoration:none}
.btn-primary{background:linear-gradient(135deg,var(--mk-purple) 0%,var(--mk-purple-2) 100%);color:#fff;border-color:transparent}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(102,126,234,.35);text-decoration:none;color:#fff}
.btn-outline{background:transparent;color:var(--mk-ink);border-color:var(--mk-border)}
.btn-outline:hover{background:var(--mk-cream);text-decoration:none}
.btn-gold{background:var(--mk-gold);color:#241a06;border-color:var(--mk-gold)}
.btn-gold:hover{background:#a5751f;border-color:#a5751f;text-decoration:none;color:#241a06}
.btn-block{width:100%}
.btn-sm{padding:.5rem 1.1rem;font-size:.85rem}

/* ---------- Hero (pagini marketing) ---------- */
.mk-hero{min-height:70vh;display:flex;align-items:center;text-align:center;justify-content:center;background:linear-gradient(135deg,#1a1a2e 0%,#16213e 100%);color:#fff;position:relative;overflow:hidden;padding:5rem 0}
.mk-hero::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 20% 50%,rgba(102,126,234,.18) 0%,transparent 55%);pointer-events:none}
.mk-hero .container{position:relative;z-index:1;max-width:820px}
.mk-hero h1{font-size:2.6rem;margin-bottom:1rem;color:#fff}
.mk-hero .lead{color:rgba(255,255,255,.82);max-width:620px;margin:0 auto 2rem}
.mk-hero .eyebrow{color:var(--mk-gold-light)}
.hero-actions{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap;margin-bottom:2rem}
.hero-badges{display:flex;gap:2rem;justify-content:center;flex-wrap:wrap;margin-top:1rem}
.hero-badge{display:flex;flex-direction:column;font-size:.8rem;color:rgba(255,255,255,.75)}
.hero-badge b{font-size:1.8rem;color:#fff;font-family:'Playfair Display',Georgia,serif}

/* ---------- Grids / cards ---------- */
.grid{display:grid;gap:2rem}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}
@media (max-width:860px){.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}}
.card{background:var(--mk-paper);padding:2rem;border-radius:18px;box-shadow:var(--mk-shadow-sm);transition:.25s}
.card:hover{box-shadow:var(--mk-shadow);transform:translateY(-3px)}
.card .icon{font-size:2.2rem;display:block;margin-bottom:.75rem}
.state-card{background:var(--mk-paper);padding:1.75rem;border-radius:18px;box-shadow:var(--mk-shadow-sm);border-top:3px solid var(--mk-purple)}
.state-card .icon{font-size:2rem;display:block;margin-bottom:.5rem}

/* ---------- Steps ---------- */
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:2rem}
@media (max-width:860px){.steps{grid-template-columns:1fr}}
.step{text-align:center;padding:1.5rem}
.step .num{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,var(--mk-purple) 0%,var(--mk-purple-2) 100%);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;margin:0 auto 1rem}

/* ---------- Pricing ---------- */
.price-card{background:var(--mk-paper);border-radius:18px;padding:2.2rem;box-shadow:var(--mk-shadow-sm);position:relative;display:flex;flex-direction:column;border:2px solid transparent}
.price-card.featured{border-color:var(--mk-purple);box-shadow:var(--mk-shadow)}
.price-card .badge{position:absolute;top:-12px;right:1.5rem;background:var(--mk-gold);color:#241a06;font-size:.72rem;font-weight:700;padding:.3rem .8rem;border-radius:999px}
.price-card h3{margin-bottom:.5rem}
.price-card .amount{font-family:'Playfair Display',Georgia,serif;font-size:2.2rem;color:var(--mk-purple);margin-bottom:.2rem}
.price-card .amount small{font-size:.85rem;color:var(--mk-ink-soft);font-family:inherit}
.price-card .amount.amount-secondary{font-size:1.5rem;margin-bottom:1rem}
.price-card .price-fineprint{margin:0 0 .8rem;color:var(--mk-ink-soft);font-size:.78rem;text-align:center}
.price-card ul{list-style:none;padding:0;margin:0 0 1.5rem;flex:1}
.price-card ul li{padding:.4rem 0;color:var(--mk-ink-soft);font-size:.92rem}
.price-card ul li::before{content:'✓ ';color:var(--mk-success);font-weight:700}

/* ---------- Forms (marketing) ---------- */
.form-card{background:var(--mk-paper);padding:2rem;border-radius:18px;box-shadow:var(--mk-shadow-sm)}
.form-card fieldset{border:none;padding:0;margin:0 0 1.5rem}
.form-card legend{font-weight:700;color:var(--mk-purple);margin-bottom:1rem;padding:0;font-family:'Playfair Display',Georgia,serif;font-size:1.1rem}
.field{margin-bottom:1.1rem}
.field label{display:block;font-weight:600;font-size:.88rem;margin-bottom:.35rem;color:var(--mk-ink)}
.field .required{color:var(--mk-danger)}
.field input[type=text],.field input[type=email],.field input[type=tel],.field input[type=number],.field input[type=password],.field select,.field textarea{
  width:100%;padding:.7rem .9rem;border:1.5px solid var(--mk-border);border-radius:10px;font-size:.95rem;font-family:inherit;background:#fff
}
.field textarea{min-height:100px;resize:vertical}
.checkbox-line{display:flex;gap:.6rem;align-items:flex-start}
.hint{font-size:.8rem;color:var(--mk-ink-soft);margin-top:.4rem}
.alert{padding:1rem 1.2rem;border-radius:12px;font-size:.92rem;margin-bottom:1.2rem}
.alert-info{background:#eef1ff;color:#3b4694}
.alert-error{background:#fdecea;color:#a33125}
.alert-success{background:#e9f7ef;color:#1e6b3e}

/* ---------- Footer (marketing) ---------- */
.site-footer{background:var(--mk-ink);color:#c9cae0;padding:3.5rem 0 1.5rem;margin-top:3rem}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:2rem;margin-bottom:2rem}
@media (max-width:860px){.footer-grid{grid-template-columns:1fr 1fr}}
.site-footer h4{color:#fff;font-size:.85rem;text-transform:uppercase;letter-spacing:.08em;margin-bottom:1rem}
.site-footer a{display:block;color:#9a9dbd;text-decoration:none;font-size:.88rem;margin-bottom:.55rem}
.site-footer a:hover{color:#fff}
.site-footer .brand{background:linear-gradient(135deg,#8fa0ef 0%,#a481c9 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;font-weight:800;font-size:1.3rem;text-decoration:none;display:inline-block}
.footer-disclaimer{font-size:.78rem;color:#8385a8;border-top:1px solid rgba(255,255,255,.08);padding-top:1.5rem;max-width:900px}
.footer-bottom{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.5rem;font-size:.78rem;color:#7375a0;padding-top:1.2rem}
.site-footer .payment-logos{margin-bottom:.8rem;min-height:24px}
.site-footer .payment-logos img{width:130px;max-width:100%;height:auto;border-radius:4px;background:#fff;padding:4px}

/* ---------- Legal pages ---------- */
.mk-legal h2{margin-top:2.2rem;font-size:1.3rem}
