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

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --accent: #ffffff;
    --accent-light: #ffffff;
    --accent-dark: #cccccc;
    --text-primary: #ffffff;
    --text-secondary: #666666;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --border-radius: 16px;
    --nav-height: 70px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 200;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.02em;
}

.app {
    max-width: 100%;
    min-height: 100vh;
    padding-bottom: var(--nav-height);
}

/* Страницы */
.page {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

/* Заголовок страницы */
.page-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 400;
}

.back-btn {
    background: var(--bg-card);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Логотип */
.logo-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.logo-text {
    font-size: 20px;
    font-weight: 200;
    color: var(--text-primary);
}

.docs-btn {
    background: var(--bg-card);
    border: 1px solid #10b981;
    border-radius: 20px;
    color: #10b981;
    font-size: 12px;
    font-weight: 200;
    cursor: pointer;
    padding: 8px 14px;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.docs-btn:hover {
    opacity: 0.7;
}

/* Главная страница */
.header {
    padding: 10px 0;
}

.greeting {
    text-align: left;
    margin-top: -5px;
}

.greeting .wave {
    font-size: 24px;
    display: inline-block;
    animation: wave 1s ease-in-out;
}

.wave-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    animation: wave 1s ease-in-out;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

.greeting h1 {
    font-size: 16px;
    font-weight: 200;
    margin-top: 6px;
}

.greeting .subtitle {
    color: var(--text-secondary);
    margin-top: 5px;
    font-size: 14px;
}

/* Баннер */
.banner {
    margin: 8px 0;
    width: 100%;
}

.banner-image,
.banner-video {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    display: block;
    object-fit: cover;
}

/* Кнопки */
.btn-primary {
    background: var(--bg-card);
    border: 1px solid #333;
    color: white;
    padding: 18px 24px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid #10b981;
    color: #10b981;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
}

.btn-icon {
    font-size: 20px;
}

.btn-icon-svg {
    width: 20px;
    height: 20px;
}

.docs-icon {
    width: 16px;
    height: 16px;
}

/* Быстрые ссылки */
.quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.quick-link {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s;
}

.quick-link:active {
    transform: scale(0.97);
}

.link-icon {
    font-size: 28px;
}

.link-icon-svg {
    width: 32px;
    height: 32px;
}

/* Табы */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.tab {
    background: var(--bg-card);
    border: none;
    color: var(--text-secondary);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.tab.active {
    background: #10b981;
    color: white;
}

/* Списки */
.list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.list-item-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: 400;
    margin-bottom: 4px;
}

.list-item-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
}

.list-item-date {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 8px;
}

.list-item-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 500;
}

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

.status-completed {
    background: rgba(124, 58, 237, 0.2);
    color: var(--accent-light);
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.empty-icon-svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: block;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Профиль */
.profile-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.avatar-icon {
    width: 32px;
    height: 32px;
}

.profile-info h3 {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 4px;
}

.profile-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

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

.stat-value {
    font-size: 28px;
    font-weight: 300;
    color: var(--accent-light);
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
    display: block;
}

.profile-menu {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--bg-secondary);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item span:first-child {
    font-size: 20px;
}

.menu-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Поддержка */
.support-content {
    text-align: center;
    padding: 40px 20px;
}

.support-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.support-icon-svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: block;
}

.support-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.support-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Нижняя навигация */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    height: var(--nav-height);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    border-top: 1px solid var(--bg-card);
    z-index: 100;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.nav-item.active {
    color: #10b981;
}

.nav-icon {
    font-size: 24px;
}

.nav-icon-svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.nav-item.active .nav-icon-svg {
    stroke: #10b981;
}

.nav-label {
    font-size: 11px;
}

.badge {
    position: absolute;
    top: 2px;
    right: 8px;
    background: var(--error);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 24px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: var(--bg-card);
    border: none;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

/* Оценка */
.rating-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
}

.rating-btn {
    background: var(--bg-card);
    border: 2px solid transparent;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    font-size: 40px;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-btn:hover {
    border-color: var(--accent);
    transform: scale(1.1);
}

.rating-btn.selected {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.2);
}

/* Документ карточка */
.document-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.doc-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.doc-info {
    flex: 1;
    min-width: 0; /* Важно для работы text-overflow */
    overflow: hidden;
}

.doc-name {
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-size {
    color: var(--text-secondary);
    font-size: 12px;
}

.doc-download {
    background: #10b981;
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Уведомление карточка */
.notification-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px;
    border-left: 4px solid var(--accent);
}

.notification-card.unread {
    background: rgba(16, 185, 129, 0.1);
}

.notif-title {
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.notif-time {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Страница чата */
.chat-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.chat-info {
    flex: 1;
}

.chat-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.chat-status {
    font-size: 12px;
    color: var(--text-secondary);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 10px 0;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
}

.message-user {
    background: var(--accent);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-assistant {
    background: var(--bg-card);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message-content {
    white-space: pre-wrap;
    word-break: break-word;
}

.message-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    text-align: right;
}

.message-user .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Документы */
.docs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.docs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 200;
    transition: opacity 0.2s;
}

.docs-item:hover {
    opacity: 0.8;
}

.docs-item span:first-child {
    font-size: 20px;
}

.modal h3 {
    font-weight: 300;
    font-size: 18px;
}

/* ===== МОЯ АКТИВНОСТЬ ===== */

.activity-demo-badge {
    background: #10b981;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    text-align: center;
    margin-bottom: 16px;
}

.activity-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.activity-stat {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.activity-stat-value {
    font-size: 28px;
    font-weight: 300;
    color: #10b981;
    display: block;
}

.activity-stat-label {
    color: var(--text-secondary);
    font-size: 11px;
    margin-top: 4px;
}

.activity-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.activity-section-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* График активности */
.activity-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 100px;
    padding-top: 10px;
}

.activity-chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.activity-chart-val {
    font-size: 11px;
    color: #10b981;
    margin-bottom: 4px;
    font-weight: 600;
}

.activity-chart-fill {
    width: 24px;
    background: linear-gradient(180deg, #10b981, #059669);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
}

.activity-chart-day {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Список активности */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 14px;
}

.activity-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.activity-item-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.activity-item-status {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 500;
}

.activity-item-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.activity-item-status.completed {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
}

.activity-item-topic {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 8px;
    line-height: 1.4;
}

.activity-item-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.activity-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.notification-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-left: 3px solid transparent;
}

.notification-card:hover {
    background: var(--bg-card);
}

.notification-card.unread {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.notif-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.notif-icon {
    font-size: 18px;
}

.notif-title {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.notif-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    flex-shrink: 0;
}

.notif-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.notif-time {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.notif-actions {
    display: flex;
    justify-content: flex-end;
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.notif-mark-all {
    font-size: 13px;
    color: var(--success);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
}

.notif-mark-all:hover {
    text-decoration: underline;
}
