/* Dashboard CSS - ASP.NET Style */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-section i {
    font-size: 2rem;
    color: #4ade80;
}

.logo-section h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.storage-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    gap: 2rem;
    padding: 2rem;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.sidebar-section {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-section h3 i {
    color: #ff6b35;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-tree {
    max-height: 400px;
    overflow-y: auto;
}

/* Project Tree Folder Structure Styles */
.project-tree-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.project-tree-header h4 {
    color: #374151;
    font-size: 1rem;
    margin: 0;
}

.project-folder {
    margin-bottom: 0.5rem;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.project-folder.active {
    background: #fff3e0;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.1);
}

.folder-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.folder-header:hover {
    background: #f8fafc;
}

.project-folder.active .folder-header {
    background: #ff6b35;
    color: white;
}

.folder-icon {
    margin-right: 0.5rem;
    font-size: 1rem;
    color: #ff6b35;
    width: 16px;
}

.project-folder.active .folder-icon {
    color: white;
}

.folder-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

.analysis-count {
    font-size: 0.8rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

.project-folder.active .analysis-count {
    color: rgba(255, 255, 255, 0.8);
}

.folder-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: 0.5rem;
}

.folder-header:hover .folder-actions,
.project-folder.active .folder-actions {
    opacity: 1;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s ease;
    color: inherit;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.1);
}

.project-folder.active .btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.folder-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.folder-content.closed {
    max-height: 0;
}

.folder-content.open {
    max-height: 500px;
    border-top: 1px solid #e5e7eb;
}

.no-analyses {
    padding: 1rem 2rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
    font-style: italic;
}

.analysis-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.analysis-item:hover {
    background: #f8fafc;
}

.analysis-item:last-child {
    border-bottom: none;
}

.analysis-info {
    display: flex;
    align-items: center;
    flex: 1;
    cursor: pointer;
}

.analysis-icon {
    color: #10b981;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

.analysis-details {
    display: flex;
    flex-direction: column;
}

.analysis-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.analysis-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

.analysis-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.analysis-item:hover .analysis-actions {
    opacity: 1;
}

.analysis-actions .btn-icon {
    padding: 0.25rem;
    font-size: 0.75rem;
}

.analysis-actions .btn-icon.delete {
    color: #ef4444;
}

.analysis-actions .btn-icon.delete:hover {
    background: #fee2e2;
}

.tree-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
}

.tree-empty i {
    font-size: 2rem;
    color: #d1d5db;
    margin-bottom: 1rem;
    display: block;
}

.tree-empty p {
    margin-bottom: 1rem;
    font-style: italic;
}

.recent-list {
    max-height: 200px;
    overflow-y: auto;
}

.tree-loading, .recent-loading {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 2rem 0;
}

/* Dashboard Main */
.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 1rem;
}

.welcome-card {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.welcome-card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-card p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4ade80;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h3 i {
    color: #ff6b35;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #ff6b35;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: between;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
}

/* Activity Timeline */
.activity-timeline {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    max-height: 400px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.timeline-icon.success {
    background: #dcfce7;
    color: #16a34a;
}

.timeline-icon.info {
    background: #dbeafe;
    color: #2563eb;
}

.timeline-icon.warning {
    background: #fef3c7;
    color: #d97706;
}

.timeline-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.timeline-time {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    text-align: center;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: #ff6b35;
    color: white;
}

.btn-primary:hover {
    background: #e55a2b;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #5b6370;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-info:hover {
    background: #2563eb;
}

.btn-outline {
    background: transparent;
    color: #ff6b35;
    border: 2px solid #ff6b35;
}

.btn-outline:hover {
    background: #ff6b35;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.full-width {
    width: 100%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.close-modal:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #374151;
    background: #f9fafb;
}

.tab-btn.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        gap: 1rem;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .user-section {
        width: 100%;
        justify-content: center;
    }

    .welcome-card {
        padding: 1.5rem;
    }

    .welcome-card h2 {
        font-size: 1.5rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
}

/* Studies/Projects Grid Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.study-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.study-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.study-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.study-info {
    flex: 1;
}

.study-name {
    margin: 0 0 0.5rem 0;
    color: #374151;
    font-size: 1.2rem;
    font-weight: 600;
}

.study-description {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}

.study-menu {
    position: relative;
}

.study-menu-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.study-menu-btn:hover {
    color: #374151;
    background: #f3f4f6;
}

.study-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}

.study-stats .stat-item {
    text-align: center;
}

.study-stats .stat-number {
    display: block;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.study-stats .stat-label {
    display: block;
    color: #6b7280;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.study-actions {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.study-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
}

.study-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 10;
    min-width: 160px;
}

.study-menu-dropdown button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: none;
    border: none;
    color: #374151;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.study-menu-dropdown button:hover {
    background: #f3f4f6;
}

.study-menu-dropdown button.delete-btn {
    color: #dc2626;
}

.study-menu-dropdown button.delete-btn:hover {
    background: #fef2f2;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.empty-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-state i {
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

.empty-state h4 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Loading Card */
.loading-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 3rem 2rem;
    text-align: center;
    grid-column: 1 / -1; /* Span all columns */
}

.loading-card i {
    color: #ff6b35;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.loading-card p {
    color: #6b7280;
    margin: 0;
}

/* Create Study Modal Enhancements */
#create-study-modal .modal-content {
    max-width: 500px;
}

#create-study-modal .form-group {
    margin-bottom: 1.5rem;
}

#create-study-modal label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

#create-study-modal .required {
    color: #dc2626;
}

#create-study-modal input,
#create-study-modal textarea,
#create-study-modal select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#create-study-modal input:focus,
#create-study-modal textarea:focus,
#create-study-modal select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

#create-study-modal textarea {
    resize: vertical;
    min-height: 80px;
}

#create-study-modal .form-help {
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

#create-study-modal input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

#create-study-modal label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

/* Responsive Adjustments for Studies */
@media (max-width: 768px) {
    .studies-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .study-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .study-actions {
        flex-direction: column;
    }

    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }
}

/* Study Management Page Styles */
.study-header-section {
    margin-bottom: 2rem;
}

.study-header-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.study-header-card .study-info {
    flex: 1;
}

.study-header-card h2 {
    margin: 0 0 0.5rem 0;
    color: #374151;
    font-size: 1.8rem;
}

.study-header-card p {
    margin: 0;
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
}

.study-stats-summary {
    display: flex;
    gap: 2rem;
}

.study-stats-summary .stat-item {
    text-align: center;
}

.study-stats-summary .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
}

.study-stats-summary .stat-label {
    display: block;
    color: #6b7280;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Analyses Grid (for study page) */
.analyses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analysis-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.analysis-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.analysis-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.analysis-header .analysis-info {
    flex: 1;
}

.analysis-name {
    margin: 0 0 0.5rem 0;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
}

.analysis-description {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}

.analysis-menu {
    position: relative;
}

.analysis-menu-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.analysis-menu-btn:hover {
    color: #374151;
    background: #f3f4f6;
}

.analysis-details {
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: #6b7280;
    font-weight: 500;
}

.detail-value {
    color: #374151;
    font-weight: 400;
}

.analysis-actions {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.analysis-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
}

.analysis-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 10;
    min-width: 160px;
}

.analysis-menu-dropdown button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: none;
    border: none;
    color: #374151;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-menu-dropdown button:hover {
    background: #f3f4f6;
}

.analysis-menu-dropdown button.delete-btn {
    color: #dc2626;
}

.analysis-menu-dropdown button.delete-btn:hover {
    background: #fef2f2;
}

/* Responsive for study page */
@media (max-width: 768px) {
    .study-header-card {
        flex-direction: column;
        gap: 1.5rem;
    }

    .study-stats-summary {
        flex-direction: column;
        gap: 1rem;
    }

    .analyses-grid {
        grid-template-columns: 1fr;
    }

    .analysis-actions {
        flex-direction: column;
    }
}