/* JusEvidence Dashboard Styles */

/* Main Layout */
.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 30px;
}

.welcome-section h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 5px 0;
}

.welcome-subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.urgent {
    border-left: 4px solid #f97316;
}

.stat-card.urgent .stat-icon {
    background: #fff7ed;
    color: #f97316;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.uploads-icon {
    background: #eff6ff;
    color: #3b82f6;
}

.stat-icon.summaries-icon {
    background: #f0fdf4;
    color: #22c55e;
}

.stat-icon.deadlines-icon {
    background: #fff7ed;
    color: #f97316;
}

.stat-icon.drafts-icon {
    background: #faf5ff;
    color: #8b5cf6;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 4px;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 30px;
}

.quick-actions h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 15px 0;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.action-btn.primary {
    background: #0d2137;
    color: white;
}

.action-btn.primary:hover {
    background: #1e3a5f;
}

.action-btn.secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.action-btn.secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* Dashboard Columns */
.dashboard-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Sections */
.dashboard-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

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

.section-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.view-all {
    font-size: 0.875rem;
    color: #3b82f6;
    text-decoration: none;
}

.view-all:hover {
    text-decoration: underline;
}

/* Loading Placeholder */
.loading-placeholder {
    text-align: center;
    padding: 30px;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 30px;
    color: #6b7280;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    color: #d1d5db;
    margin-bottom: 12px;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* Deadline Items */
.deadline-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: #f9fafb;
    margin-bottom: 10px;
    gap: 12px;
    transition: background 0.2s;
}

.deadline-item:hover {
    background: #f3f4f6;
}

.deadline-item:last-child {
    margin-bottom: 0;
}

.deadline-urgency {
    width: 8px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.deadline-urgency.critical {
    background: #dc2626;
}

.deadline-urgency.urgent {
    background: #f97316;
}

.deadline-urgency.normal {
    background: #eab308;
}

.deadline-urgency.safe {
    background: #22c55e;
}

.deadline-content {
    flex: 1;
    min-width: 0;
}

.deadline-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deadline-date {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 2px;
}

.deadline-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.deadline-badge.critical {
    background: #fee2e2;
    color: #dc2626;
}

.deadline-badge.urgent {
    background: #ffedd5;
    color: #ea580c;
}

.deadline-badge.normal {
    background: #fef3c7;
    color: #d97706;
}

.deadline-badge.safe {
    background: #dcfce7;
    color: #16a34a;
}

/* Upload Items */
.upload-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: #f9fafb;
    margin-bottom: 10px;
    gap: 12px;
    transition: background 0.2s;
    cursor: pointer;
}

.upload-item:hover {
    background: #f3f4f6;
}

.upload-item:last-child {
    margin-bottom: 0;
}

.upload-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #eff6ff;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upload-content {
    flex: 1;
    min-width: 0;
}

.upload-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 2px;
}

.upload-type {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #f3f4f6;
    color: #4b5563;
    flex-shrink: 0;
}

/* Draft Items */
.drafts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.draft-item {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
    cursor: pointer;
}

.draft-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

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

.draft-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #faf5ff;
    color: #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.draft-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8b5cf6;
    text-transform: uppercase;
}

.draft-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.draft-date {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Usage Display Override */
.nav-right .usage-display {
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 12px;
    margin-right: 15px;
}

.usage-display.normal {
    background: #e0f2fe;
    color: #0369a1;
}

.usage-display.low {
    background: #fef3c7;
    color: #d97706;
}

.usage-display.depleted {
    background: #fee2e2;
    color: #dc2626;
}

.usage-display.unlimited {
    background: #d1fae5;
    color: #059669;
}

/* Navbar Active State */
.nav-link.active {
    color: #0d2137;
    font-weight: 600;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

#userName {
    font-weight: 500;
    color: #374151;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #d1fae5;
    color: #065f46;
}

.toast.error {
    background: #fee2e2;
    color: #991b1b;
}

.toast.info {
    background: #e0f2fe;
    color: #0369a1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .dashboard-main {
        padding: 20px 15px;
    }

    .welcome-section h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        justify-content: center;
    }

    .drafts-list {
        grid-template-columns: 1fr;
    }
}
