/* Industry 194 - landing page styles */

:root {
    --bg: #0b0f14;
    --bg-elev: #11171f;
    --bg-card: #161e28;
    --bg-card-hover: #1c2530;
    --border: #232b36;
    --border-strong: #2d3845;
    --text: #e6edf3;
    --text-dim: #8b949e;
    --text-faint: #586069;
    --accent: #00d4aa;
    --accent-glow: rgba(0, 212, 170, 0.15);
    --accent-dim: #00a987;
    --danger: #f85149;
    --warning: #d29922;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --radius: 8px;
    --radius-lg: 12px;
    --mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

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

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Top bar ---------- */

.topbar {
    border-bottom: 1px solid var(--border);
    background: var(--bg-elev);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
}
.brand:hover { text-decoration: none; }

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--bg);
    font-family: var(--mono);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: -0.5px;
}

.brand-text {
    font-size: 15px;
    letter-spacing: -0.2px;
}

.topnav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.topnav a, .topnav button {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 8px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-family: var(--sans);
    transition: background 120ms ease, color 120ms ease;
    text-decoration: none;
}
.topnav a:hover, .topnav button:hover {
    background: var(--bg-card);
    color: var(--text);
    text-decoration: none;
}
.topnav a.active {
    background: var(--bg-card);
    color: var(--accent);
}

.topnav .signin {
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    padding: 8px 16px;
    margin-left: 8px;
}
.topnav .signin:hover {
    background: var(--accent-dim);
    color: var(--bg);
}

/* ---------- App main ---------- */

.app {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 24px;
}

.loading {
    display: flex;
    justify-content: center;
    padding: 80px 0;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Hero ---------- */

.hero {
    padding: 60px 0;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 42px;
    line-height: 1.1;
    letter-spacing: -1.2px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(180deg, var(--text), var(--text-dim));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 17px;
    color: var(--text-dim);
    margin-bottom: 32px;
    line-height: 1.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-family: var(--sans);
    transition: background 120ms ease, transform 120ms ease;
    text-decoration: none;
}
.btn:hover {
    background: var(--accent-dim);
    color: var(--bg);
    text-decoration: none;
    transform: translateY(-1px);
}
.btn.ghost {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border-strong);
}
.btn.ghost:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    color: var(--text);
}

/* ---------- Features (unauth) ---------- */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 60px;
}

.feature {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.feature h3 {
    font-size: 15px;
    margin-bottom: 8px;
    color: var(--text);
}

.feature p {
    font-size: 14px;
    color: var(--text-dim);
}

/* ---------- Service panel ---------- */

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.panel-title h1 {
    font-size: 28px;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.panel-title .user {
    color: var(--text-dim);
    font-size: 14px;
    font-family: var(--mono);
}

.services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.service {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: block;
    color: inherit;
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
    position: relative;
    overflow: hidden;
}

.service:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    text-decoration: none;
}

.service-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: var(--radius);
    color: var(--accent);
    margin-bottom: 16px;
}

.service-icon svg {
    width: 22px;
    height: 22px;
}

.service-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.service-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.service-cat {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 10px;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-faint);
    padding: 2px 8px;
    background: var(--bg);
    border-radius: 4px;
}

/* ---------- Sub-page sections ---------- */

.page-section h1 {
    font-size: 28px;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.page-section .lede {
    color: var(--text-dim);
    margin-bottom: 32px;
    font-size: 15px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 600;
}

.card .value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--mono);
    margin-bottom: 4px;
}

.card .meta {
    font-size: 13px;
    color: var(--text-dim);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.status-dot.ok { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.status-dot.warn { background: var(--warning); }
.status-dot.err { background: var(--danger); }

table.simple {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

table.simple th, table.simple td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

table.simple th {
    background: var(--bg-elev);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

code, .mono {
    font-family: var(--mono);
    font-size: 13px;
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent);
}

/* ---------- Footer ---------- */

.footer {
    border-top: 1px solid var(--border);
    margin-top: 60px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-faint);
    flex-wrap: wrap;
    gap: 12px;
}

.muted { color: var(--text-dim); }

/* ---------- Sign in prompt ---------- */

.signin-prompt {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-top: 32px;
    text-align: center;
}

.signin-prompt h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.signin-prompt p {
    color: var(--text-dim);
    margin-bottom: 24px;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
    .topbar-inner { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
    .brand-text { display: none; }
    .app { padding: 32px 16px; }
    .hero { padding: 24px 0; }
    .hero h1 { font-size: 32px; }
    .panel-header { flex-direction: column; align-items: flex-start; }
}