/* ===========================================
   DASHBOARD SPECIFIC STYLES
   Soft Monochrome Theme
   =========================================== */

/* --- Container --- */
.dashboard-container {
    padding: 0;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Stats Grid --- */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Responsiveness for grid */
@media (max-width: 1200px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Stat Cards --- */
.dashboard-stat-card {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 160px;
    position: relative;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.dashboard-stat-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

/* Highlight Card (Black) */
.stat-card-highlight {
    background: var(--bg-dark);
    /* Black background */
    color: var(--text-white);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
    /* Stronger shadow */
}

.stat-card-highlight .dashboard-stat-label,
.stat-card-highlight .dashboard-stat-value,
.stat-card-highlight .dashboard-stat-trend {
    color: var(--text-white);
}

.dashboard-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.dashboard-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    /* Gray usually */
    font-weight: 500;
}

.stat-card-highlight .dashboard-stat-label {
    color: rgba(255, 255, 255, 0.7);
}

.dashboard-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: auto;
    margin-bottom: 0.5rem;
}

.dashboard-stat-trend {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

.trend-up {
    color: var(--accent-success);
}

.trend-down {
    color: var(--accent-error);
}

/* --- Main Layout Grid (Charts & Lists) --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* 2/3 and 1/3 split */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-card {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    border: none;
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-full-width {
    grid-column: 1 / -1;
}


.dashboard-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

/* --- Dashboard Specific Lists & Grids --- */
.dashboard-two-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .dashboard-two-column {
        grid-template-columns: 1fr;
    }
}

.dashboard-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bg-app);
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dashboard-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
}

.dashboard-list-link {
    font-weight: 500;
    color: var(--text-main);
}

.dashboard-list-link:hover {
    color: var(--text-secondary);
}

.dashboard-badge {
    font-size: 0.75rem;
    background: var(--bg-app);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.dashboard-muted {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Actions Grid */
.dashboard-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.dashboard-action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    background: var(--bg-app);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    min-height: 100px;
    justify-content: space-between;
}

.dashboard-action-card:hover {
    background: var(--text-main);
    color: white;
}

.dashboard-action-card:hover .dashboard-action-icon {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.dashboard-action-icon {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.dashboard-action-text {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Use simpler list styles for activity */
.dashboard-activity-list {
    margin-top: 1rem;
}

.dashboard-activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--bg-app);
}

.dashboard-activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-app);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Records Table in Dashboard */
.records-nav-section {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    margin-top: 2rem;
}

.records-nav-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.records-nav-table th {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--bg-app);
}

.records-nav-table td {
    text-align: center;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--bg-app);
    color: var(--text-main);
    font-weight: 500;
}

.records-nav-table tr:last-child td {
    border-bottom: none;
}

.records-nav-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.records-nav-table .nav-link {
    display: block;
    width: 100%;
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.records-nav-table .nav-link:hover {
    color: #2563EB;
    /* Blue accent */
    font-weight: 500;
}

.kpi-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
}

.kpi-badge.paid {
    background-color: var(--text-main);
    color: white;
}

.kpi-badge.pending {
    background-color: var(--bg-app);
    color: var(--text-secondary);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bg-app);
}

/* --- Notifications Dropdown --- */
.notifications-dropdown {
    position: absolute;
    width: 360px;
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    border: 1px solid var(--bg-app);
    overflow: hidden;
    animation: dashboard-fadeInUp 0.2s ease-out;
}

.notifications-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--bg-app);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-panel);
}

.notifications-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    padding: 0;
}

.mark-all-read:hover {
    color: var(--uks-blue-500);
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--bg-app);
    transition: background-color 0.2s;
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: var(--uks-blue-50);
}

.notification-item.unread {
    background-color: var(--uks-blue-50);
}

.notification-item.unread:hover {
    background-color: var(--uks-blue-100);
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--uks-blue-500);
    border: 1px solid var(--uks-blue-100);
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text-main);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.notifications-footer {
    padding: 0.75rem;
    text-align: center;
    border-top: 1px solid var(--bg-app);
    background: var(--bg-app);
}

.notifications-footer a {
    color: var(--uks-blue-600);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.notifications-footer a:hover {
    text-decoration: underline;
}

/* Custom Scrollbar for notifications */
.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: transparent;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--bg-app);
    border-radius: 10px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}


/* ===========================================
   ADMIN HOME DASHBOARD (Super Dashboard)
   =========================================== */

/* Styles removed for reversion to stable state */