/* ============================================================
   Modern Cloud — clean white/blue, fixed sidebar layout
   ============================================================ */

:root {
    --primary:        #2563eb;
    --primary-hover:  #1d4ed8;
    --primary-soft:   rgba(37, 99, 235, 0.10);
    --primary-softer: rgba(37, 99, 235, 0.05);
    --accent-cyan:    #06b6d4;

    --bg:            #f1f5f9;
    --surface:       #ffffff;
    --surface-2:     #f8fafc;
    --border:        #e2e8f0;
    --border-strong: #cbd5e1;

    --text:        #0f172a;
    --text-soft:   #475569;
    --text-muted:  #64748b;
    --text-faint:  #94a3b8;

    --success:      #10b981;
    --success-soft: rgba(16, 185, 129, 0.10);
    --danger:       #ef4444;
    --danger-soft:  rgba(239, 68, 68, 0.10);
    --warning:      #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.12);
    --info:         #06b6d4;
    --info-soft:    rgba(6, 182, 212, 0.10);

    --topbar-h:    64px;
    --sidebar-w:   240px;
    --radius-sm:   6px;
    --radius:      8px;
    --radius-md:   10px;
    --radius-lg:   14px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow:    0 6px 16px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.10), 0 4px 10px rgba(15, 23, 42, 0.05);

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--primary-hover); }

img { max-width: 100%; }

hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

p { margin: 0 0 12px; }

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 10px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    letter-spacing: -0.01em;
}
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
h5 { font-size: 13px; }

/* ================ Sidebar (fixed, full height) ================ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar__head {
    height: var(--topbar-h);
    flex-shrink: 0;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.015em;
}
.brand:hover { color: var(--primary); }

.brand__mark {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.brand__text {
    white-space: nowrap;
}

.sidenav {
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidenav__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius);
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.sidenav__item:hover {
    background: var(--primary-softer);
    color: var(--primary);
}
.sidenav__item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}
.sidenav__icon {
    width: 20px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 40;
}
.sidebar__backdrop.is-open { display: block; }

/* ================ Content area (right of sidebar) ================ */

.content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================ Topbar (inside content) ================ */

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--topbar-h);
    flex-shrink: 0;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-xs);
}

.topbar__burger {
    display: none !important;
}

.topsearch {
    flex: 1 1 auto;
    max-width: 480px;
    min-width: 0;
    position: relative;
}
.topsearch__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    font-size: 13px;
    pointer-events: none;
}
.topsearch__input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font-size: 13.5px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.topsearch__input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.userbtn { position: relative; }
.userbtn__toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 38px;
    padding: 0 12px 0 5px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-soft);
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.userbtn__toggle:hover { background: var(--surface-2); border-color: var(--border-strong); }
.userbtn__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
}
.userbtn__name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.userbtn__caret { font-size: 10px; color: var(--text-faint); }

.usermenu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 6px;
    z-index: 110;
}
.usermenu.is-open { display: block; }

.usermenu__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    color: var(--text-soft);
    font-size: 13.5px;
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s;
}
.usermenu__item:hover { background: var(--primary-softer); color: var(--primary); }
.usermenu__item .fas { width: 16px; font-size: 13px; color: var(--text-faint); }
.usermenu__item:hover .fas { color: var(--primary); }
.usermenu__item--danger { color: var(--danger); }
.usermenu__item--danger:hover { background: var(--danger-soft); color: var(--danger); }
.usermenu__item--danger .fas, .usermenu__item--danger:hover .fas { color: var(--danger); }
.usermenu__divider { height: 1px; background: var(--border); margin: 6px 0; }

.iconbtn {
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-soft);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.iconbtn:hover { background: var(--surface-2); color: var(--primary); }

/* ================ Page ================ */

.page {
    flex: 1;
    background: var(--bg);
}

#mainwrapper {
    padding: 28px;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}
#innerwrapper { display: block; }
#content { display: block; }

.page__header { margin-bottom: 22px; }
.page__title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

#breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 14px;
}
#breadcrumb a { color: var(--text-muted); }
#breadcrumb a:hover { color: var(--primary); }
#breadcrumb > a:last-child { color: var(--text); font-weight: 600; }
#breadcrumb i { font-size: 10px; color: var(--text-faint); }

#content_title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}
#content_title b { font-weight: 700; }

/* ================ Cards ================ */

#submit-main,
#login,
#lostpassword,
#cpanel,
#admin-page-content,
#current-theme-holder,
#servers,
#singleserver,
#singleoverview,
#permis-drop,
#front-introduction {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-xs);
}

/* ================ Buttons ================ */

.btn,
.button,
button.button,
input.button,
.btnhvr,
.ok {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    background: var(--primary);
    color: #fff !important;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, transform 0.05s;
    white-space: nowrap;
    text-align: center;
    width: auto;
    height: auto;
}
.btn:hover, .button:hover, .btnhvr:hover, .ok:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff !important;
}
.btn:active, .button:active { transform: translateY(1px); }

.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-lg { padding: 11px 20px; font-size: 14px; }

.btn-primary, .save {
    background: var(--primary); border-color: var(--primary); color: #fff !important;
}
.btn-primary:hover, .save:hover {
    background: var(--primary-hover); border-color: var(--primary-hover); color: #fff !important;
}

.btn-success, .game {
    background: var(--success); border-color: var(--success); color: #fff !important;
}
.btn-success:hover, .game:hover {
    background: #0d9669; border-color: #0d9669; color: #fff !important;
}

.btn-danger {
    background: var(--danger); border-color: var(--danger); color: #fff !important;
}
.btn-danger:hover {
    background: #dc2626; border-color: #dc2626; color: #fff !important;
}

.btn-warning, .cancel {
    background: var(--warning); border-color: var(--warning); color: #fff !important;
}
.btn-warning:hover, .cancel:hover {
    background: #d97706; border-color: #d97706; color: #fff !important;
}

.btn-info, .refresh {
    background: var(--info); border-color: var(--info); color: #fff !important;
}
.btn-info:hover, .refresh:hover {
    background: #0891b2; border-color: #0891b2; color: #fff !important;
}

.btn-light {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-soft) !important;
}
.btn-light:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--primary) !important;
}

.login {
    width: 100%;
    padding: 11px 16px;
    font-size: 14px;
}

.faux-button {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#searchbtn {
    width: 100%;
    padding: 11px 16px;
    font-size: 14px;
}

/* ================ Forms ================ */

.inputbox, .textbox, .select, .file,
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="search"],
textarea, select {
    width: auto;
    padding: 9px 13px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13.5px;
    font-family: var(--font);
    line-height: 1.4;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.inputbox:focus, .textbox:focus, .select:focus,
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus,
textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.file { padding: 5px; }
textarea { resize: vertical; min-height: 90px; }
.searchbox { width: 220px; }

.badentry { color: var(--danger); display: none; font-size: 13px; }
.mandatory { color: var(--danger); }

/* ================ Headings ================ */

h2.error, h2.info, h2.warning, h2.ok {
    color: #fff;
    padding: 8px 14px;
    border: 0;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius) var(--radius) 0 0;
    margin: 0 0 -1px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: block;
}
h2.error   { background: var(--danger); }
h2.info    { background: var(--info); }
h2.warning { background: var(--warning); }
h2.ok      { background: var(--success); }

h3 {
    background: var(--surface-2);
    border-left: 3px solid var(--primary);
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 6px 0 14px;
}

h4 { margin: 0; font-size: 14px; font-weight: 600; }

/* ================ Tables ================ */

table.listtable, table.listtable2, table.listtable3 {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    font-size: 13px;
    font-family: var(--font);
    color: var(--text);
}
table.listtable3 { border: 0; background: transparent; }

td.listtable_top {
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    height: auto;
}
a.listtable_top, a.listtable_top:link, a.listtable_top:visited { color: var(--text-muted); }
a.listtable_top:hover { color: var(--primary); }

td.listtable_1, td.listtable_1_unbanned, td.listtable_1_permanent, td.listtable_1_banned {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    font-size: 13px;
}
td.listtable_2 {
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

td.listtable_1_unbanned  { background: var(--success-soft); }
td.listtable_1_permanent { background: var(--danger-soft); }
td.listtable_1_banned    { background: var(--warning-soft); }

tr:last-child td { border-bottom: 0; }

.tbl_hover { cursor: pointer; background: var(--primary-soft) !important; }
.tbl_out   { background: var(--surface); }

.activeplayer {
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tablerow1 { background: var(--surface-2); padding: 9px; border-radius: var(--radius); }
.tablerow2 { background: var(--primary-soft); border: 1px solid var(--border); padding: 9px; border-radius: var(--radius); }
.tablerow4 { background: var(--text); color: #fff; padding: 9px; border-radius: var(--radius); }

.rowdesc { color: var(--text); font-weight: 600; }

/* ================ Login ================ */

#login, #lostpassword {
    max-width: 420px;
    width: 100%;
    margin: 60px auto;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-top: 3px solid var(--primary);
}
#loginLogo { text-align: center; margin-bottom: 22px; }
#loginLogo img { max-height: 56px; }

#loginUsernameDiv,
#loginPasswordDiv,
#loginRememberMeDiv,
#loginSubmit { padding: 8px 0; }

.loginmedium {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.loginmedium:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

#loginSubmit { text-align: right; }

#loginbutton {
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
}
#loginbutton:hover { background: var(--primary-hover); }

#loginOtherlinks {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 12px 0 0;
    margin-top: 22px;
    font-size: 13px;
}

/* ================ Admin layout ================ */

#admin-page-menu, .adminmenu {
    width: 220px;
    float: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    margin-right: 18px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
#admin-page-menu > a,
.adminmenu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: transparent;
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-soft);
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-left-color 0.15s;
}
#admin-page-menu > a:hover,
.adminmenu__item:hover {
    background: var(--primary-softer);
    color: var(--primary);
    border-left-color: var(--primary);
}
#admin-page-menu > .active,
.adminmenu .active {
    background: var(--primary-soft);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

#admin-page-content {
    overflow: hidden;
    padding: 20px;
}

#cpanel { padding: 14px; }
#cpanel ul {
    margin: 0;
    padding: 6px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
#cpanel ul li { margin: 0; float: none; text-align: center; }
#cpanel ul li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: auto !important;
    width: 110px !important;
    padding: 14px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-soft);
    font-size: 12px;
    transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.05s;
}
#cpanel ul li a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-softer);
    transform: translateY(-2px);
    padding: 14px 10px;
}
#cpanel ul li img { margin: 0; max-height: 40px; }

/* ================ Permissions ================ */

#permis-drop {
    width: 60%;
    float: right;
    padding: 12px;
    border: 1px dashed var(--border-strong);
    background: var(--surface-2);
}
.permis-container { width: 38%; float: left; overflow: hidden; }
.permis-container ul {
    margin: 0;
    padding: 8px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.permis-container ul li { float: none; margin: 0; text-align: center; }
.permis-container ul li a {
    display: block;
    height: auto;
    width: 110px;
    padding: 10px 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-soft);
    font-size: 12px;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.permis-container ul li a:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    cursor: move;
}

/* ================ Frontpage ================ */

#front-introduction { padding: 20px; margin-bottom: 18px; }
#front-servers { margin-bottom: 26px; }
#front-servers hr { border: 0; border-top: 1px solid var(--border); margin-bottom: 7px; }
.front-module { width: 100%; max-width: 410px; }
.front-module-intro { margin: 11px; }
.front-module-line { background: var(--surface-2); color: var(--text); }
.front-module-header { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.fmsd { font-size: 11.5px; color: var(--text-muted); }

/* ================ Servers ================ */

#singleserver { float: left; width: 58%; }
#singleoverview { float: right; width: 40%; }
#servers { width: 100%; }

/* ================ Banlist ================ */

#banlisttitle { width: 50%; float: left; }
#banlist-nav  { width: 50%; float: right; text-align: right; }
#banlist { width: 100%; float: left; margin-top: 14px; }

.ban-edit { padding: 10px; }
.ban-edit ul { margin: 0; padding: 0; list-style: none; }
.ban-edit ul li { text-align: left; }
.ban-edit li a {
    display: block;
    padding: 7px 11px;
    color: var(--text-soft);
    border-bottom: 1px solid var(--border);
    transition: background 0.15s, color 0.15s;
}
.ban-edit ul li a:hover {
    background: var(--primary-softer);
    color: var(--primary);
    padding: 7px 11px;
}

/* ================ Theme settings ================ */

#current-theme-holder { padding: 18px; height: auto; overflow: hidden; }
.largetitle {
    font-size: 17px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    padding-bottom: 7px;
    margin-bottom: 11px;
}
#current-theme-screenshot {
    width: 250px;
    float: left;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 10px 18px 0 0;
}
#current-theme-details { width: auto; float: none; overflow: hidden; margin-top: 10px; }

#theme-list ul { margin: 0; padding: 0; list-style: none; }
#theme-list ul li { margin: 4px 0; }
#theme-list ul li a {
    display: block;
    padding: 8px 14px;
    border-left: 2px solid transparent;
    color: var(--text-soft);
    border-radius: 0 var(--radius) var(--radius) 0;
    transition: background 0.15s, color 0.15s, border-left-color 0.15s;
}
#theme-list ul li a:hover {
    background: var(--primary-softer);
    color: var(--primary);
    border-left-color: var(--primary);
}
#theme-list ul .active a, #theme-list ul li.active a {
    background: var(--primary-soft);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

/* ================ Messages ================ */

#msg-red, #msg-green, #msg-blue,
#msg-red-debug, #msg-blue-debug, #msg-green-dbg {
    padding: 13px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    margin: 12px 0;
    width: auto;
    height: auto;
    overflow: hidden;
    font-size: 13.5px;
}
#msg-red    { background: var(--danger-soft);  border-color: var(--danger);  color: var(--danger); }
#msg-green  { background: var(--success-soft); border-color: var(--success); color: var(--success); }
#msg-blue   { background: var(--info-soft);    border-color: var(--info);    color: var(--info); }
#msg-red-debug  { background: var(--warning-soft); border-color: var(--warning); color: var(--warning); }
#msg-blue-debug { background: var(--info-soft);    border-color: var(--info);    color: var(--info); }
#msg-green-dbg  { background: var(--success-soft); border-color: var(--success); color: var(--success); }

#msg-red b, #msg-green b, #msg-blue b,
#msg-red-debug b, #msg-blue-debug b, #msg-green-debug b { font-size: 14px; }
#msg-red i, #msg-green i, #msg-blue i,
#msg-red-debug i, #msg-blue-debug i, #msg-green-dbg i { float: left; margin-right: 11px; }

.msg-button { float: right; }
.msgbox-border {
    position: fixed !important;
    top: calc(var(--topbar-h) + 16px);
    right: 22px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    width: 380px;
    margin: 0;
    z-index: 200;
}

/* ================ Dialogs ================ */

.dialog__box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.dialog-holder {
    border-collapse: collapse;
    margin: auto;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
td.dialog-topleft, td.dialog-topright, td.dialog-bottomright,
td.dialog-bottomleft, td.dialog-border {
    background-image: none !important;
    background: transparent !important;
    height: 0 !important; width: 0 !important; padding: 0 !important;
}
.dialog-content { background: var(--surface); border: 0; }
div.dialog-body { border-bottom: 1px solid var(--border); padding: 16px; }
div.dialog-control { background: var(--surface-2); padding: 12px 16px; text-align: right; }

/* ================ Tooltips ================ */

.tool-tip, .perm-tip {
    color: #fff;
    width: 220px;
    z-index: 13000;
    text-align: left;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.perm-tip { width: 260px; }

.tool-title, .perm-title {
    background: var(--text);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 12px;
    border: 0;
    margin: 0;
}
.tool-text, .perm-text {
    background: #1e293b;
    color: #e2e8f0;
    font-size: 12px;
    padding: 8px 12px;
}

/* ================ Icons (legacy) ================ */

.icon-ok      { background-image: url(../images/info.png);    float: left; height: 32px; width: 32px !important; padding: 0 !important; overflow: hidden; }
.icon-error   { background-image: url(../images/warning.png); float: left; height: 32px; width: 32px !important; padding: 0 !important; overflow: hidden; }
.icon-warning { background-image: url(../images/warning.png); float: left; height: 32px; width: 32px !important; padding: 0 !important; overflow: hidden; }
.icon-info    { background-image: url(../images/info.png);    float: left; height: 32px; width: 32px !important; padding: 0 !important; overflow: hidden; }

/* ================ Context menu ================ */

div.contextmenu, .contextmenu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 5px 0;
    overflow: hidden;
    width: 14em;
    font-family: var(--font);
}
div.contextmenu a, .contextmenu a {
    display: block;
    padding: 8px 14px;
    color: var(--text);
    font-size: 13px;
    text-decoration: none;
    cursor: default;
    transition: background 0.1s;
    margin: 0;
}
div.contextmenu a:hover, .contextmenu a:hover {
    background: var(--primary-softer);
    color: var(--primary);
}
.contextmenu a.disabled { color: var(--text-faint); }
.contextmenu a.disabled:hover { background: transparent; color: var(--text-faint); }
.contextmenu .separator {
    border-bottom: 1px solid var(--border);
    background: transparent;
    height: 1px;
    padding: 0;
    margin: 5px 0;
}
.contextmenu .head {
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 12px;
    font-weight: 600;
}

/* ================ Footer ================ */

.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.footer__inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--primary); }
.footer__left { display: flex; align-items: center; gap: 10px; }
.footer__version { color: var(--text-faint); font-size: 11px; }
.footer__sep { margin: 0 6px; color: var(--text-faint); }

/* ================ Misc ================ */

.dbg.b { font-size: 13px; font-weight: 600; }
.tabcontent { display: none; }
.tabcontent:first-of-type { display: block; }

.clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.clearfix { display: block; }

.user { color: var(--text-soft); font-weight: 500; }
.user a, .user a:link, .user a:visited, .user a:hover { color: var(--primary); }

::selection { background: var(--primary-soft); color: var(--primary-hover); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); }

/* ================ Responsive ================ */

@media (min-width: 1280px) {
    .dashboard-comm-blocks { float: left; width: 49%; }
    .dashboard-ban-blocks  { float: right; width: 49%; }
    .dashboard-blocks-separate { display: none; }
    .dashboard-ban-block-date { text-align: center; }
}

@media (max-width: 1279px) {
    .dashboard-comm-blocks, .dashboard-ban-blocks { width: 100%; float: none; }
    .dashboard-blocks-separate { display: block; }
    .dashboard-ban-block-date { text-align: left; }
}

@media (max-width: 900px) {
    .topbar__burger { display: inline-flex !important; }
    .userbtn__name { display: none; }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: var(--shadow);
    }
    .sidebar.is-open { transform: translateX(0); }

    .content { margin-left: 0; }

    #mainwrapper { padding: 18px; }

    #admin-page-menu, .adminmenu {
        float: none;
        width: 100%;
        margin-right: 0;
        margin-bottom: 14px;
    }
    #admin-page-content { width: 100%; }

    #permis-drop, .permis-container { float: none; width: 100%; margin-bottom: 14px; }
    #singleserver, #singleoverview { float: none; width: 100%; margin-bottom: 14px; }
    .msgbox-border { width: calc(100% - 44px); right: 22px; }
}

@media (max-width: 600px) {
    .topsearch { display: none; }
    .topbar { padding: 0 14px; gap: 10px; }
    .page__title { font-size: 22px; }
    h1 { font-size: 22px; }
    #current-theme-screenshot { width: 100%; float: none; margin: 0 0 12px; }
}
