:root {
    --green: #16a34a;
    --green-bg: #f0fdf4;
    --yellow: #ca8a04;
    --yellow-bg: #fefce8;
    --grey: #6b7280;
    --grey-bg: #f3f4f6;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --text: #111827;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.nav-brand { font-weight: 700; font-size: 1.1rem; }

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--grey);
}

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

h1 { margin-bottom: 0.5rem; }
h2 { margin: 1.5rem 0 0.5rem; font-size: 1.15rem; }
p { margin-bottom: 1rem; color: var(--grey); }

textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: monospace;
    resize: vertical;
    margin-bottom: 0.75rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    background: var(--grey-bg);
}

.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }

.htmx-indicator {
    display: none;
    margin-left: 0.75rem;
    color: var(--grey);
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: inline; }

/* Results */

.results-summary {
    margin: 1.5rem 0 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
}

.tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-yellow { background: var(--yellow-bg); color: var(--yellow); }
.tag-grey { background: var(--grey-bg); color: var(--grey); }
.tag-cached { background: #ede9fe; color: #7c3aed; font-size: 0.7rem; }

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.88rem;
}

.results-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    background: var(--grey-bg);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--grey);
}

.results-table td {
    padding: 0.6rem 0.75rem;
    border-top: 1px solid var(--border);
    vertical-align: top;
}

.results-table a { color: var(--primary); text-decoration: none; }
.results-table a:hover { text-decoration: underline; }

.row-found td:first-child { font-weight: 600; }
.row-found { background: var(--green-bg); }
.row-not-found { background: #fff; }
.row-error { background: var(--yellow-bg); }

.cell-dates { font-size: 0.82rem; max-width: 280px; }
.cell-resolution { font-size: 0.82rem; max-width: 300px; }

/* Login */
.login-card {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
}
.login-card h1 { margin-bottom: 1rem; }
.login-card p { margin-bottom: 1.5rem; }

.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--grey);
    font-size: 0.8rem;
}
