/* title */

.dashboard-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-title-row h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    color: #111827;
}

.new-doc-button {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    background: #249447;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.new-doc-button:hover {
    text-decoration: none;
}

.new-doc-button svg {
    width: 18px;
    height: 18px;
}

/* stats */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 120px;
    padding: 0 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #eaf7ee;
    border-radius: 10px;
    color: #249447;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-card div {
    display: grid;
    gap: 4px;
}

.stat-card span {
    font-size: 13px;
    color: #6b7280;
}

.stat-card strong {
    font-size: 32px;
    line-height: 1;
    color: #111827;
}

/* recent */

.recent-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.recent-card header {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.recent-table-wrap {
    overflow-x: auto;
}

.recent-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.recent-table th,
.recent-table td {
    padding: 0 24px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.recent-table th {
    height: 44px;
    background: #f9fafb;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.recent-table td {
    height: 56px;
    font-size: 13px;
    color: #6b7280;
}

.recent-table th:first-child,
.recent-table td:first-child {
    width: 48%;
}

.recent-table th:last-child,
.recent-table td:last-child {
    width: 80px;
    text-align: center;
}

.doc-name {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #111827;
}

.doc-name svg {
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

/* badges */

.dashboard-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.dashboard-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.dashboard-badge.progress  { background: #dbeafe; color: #2563eb; }
.dashboard-badge.progress::before { background: #2563eb; }

.dashboard-badge.signed    { background: #d1fae5; color: #059669; }
.dashboard-badge.signed::before   { background: #249447; }

.dashboard-badge.draft     { background: #fef3c7; color: #92400e; }
.dashboard-badge.draft::before    { background: #f59e0b; }

.dashboard-badge.error     { background: #fee2e2; color: #991b1b; }
.dashboard-badge.error::before    { background: #ef4444; }

.view-action {
    display: inline-flex;
    color: #249447;
}

.view-action svg {
    width: 18px;
    height: 18px;
}

.empty-row {
    text-align: center !important;
    color: #6b7280;
}

.recent-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 52px;
    font-size: 13px;
    font-weight: 500;
    color: #249447;
}

.recent-footer:hover {
    text-decoration: none;
}

/* responsive */

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

@media (max-width: 760px) {
    .dashboard-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .new-doc-button {
        width: 100%;
        justify-content: center;
    }

    .stat-card {
        height: 104px;
    }
}
