/* Dashboard Exact Styling - Matching Design Image */

body {
    background-color: #F8F9FA; /* Light grey background for the dashboard */
}

/* Base card styling */
.summary-card, .alerts-panel, .collectors-panel, .dashboard-card {
    background-color: #FFFFFF;
    border-radius: var(--border-border-radius-rounded-base, 12px);
    border: var(--border-border-width-border, 1px) solid var(--colors-border-border-base, #E5E7EB);
    box-shadow: 0 1px 0.5px 0.05px rgba(29, 41, 61, 0.02);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Summary Card Specifics (Top Row) */
.summary-card,
a.summary-card {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
}

a.summary-card:hover {
    text-decoration: none;
    color: inherit;
}

.summary-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: #E6F7ED; /* Light green background */
    color: #28A745; /* Darker green icon */
    font-size: 20px;
}

.summary-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #1F2937; /* Dark grey */
    line-height: 1.2;
    margin-bottom: 4px;
}

.summary-card-label {
    color: var(--colors-text-text-body, #4A5565);
    font-family: var(--typography-font-family-font-base, "Ubuntu Sans");
    font-size: var(--typography-font-size-text-base, 16px);
    font-style: normal;
    font-weight: 400;
    line-height: var(--typography-line-height-leading-6, 24px);
}

/* Panel Headers (for Recent Alerts and Data Collectors Status) */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px; /* Reduced from 16px for tighter spacing */
}

.panel-title {
    color: var(--colors-text-text-heading, #101828);
    font-family: var(--typography-font-family-font-base, "Ubuntu Sans");
    font-size: var(--typography-font-size-text-lg, 18px);
    font-style: normal;
    font-weight: 500;
    line-height: var(--typography-line-height-leading-7, 28px);
}

.panel-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 4px;
    background-color: #28A745; /* Green button */
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.panel-button:hover {
    background-color: #218838; /* Darker green on hover */
}

/* Recent Alerts Panel */
.alerts-list {
    display: flex;
    flex-direction: column;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #E5E7EB; /* Subtle border */
    background-color: #FFFFFF;
    margin-bottom: 8px;
}

.alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    flex-shrink: 0;
}

.alert-icon.severity-critical {
    background-color: #FEF2F2; /* Light Red Background */
    color: #DC2626; /* Dark Red Icon */
    border: 1px solid #FECACA; /* Red border for emphasis */
}
.alert-icon.severity-major {
    background-color: #FFF7ED; /* Light Orange Background */
    color: #EA580C; /* Dark Orange Icon */
    border: 1px solid #FED7AA; /* Orange border */
}
.alert-icon.severity-warning {
    background-color: #FFFBEB; /* Light Yellow Background */
    color: #D97706; /* Dark Yellow Icon */
    border: 1px solid #FDE68A; /* Yellow border */
}
.alert-icon.severity-minor {
    background-color: #EFF6FF; /* Light Blue Background */
    color: #2563EB; /* Dark Blue Icon */
    border: 1px solid #BFDBFE; /* Blue border */
}
.alert-icon.severity-info {
    background-color: #ECFEFF; /* Light Cyan Background */
    color: #0891B2; /* Dark Cyan Icon */
    border: 1px solid #A7F3D0; /* Cyan border */
}
.alert-icon.severity-error {
    background-color: #FEF2F2; /* Light Red Background */
    color: #DC2626; /* Dark Red Icon */
    border: 1px solid #FECACA; /* Red border */
}
.alert-icon.severity-neutral {
    background-color: #F8FAFC; /* Light Grey Background */
    color: #64748B; /* Dark Grey Icon */
    border: 1px solid #E2E8F0; /* Grey border */
}

.alert-content {
    flex-grow: 1;
}

.alert-title {
    font-size: 16px;
    font-weight: 700;
    color: #1F2937;
    line-height: 1.4;
    margin-bottom: 4px;
}

.alert-subtitle {
    font-size: 14px;
    color: #6B7280;
    font-weight: 400;
}

/* Data Collectors Status Panel */
.collectors-summary {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.summary-count {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.summary-label {
    font-size: 16px;
    color: #343A40;
}

.status-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 16px;
}

.status-category {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E5E7EB;
    min-width: 0;
}

.category-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
}

.category-icon.status-connected {
    background-color: #E6FFF3 !important;
    color: #16A34A !important;
} /* Very Light Green Background, Green Icon */
.category-icon.status-disconnected {
    background-color: #FEF0F2 !important;
    color: #DC2626 !important;
} /* Light Red Background, Red Icon */
.category-icon.status-other {
    background-color: #EFF6FF !important;
    color: #1c398e !important;
} /* Light Blue Background, Blue Icon */

.category-label {
    font-size: 16px;
    font-weight: 600;
    color: #343A40;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    min-width: 0;
}

.collector-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.collector-item {
    font-size: 14px;
    color: #343A40;
    padding: 6px 8px;
    background-color: #F9FAFB;
    border-radius: 4px;
    border: 1px solid #E5E7EB;
    margin-bottom: 4px;
    transition: background-color 0.2s ease;
}

.collector-item:hover {
    background-color: #F3F4F6;
    border-color: #D1D5DB;
}

.orange-text {
    color: orange;
}
