/* TV Files — deliberately old-browser-safe CSS: no flexbox, no grid, no
   variables, layout via tables/inline-block. Big focus outlines for TV
   D-pad navigation. */

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    margin: 0;
    background: #f1f3f6;
    color: #1f2328;
}

a { color: #0b57d0; }
a:focus, button:focus, input:focus, select:focus {
    outline: 3px solid #ff8800;
}

/* ---------- top bar ---------- */
.topbar { background: #1f2937; }
.topbar-in { max-width: 1150px; margin: 0 auto; padding: 0 20px; }
.brand {
    display: inline-block;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    padding: 14px 0;
}
.topnav { float: right; }
.topnav a {
    display: inline-block;
    color: #d1d5db;
    text-decoration: none;
    font-size: 15px;
    padding: 16px 12px;
}
.topnav a:hover { color: #fff; background: #374151; }
.whoami {
    display: inline-block;
    color: #9ca3af;
    font-size: 14px;
    padding: 16px 0 16px 10px;
}
.topbar-in { zoom: 1; }
.topbar-in:after { content: ""; display: block; clear: both; }

/* ---------- page ---------- */
.wrap { max-width: 1150px; margin: 0 auto; padding: 20px; }
h1 { font-size: 24px; margin: 6px 0 14px 0; }
h2 { font-size: 19px; margin: 26px 0 10px 0; }

.flash {
    background: #fff3cd;
    border: 1px solid #e0a800;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 0 0 16px 0;
}
.muted { color: #667085; }
.small { font-size: 14px; }
.empty { padding: 26px 16px; margin: 0; }

/* ---------- breadcrumbs ---------- */
.crumbbar {
    background: #fff;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 16px;
}
.crumbbar a { text-decoration: none; }
.crumbbar a:hover { text-decoration: underline; }
.crumbbar .sep { color: #98a2b3; padding: 0 2px; }

/* ---------- two-pane layout (table = works everywhere) ---------- */
table.layout { width: 100%; border-collapse: collapse; }
table.layout > tr > td, table.layout td.side, table.layout td.main { vertical-align: top; }
td.side { width: 210px; padding-right: 18px; }
.sidehead {
    font-size: 13px;
    font-weight: bold;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 4px 0 8px 4px;
}
ul.tree { list-style: none; margin: 0; padding: 0; }
ul.tree a {
    display: block;
    padding: 9px 12px;
    margin-bottom: 2px;
    border-radius: 6px;
    color: #1f2328;
    text-decoration: none;
    font-size: 16px;
}
ul.tree a:hover { background: #e4e8ee; }
ul.tree a.cur { background: #d7e5fd; color: #0b57d0; font-weight: bold; }

/* ---------- cards ---------- */
.card {
    background: #fff;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    overflow: hidden;
}
.card.pad { padding: 16px 18px; }
.cardhead {
    font-size: 17px;
    font-weight: bold;
    padding: 12px 16px;
    border-bottom: 1px solid #e6eaf0;
    background: #fafbfc;
}

/* ---------- item table ---------- */
table.items { width: 100%; border-collapse: collapse; }
table.items th {
    text-align: left;
    font-size: 13px;
    color: #667085;
    font-weight: bold;
    padding: 10px 14px;
    border-bottom: 1px solid #d8dee4;
    background: #fafbfc;
}
table.items td {
    padding: 10px 14px;
    border-bottom: 1px solid #eef1f4;
    font-size: 16px;
    vertical-align: middle;
}
table.items tr:hover td { background: #f6f8fa; }
th.w1 { width: 1%; }
.num { text-align: right; white-space: nowrap; }
a.item { text-decoration: none; font-weight: bold; }
a.item:hover { text-decoration: underline; }

.badge {
    display: inline-block;
    min-width: 38px;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #fff;
    background: #8b949e;
    border-radius: 4px;
    padding: 4px 6px;
}
.badge.dir { background: #0b57d0; }
.badge.lnk { background: #188038; }

/* ---------- toolbar (admin) ---------- */
.toolbar { margin-bottom: 16px; }
.tool {
    display: inline-block;
    vertical-align: top;
    background: #fff;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0 12px 12px 0;
}
.toolhead {
    font-size: 13px;
    font-weight: bold;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* ---------- forms / buttons ---------- */
input, select, button {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
}
input, select {
    border: 1px solid #c6ccd4;
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
    color: #1f2328;
}
input.small { padding: 5px 8px; font-size: 14px; }
.btn {
    display: inline-block;
    background: #fff;
    border: 1px solid #c6ccd4;
    border-radius: 6px;
    color: #1f2328;
    padding: 8px 16px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
}
.btn:hover { background: #f0f2f5; }
.btn.primary { background: #0b57d0; border-color: #0b57d0; color: #fff; }
.btn.primary:hover { background: #0a4cb8; }
.btn.small { padding: 5px 10px; font-size: 14px; }
.btn.danger { color: #b3261e; }
.btn.wide { width: 100%; }
.inline { display: inline; }

/* ---------- auth pages ---------- */
.authcard {
    max-width: 420px;
    margin: 48px auto 0 auto;
    background: #fff;
    border: 1px solid #d8dee4;
    border-radius: 10px;
    padding: 28px 30px;
}
.authcard.widecard { max-width: 560px; }
.authcard h1 { margin-top: 0; }
.authcard input { width: 95%; }
.authcard input.codebox {
    width: auto;
    font-size: 26px;
    letter-spacing: 6px;
    text-align: center;
}
.secret {
    font-family: monospace;
    font-size: 22px;
    letter-spacing: 2px;
    word-wrap: break-word;
}

/* ---------- TOTP enrollment QR ---------- */
table.qr {
    border-collapse: collapse;
    background: #fff;
    border: 24px solid #fff;
    width: auto;
}
table.qr td { width: 6px; height: 6px; padding: 0; font-size: 0; }
table.qr td.b { background: #000; }
table.qr td.w { background: #fff; }

/* ---------- small screens (modern phones; old browsers ignore this) ---------- */
@media (max-width: 720px) {
    td.side { display: none; }
    .wrap { padding: 12px; }
    .whoami { display: none; }
}
