:root {
    --border: #dcdfe4;
    --text: #1f2328;
    --muted: #656d76;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --bg: #f6f8fa;
}

* {
    box-sizing: border-box;
}

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

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
}

.brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    text-decoration: none;
}

.site-header nav a {
    margin-left: 18px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
}

.site-header nav a:hover {
    color: var(--primary);
}

main.container {
    padding-top: 28px;
    padding-bottom: 60px;
}

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

.card {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow .15s ease, border-color .15s ease;
}

.card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.card h2 {
    margin: 0 0 6px;
    font-size: 1.1rem;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 12px;
    padding: 48px 36px;
    margin-bottom: 24px;
}

.hero .eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .78rem;
    font-weight: 700;
    background: rgba(255, 255, 255, .15);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.hero h1 {
    margin: 0 0 14px;
    font-size: 2rem;
    line-height: 1.25;
}

.hero-lead {
    margin: 0 0 8px;
    font-size: 1.05rem;
    max-width: 640px;
    color: rgba(255, 255, 255, .95);
}

.hero-sub {
    margin: 0;
    font-size: .95rem;
    max-width: 640px;
    color: rgba(255, 255, 255, .85);
}

.status-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 32px;
    font-weight: 600;
    font-size: .92rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .18);
    flex-shrink: 0;
}

.stack-section,
.quick-links {
    margin-bottom: 32px;
}

.stack-section h2,
.quick-links h2 {
    font-size: 1.15rem;
    margin: 0 0 6px;
}

.stack-card {
    cursor: default;
}

.stack-card:hover {
    border-color: var(--border);
    box-shadow: none;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: .9rem;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-small {
    padding: 4px 10px;
    font-size: .82rem;
    border-radius: 5px;
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: .92rem;
}

th {
    background: #f0f2f5;
    font-weight: 600;
}

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

tbody tr:hover {
    background: #fafbfc;
}

.empty-row td {
    text-align: center;
    color: var(--muted);
    padding: 24px;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h2 {
    margin-top: 0;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: .85rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .9rem;
    font-family: inherit;
}

.form-error {
    color: var(--danger);
    font-size: .8rem;
    margin-top: 4px;
    min-height: 1em;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: flex-end;
}

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: .9rem;
}

.alert-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}
