/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables */
:root {
    --primary-color: #0088cc;
    --secondary-color: #64b5f6;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --background-color: var(--tg-theme-bg-color, #ffffff);
    --surface-color: var(--tg-theme-secondary-bg-color, #f5f5f5);
    --text-color: var(--tg-theme-text-color, #333333);
    --hint-color: var(--tg-theme-hint-color, #999999);
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --padding: 16px;
}

/* Colleague Section Styles */
.colleague-section {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: var(--padding);
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.colleague-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.colleague-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.colleague-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.colleague-username {
    font-size: 12px;
    color: var(--hint-color);
    font-weight: normal;
}

.colleague-dailies-count {
    font-size: 12px;
    color: var(--hint-color);
    background: rgba(0, 136, 204, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
}

.colleague-dailies {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.colleague-daily {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-left: 8px;
    padding: 12px;
}

.colleague-daily .daily-header {
    margin-bottom: 8px;
}

/* Leaderboard Styles */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s;
}

.leaderboard-item.current-user {
    background: rgba(0, 136, 204, 0.1);
    border: 1px solid var(--primary-color);
}

.leaderboard-item .rank {
    font-size: 18px;
    font-weight: bold;
    min-width: 32px;
    text-align: center;
}

.leaderboard-item .user-info {
    flex: 1;
}

.leaderboard-item .user-name {
    font-weight: 600;
    font-size: 14px;
}

.leaderboard-item .user-handle {
    font-size: 12px;
    color: var(--hint-color);
}

.leaderboard-item .streak-info {
    text-align: right;
    font-size: 12px;
}

.leaderboard-item .current-streak {
    font-weight: bold;
    color: var(--primary-color);
}

.leaderboard-item .max-streak {
    color: var(--hint-color);
}

/* Base styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* Loading state */
.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: var(--padding);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

.spinner {
    width: 60px;
    height: 60px;
    position: relative;
    margin-bottom: 24px;
}

.spinner::before,
.spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: pulse-rings 2s ease-in-out infinite;
}

.spinner::before {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255,255,255,0.3);
    animation-delay: 0s;
}

.spinner::after {
    width: 40px;
    height: 40px;
    top: 10px;
    left: 10px;
    border: 3px solid rgba(255,255,255,0.6);
    animation-delay: 0.5s;
}

.spinner > div {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 20px;
    left: 20px;
    animation: bounce-center 1.5s ease-in-out infinite;
}

.loading p {
    color: white;
    font-size: 16px;
    font-weight: 500;
    animation: fade-pulse 2s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Tab loading animation */
.tab-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    position: relative;
}

.tab-spinner {
    width: 32px;
    height: 32px;
    position: relative;
}

.tab-spinner > div {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    animation: orbit 1.2s linear infinite;
}

.tab-spinner > div:nth-child(1) { animation-delay: 0s; }
.tab-spinner > div:nth-child(2) { animation-delay: 0.3s; }
.tab-spinner > div:nth-child(3) { animation-delay: 0.6s; }
.tab-spinner > div:nth-child(4) { animation-delay: 0.9s; }

/* Jira specific loading */
.jira-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(0,136,204,0.05), rgba(100,181,246,0.05));
    border-radius: var(--radius);
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.jira-loading::before {
    content: '🎯';
    font-size: 32px;
    animation: jira-bounce 1.5s ease-in-out infinite;
    margin-bottom: 16px;
}

.jira-loading::after {
    content: 'Загружаем планы...';
    color: var(--primary-color);
    font-weight: 500;
    animation: fade-pulse 2s ease-in-out infinite;
}

.jira-dots {
    display: flex;
    gap: 4px;
    margin-top: 16px;
}

.jira-dots > div {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: wave-dots 1.4s ease-in-out infinite;
}

.jira-dots > div:nth-child(1) { animation-delay: 0s; }
.jira-dots > div:nth-child(2) { animation-delay: 0.2s; }
.jira-dots > div:nth-child(3) { animation-delay: 0.4s; }

/* Animations */
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulse-rings {
    0%, 40%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    20% {
        transform: scale(1.3);
        opacity: 0.5;
    }
}

@keyframes bounce-center {
    0%, 100% {
        transform: scale(1);
        background: rgba(255,255,255,0.9);
    }
    50% {
        transform: scale(1.3);
        background: rgba(255,255,255,1);
    }
}

@keyframes fade-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes orbit {
    0% {
        top: 12px;
        left: 12px;
        transform: scale(0);
    }
    25% {
        top: 2px;
        left: 12px;
        transform: scale(1);
    }
    50% {
        top: 12px;
        left: 22px;
        transform: scale(1);
    }
    75% {
        top: 22px;
        left: 12px;
        transform: scale(1);
    }
    100% {
        top: 12px;
        left: 12px;
        transform: scale(0);
    }
}

@keyframes jira-bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-5px) rotate(5deg);
    }
}

@keyframes wave-dots {
    0%, 40%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    20% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: var(--padding);
    border-radius: 0 0 var(--radius) var(--radius);
    margin-bottom: 16px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    font-size: 20px;
    font-weight: 600;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.user-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lives-badge, .streak-badge {
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.lives-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.streak-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

/* Navigation */
.nav-tabs {
    display: flex;
    background: var(--surface-color);
    border-radius: var(--radius);
    margin: 0 var(--padding) 16px var(--padding);
    padding: 4px;
}

.nav-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 8px;
    border-radius: calc(var(--radius) - 4px);
    font-size: 14px;
    font-weight: 500;
    color: var(--hint-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-tab.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

/* Content */
.content {
    padding: 0 var(--padding);
    min-height: calc(100vh - 200px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Smooth transitions for content */
#jira-content,
#recent-dailies,
#mentions-list {
    transition: opacity 0.15s ease, transform 0.15s ease;
    opacity: 1;
    transform: translateY(0);
}

.content-loading {
    opacity: 0.7;
    transform: translateY(5px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.primary-btn {
    flex: 1;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.primary-btn:hover {
    background: #0077bb;
    transform: translateY(-1px);
}

.primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    flex: 1;
    background: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background: #e0e0e0;
}

/* Section */
.section {
    margin-bottom: 24px;
}

.section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

/* Daily Toggle */
.daily-toggle {
    display: flex;
    background: var(--surface-color);
    border-radius: var(--radius);
    margin-bottom: 16px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

.toggle-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 16px;
    border-radius: calc(var(--radius) - 4px);
    font-size: 14px;
    font-weight: 500;
    color: var(--hint-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.toggle-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow);
    font-weight: 600;
}

/* Dailies List */
.dailies-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.daily-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.daily-item:hover {
    transform: translateY(-1px);
}

.daily-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    gap: 8px;
    min-height: 24px;
}

.daily-date {
    font-size: 14px;
    color: var(--hint-color);
    white-space: nowrap;
    flex-shrink: 0;
}

.daily-author {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sentiment-badge {
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.sentiment-positive {
    background: #e8f5e8;
    color: var(--success-color);
}

.sentiment-neutral {
    background: #f0f0f0;
    color: var(--hint-color);
}

.sentiment-negative {
    background: #ffebee;
    color: var(--error-color);
}

.daily-summary {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.daily-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: var(--surface-color);
    color: var(--hint-color);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--hint-color);
    font-weight: 500;
}

/* Mentions List */
.mentions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mention-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.mention-from {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.mention-text {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.mention-date {
    font-size: 12px;
    color: var(--hint-color);
}

/* Achievements List */
.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.achievement-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
}

.achievement-emoji {
    font-size: 24px;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.achievement-desc {
    font-size: 12px;
    color: var(--hint-color);
}

.achievement-date {
    font-size: 12px;
    color: var(--hint-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: var(--padding);
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--hint-color);
    padding: 4px;
}

.modal-body {
    padding: 16px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.modal-body textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.bot-link {
    text-align: center;
    padding: 16px 0;
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: var(--padding);
    text-align: center;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-state h3 {
    margin-bottom: 8px;
    color: var(--error-color);
}

.error-state p {
    margin-bottom: 24px;
    color: var(--hint-color);
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--hint-color);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 480px) {
    :root {
        --padding: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .nav-tab {
        padding: 10px 6px;
        font-size: 13px;
    }
}

/* Mentions Styles */
.mentions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mentions-actions {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--surface-color);
    border-radius: var(--radius);
    text-align: center;
}

.mention-item {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: 16px;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.mention-item.unread {
    border-left-color: var(--primary-color);
    background: rgba(0, 136, 204, 0.05);
}

.mention-item.unread:hover {
    background: rgba(0, 136, 204, 0.1);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.mention-item.read {
    opacity: 0.8;
    cursor: default;
}

.mention-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
}

.mention-from {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-color);
    flex: 1;
}

.mention-date {
    font-size: 12px;
    color: var(--hint-color);
    white-space: nowrap;
}

.unread-indicator {
    font-size: 8px;
    line-height: 1;
}

.mention-content {
    margin-bottom: 8px;
}

.mention-context {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.mention-project {
    font-size: 12px;
    color: var(--primary-color);
    background: rgba(0, 136, 204, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.mention-daily {
    font-size: 12px;
    color: var(--hint-color);
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    margin-top: 8px;
}

.mention-action {
    font-size: 11px;
    color: var(--primary-color);
    text-align: center;
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(0, 136, 204, 0.1);
    border-radius: 6px;
    font-style: italic;
}

/* Audio Player Styles */
.audio-player {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 8px;
    background: rgba(0, 136, 204, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 136, 204, 0.2);
    min-height: 48px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.media-player {
    margin: 8px 0;
}

/* Video Note Styles */
.video-note-item {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid rgba(138, 43, 226, 0.2);
    background: rgba(138, 43, 226, 0.02);
}

.video-note-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(138, 43, 226, 0.15);
}

.video-note-badge {
    background: #8a2be2;
    color: white;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.video-note-container {
    text-align: center;
    margin: 12px 0;
    transition: height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.video-note-container video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-note-hint {
    font-size: 11px;
    color: #8a2be2;
    font-weight: 500;
    margin-left: auto;
}

.play-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 136, 204, 0.3);
    flex-shrink: 0;
}

.play-btn:hover {
    background: #006fa3;
    transform: scale(1.05);
}

.play-btn:active {
    transform: scale(0.95);
}

.audio-progress {
    flex: 1;
    position: relative;
    height: 4px;
    margin: 0 8px;
    min-width: 0;
}

.progress-track {
    width: 100%;
    height: 4px;
    background: rgba(0, 136, 204, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.1s linear;
    width: 0%;
}

.audio-duration {
    font-size: 12px;
    color: var(--hint-color);
    font-weight: 500;
    min-width: 45px;
    width: 45px;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
    display: block;
}

/* Hide default audio controls */
audio {
    display: none;
}

/* Telegram Theme Adaptation */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: var(--tg-theme-bg-color, #1e1e1e);
        --surface-color: var(--tg-theme-secondary-bg-color, #2d2d2d);
        --text-color: var(--tg-theme-text-color, #ffffff);
        --border-color: #404040;
    }
    
    .modal-content {
        background: var(--surface-color);
        color: var(--text-color);
    }
    
    .daily-item,
    .stat-card,
    .mention-item,
    .achievement-item {
        background: var(--surface-color);
        border-color: var(--border-color);
    }
    
    .audio-player {
        background: rgba(100, 181, 246, 0.1);
        border-color: rgba(100, 181, 246, 0.3);
    }
    
    .progress-track {
        background: rgba(100, 181, 246, 0.3);
    }
}

/* Jira Styles */
.jira-toggle {
    display: flex;
    background: var(--surface-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

.jira-date-filters {
    display: flex;
    background: var(--surface-color);
    border-radius: var(--radius);
    margin-bottom: 16px;
    padding: 4px;
    border: 1px solid var(--border-color);
    gap: 4px;
}

.date-filter-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--hint-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-filter-btn:hover {
    background: rgba(0, 136, 204, 0.1);
}

.date-filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.jira-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jira-plan-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.jira-plan-item:hover {
    transform: translateY(-1px);
}

.jira-plan-item.to-do {
    border-left: 4px solid #6c757d;
}

.jira-plan-item.in-progress {
    border-left: 4px solid #0088cc;
}

.jira-plan-item.done {
    border-left: 4px solid #28a745;
    opacity: 0.8;
}

.jira-plan-item.unknown {
    border-left: 4px solid var(--hint-color);
}

.jira-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 6px;
}

.jira-plan-key {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(0, 136, 204, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.jira-plan-status {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.jira-plan-status.to-do {
    background: #f8f9fa;
    color: #6c757d;
}

.jira-plan-status.in-progress {
    background: rgba(0, 136, 204, 0.1);
    color: #0088cc;
}

.jira-plan-status.done {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.jira-plan-status.unknown {
    background: var(--surface-color);
    color: var(--hint-color);
}

.jira-plan-priority {
    font-size: 14px;
}

.jira-plan-title {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.jira-plan-assignee {
    font-size: 9px;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.jira-plan-description {
    font-size: 10px;
    color: var(--hint-color);
    line-height: 1.3;
    margin-bottom: 4px;
}

.jira-plan-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--hint-color);
}

.jira-plan-date, .jira-plan-due {
    white-space: nowrap;
}

.colleague-jira-section {
    background: var(--surface-color);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.colleague-plans {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.colleague-plans .jira-plan-item {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-left: 4px;
    padding: 6px;
}

.colleague-plans-count {
    font-size: 12px;
    color: var(--hint-color);
    background: rgba(0, 136, 204, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
}

/* Date grouping styles */
.date-group {
    margin-bottom: 12px;
}

.date-group:last-child {
    margin-bottom: 0;
}

.date-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 6px;
    padding: 4px 8px;
    background: rgba(0, 136, 204, 0.08);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.date-plans {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: 8px;
    position: relative;
}

.date-plans::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), rgba(0, 136, 204, 0.2));
    border-radius: 1px;
}

.date-plans .jira-plan-item {
    position: relative;
    margin-left: 8px;
}

.date-plans .jira-plan-item::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid var(--background-color);
}

/* Colleague section date groups */
.colleague-plans .date-group {
    margin-bottom: 8px;
}

.colleague-plans .date-header {
    font-size: 10px;
    font-weight: 500;
    background: rgba(0, 136, 204, 0.05);
    border-left: 2px solid var(--primary-color);
    padding: 3px 6px;
}

.colleague-plans .date-plans {
    margin-left: 6px;
}

.colleague-plans .date-plans::before {
    width: 1px;
    left: -6px;
}

.colleague-plans .date-plans .jira-plan-item::before {
    width: 4px;
    height: 4px;
    left: -12px;
}

@media (prefers-color-scheme: dark) {
    .jira-plan-item {
        background: var(--surface-color);
        border-color: var(--border-color);
    }
    
    .colleague-plans .jira-plan-item {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid var(--border-color);
    }
    
    .date-header {
        background: rgba(100, 181, 246, 0.1);
        border-left-color: var(--secondary-color);
    }
    
    .date-plans::before {
        background: linear-gradient(to bottom, var(--secondary-color), rgba(100, 181, 246, 0.2));
    }
    
    .date-plans .jira-plan-item::before {
        background: var(--secondary-color);
    }
}

/* Main Jira Toggle Styles */
.jira-main-toggle {
    display: flex;
    background: var(--surface-color);
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.main-toggle-btn {
    flex: 1;
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: var(--hint-color);
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 26px;
}

.main-toggle-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.main-toggle-btn:hover:not(.active) {
    background: rgba(0, 136, 204, 0.1);
    color: var(--primary-color);
}

/* Compact Toggle Styles - уменьшенная высота */
.jira-toggle {
    margin-bottom: 6px; /* уменьшено еще больше */
    border-radius: 8px; /* уменьшен радиус */
    padding: 3px; /* уменьшен внутренний отступ */
}

.toggle-btn {
    padding: 4px 8px; /* уменьшено еще больше */
    min-height: 22px; /* уменьшено еще больше */
    font-size: 10px; /* уменьшено еще больше */
    border-radius: 6px; /* уменьшен радиус */
}

/* Compact Date Filters */
.jira-date-filters {
    margin-bottom: 6px; /* уменьшено еще больше */
    gap: 3px; /* уменьшено еще больше */
    border-radius: 8px; /* уменьшен радиус */
    padding: 3px; /* уменьшен внутренний отступ */
}

.date-filter-btn {
    padding: 3px 6px; /* уменьшено еще больше */
    min-height: 20px; /* уменьшено еще больше */
    font-size: 9px; /* уменьшено еще больше */
    border-radius: 4px; /* уменьшен радиус */
}

/* Worklog Item Styles */
.worklog-item {
    border-left: 3px solid var(--success-color);
}

.worklog-time {
    background: var(--success-color);
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

/* Total Time Display */
.total-time {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 12px;
    margin-left: 8px;
}

/* Responsive improvements for compact design */
@media (max-width: 480px) {
    .main-toggle-btn {
        font-size: 12px;
        padding: 6px 8px;
        min-height: 28px;
    }
    
    .toggle-btn {
        font-size: 11px;
        padding: 5px 8px;
        min-height: 24px;
    }
    
    .date-filter-btn {
        font-size: 10px;
        padding: 4px 6px;
        min-height: 22px;
    }
    
    .jira-plan-item {
        padding: 8px;
    }
    
    .colleague-header {
        margin-bottom: 8px;
        padding-bottom: 6px;
    }
} 