/* Praxi Manage V2 - app styles. Tokens match the public site and the DNN reskin. */
:root {
    --px-navy: #102e4b; --px-blue: #175b94; --px-blue-hover: #0f4a7a; --px-gold: #b58a2f;
    --px-text: #1f2d3a; --px-muted: #53677b; --px-line: #dce5ee; --px-line-soft: #e8eef4;
    --px-bg: #f4f7fa; --px-surface: #fff; --px-hover: #eef4f9;
    --px-ok: #2e7d4f; --px-warn: #b7791f; --px-err: #c0392b;
    --px-radius: 8px; --px-radius-lg: 12px;
    --px-shadow: 0 1px 2px rgba(16,46,75,.06), 0 6px 20px rgba(16,46,75,.06);
    --px-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--px-font); font-size: 14px; line-height: 1.5; color: var(--px-text); background: var(--px-bg); }
a { color: var(--px-blue); } a:hover { color: var(--px-blue-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--px-gold); outline-offset: 2px; }
h1, h2, h3 { color: var(--px-navy); letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: 24px; } h2 { font-size: 18px; }
.muted { color: var(--px-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Header ---------------------------------------------------------- */
.app-header { background: var(--px-surface); border-bottom: 1px solid var(--px-line); }
.app-header-inner { max-width: none; margin: 0 auto; padding: 10px 12px; display: flex; align-items: center; gap: 24px; }
.brand img { height: 40px; width: auto; display: block; }
.app-nav { display: flex; gap: 4px; flex: 1; }
.app-nav a { padding: 8px 14px; border-radius: var(--px-radius); color: var(--px-navy); font-weight: 600; text-decoration: none; }
.app-nav a:hover { background: var(--px-hover); color: var(--px-blue); }
.app-nav a.active { background: var(--px-navy); color: #fff; }
.user-area { display: flex; align-items: center; gap: 12px; }
.broker-chip { background: var(--px-hover); border: 1px solid var(--px-line); border-radius: 999px; padding: 4px 14px; font-weight: 600; color: var(--px-navy); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-name { color: var(--px-muted); }
.btn-signout { background: var(--px-navy); color: #fff !important; border-radius: var(--px-radius); padding: 8px 16px; font-weight: 600; text-decoration: none; }
.btn-signout:hover { background: var(--px-blue); }

/* --- Page ------------------------------------------------------------ */
.app-main { max-width: none; margin: 14px auto 8px; padding: 0 12px; }   /* nearly full width: 12px each side */
.card { background: var(--px-surface); border: 1px solid var(--px-line); border-radius: var(--px-radius-lg); box-shadow: var(--px-shadow); padding: 24px; }
.card + .card { margin-top: 16px; }
.app-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: var(--px-muted); font-size: 12px; line-height: 1.2; padding: 3px 12px 4px; }
.app-footer-logo { display: inline-flex; line-height: 0; opacity: .9; }
.app-footer-logo:hover { opacity: 1; }
.app-footer-logo img { display: block; }

/* --- Forms and buttons ---------------------------------------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--px-navy); }
.input, select.input { width: 100%; padding: 10px 12px; border: 1px solid #c5d3e0; border-radius: 6px; font: inherit; background: #fff; }
.input:focus { border-color: var(--px-blue); box-shadow: 0 0 0 3px rgba(23,91,148,.15); outline: 0; }
.btn { display: inline-block; border: 1px solid var(--px-blue); background: var(--px-blue); color: #fff; border-radius: var(--px-radius); padding: 10px 20px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--px-blue-hover); border-color: var(--px-blue-hover); }
.btn-block { width: 100%; }
.alert { border-radius: var(--px-radius); padding: 10px 14px; margin-bottom: 16px; border: 1px solid; }
.alert-error { background: #fdecea; color: #7a1f16; border-color: #f3c1bb; border-left: 5px solid var(--px-err); }
.alert-info { background: #eef4f9; color: var(--px-navy); border-color: var(--px-line); border-left: 5px solid var(--px-blue); }

/* --- Login ------------------------------------------------------------ */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(120deg, #f7fafc 25%, #dbeaf5); }
.login-card { width: 100%; max-width: 400px; background: var(--px-surface); border: 1px solid var(--px-line); border-radius: 16px; box-shadow: var(--px-shadow); padding: 32px; }
.login-card img { height: 48px; display: block; margin: 0 auto 20px; }
.login-card h1 { text-align: center; font-size: 22px; }
.login-terms { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--px-line); border-radius: 10px; background: #f7f9fc; color: var(--px-muted); font-size: 13px; }
.login-terms label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.login-terms input { margin-top: 3px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.remember { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--px-muted); }

/* --- Manage shell ------------------------------------------------------ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--px-line); margin-bottom: 0; }
.tab { padding: 10px 18px; border-radius: 8px 8px 0 0; color: var(--px-muted); font-weight: 600; text-decoration: none; border: 1px solid transparent; border-bottom: 0; }
.tab:hover { background: var(--px-hover); color: var(--px-blue); }
.tab.active { background: #fff; color: var(--px-navy); border-color: var(--px-line); box-shadow: inset 0 3px 0 var(--px-gold); }
.frame-wrap { background: #fff; border: 1px solid var(--px-line); border-top: 0; border-radius: 0 0 var(--px-radius-lg) var(--px-radius-lg); box-shadow: var(--px-shadow); }
.frame-wrap iframe { display: block; width: 100%; height: calc(100vh - 196px); min-height: 260px; border: 0; }
.frame-wrap { position: relative; overflow: hidden; }   /* clips a full-frame dialog to the rounded corners */
.px-loading { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(255,255,255,.82); color: var(--px-muted); font-weight: 600; border-radius: 0 0 var(--px-radius-lg) var(--px-radius-lg); }
.px-loading[hidden] { display: none; }
.px-spinner { width: 34px; height: 34px; border: 3px solid var(--px-line); border-top-color: var(--px-blue); border-radius: 50%; animation: px-spin .8s linear infinite; }
@keyframes px-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .px-spinner { animation-duration: 2.4s; } }
body.frame { background: #fff; } body.frame .frame-body { padding: 16px; }
/* a page inside another screen's tab page (see px-fit.js) is already inset to that screen's tab strip */
html.px-nested body.frame .frame-body { padding: 12px 0 0; }

/* --- Data tables (Telerik RadGrid) ------------------------------------- */
.RadGrid { border: 1px solid var(--px-line) !important; border-radius: var(--px-radius); overflow: hidden; font-family: var(--px-font) !important; }
.RadGrid .rgHeader, .RadGrid th.rgHeader { background: #f4f7fa !important; color: var(--px-navy) !important; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-color: var(--px-line) !important; }
.RadGrid .rgRow > td, .RadGrid .rgAltRow > td { padding: 9px 10px; border-color: var(--px-line-soft) !important; }
.RadGrid .rgRow:hover > td, .RadGrid .rgAltRow:hover > td { background: var(--px-hover) !important; }

@media (max-width: 767px) {
    .app-header-inner { flex-wrap: wrap; gap: 8px; }
    .app-nav { order: 3; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* --- Layout panels that replaced DNN's splitter (asp:Panel keeps ID/Height for code that resizes a pane) --- */
.px-split { display: block; width: 100%; }
.px-split-pane { box-sizing: border-box; }

/* --- Session countdown (UserControls/ucSessionTimer): designed for the DNN header; sits at the right end of the V2 header --- */
.timeRemain { top: 8px !important; right: 14px !important; width: auto !important; white-space: nowrap; display: flex; align-items: center; gap: 4px; color: var(--px-muted); }
.timeRemain img { width: 22px; height: 22px; }
.app-header-inner { padding-right: 120px; }

/* --- Login / Register shown inside the landing page dialog (?popUp=true) ------------------------------ */
html:has(body.popup), body.popup { overflow: hidden; }
body.popup { background: transparent; }
body.popup .login-wrap { min-height: 0; padding: 8px; background: transparent; }
body.popup .login-card { max-width: none; border: 0; box-shadow: none; padding: 8px 16px; }
body.popup .login-card h1 { font-size: 20px; }

/* session timer (top right): centred vertically in the header bar */
.timeRemain { top: 0 !important; height: var(--px-header-h, 61px); display: flex; align-items: center; }
.timeRemain > *, .timeRemain table, .timeRemain td { margin-top: 0 !important; margin-bottom: 0 !important; }
