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

:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #1f2937;
    --light-bg: #f3f4f6;
    --white: #ffffff;
    --text-dark: #111827;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
}

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

.auth-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== АВТОРИЗАЦИЯ ===== */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.auth-header p {
    color: var(--text-light);
    font-size: 0.95em;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: var(--text-dark);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-toggle {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

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

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

.error-message {
    color: var(--danger-color);
    font-size: 0.9em;
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

.success-message {
    color: var(--success-color);
    font-size: 0.9em;
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(16, 185, 129, 0.1);
    border-radius: 4px;
    display: none;
}

.success-message:not(:empty) {
    display: block;
}

/* ===== КНОПКИ ===== */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #db2777;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1em;
    width: auto;
}

.btn-delete {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.2em;
    padding: 4px 8px;
    transition: all 0.2s;
}

.btn-delete:hover {
    color: #dc2626;
    transform: scale(1.2);
}

/* ===== НАВБАР ===== */

.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1em 2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand h1 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin: 0;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 2em;
}

.navbar-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar-menu a:hover {
    color: var(--primary-color);
}

/* ===== КОНТЕЙНЕР ===== */

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

/* ===== ГЛАВНОЕ МЕНЮ ===== */

.welcome-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    margin-bottom: 3em;
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
    align-items: center;
}

.welcome-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.welcome-text h2 {
    color: var(--primary-color);
    margin-bottom: 1em;
    font-size: 1.8em;
}

.welcome-text p {
    margin-bottom: 1em;
    color: var(--text-light);
    line-height: 1.8;
}

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

.menu-card {
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.menu-icon {
    font-size: 3em;
    margin-bottom: 1em;
}

.menu-card h3 {
    color: var(--text-dark);
    margin-bottom: 0.5em;
}

.menu-card p {
    color: var(--text-light);
    font-size: 0.95em;
}

.menu-card.emergency {
    border: 2px solid var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
}

/* ===== СТРАНИЦЫ ===== */

.page-header {
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2em;
}

.page-header h2 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 0.5em;
}

.page-header p {
    color: var(--text-light);
    font-size: 1.1em;
}

.page-header.emergency-header {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger-color);
}

/* ===== АФФИРМАЦИИ ===== */

.affirmations-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
}

.random-affirmation {
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.random-affirmation h3 {
    color: var(--text-dark);
    margin-bottom: 1.5em;
    font-size: 1.3em;
}

.affirmation-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2em;
    border-radius: 8px;
    margin-bottom: 1.5em;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: 500;
    line-height: 1.6;
}

.affirmations-list h3 {
    margin-bottom: 1em;
}

.affirmations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1em;
}

.affirmation-item {
    background: white;
    padding: 1.5em;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.affirmation-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

/* ===== ДНЕВНИК ===== */

.diary-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
}

.new-entry-section,
.entries-section {
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.new-entry-section h3,
.entries-section h3 {
    margin-bottom: 1.5em;
    color: var(--text-dark);
}

.diary-form .form-group {
    margin-bottom: 1.5em;
}

.mood-selector {
    display: flex;
    gap: 1em;
    justify-content: space-between;
    margin-bottom: 1em;
}

.mood-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.2s;
}

.mood-btn:hover,
.mood-btn.active {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.1);
    transform: scale(1.1);
}

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
    max-height: 600px;
    overflow-y: auto;
}

.entry-item {
    background: var(--light-bg);
    padding: 1.5em;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--border-color);
}

.entry-mood {
    font-weight: 600;
    color: var(--primary-color);
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
}

.entry-date {
    color: var(--text-light);
    font-size: 0.9em;
}

.entry-text {
    color: var(--text-dark);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ===== ПРАКТИКИ ===== */

.practices-container {
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.practices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2em;
    margin-bottom: 3em;
}

.practice-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2em;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}

.practice-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.practice-card h3 {
    margin-bottom: 1.5em;
    font-size: 1.2em;
}

.practice-card .btn-secondary {
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
}

.practices-tips {
    background: var(--light-bg);
    padding: 2em;
    border-radius: 12px;
}

.practices-tips h3 {
    margin-bottom: 1.5em;
    color: var(--text-dark);
}

.practices-tips ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.practices-tips li {
    padding-left: 1.5em;
    position: relative;
    color: var(--text-light);
    line-height: 1.6;
}

.practices-tips li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2em;
}

/* ===== ЭКСТРЕННАЯ ПОМОЩЬ ===== */

.emergency-container {
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.emergency-warning {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger-color);
    padding: 1.5em;
    border-radius: 6px;
    margin-bottom: 2em;
    color: var(--danger-color);
    font-weight: 500;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5em;
    margin-bottom: 2em;
}

.contact-card {
    background: var(--light-bg);
    padding: 1.5em;
    border-radius: 8px;
    border-left: 4px solid var(--success-color);
    font-weight: 500;
}

.emergency-info {
    background: var(--light-bg);
    padding: 2em;
    border-radius: 12px;
}

.emergency-info h3 {
    margin-bottom: 1.5em;
    color: var(--text-dark);
}

.emergency-info ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.emergency-info li {
    color: var(--text-light);
    padding-left: 1.5em;
    position: relative;
    line-height: 1.6;
}

.emergency-info li:before {
    content: "";
    position: absolute;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: 0.5em;
}

/* ===== ПСИХОЛОГ ===== */

.psychologist-container {
    background: white;
    padding: 3em;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.psychologist-info {
    margin: 0 auto;
}

.psychologist-info p {
    font-size: 1.1em;
    color: var(--text-light);
    margin-bottom: 2em;
}

/* ===== ПРОФИЛЬ ===== */

.profile-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
}

.profile-card {
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.profile-card h3 {
    margin-bottom: 1.5em;
    color: var(--primary-color);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.profile-info p {
    color: var(--text-dark);
    line-height: 1.8;
}

.profile-info strong {
    color: var(--primary-color);
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.profile-actions .btn {
    font-size: 1em;
}

/* ===== NO DATA ===== */

.no-data {
    text-align: center;
    color: var(--text-light);
    padding: 2em;
    background: var(--light-bg);
    border-radius: 8px;
}

/* ===== FOOTER ===== */

.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    text-align: center;
    padding: 2em;
    margin-top: 4em;
}

/* ===== АДАПТИВНОСТЬ ===== */

@media (max-width: 768px) {
    .welcome-section,
    .diary-container,
    .profile-container,
    .affirmations-container {
        grid-template-columns: 1fr;
    }
    
    .navbar-menu {
        gap: 1em;
    }
    
    .container {
        padding: 1em;
    }
    
    .auth-card {
        padding: 2em;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .mood-selector {
        flex-wrap: wrap;
    }
    
    .page-header h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 1em;
    }
    
    .navbar-brand h1 {
        font-size: 1.2em;
    }
    
    .navbar-menu {
        flex-direction: column;
        gap: 0.5em;
        font-size: 0.9em;
    }
    
    .container {
        padding: 1em 0.5em;
    }
    
    .auth-card {
        margin: 1em;
        padding: 1.5em;
    }
    
    .welcome-text h2 {
        font-size: 1.3em;
    }
}

/* ===== АДМИН-ПАНЕЛЬ ===== */

.admin-container {
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.admin-header {
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 2px solid var(--border-color);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5em;
    margin-bottom: 2em;
}

.stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5em;
    border-radius: 8px;
    text-align: center;
}

.stat-box h4 {
    margin-bottom: 0.5em;
    font-size: 0.95em;
    opacity: 0.9;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0;
}

.admin-tabs {
    display: flex;
    gap: 1em;
    margin-bottom: 2em;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 1em 1.5em;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-light);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

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

.tab-btn.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-header {
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--border-color);
}

.add-affirmation {
    background: var(--light-bg);
    padding: 1.5em;
    border-radius: 8px;
    margin-bottom: 2em;
}

.add-affirmation textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    margin-bottom: 1em;
}

.management-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.management-item {
    background: var(--light-bg);
    padding: 1.5em;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.management-item p {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.5;
}

.management-item small {
    color: var(--text-light);
    font-size: 0.85em;
}

.item-actions {
    display: flex;
    gap: 1em;
    align-items: center;
}

.toggle-small {
    display: inline-block;
    position: relative;
    cursor: pointer;
}

.toggle-small input {
    display: none;
}

.toggle-small span {
    display: inline-block;
    width: 40px;
    height: 24px;
    background-color: var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
    position: relative;
}

.toggle-small span:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
}

.toggle-small input:checked + span {
    background-color: var(--success-color);
}

.toggle-small input:checked + span:after {
    left: 18px;
}

.btn-delete-small {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.2em;
    padding: 4px 8px;
}

.management-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
}

.management-table thead {
    background-color: var(--light-bg);
}

.management-table th {
    padding: 1em;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

.management-table td {
    padding: 1em;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

.management-table tr:hover {
    background-color: var(--light-bg);
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 0.5em;
}

.badge-admin {
    background-color: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-badge.active {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.status-badge.blocked {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.management-table .actions {
    display: flex;
    gap: 0.5em;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background-color: var(--primary-light);
}

.text-muted {
    color: var(--text-light);
    font-size: 0.9em;
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    padding: 2em;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 2em;
}

.modal-body p {
    margin-bottom: 1em;
    color: var(--text-light);
    line-height: 1.6;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1em;
    margin-bottom: 1em;
}

.modal-footer {
    padding: 2em;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1em;
    justify-content: flex-end;
}

.modal-footer .btn {
    width: auto;
}

/* ===== ЦЕЛИ И ПРИВЫЧКИ ===== */

.goals-container,
.habits-container,
.reminders-container {
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.new-goal-section,
.new-habit-section,
.new-reminder-section {
    background: var(--light-bg);
    padding: 2em;
    border-radius: 8px;
    margin-bottom: 2em;
}

.goal-form,
.habit-form,
.reminder-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

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

.goals-grid,
.habits-grid,
.reminders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5em;
}

.goal-card,
.habit-card,
.reminder-card {
    background: var(--light-bg);
    padding: 1.5em;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.goal-header,
.habit-header,
.reminder-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1em;
}

.goal-priority {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.goal-priority.priority-high {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.goal-priority.priority-medium {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.goal-priority.priority-low {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.goal-description {
    color: var(--text-light);
    margin-bottom: 1em;
    font-size: 0.95em;
}

.goal-progress {
    margin-bottom: 1em;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5em;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85em;
    color: var(--text-light);
}

.goal-controls {
    display: flex;
    gap: 1em;
    align-items: center;
}

.progress-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.progress-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.habit-title {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.habit-icon {
    font-size: 1.5em;
}

.habit-frequency {
    color: var(--text-light);
    font-size: 0.9em;
    margin-bottom: 1em;
}

.btn-toggle-habit {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-toggle-habit:hover {
    background-color: var(--primary-light);
}

.btn-toggle-habit.completed {
    background-color: var(--success-color);
}

.reminder-info {
    font-size: 0.9em;
    color: var(--text-light);
    margin-bottom: 1em;
}

.reminder-info p {
    margin: 0.5em 0;
}

.reminder-toggle {
    display: flex;
    align-items: center;
    gap: 1em;
}

/* ===== СТРИК ЗАПИСЕЙ ===== */

.streak-banner {
    background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
    color: white;
    padding: 1.5em;
    border-radius: 8px;
    margin-top: 1.5em;
    text-align: center;
}

.streak-content {
    margin: 0;
}

.streak-banner h3 {
    margin: 0 0 0.5em 0;
    font-size: 1.3em;
}

.streak-banner p {
    margin: 0;
    opacity: 0.9;
}

/* ===== ГРАФИК НАСТРОЕНИЯ ===== */

.mood-chart-container {
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.chart-controls {
    display: flex;
    gap: 1em;
    margin-bottom: 2em;
    justify-content: center;
}

.btn-period {
    padding: 10px 20px;
    background-color: var(--light-bg);
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
}

.btn-period:hover {
    border-color: var(--primary-color);
    background-color: white;
}

.btn-period.active {
    background-color: var(--primary-color);
    color: white;
}

.chart-wrapper {
    position: relative;
    height: 400px;
    margin-bottom: 2em;
}

.mood-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5em;
    margin-bottom: 2em;
}

.stat-card {
    background: var(--light-bg);
    padding: 1.5em;
    border-radius: 8px;
    text-align: center;
}

.stat-card h4 {
    color: var(--text-dark);
    margin-bottom: 0.5em;
}

.stat-card p {
    font-size: 1.5em;
    color: var(--primary-color);
    font-weight: bold;
    margin: 0;
}

.mood-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1em;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1em;
    background: var(--light-bg);
    border-radius: 6px;
}

.mood-badge {
    padding: 8px 12px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    flex: 1;
}

.trend-value {
    color: var(--text-light);
    font-weight: bold;
}

/* ===== ВСЕХ АФФИРМАЦИЙ - СЮРПРИЗ ===== */

.all-affirmations-container {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2em;
    margin-top: 2em;
}

.affirmations-wall {
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5em;
}

.affirmation-wall-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5em;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    line-height: 1.5;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.affirmation-wall-item:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.affirmation-stats {
    background: white;
    padding: 2em;
    border-radius: 12px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 80px;
}

.affirmation-stats h3 {
    margin-bottom: 1.5em;
    color: var(--primary-color);
}

.stat {
    margin-bottom: 1em;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ АДМИН-ПАНЕЛИ И НОВЫХ ЭЛЕМЕНТОВ===== */

@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .all-affirmations-container {
        grid-template-columns: 1fr;
    }
    
    .affirmations-wall {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .affirmation-stats {
        position: static;
    }
    
    .management-table {
        font-size: 0.9em;
    }
    
    .management-table th,
    .management-table td {
        padding: 0.75em 0.5em;
    }
    
    .goals-grid,
    .habits-grid,
    .reminders-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper {
        height: 300px;
    }
    
    .mood-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .chart-controls {
        flex-direction: column;
    }
    
    .chart-wrapper {
        height: 250px;
    }
    
    .affirmations-wall {
        grid-template-columns: 1fr;
    }
    
    .management-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .item-actions {
        width: 100%;
        margin-top: 1em;
    }
}
