:root {
    --c-bg: #f5f5f5;
    --c-surface: #ffffff;
    --c-border: #e0e0e0;
    --c-text: #1a1a1a;
    --c-text-muted: #6b6b6b;
    --c-accent: #1a1a1a;
    --c-accent-contrast: #ffffff;
    --c-online: #2e7d32;
    --c-offline: #c62828;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
}

/* Top bar */
#cryptid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

#cryptid-header nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

#cryptid-header nav a {
    color: var(--c-text-muted);
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

#cryptid-header nav a:hover {
    color: var(--c-text);
}

#cryptid-header nav a.active {
    color: var(--c-text);
    border-bottom-color: var(--c-accent);
}

#cryptid-header .cryptid-brand {
    text-align: right;
    line-height: 1.3;
}

#cryptid-header .cryptid-brand .name {
    font-weight: 700;
    font-size: 1.05em;
}

#cryptid-header .cryptid-brand .build {
    color: var(--c-text-muted);
    font-size: 0.8em;
}

.cryptid-page {
    padding: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

h2, h3 {
    font-weight: 600;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    border-bottom: 1px solid var(--c-border);
    padding: 10px 12px;
    text-align: left;
}

th {
    background: var(--c-bg);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--c-text-muted);
}

input {
    width: 100%;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
}

input:focus {
    outline: 1px solid var(--c-accent);
    background: var(--c-bg);
}

/* Buttons */
button {
    padding: 8px 14px;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
    cursor: pointer;
}

button:hover {
    background: var(--c-bg);
}

button:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Forms */
form {
    border: 1px solid var(--c-border);
    border-radius: 8px;
    padding: 16px;
    max-width: 420px;
    background: var(--c-surface);
}

form label {
    display: block;
    margin-top: 10px;
    font-size: 0.9em;
    color: var(--c-text-muted);
}

form input {
    border: 1px solid var(--c-border);
    border-radius: 6px;
    padding: 6px 8px;
    margin-top: 4px;
}

.ssl-badge {
    display: inline-block;
    background: var(--c-online);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

.status-online { color: var(--c-online); font-weight: 600; }
.status-offline { color: var(--c-offline); font-weight: 600; }
.status-unknown { color: var(--c-text-muted); }

/* Dashboard tiles */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.tile {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 20px;
}

.tile h3 {
    margin: 0 0 14px 0;
    font-size: 1em;
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tile-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.tile-stat .value {
    font-size: 2em;
    font-weight: 700;
    line-height: 1;
}

.tile-stat .label {
    font-size: 0.85em;
    color: var(--c-text-muted);
    margin-top: 4px;
}

.tile a.tile-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.9em;
    color: var(--c-text-muted);
    text-decoration: none;
}

.tile a.tile-link:hover {
    color: var(--c-text);
}
