
:root {
    /* Nomad Brand Colors */
    --primary: #027468;
    --primary-dark: #023A41;
    --accent: #006494;
    --success: #027468;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #EDEDEE;
    --gray-200: #DFDFE1;
    --gray-700: #374151;
    --gray-800: #023A41;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header .subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
}

.nav-tabs {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-tabs ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    overflow-x: auto;
}

.nav-tabs button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-tabs button:hover {
    color: var(--primary);
    background: var(--gray-100);
}

.nav-tabs button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    padding: 2rem 0;
}

.tab-content.active {
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card.success {
    border-left-color: var(--success);
}

.stat-card.warning {
    border-left-color: var(--warning);
}

.stat-card.danger {
    border-left-color: var(--danger);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-change {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    font-weight: 700;
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: var(--gray-900);
    font-weight: 600;
    border-bottom: 2px solid var(--gray-100);
    padding-bottom: 0.5rem;
}

.card h2:first-of-type {
    margin-top: 1rem;
}

.card h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

.card p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--gray-700);
}

.card ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.card li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Chart containers */
.chart-container {
    background: var(--gray-50);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.card img {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 0.5rem;
    cursor: zoom-in;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Ensure images don't overflow on mobile */
@media (max-width: 768px) {
    .card img {
        max-height: 300px;
    }
}

/* Image modal for fullscreen view */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.image-modal img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 95%;
    max-height: 95%;
    border-radius: 0.5rem;
}

.image-modal .close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.image-modal .close:hover {
    color: #bbb;
}

.card table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.card th {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.card tbody tr:hover {
    background: var(--gray-50);
}

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

/* Responsive table wrapper */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
}

@media (max-width: 768px) {
    .card table {
        font-size: 0.85rem;
    }

    .card th,
    .card td {
        padding: 0.5rem;
    }
}

.url-list ul {
    list-style: none;
    padding-left: 0;
}

.url-list li {
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    background: var(--gray-50);
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary);
    font-size: 0.85rem;
    line-height: 1.5;
    transition: all 0.2s;
}

.url-list li:hover {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
}

.url-list code {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    color: var(--primary);
}

.url-list strong {
    color: var(--primary);
    margin-right: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.badge.primary {
    background: var(--primary);
    color: white;
}

.badge.success {
    background: var(--success);
    color: white;
}

.badge.warning {
    background: var(--warning);
    color: white;
}

.badge.danger {
    background: var(--danger);
    color: white;
}

.footer {
    background: var(--gray-800);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

.last-updated {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Code blocks */
pre {
    background: var(--gray-900);
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

code {
    background: var(--gray-100);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
}

pre code {
    background: none;
    padding: 0;
}

/* Inline link buttons for tab switching */
.inline-link-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin: 0.25rem;
    display: inline-block;
}

.inline-link-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.inline-link-btn:active {
    transform: translateY(0);
}

/* Section dividers */
hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 2rem 0;
}

/* Emphasis boxes */
em {
    font-style: normal;
    color: var(--gray-700);
    font-size: 0.9rem;
}

/* Links */
.card a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.card a:hover {
    border-bottom-color: var(--primary);
}
