﻿/* drafts.css - Enhanced drafts page */

/* ==================== ENHANCED DRAFTS PAGE ==================== */
.drafts-kpis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
    .drafts-kpis-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .drafts-kpis-grid { grid-template-columns: 1fr; }
}

.draft-kpi-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.draft-kpi-card:hover { transform: translateY(-2px); }
.draft-kpi-card.warning { border-left: 4px solid #f59e0b; }
.draft-kpi-card.danger { border-left: 4px solid #dc2626; }

.draft-kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.draft-kpi-icon.total { background: #e0e7ff; color: #4f46e5; }
.draft-kpi-icon.expiring { background: #fef3c7; color: #f59e0b; }
.draft-kpi-icon.expired { background: #fee2e2; color: #dc2626; }
.draft-kpi-icon.progress-kpi { background: #dcfce7; color: #198754; }

.draft-kpi-content { display: flex; flex-direction: column; }
.draft-kpi-value { font-size: 1.5rem; font-weight: 700; color: #1f2937; }
.draft-kpi-label { font-size: 0.85rem; color: #6b7280; }
.draft-kpi-sub { font-size: 0.75rem; color: #9ca3af; }

.draft-expiration-notice {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #1e40af;
}

.draft-expiration-notice i { font-size: 1.25rem; color: #3b82f6; }

/* Drafts Tabs */
.drafts-tabs {
    display: flex;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.375rem;
    border-radius: 0.75rem;
}

.drafts-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drafts-tab:hover {
    background: rgba(255,255,255,0.5);
    color: #475569;
}

.drafts-tab.active {
    background: #fff;
    color: #198754;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.drafts-tab .tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.375rem;
    background: #198754;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.75rem;
}

.drafts-tab .tab-badge.secondary {
    background: #94a3b8;
}

.drafts-tab.active .tab-badge.secondary {
    background: #64748b;
}

/* Archived draft card styling */
.draft-card.archived {
    opacity: 0.75;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
}

.draft-card.archived::before {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.draft-card.archived .draft-expires {
    background: #94a3b8;
}

.draft-archived-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #64748b;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 600;
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.drafts-filter-bar {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
}

.filter-actions { margin-left: auto; }

/* View Toggle Buttons */
.view-toggle-group {
    display: flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.view-toggle-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.view-toggle-btn:hover {
    color: #198754;
    background: rgba(25, 135, 84, 0.1);
}

.view-toggle-btn.active {
    background: #fff;
    color: #198754;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Drafts List View */
.drafts-list-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.drafts-list-wrap {
    overflow-x: auto;
}

.drafts-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.drafts-list-table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border-bottom: 2px solid #e9ecef;
}

.drafts-list-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.drafts-list-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.drafts-list-table tbody tr {
    transition: background 0.15s ease;
}

.drafts-list-table tbody tr:hover {
    background: #f9fafb;
}

.draft-list-id {
    font-weight: 600;
    color: #198754;
    font-family: 'SF Mono', monospace;
    font-size: 0.8rem;
}

.draft-list-name {
    font-weight: 600;
    color: #1f2937;
}

.draft-list-funeral {
    color: #6b7280;
    font-size: 0.85rem;
}

.draft-list-policies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.draft-list-policy-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #166534;
}

.draft-list-amount {
    font-weight: 600;
    color: #198754;
}

.draft-list-beneficiaries {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.draft-list-beneficiary-chip {
    padding: 0.15rem 0.4rem;
    background: #e0e7ff;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #3730a3;
}

.draft-list-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.draft-list-progress-bar {
    width: 60px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.draft-list-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #198754, #22c55e);
    border-radius: 3px;
}

.draft-list-progress-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #198754;
}

.draft-list-expires {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.draft-list-expires-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.draft-list-expires-badge.expired {
    background: #fee2e2;
    color: #dc2626;
}

.draft-list-expires-badge.today {
    background: #fef3c7;
    color: #d97706;
}

.draft-list-expires-badge.soon {
    background: #fff7ed;
    color: #ea580c;
}

.draft-list-expires-badge.ok {
    background: #f0fdf4;
    color: #16a34a;
}

.draft-list-actions {
    display: flex;
    gap: 0.5rem;
}

.draft-list-action-btn {
    padding: 0.4rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.draft-list-action-btn.continue {
    background: #198754;
    color: #fff;
}

.draft-list-action-btn.continue:hover {
    background: #157347;
}

.draft-list-action-btn.archive {
    background: #f3f4f6;
    color: #6b7280;
}

.draft-list-action-btn.archive:hover {
    background: #e5e7eb;
}

.draft-list-action-btn.delete {
    background: #fef2f2;
    color: #dc2626;
}

.draft-list-action-btn.delete:hover {
    background: #fee2e2;
}

.drafts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1600px) { .drafts-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1200px) { .drafts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .drafts-grid { grid-template-columns: 1fr; } }

.draft-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
}

.draft-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #198754, #20c997);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.draft-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);
}

.draft-card:hover::before {
    opacity: 1;
}

.draft-card.urgent {
    border-left: 4px solid #dc2626;
    background: linear-gradient(145deg, #fff5f5 0%, #fef2f2 100%);
}
.draft-card.urgent::before { background: linear-gradient(90deg, #dc2626, #f87171); opacity: 1; }

.draft-card.warning {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
}
.draft-card.warning::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); opacity: 1; }

.draft-card-header {
    padding: 0.75rem 1rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.draft-id {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.75rem;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.draft-expires {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.65rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
}

.draft-expires.text-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

.draft-expiry-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.draft-expiry-badge.danger { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #dc2626; }
.draft-expiry-badge.warning { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
.draft-expiry-badge.info { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #4f46e5; }
.draft-expiry-badge.success { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #166534; }

.draft-card-body {
    padding: 0.375rem 1rem 0.75rem;
}

.draft-deceased {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.draft-funeral {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.draft-funeral i { color: #9ca3af; font-size: 0.7rem; }

.draft-deceased-name { font-size: 0.95rem; font-weight: 600; color: #1f2937; margin-bottom: 0.2rem; }
.draft-funeral-home { font-size: 0.75rem; color: #6b7280; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.375rem; }

.draft-progress-section { margin-bottom: 0.5rem; }

.draft-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.draft-progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.draft-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #198754, #20c997);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Progress section used in JS rendering */
.draft-progress {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f3f4f6;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7f9 100%);
}

/* Step Indicators */
.step-indicators {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    z-index: 1;
}

.step-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #9ca3af;
}

.step-dot i {
    font-size: 0.55rem;
}

.step-indicator.completed .step-dot {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #22c55e;
    color: #fff;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.step-indicator.current .step-dot {
    background: #fff;
    border-color: #22c55e;
    border-width: 2px;
    color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
    animation: pulse-step 2s infinite;
}

@keyframes pulse-step {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); }
    50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.1); }
}

.step-indicator.pending .step-dot {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #d1d5db;
}

.step-label {
    font-size: 0.55rem;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.step-indicator.completed .step-label {
    color: #22c55e;
}

.step-indicator.current .step-label {
    color: #22c55e;
    font-weight: 600;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 0.15rem;
    margin-bottom: 1rem;
    border-radius: 1px;
    transition: background 0.3s ease;
}

.step-connector.completed {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

/* Archived state */
.step-indicators.archived .step-indicator.completed .step-dot {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    border-color: #9ca3af;
    box-shadow: none;
}

.step-indicators.archived .step-indicator.completed .step-label {
    color: #9ca3af;
}

.step-indicators.archived .step-connector.completed {
    background: #9ca3af;
}

.step-indicators.archived .step-indicator.current .step-dot {
    border-color: #9ca3af;
    color: #9ca3af;
    box-shadow: none;
    animation: none;
}

.step-indicators.archived .step-indicator.current .step-label {
    color: #9ca3af;
}

.draft-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.65rem;
    color: #9ca3af;
}

.draft-meta i { margin-right: 0.25rem; }

.draft-card-footer {
    padding: 0.625rem 1rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 0.375rem;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.draft-card-footer .btn {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
}

.draft-card-footer .draft-actions {
    display: flex;
    gap: 0.375rem;
    margin-left: auto;
}

.draft-card-footer .btn-outline-danger,
.draft-card-footer .btn-outline-secondary {
    padding: 0.25rem 0.5rem;
}

.draft-policies-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}

.draft-policy-item {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

.draft-policy-item .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

.draft-beneficiaries-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.375rem;
}

.draft-beneficiaries-row small {
    font-size: 0.7rem;
}

.beneficiary-names {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.beneficiary-names .badge {
    font-size: 0.6rem;
    font-weight: 500;
    padding: 0.15rem 0.35rem;
}

.draft-meta-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.draft-meta-row small {
    display: flex;
    align-items: center;
    font-size: 0.65rem;
}

/* Enhanced Draft Card Styles */
.draft-info-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.draft-info-row span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.draft-info-row i { color: #9ca3af; }

.draft-step-map {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.step-map-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    position: relative;
}

.step-map-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.step-map-item.completed:not(:last-child)::after {
    background: #198754;
}

.step-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    z-index: 1;
    background: #e5e7eb;
    color: #9ca3af;
}

.step-map-item.completed .step-dot {
    background: #198754;
    color: #fff;
}

.step-map-item.current .step-dot {
    background: #3b82f6;
    color: #fff;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.step-name {
    font-size: 0.6rem;
    color: #9ca3af;
    text-align: center;
    line-height: 1.1;
}

.step-map-item.completed .step-name { color: #198754; }
.step-map-item.current .step-name { color: #3b82f6; font-weight: 600; }

.draft-next-step {
    font-size: 0.8rem;
    color: #3b82f6;
    padding: 0.5rem 0.75rem;
    background: #eff6ff;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.draft-next-step.success {
    background: #dcfce7;
    color: #166534;
}

.draft-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #9ca3af;
}

.draft-meta-row span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.draft-funeral-home {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.draft-funeral-home i { color: #9ca3af; font-size: 0.75rem; }

/* Compact Document Widget Styles */
.dashboard-top-row {
    position: relative;
    margin-bottom: 1.5rem;
}

.quick-actions-inline {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-right: 340px; /* Space for doc widget */
}

.qa-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 2rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.qa-chip:hover {
    background: #198754;
    color: #fff;
    border-color: #198754;
    transform: translateY(-1px);
}

.qa-chip i { font-size: 0.9rem; }
.qa-badge {
    background: #dc2626;
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.doc-widget {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #fde68a;
    overflow: hidden;
    z-index: 10;
}

.doc-widget-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.doc-widget-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.doc-widget-count {
    background: #fff;
    color: #d97706;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.doc-widget-list {
    max-height: 180px;
    overflow-y: auto;
}

.doc-widget-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s;
}

.doc-widget-row:hover { background: #fffbeb; }
.doc-widget-row:last-child { border-bottom: none; }

.dw-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dw-dot.urgent { background: #dc2626; }
.dw-dot.high { background: #f59e0b; }
.dw-dot.medium { background: #3b82f6; }
.dw-dot.low { background: #10b981; }

.dw-content {
    flex: 1;
    min-width: 0;
}

.dw-name {
    display: block;
    font-weight: 500;
    font-size: 0.85rem;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-meta {
    font-size: 0.7rem;
    color: #9ca3af;
}

.dw-actions {
    display: flex;
    gap: 0.25rem;
}

.dw-btn, .dw-btn-info {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.15s;
}

.dw-btn {
    background: #198754;
    color: #fff;
}

.dw-btn:hover { background: #157347; }

.dw-btn-info {
    background: #e5e7eb;
    color: #6b7280;
}

.dw-btn-info:hover { background: #d1d5db; color: #374151; }

.doc-widget-footer {
    padding: 0.5rem 1rem;
    background: #fffbeb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #fde68a;
}

.dw-help {
    font-size: 0.7rem;
    color: #92400e;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

.no-docs-needed {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%) !important;
    border: 1px solid #86efac !important;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #166534;
    font-size: 0.85rem;
    width: auto;
    min-width: 280px;
}

.no-docs-needed i {
    font-size: 1.25rem;
    color: #22c55e;
}

@media (max-width: 900px) {
    .dashboard-top-row {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .quick-actions-inline {
        margin-right: 0;
    }
    .doc-widget {
        position: relative;
        width: 100%;
    }
}

/* When no documents needed, remove the margin */
.dashboard-top-row:has(.doc-widget[style*="display: none"]) .quick-actions-inline,
.dashboard-top-row:has(#noDocsWidget:not([style*="display: none"])) .quick-actions-inline {
    margin-right: 0;
}
