:root {
    --bg-color: #f7f9fc;
    --card-bg: #ffffff;
    --text-dark: #002159;
    --text-muted: #64748b;
    --status-green: #39b54a;
    --status-red: #ef4444;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    font-family: 'PT Sans', sans-serif;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-font-smoothing: antialiased;
}

/* Header Flexbox Layout */
.header-container {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 40px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-text-block {
    text-align: center;
    flex-grow: 1;
}

h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

.subtitle {
    color: var(--text-muted);
    font-family: 'PT Sans', sans-serif;
    text-transform: uppercase;
    margin: 6px 0 0 0;
    font-size: 1rem;
    letter-spacing: 1px;
    font-weight: 700;
}

.header-logo {
    height: 65px;
    width: auto;
    object-fit: contain;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

/* Card with a 3px gradual vertical linear gradient */
.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 3px; /* FIXED: Increased to 3px thick border wrapper */
    background-image: linear-gradient(to bottom, #003da6, #39b54a); /* FIXED: Gradual vertical linear gradient */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Internal content wrapper */
.card-inner {
    background: var(--card-bg);
    border-radius: 13px 14px 0 0; /* Mathematical inner radius curve matching */
    padding: 24px 24px 14px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 33, 89, 0.1), 0 4px 6px -2px rgba(0, 33, 89, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.card-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.card-timeline {
    font-family: 'PT Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 700;
}

.status-badge {
    font-family: 'PT Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
}

.status-badge.online {
    background-color: #e6f7ed;
    color: var(--status-green);
}

.status-badge.offline {
    background-color: #fee2e2;
    color: var(--status-red);
}

.metric-main {
    margin: 20px 0;
}

.metric-label {
    font-family: 'PT Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.metric-value-large {
    font-family: 'Oswald', sans-serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: #003da6;
    margin-top: 4px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 6px;
}

.data-value {
    font-family: 'PT Sans', sans-serif;
    color: var(--text-dark);
    font-weight: 700;
    text-transform: uppercase;
}

.brands-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #cbd5e1;
    margin-bottom: 10px;
}

.brands-value {
    font-family: 'PT Sans', sans-serif;
    color: var(--text-dark);
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Card Link Footer Container to overlay perfectly on the green gradient region */
.card-footer {
    background: transparent;
    padding: 12px 24px;
    display: flex;
    justify-content: center; /* Centers the item horizontally */
    align-items: center;
}

.card-link {
    display: inline-block;
    color: #ffffff; /* High contrast text over the solid green portion */
    font-family: 'PT Sans', sans-serif;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem; /* FIXED: Slightly smaller size wrapper */
    letter-spacing: 0.5px;
    transition: color 0.2s;
    margin-left: 10px; /* FIXED: Applied explicit relative inner structural margins */
    margin-bottom: 4px;
}

.card-link:hover {
    color: #000000; /* FIXED: Changes to solid black on hover to ensure crisp legibility */
    text-decoration: none;
}

.error-msg {
    font-family: 'PT Sans', sans-serif;
    color: var(--status-red);
    text-transform: uppercase;
    font-weight: 700;
}
