/* ========================================
   Contracts Dashboard
   ======================================== */

/* ========================================
   Stat Cards
   ======================================== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-section-heading {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 8px 0 16px;
}

.agreement-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .agreement-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .agreement-stats {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.stat-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

/* Stat Card Accent Colors */
.stat-active .stat-icon {
    background: #059669;
}

.stat-draft .stat-icon {
    background: #64748b;
}

.stat-expiring .stat-icon {
    background: #d97706;
}

.stat-expired .stat-icon {
    background: #dc2626;
}

/* ========================================
   Breakdown Panels
   ======================================== */
.breakdown-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.breakdown-panel {
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    overflow: hidden;
}

.breakdown-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e1e8ef;
}

.breakdown-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.breakdown-title i {
    color: #64748b;
    font-size: 14px;
}

.breakdown-body {
    padding: 8px 0;
}

.breakdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.15s ease;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item:hover {
    background: #f8fafc;
}

.breakdown-name {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
}

.breakdown-count {
    font-size: 13px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    min-width: 28px;
    text-align: center;
}

.breakdown-count-tier {
    background: #f1f5f9;
    color: #475569;
}

.breakdown-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    padding: 24px 20px;
}

/* ========================================
   Recent Contracts Table
   ======================================== */
.recent-contracts-table {
    width: 100%;
    border-collapse: collapse;
}

.recent-contracts-table thead th {
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    border-bottom: 1px solid #e1e8ef;
    background: #f8fafc;
}

.recent-contracts-table tbody td {
    padding: 14px 20px;
    font-size: 14px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.recent-contracts-table tbody tr:last-child td {
    border-bottom: none;
}

.recent-contracts-table tbody tr:hover {
    background: #f8fafc;
}

.contract-link {
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.contract-link:hover {
    color: #059669;
    text-decoration: underline;
}

/* ========================================
   Status Badge
   ======================================== */
.status-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.status-draft {
    background: #f1f5f9;
    color: #64748b;
}

.status-active {
    background: #d1fae5;
    color: #059669;
}

.status-expiring {
    background: #fef3c7;
    color: #d97706;
}

.status-expired {
    background: #fee2e2;
    color: #dc2626;
}

.status-renewed {
    background: #dbeafe;
    color: #2563eb;
}

.status-cancelled {
    background: #f1f5f9;
    color: #475569;
}

/* ========================================
   Dashboard Card (shared)
   ======================================== */
.dashboard-card {
    background: #ffffff;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e1e8ef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.card-title i {
    color: #64748b;
    font-size: 14px;
}

.card-body {
    padding: 20px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .breakdown-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .recent-contracts-table thead th,
    .recent-contracts-table tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }
}
