/* ============================================================
   Rise VoIP Portal theme — recreates the legacy production look
   (wood-grain banner, red utility box, red title bar, uppercase
   nav, silver-header tables, red footer).
   To customize, prefer editing custom.css (loaded after this).
   ============================================================ */
:root {
    --red:       #d81e26;   /* title / utility bars */
    --red-dark:  #b3161d;
    --red-link:  #c8102e;   /* nav + footer links */
    --ink:       #222;
    --muted:     #666;
    --line:      #cfcfcf;
    --silver:    #c9c9c9;   /* table header (legacy datagrid) */
    --altrow:    #e7e7e7;
    --err:       #c00;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font: 13px/1.5 Verdana, Arial, "Helvetica Neue", sans-serif;
    color: var(--ink);
    background: #fff;
}
a { color: var(--red-link); }

/* Centered container with a soft drop shadow, like the legacy #palette/#btcap */
.portal {
    max-width: 940px;
    margin: 0 auto 30px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(0,0,0,.28);
}

/* ---- Brand banner (wood grain + logo + utility box) ---- */
.brandbar {
    position: relative;
    height: 128px;
    background: #6b4a2b url('img/header_background.jpg') center/cover no-repeat;
}
.brandbar .logo { position: absolute; top: 26px; left: 24px; }
.brandbar .logo img { display: block; border: 0; width: 140px; height: auto; }

.utility {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 360px; background: var(--red); color: #fff;
    padding: 8px 14px;
}
.utility .util-title { text-align: right; font-weight: bold; margin-bottom: 6px; }
.utility .util-title a { color: #fff; text-decoration: none; }
.utility .util-cols { display: flex; gap: 10px; }
.utility .util-cols > div { flex: 1; font-size: 11px; line-height: 1.3; }
.utility .util-cols strong { display: block; }
.utility .util-cols p { margin: 2px 0 4px; }
.utility .util-cols a { color: #fff; font-weight: bold; text-decoration: underline; }

/* ---- Title bar ---- */
.titlebar {
    background: var(--red); color: #fff;
    padding: 10px 20px; display: flex; justify-content: space-between; align-items: center;
}
.titlebar h2 { margin: 0; font-size: 18px; font-weight: bold; }
.titlebar .who { font-size: 12px; }
.titlebar .who a { color: #fff; text-decoration: underline; }

/* ---- Nav ---- */
.voipnav {
    background: #fff; border-bottom: 1px solid #000;
    padding: 10px 4px 3px; font-size: 11px;
    white-space: nowrap;        /* keep all items on one row, like the legacy site */
    overflow-x: auto;           /* safety: scroll rather than wrap on very narrow screens */
}
.voipnav a {
    padding: 8px 6px; font-weight: bold; text-transform: uppercase;
    text-decoration: none; color: var(--red-link);
}
.voipnav a:hover { text-decoration: underline; }
.voipnav a.active { color: #000; }

/* ---- Content ---- */
.content { padding: 22px 24px 28px; }
h1 { font-size: 20px; margin: 0 0 4px; }
.subtitle { color: var(--muted); margin: 0 0 18px; }

.filters {
    display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end;
    background: #f4f4f4; border: 1px solid var(--line);
    padding: 12px 14px; border-radius: 4px; margin-bottom: 16px;
}
.filters label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.filters input[type=text] { padding: 5px 7px; border: 1px solid var(--line); border-radius: 3px; }
.btn {
    background: var(--red); color: #fff; border: 0; border-radius: 3px;
    padding: 7px 16px; font-size: 13px; cursor: pointer;
}
.btn:hover { background: var(--red-dark); }

/* Tables — legacy datagrid look (silver header, alternating rows) */
table.grid { width: 100%; border-collapse: collapse; font-size: 12px; }
table.grid th {
    background: var(--silver); text-align: left; padding: 6px 9px;
    border-bottom: 1px solid #aaa; font-weight: bold;
}
table.grid td { padding: 6px 9px; border-bottom: 1px solid #e2e2e2; }
table.grid tbody tr:nth-child(even) td { background: var(--altrow); }
td.num, th.num { text-align: right; }
.empty { color: var(--muted); padding: 20px 0; text-align: center; }

.pager { margin-top: 14px; display: flex; gap: 14px; align-items: center; font-size: 12px; }
.pager span { color: var(--muted); }

.err { color: var(--err); margin: 8px 0; }
.ok  { color: #1a7f2e; margin: 8px 0; }
.note { color: var(--muted); font-size: 12px; }

/* Ring-plan form: label cells read as labels, not header bars */
table.grid.form th {
    background: #fff; font-weight: bold; width: 300px;
    vertical-align: middle; border-bottom: 1px solid #eee;
}
table.grid.form td { vertical-align: middle; border-bottom: 1px solid #eee; }
table.grid.form tbody tr:nth-child(even) td { background: #fff; }
table.grid.form select, table.grid.form input[type=text] {
    padding: 4px 6px; border: 1px solid var(--line); border-radius: 3px;
}

/* Login */
.login-lead { text-align: center; margin: 6px auto 16px; max-width: 640px; }
.login-box { max-width: 380px; margin: 0 auto; }
.login-box .field { margin-bottom: 12px; }
.login-box label { display: block; font-size: 12px; margin-bottom: 4px; }
.login-box input[type=text], .login-box input[type=password] {
    width: 100%; padding: 8px 9px; border: 1px solid var(--line); border-radius: 3px;
}
.g-recaptcha { margin: 12px 0; }

/* ---- Footer ---- */
.footer { text-align: center; padding: 18px 10px 22px; }
.footer a { color: var(--red-link); text-decoration: none; font-size: 12px; }
.footer a:hover { text-decoration: underline; }
.footer .copy { color: #999; font-size: 11px; margin-top: 8px; }

@media (max-width: 640px) {
    .utility { position: static; width: auto; }
    .brandbar { height: auto; }
}
