/* --- Modern Dashboard Redesign --- */

/* General Layout */
.dashboard-container {
    padding-top: 30px;
    padding-bottom: 50px;
}

.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 15px;
}

.dashboard-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
}

/* Summary Cards (Top Section) */
.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
    border-color: var(--gold);
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.summary-card__icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--gold);
    margin-bottom: 16px;
}

.summary-card__title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card__value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.summary-card__value small {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-left: 4px;
}

/* Action Area */
.dashboard-actions {
    background: var(--bg-tertiary);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--surface-border);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.dashboard-actions__title {
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-actions__title i {
    color: var(--gold);
}

.action-btn {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.action-btn--primary {
    background: var(--gold-gradient);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.action-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    color: var(--bg-primary);
}

.action-btn--secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--surface-border);
}

.action-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    color: var(--gold);
}

.action-btn i {
    font-size: 18px;
}

/* Dashboard Forms (Fixed) */
.dashboard-form-card {
    background: var(--bg-card);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--gold);
}

.dashboard-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--surface-border);
}

.dashboard-form-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.btn-close-custom {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-close-custom:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4d4d;
}

/* Data Table Section */
.dashboard-table-container {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--surface-border);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.dashboard-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-table-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.dashboard-tabs {
    display: flex;
    gap: 5px;
    background: var(--bg-tertiary);
    padding: 5px;
    border-radius: 10px;
    overflow-x: auto;
}

.dashboard-tab {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.dashboard-tab:hover {
    color: var(--text-primary);
}

.dashboard-tab.active {
    background: var(--bg-card);
    color: #000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Table Styles Override */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

.table.dashboard-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table.dashboard-table thead th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    padding: 15px 20px;
    border: none;
    letter-spacing: 0.5px;
}

.table.dashboard-table tbody td {
    background: var(--bg-card);
    border-bottom: 1px solid var(--surface-border);
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 14px;
    vertical-align: middle;
}

.table.dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

.table.dashboard-table tbody tr:hover td {
    background: rgba(255, 215, 0, 0.02);
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge--success {
    background: rgba(39, 174, 96, 0.15);
    color: #2ecc71;
}

.status-badge--warning {
    background: rgba(243, 156, 18, 0.15);
    color: #f1c40f;
}

.status-badge--danger {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.status-badge--info {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

/* Message Cards */
.message-card {
    background: var(--bg-card);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.message-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
}

.message-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.message-body {
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.message-reply {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 12px;
    border-left: 3px solid var(--gold);
}

.message-reply h5 {
    color: var(--gold);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 600;
}

.message-reply p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dashboard-tabs {
        width: 100%;
        padding-bottom: 10px;
    }
    
    .summary-card {
        padding: 20px;
    }
}