:root {
    --ou-green: #00694E;
    --ou-green-dark: #004C37;
    --bg: #f5f5f7;
    --bg-card: #fff;
    --border: #d0d7de;
    --text: #1f2328;
    --text-muted: #656d76;
    --danger: #cf222e;
    --radius: 6px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.site-header {
    background: var(--ou-green);
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;           /* pushes brand to the right side of the header */
    text-align: right;
}
.brand > div { display: flex; flex-direction: column; align-items: flex-end; }
.brand-logo { height: 48px; width: auto; order: 2; }  /* ducky on the far right */
.brand h1 { margin: 0; font-size: 1.5rem; line-height: 1.2; }
.brand h1 a { color: #fff; text-decoration: none; }
.brand .subtitle { font-size: 0.85rem; opacity: 0.85; }
.login-logo { display: block; margin: 0 auto 1rem; width: 120px; height: auto; }
.about-logo { display: block; margin: 0 auto 1rem; width: 90px; height: auto; }

/* Hamburger button (matches darkweb style) */
.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    transition: all 0.3s;
}
.hamburger.open { visibility: hidden; }

/* Side drawer */
.side-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 998;
}
.side-menu-backdrop.open { opacity: 1; pointer-events: auto; }

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.2s ease-out;
    z-index: 999;
    display: flex;
    flex-direction: column;
}
.side-menu.open { transform: translateX(0); }
.side-menu-header {
    padding: 1rem 1.25rem;
    background: var(--ou-green);
    color: #fff;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.side-menu-close {
    background: none;
    border: 0;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
}
.side-menu nav {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
}
.side-menu nav a,
.side-menu .menu-link-btn {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
    font: inherit;
    width: 100%;
    font-family: inherit;
}
.side-menu nav a:hover,
.side-menu .menu-link-btn:hover { background: #f6f8fa; color: var(--ou-green); }
.menu-form { margin: 0; }
.menu-form .menu-link-btn { color: var(--danger); }

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
    padding: 1rem;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
    background: #fff;
    border-radius: var(--radius);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { margin: 0; color: var(--ou-green); }
.modal-close {
    background: none;
    border: 0;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: var(--text-muted);
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.25rem; }
.modal-body h4 { margin: 1.25rem 0 0.5rem; color: var(--ou-green); font-size: 1rem; }
.modal-body p { margin: 0.5rem 0; }
.about-list { padding-left: 1.25rem; font-size: 0.9rem; }
.about-list li { margin: 0.25rem 0; }
.about-footer { margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-muted); text-align: center; }

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

h2 { margin-top: 0; color: var(--ou-green); }
h3 { color: var(--ou-green); margin-top: 2rem; }
.hint { color: var(--text-muted); font-size: 0.9rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9rem; }
.arrow { color: var(--text-muted); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.card-label { color: var(--text-muted); font-size: 0.85rem; }
.card-value { font-size: 2rem; font-weight: 600; color: var(--ou-green); }
.card-value.small { font-size: 1.1rem; }

.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}
.tier-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.tier-card h4 { margin: 0; color: var(--ou-green); }
.tier-count { font-size: 1.5rem; font-weight: 600; color: var(--text-muted); }
.tier-card ul { padding-left: 0; list-style: none; font-size: 0.9rem; max-height: 250px; overflow-y: auto; }
.tier-card li { padding: 0.2rem 0; }

.provider-chip {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    vertical-align: middle;
    margin-right: 0.25rem;
}
.provider-github { background: #24292f; }
.provider-google { background: #1a73e8; }
.provider-ohio { background: #00694E; }

.info-table, .models-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.info-table th, .info-table td,
.models-table th, .models-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}
.models-table thead th { background: #f6f8fa; font-weight: 600; }
.models-table tbody tr:hover { background: #f6f8fa; }
.models-table tr.row-broken { opacity: 0.55; }
.models-table tr.row-broken td.mono { text-decoration: line-through; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-ok { background: #d1f4dc; color: #1a7f3b; }
.badge-broken { background: #ffebe9; color: var(--danger); }
.info-table th { width: 180px; color: var(--text-muted); font-weight: 500; }

.actions { display: flex; gap: 0.75rem; margin: 1rem 0; }
.inline-form { display: inline; margin: 0; }
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}
.btn:hover { background: #f6f8fa; }
.btn-primary { background: var(--ou-green); color: #fff; border-color: var(--ou-green); }
.btn-primary:hover { background: var(--ou-green-dark); border-color: var(--ou-green-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #a40e26; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.85rem; }

select {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
}

.logs {
    background: #0d1117;
    color: #c9d1d9;
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    max-height: 600px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
    line-height: 1.4;
}

.site-footer {
    margin-top: 4rem;
    padding: 1rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

code { background: #eef1f4; padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.9em; }

/* Login form */
.login-container {
    max-width: 400px;
    margin: 3rem auto;
    background: var(--bg-card);
    padding: 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.login-container h2 { text-align: center; margin: 0 0 1.5rem; }
.login-error {
    background: #ffebe9;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; font-weight: 500; }
.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
}
.form-group input:focus {
    outline: none;
    border-color: var(--ou-green);
    box-shadow: 0 0 0 2px rgba(0, 105, 78, 0.2);
}
.btn-full { width: 100%; }

/* Logout button in nav */
.logout-form { display: inline; margin: 0; }
.logout-form button {
    background: none;
    border: none;
    color: #fff;
    opacity: 0.85;
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
}
.logout-form button:hover { opacity: 1; border-bottom-color: #fff; }
