/* Euystacio Dashboard Styles */
:root {
    --primary-green: #2d5a3d;
    --light-green: #4a7c59;
    --soft-blue: #6bb6ff;
    --earth-brown: #8b4513;
    --bg-light: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --border-light: #e9ecef;
    --accent-gold: #ffd700;
    --white: #ffffff;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8f5e8 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
}

/* Dashboard Sections */
.dashboard {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}

section {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--primary-green);
}

section h2, section h3 {
    color: var(--primary-green);
    margin-bottom: 20px;
    font-weight: 500;
}

section h2 {
    font-size: 1.4rem;
}

section h3 {
    font-size: 1.2rem;
}

section h4 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 500;
}

/* Red Code Section */
.red-code {
    background: linear-gradient(135deg, #f8fff8 0%, #e8f5e8 100%);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--light-green);
}

.red-code p {
    margin-bottom: 10px;
}

.red-code strong {
    color: var(--primary-green);
}

/* Current State (Trunk) */
.trunk-section {
    border-left-color: var(--earth-brown);
}

.state-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.emotion-display, .symbiosis-meter {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.label {
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.9rem;
}

.value {
    font-weight: 600;
    color: var(--primary-green);
    font-size: 1.1rem;
}

.meter {
    width: 100%;
    height: 20px;
    background: var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.meter-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--light-green), var(--primary-green));
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Pulse Form */
.pulse-form {
    background: #fafbfc;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 15px;
}

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

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

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

.form-group input[type="range"] {
    padding: 0;
}

#intensity-value {
    font-weight: 600;
    color: var(--primary-green);
    margin-left: 10px;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

button {
    background: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: var(--light-green);
    transform: translateY(-2px);
}

/* Pulses Feed */
.pulses-list {
    max-height: 300px;
    overflow-y: auto;
}

.pulse-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid var(--soft-blue);
}

.pulse-emotion {
    font-weight: 600;
    color: var(--primary-green);
    text-transform: capitalize;
}

.pulse-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 5px;
}

.pulse-note {
    margin-top: 10px;
    font-style: italic;
    color: var(--text-dark);
}

/* Tutors List */
.tutor-item {
    background: #fff8e1;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid var(--accent-gold);
}

.tutor-name {
    font-weight: 600;
    color: var(--earth-brown);
    font-size: 1.1rem;
}

.tutor-reason {
    margin-top: 5px;
    color: var(--text-dark);
}

/* Reflections */
.reflection-controls {
    margin-bottom: 20px;
}

.reflect-btn {
    background: var(--soft-blue);
}

.reflect-btn:hover {
    background: #5aa3e8;
}

.reflection-item {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid var(--soft-blue);
}

.reflection-timestamp {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.reflection-content {
    color: var(--text-dark);
    line-height: 1.7;
}

/* Loading and Status */
.loading {
    text-align: center;
    color: var(--text-light);
    padding: 20px;
    font-style: italic;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #f44336;
    margin-bottom: 15px;
}

.success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #4caf50;
    margin-bottom: 15px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer p {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .state-display {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
}

@media (min-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr 1fr;
    }
    
    .red-code-section,
    .trunk-section {
        grid-column: 1 / -1;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse-item,
.tutor-item,
.reflection-item {
    animation: fadeIn 0.5s ease-out;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-green: #000000;
        --light-green: #333333;
        --text-dark: #000000;
        --border-light: #666666;
    }
}