
:root {
    --cm-bg: #020617;           /* overall page background */
    --cm-header-bg: #020617;    /* top bar */
    --cm-surface: #020617;      /* panels / containers */
    --cm-card: #0b1120;         /* inner cards */
    --cm-border: #1f2933;
    --cm-border-soft: #111827;
    --cm-text: #e5e7eb;
    --cm-muted: #9ca3af;
    --cm-primary: #38bdf8;      /* cyan */
    --cm-primary-soft: rgba(56, 189, 248, 0.12);
    --cm-accent: #a855f7;       /* purple */
    --cm-danger: #fb7185;       /* soft red */
    --cm-radius: 10px;
    --cm-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.65);
}

* {
    box-sizing: border-box;
}

#alertlog{
display:none;
}

body#body-wrapper {
    margin: 0;
    min-width: 1100px;
    font-family: "Titillium Web", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
        radial-gradient(circle at 100% 0%, rgba(168, 85, 247, 0.16), transparent 55%),
        #020617;
    color: var(--cm-text);
}

/* LINKS */
a {
    color: var(--cm-primary);
    text-decoration: none;
    font-weight: 500;
}
a:hover {
    text-decoration: underline;
}

/* ===== HEADER (LOGO + TITLE + REFRESH) ===== */

#header_container {
    width: 100%;
    padding: 10px 26px 12px;
    background: #122440;
    border-bottom: 1px solid var(--cm-border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    /* box-shadow: 0 18px 30px rgba(15, 23, 42, 0.75); */
    position: relative;
    z-index: 5;
}

/* left side (logo + links + title) – JS controls display, so no display override */
#headerLeftContainer {
    /* display is managed by inline style / JS */
}

#logo {
    display: block;
    width: 210px;
    height: 52px;
    object-fit: scale-down;
    margin-bottom: 2px;
}

#headerLeftContainer a,
#headerLeftContainer label {
    margin-right: 12px;
    font-size: 0.9rem;
    color: var(--cm-muted);
    cursor: pointer;
}
#headerLeftContainer a:hover,
#headerLeftContainer label:hover {
    color: var(--cm-primary);
}

/* title + subtitle */
#page_title {
    display: block;
    margin: 6px 0 0;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f9fafb;
}

#page_subtitle {
    display: block;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--cm-muted);
}

/* login box (sits in header bar until logged in) */
#login_head {
    min-width: 260px;
    padding: 12px 16px;
    border-radius: 12px;
    background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.25), transparent 60%), #020617;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: var(--cm-shadow-soft);
}

#login_head table {
    width: 100%;
    border-collapse: collapse;
}
#login_head td {
    padding: 4px 0;
    font-size: 0.9rem;
}

#login_head input[type="text"],
#login_head input[type="password"] {
    width: 100%;
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid var(--cm-border);
    background: #020617;
    color: var(--cm-text);
    font-size: 0.9rem;
}
#login_head input:focus {
    outline: none;
    border-color: var(--cm-primary);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5);
}

#loginbtn {
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(to right, #38bdf8, #22c55e);
    color: #0b1120;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* right side (refresh info) – JS controls display, so we don’t override it */
#headerRightContainer {
    text-align: right;
    font-size: 0.85rem;
	    width: 500px;
}

#masterimage {
    width: 60px;
    height: 60px;
    float: right;
	margin-top: -10px;
    margin-left: 12px;
}

#refreshed {
    margin: 0;
    font-weight: 600;
font-size:23px;
}
#refresh-rate {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: var(--cm-muted);
}

/* ===== MAIN TABLE WRAPPER ===== */

#table_container {
    width: 100%;
    padding: 10px 26px 26px;
    box-sizing: border-box;
    background: transparent;
}

/* scroll if many columns on smaller screens */
#table_container > table {
    width: 100%;
}

/* ===== SERVER TABLE ===== */

#table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(15, 23, 42, 0.96);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--cm-shadow-soft);
}

/* header row */
#table th {
    padding: 9px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    color: #cbd5f5;
    background: linear-gradient(to right, rgba(56, 189, 248, 0.22), rgba(129, 140, 248, 0.16));
    border-bottom: 1px solid var(--cm-border-soft);
}

/* cells */
#table td {
    padding: 10px 10px;
    border-bottom: 1px solid var(--cm-border-soft);
    text-align: center;        /* centre everything by default */
    vertical-align: middle;
    font-size: 0.9rem;
    color: var(--cm-text);
}

/* zebra + hover */
#table tr:nth-child(even) td {
    background: rgba(15, 23, 42, 0.9);
}
#table tr:nth-child(odd) td {
    background: rgba(15, 23, 42, 0.8);
}
#table tr:hover td {
    background: rgba(56, 189, 248, 0.08);
}

/* centre icons in cells */
#table td img {
    display: block;
    margin: 0 auto;
}

/* Uncomment this if you prefer the NAME column left-aligned instead of centered
#table th:nth-child(3),
#table td:nth-child(3) {
    text-align: left;
}
*/

/* ===== ALERT LOG OVERLAY ===== */

#alertlog {
    /* visibility controlled by inline style / JS (display:none by default) */
    position: fixed;
    inset: 40px 4%;
    width: 92%;
    height: calc(100% - 80px);
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 55%), #020617;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    z-index: 50;
    border: 1px solid var(--cm-border-soft);
}

#closealertlog {
    width: 100%;
    height: 44px;
    background: linear-gradient(to right, #fb7185, #f97316);
    text-align: center;
    color: #020617;
    cursor: pointer;
}
#closealertlog label {
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 44px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#alertlogcontents {
    padding: 16px 20px;
    overflow: auto;
    height: calc(100% - 44px);
    color: #e5e7eb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
}

/* ===== ADMIN AREA ===== */

/*
 NOTE:
 - WE DO NOT set display for #admin_container or #superadmindiv here,
   so your inline style `display:none` and JS can still show/hide them.
*/

#admin_container {
    width: 100%;
    padding: 20px 26px 30px;
    box-sizing: border-box;
    background: #020617;
    border-top: 1px solid var(--cm-border-soft);
}

/* baseadmincontainer uses floats in your HTML; keep that */
#baseadmincontainer {
    height: 100%;
    width: 776px;
    float: left;
}

/* User list panel */
#adminusers {
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    width: 150px;
    height: 240px;
    overflow-y: auto;
    background: var(--cm-card);
    box-shadow: var(--cm-shadow-soft);
    padding: 6px 4px;
    font-size: 0.85rem;
}

/* Create user button */
#createnewuser {
    margin-top: 10px;
    width: 150px;
    padding: 6px 10px;
    border-radius: 999px;
    border: none;
    background: var(--cm-primary-soft);
    color: var(--cm-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

/* User settings card */
#usersettings {
    float: left;
    margin-left: 14px;
    padding: 14px 16px;
    background: var(--cm-card);
    border-radius: var(--cm-radius);
    box-shadow: var(--cm-shadow-soft);
    min-width: 230px;
    font-size: 0.88rem;
}
#usersettings table {
    width: 100%;
}
#usersettings td {
    padding: 4px 0;
}
#adminpassword {
    width: 100%;
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid var(--cm-border);
    background: #020617;
    color: var(--cm-text);
    font-size: 0.9rem;
}

/* admin action buttons */
#adminupdate,
#deleteuser {
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
}

#adminupdate {
    background: var(--cm-primary);
    color: #020617;
    margin-right: 6px;
}
#deleteuser {
    background: rgba(248, 113, 113, 0.16);
    color: var(--cm-danger);
}

/* Servers assigned to the selected user */
#userservers {
    float: left;
    height: 100%;
    width: 350px;
    overflow-y: auto;
    margin-left: 14px;
    padding: 10px 12px;
    background: var(--cm-card);
    border-radius: var(--cm-radius);
    box-shadow: var(--cm-shadow-soft);
    font-size: 0.85rem;
}

/* Super admin container – JS toggles display */
#superadmindiv {
    background: #020617;
    float: left;
    width: calc(100% - 780px);
    height: 100%;
    margin-left: 16px;
    border-radius: var(--cm-radius);
    padding: 10px 12px 12px;
    border: 1px solid var(--cm-border-soft);
}

/* Clean DB */
#cleandb {
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(to right, #f97316, #fb7185);
    color: #020617;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
}

/* Server list and detail panes inside super admin */
#adminservers {
    float: left;
    height: calc(100% - 40px);
    width: 325px;
    overflow-y: auto;
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--cm-card);
    border-radius: var(--cm-radius);
    box-shadow: var(--cm-shadow-soft);
    font-size: 0.85rem;
}

#adminserversdetails {
    float: left;
    height: calc(100% - 40px);
    width: calc(100% - 360px);
    overflow-y: auto;
    margin-top: 10px;
    margin-left: 10px;
    padding: 10px 12px;
    background: var(--cm-card);
    border-radius: var(--cm-radius);
    box-shadow: var(--cm-shadow-soft);
    font-size: 0.86rem;
}

/* labels & fields */
#adminserversdetails label {
    display: inline-block;
    margin-right: 6px;
    margin-bottom: 4px;
    font-size: 0.84rem;
    color: var(--cm-muted);
}

#addnewservercheck {
    margin: 6px 0 10px;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    background: var(--cm-primary-soft);
    color: var(--cm-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

#editserversockets {
    width: 100%;
    height: calc(100% - 20px);
    overflow: auto;
    border-radius: 8px;
    border: 1px dashed var(--cm-border);
    padding: 8px;
    margin-top: 4px;
}

/* limits + actions inputs */
.updateactionval,
.msmqlimitval,
.hdd0freelimit,
.hdd1freelimit {
    width: 180px;
    max-width: 100%;
    padding: 4px 6px;
    border-radius: 999px;
    border: 1px solid var(--cm-border);
    background: #020617;
    color: var(--cm-text);
    font-size: 0.85rem;
    margin: 4px 0;
}

.updateaction {
    margin-left: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    border: none;
    background: var(--cm-primary);
    color: #020617;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
}

/* spacing between sections in adminserversdetails */
#adminserversdetails > div {
    margin-bottom: 10px;
}

/* small responsive tweak */
@media (max-width: 1300px) {
    #header_container {
        flex-wrap: wrap;
        row-gap: 10px;
    }
}
