/* ============================================
   CONSOLE IFRAME WRAPPER
   ============================================ */

.console-frame-wrapper {
    /* flex container for iframe */
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 
		0; /* allow it to shrink within console-main */
}

.console-frame {
    flex: 1;
    width: 100%;
    height: 100%;          /* still fills the console pane */
    border: none;          /* kill the outer card border */
    border-radius: 0;      /* no rounded giant back panel */
    background: transparent;
    box-shadow: none;      /* no big glowing box behind JamStation */
}


/* ============================================
   GLOBAL THEME (MATCH TECHMERCENARY.ORG)
   ============================================ */

:root {
    --bg: #0b0d10;
    --panel: #12161b;
    --ink: #e7eef7;
    --muted: #9fb1c7;
    --brand: #68b5ff;
    --brand-ink: #041a2e;
    --ok: #2ecc71;
    --warn: #f1c40f;
    --err: #e74c3c;
    --ring: 0 0 0 3px rgba(104,181,255,0.35);

    /* By-the-Numbers gradient */
    --tm-grad-start: #00c4cc;
    --tm-grad-end: #ffd700;
}

/* ============================================
   GLOBAL RESET
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Make viewport height available to flex layout */
html,
body {
    height: 100%;
}

/* ============================================
   GLOBAL BASE STYLES
   ============================================ */

body {
    margin: 0;
    padding: 24px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--bg);
    color: var(--ink);
}

/* Headings */
h1,
h2 {
    color: var(--ink);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Basic link styling */
a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* ============================================
   GLOBAL FORM ELEMENTS (NON-CARD)
   ============================================ */

/* Do NOT make every form a card */
form {
    max-width: 640px;
    width: 100%;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

/* Labels */
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--muted);
}

/* Text/password/etc inputs (generic) */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"] {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.12);
    background-color: #0e1217;
    color: var(--ink);
    margin-bottom: 1rem;
    outline: none;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus {
    border-color: var(--brand);
    box-shadow: var(--ring);
    background-color: #10151d;
}

/* Generic button styling (non-login-specific) */
button {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #3a7bff, #6f4bff);
    color: #ffffff;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

button:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}


/* ============================================
   GLOBAL LISTS
   ============================================ */

ul {
    margin-top: 2rem;
    list-style: none;
    padding: 0;
}

ul li {
    margin-bottom: 0.4rem;
}

ul li a {
    color: var(--brand);
}

ul li a:hover {
    color: #ffffff;
    text-decoration: underline;
}


/* ============================================
   LOGIN PAGE STYLES
   (applied when <body class="login-body">)
   ============================================ */

.login-body {
    /* Fullscreen dark background, same palette as TM */
    min-height: 100vh;
    padding: 0; /* override global body padding for login page */
    background-color: var(--bg);
    color: var(--ink);

    /* Center content */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Wrapper to control overall width */
.login-wrapper {
    width: 100%;
    max-width: 520px; /* outer wrapper wider than inner form */
    padding: 16px;
}

/* Outer background panel (mimic TM cards) */
.login-card {
    width: 100%;
    background: var(--panel);
    border-radius: 16px;
    padding: 24px 22px 22px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255,255,255,0.08);
}


/* ---------- Header / Branding ---------- */

.login-header {
    text-align: center;
    margin-bottom: 12px;
}

/* Logo in the login header */
.login-logo {
    display: block;
    height: 160px;         /* tweak this if it looks too big/small */
    width: auto;
    margin: 0 auto 4px;   /* center it, add a little space below */
}


/* Title uses the same gradient vibe as "By the Numbers" numbers */
.login-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    margin-bottom: 4px;

    background: linear-gradient(135deg, var(--tm-grad-start), var(--tm-grad-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/* ---------- Error Message ---------- */

.login-error {
    background-color: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.75);
    color: #ffb4aa;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    margin: 10px 0 14px;
}


/* ============================================
   INNER LOGIN FORM PANEL (PANEL ON PANEL)
   ============================================ */

.login-form {
    /* Inner foreground panel */
    background: #151921;
    border-radius: 12px;
    padding: 16px 14px 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255,255,255,0.08);

    max-width: 440px;          /* smaller than outer card */
    margin: 12px auto 0;       /* centered inside outer card */

    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-label-text {
    font-size: 13px;
    color: var(--muted);
}

/* Login-specific inputs */
.login-input {
    background-color: #0e1217;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.14);
    padding: 8px 10px;
    color: var(--ink);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    width: 100%;
    max-width: 100%;
}

/* Focus state for login inputs */
.login-input:focus {
    border-color: var(--brand);
    box-shadow: var(--ring);
    background-color: #10151d;
}

.login-input::placeholder {
    color: #707080;
}


/* ---------- Submit Button (login-specific) ---------- */

.login-button {
    margin-top: 8px;
    padding: 10px 0;
    border-radius: 999px;
    border: none;

    /* Use the same gradient as the "By the Numbers" numbers */
    background: linear-gradient(135deg, var(--tm-grad-start), var(--tm-grad-end));
    color: #04151b; /* dark ink like TM brand-ink */
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.login-button:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    opacity: 0.92;
}


/* ---------- Footer Text ---------- */

.login-footer {
    margin-top: 14px;
    text-align: center;
    font-size: 11px;
    color: var(--muted);
}


/* ============================================
   LOGIN DISCLAIMER
   ============================================ */

.login-disclaimer {
    margin-top: 12px;
    max-width: 520px;
    padding: 0 16px;
    font-size: 10px;
    line-height: 1.4;
    color: #7e7e7e;
    text-align: center;
    opacity: 0.9;
}

.login-disclaimer strong {
    color: #cfcfcf;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
}

.login-ip {
    font-family: "Consolas", "Courier New", monospace;
    color: #b0c4ff;
}

/* ============================================
   CONSOLE LAYOUT (INDEX.PHP)
   ============================================ */

.console-body {
    background-color: var(--bg);
    color: var(--ink);
    padding: 0;     /* override global padding */
    height: 100%;   /* match html/body */
}

.console-shell {
    display: flex;
    height: 100%;   /* full viewport height */
}

/* ---------- Sidebar ---------- */

.console-sidebar {
    width: 230px;
    background: rgba(11, 13, 16, 0.98);
    border-right: 2px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    padding: 18px 16px;
}

.console-sidebar-header {
    margin-bottom: 24px;
	text-align: center;
	border-bottom: 3px solid rgba(255,255,255,0.06);
}

.console-sidebar-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink);
}

.console-sidebar-subtitle {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-top: 4px;
	margin-bottom: 10px;
}

/* Nav links */
.console-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: auto;
}

.console-nav-link {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.console-nav-link:hover {
    background: rgba(255,255,255,0.04);
    color: var(--ink);
    transform: translateX(1px);
}

.console-nav-link.active {
    background: linear-gradient(135deg, var(--tm-grad-start), var(--tm-grad-end));
    color: #04151b;
    font-weight: 600;
}

/* Sidebar footer (user + logout) */
.console-sidebar-footer {
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--muted);
}

.console-username {
    font-weight: 600;
}

.console-logout-link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
}

.console-logout-link:hover {
    color: var(--brand);
}


/* ---------- Main Area ---------- */

.console-main {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    min-height: 0;  /* allow children to size within 100% shell */
}

/* Content wrapper */
.console-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    min-height: 0;  /* required for nested flex/iframe to fill height */
}

/* Generic card style for content blocks */
.console-card {
    background: var(--panel);
    border-radius: 16px;
    padding: 18px 16px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}

.console-card h2 {
    margin: 0 0 8px;
    font-size: 17px;
}

.console-card p {
    margin: 0 0 6px;
    color: var(--muted);
}

.console-muted {
    color: var(--muted);
    font-size: 13px;
}

/* ---------- Responsive tweak ---------- */

@media (max-width: 720px) {
    .console-shell {
        flex-direction: column;
        height: auto; /* let mobile stack grow as needed */
        min-height: 100vh;
    }

    .console-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 10px 12px;
        overflow-x: auto;
    }

    .console-sidebar-header {
        margin-bottom: 0;
        margin-right: 16px;
    }

    .console-nav {
        flex-direction: row;
        gap: 8px;
        margin-bottom: 0;
    }

    .console-sidebar-footer {
        display: none; /* you can rework this for mobile later if you care */
    }

    .console-main {
        padding: 14px 12px 20px;
    }
}

/* ============================================
   JAMSTATION STATUS TILES
   ============================================ */

/* ----- Grid wrapper for individual status tiles ----- */
.status-grid {
    display: grid;                         /* tile layout */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;                             /* space between tiles */
    margin-top: 12px;
}

/* ----- Single status tile card ----- */
.status-item {
    background: rgba(0, 0, 0, 0.35);       /* slightly lighter than bg */
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

/* ----- Header row inside tile: name + UP/DOWN badge ----- */
.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

/* ----- Name/label of the service (site, DB, etc.) ----- */
.status-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

/* ----- Badge base style ----- */
.status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ----- Badge color when service is UP ----- */
.status-ok {
    background: var(--ok);                 /* uses your OK green */
    color: #04120a;
}

/* ----- Badge color when service is DOWN ----- */
.status-down {
    background: var(--err);                /* uses your error red */
    color: #ffffff;
}

/* ----- Meta rows under header (URL, latency, etc.) ----- */
.status-meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

/* ----- URL text inside a tile ----- */
.status-url {
    word-break: break-all;                 /* don't let long URLs bust layout */
}

/* ----- Latency / timing text ----- */
.status-latency {
    font-size: 11px;
}

/* ----- Error message text inside tile ----- */
.status-error {
    margin-top: 4px;
    font-size: 11px;
    color: #ffb4aa;                        /* softer red for errors */
}

/* ============================================
   JAMSTATION: FULL-TILE LAUNCH BUTTON
   ============================================ */

.status-launch-tile {
    display: flex;                  /* center the text in the tile */
    align-items: center;
    justify-content: center;

    /* override generic link styles */
    text-decoration: none;

    /* make it feel like a CTA */
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    /* use your TM gradient */
    background: linear-gradient(135deg, var(--tm-grad-start), var(--tm-grad-end));
    color: var(--brand-ink);
}

/* remove underline on hover and add button-y feel */
.status-launch-tile:hover {
    text-decoration: none;          /* override global a:hover underline */
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
    transform: translateY(-1px);
}

/* active press state */
.status-launch-tile:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    opacity: 0.92;
}
/* ============================================
   SUBLEVEL9 OVERVIEW SYSTEM STATUS
   ============================================ */

.status-summary {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    font-size: 13px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    color: var(--muted);
}

.status-value {
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot-ok {
    background: var(--ok);
}

