:root {
    --xp-blue-1: #0a4cbc;
    --xp-blue-2: #1d67d2;
    --xp-blue-3: #3a79d7;
    --xp-line: #5a84b1;
    --xp-border-dark: #27507f;
    --xp-panel: #dce7f3;
    --xp-panel-2: #edf4fb;
    --xp-white: #ffffff;
    --xp-text: #11253c;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    font-family: Tahoma, Verdana, Arial, sans-serif;
    color: var(--xp-text);
    background: radial-gradient(circle at top, #8ab0da, #5c82b1 45%, #456995 100%);
}

a { color: inherit; }

.app-shell {
    max-width: 1530px;
    margin: 12px auto 24px;
    background: #cfdbe7;
    border: 1px solid #385e89;
    box-shadow: 0 14px 34px rgba(0,0,0,.28);
}

.xp-titlebar {
    background: linear-gradient(180deg, #2e7cea 0%, #1158cf 55%, #0742aa 100%);
    color: #fff;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 16px;
    border-bottom: 1px solid #06388e;
}
.window-title {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: .2px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.title-icon { font-size: 22px; }
.xp-controls { display: flex; gap: 6px; }
.xp-control {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(#79b4ff, #3d82ea);
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 4px;
    font-weight: bold;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}
.xp-control.close {
    background: linear-gradient(#ff8a72, #df4a21);
}

.top-menu-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 8px 10px;
    background: linear-gradient(#f3f5f8, #d4dae3);
    border-top: 1px solid rgba(255,255,255,.65);
    border-bottom: 1px solid #7d9bbd;
}
.top-link {
    text-decoration: none;
    padding: 10px 16px;
    border-right: 1px solid #a4b3c6;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
}
.top-link.right { margin-left: auto; }
.top-link:hover { background: rgba(255,255,255,.45); }

.workspace-frame {
    margin: 0;
    padding: 0;
    border-top: 1px solid #fff;
    background: linear-gradient(#2f6fc5, #215ba5);
}

.room-tabs {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 10px 10px 0;
}
.room-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 18px;
    text-decoration: none;
    font-weight: 700;
    font-size: 17px;
    color: #fff;
    background: linear-gradient(#4d87d7, #1d58ac);
    border: 1px solid #1e4d91;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.room-tab.active {
    background: linear-gradient(#ffffff, #eef4fb);
    color: #102b48;
    position: relative;
    top: 1px;
}
.add-tab {
    cursor: default;
    min-width: 54px;
    justify-content: center;
}
.tab-emoji { font-size: 20px; }

.welcome-strip {
    margin: 0 10px;
    background: linear-gradient(#fefefe, #dbe6f2);
    border: 1px solid #7f9fc2;
    border-top: 0;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 700;
}

.chat-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 0;
    min-height: 730px;
    background: #d6e2ef;
    border-top: 1px solid #96b1cf;
}
.chat-panel, .sidebar {
    background: #dbe6f2;
}
.sidebar {
    border-left: 1px solid #89a7c7;
}
.panel-header {
    background: linear-gradient(#fdfefe, #d7e3f0);
    border-bottom: 1px solid #8fa9c6;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 18px;
}
.online-title { font-size: 22px; }

.messages {
    height: 580px;
    overflow-y: auto;
    background: #fff;
    margin: 12px 10px 10px;
    border: 2px inset #b8c9dc;
    padding: 14px 16px;
}
.message-row {
    margin-bottom: 12px;
    line-height: 1.35;
    font-size: 18px;
}
.message-meta {
    color: #44698d;
    font-size: 14px;
    margin-bottom: 3px;
}
.message-name {
    font-weight: 700;
    color: #1748bd;
}
.message-name.admin { color: #b21010; }
.message-name.mod { color: #cc7a00; }
.message-name.self { color: #0e3fa8; }
.message-body { color: #182737; }
.message-body.nudge {
    display: inline-block;
    background: #fff0bf;
    border: 1px solid #d8a53d;
    padding: 6px 10px;
}
.pm-badge {
    display: inline-block;
    background: #fff1cc;
    border: 1px solid #d39c23;
    padding: 2px 6px;
    margin-right: 6px;
    font-size: 12px;
    font-weight: 700;
}
.muted { color: #657c95; }

.compose-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 10px 0;
}
.tool-btn, .retro-select, .message-form button, .context-menu button, .auth-form button {
    min-height: 44px;
    border: 1px solid #6d8db1;
    background: linear-gradient(#ffffff, #dfe7f1);
    color: #17324e;
    padding: 7px 14px;
    cursor: pointer;
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
    font-family: inherit;
    font-size: 16px;
}
.tool-btn:hover, .message-form button:hover, .context-menu button:hover, .auth-form button:hover {
    background: linear-gradient(#fffefa, #f0dfa2);
}
.format-btn {
    min-width: 44px;
    padding-inline: 0;
    font-size: 20px;
}
.retro-select { min-width: 110px; }
.smiley-btn {
    min-width: 44px;
    padding-inline: 8px;
    font-size: 28px;
    line-height: 1;
}
.more-link {
    color: #1448a8;
    font-size: 18px;
    margin: 0 8px 0 4px;
}
.sound-toggle { min-width: 120px; }
.nudge-btn {
    font-weight: 700;
    color: #b01000;
    min-width: 190px;
}

.message-form {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 12px;
    padding: 12px 10px 12px;
}
.message-form input {
    width: 100%;
    min-height: 64px;
    padding: 12px 14px;
    border: 2px inset #b8c9dc;
    font-family: inherit;
    font-size: 17px;
    background: #fff;
}
.send-btn {
    font-size: 22px;
    font-weight: 700;
}

.users {
    padding: 0;
    background: #fff;
    margin: 12px 10px 10px;
    border: 2px inset #b8c9dc;
    min-height: 580px;
    overflow-y: auto;
}
.user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #e0e8f0;
    cursor: context-menu;
    font-size: 18px;
}
.user-row:hover,
.user-row.active {
    background: #2b67c3;
    color: #fff;
}
.user-row:hover .user-role,
.user-row.active .user-role { color: #fff4c8; }
.user-avatar { width: 26px; text-align: center; }
.user-role {
    font-size: 13px;
    color: #b31e1e;
    margin-left: auto;
    text-transform: lowercase;
    font-weight: 700;
}
.sidebar-actions {
    display: flex;
    gap: 8px;
    padding: 0 10px 12px;
}
.sidebar-btn {
    flex: 1;
    justify-content: center;
}

.context-menu {
    position: fixed;
    z-index: 9999;
    background: #f5f7fb;
    border: 1px solid #476d95;
    box-shadow: 0 10px 24px rgba(0,0,0,.28);
    min-width: 240px;
}
.context-menu.hidden { display: none; }
.context-menu button {
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #d6dfeb;
    background: #f8fbff;
}
.context-menu button:last-child { border-bottom: 0; }

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(#f2f5f8, #d5dbe3);
    border-top: 1px solid #7d9bbd;
    font-size: 16px;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
}
.auth-window {
    width: min(520px, calc(100vw - 30px));
    background: #e7f1fb;
    border: 1px solid #345f94;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    padding: 22px;
}
.auth-form { display: grid; gap: 8px; }
.auth-form input {
    padding: 10px;
    border: 1px solid #7d9fc3;
    font-size: 16px;
}
.auth-links { margin-top: 14px; }
.auth-links a { color: #0b3f75; }
.error-box, .success-box {
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid;
}
.error-box { background: #ffe6e6; border-color: #c44; }
.success-box { background: #eafce6; border-color: #5ea35e; }
.admin-window { width: min(980px, calc(100vw - 30px)); }
.admin-table { width: 100%; border-collapse: collapse; background: white; }
.admin-table th, .admin-table td { border: 1px solid #c8d8ea; padding: 8px; text-align: left; }
.emoji { font-size: 24px; }
.shake { animation: shake .35s linear 2; }
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

@media (max-width: 1050px) {
    .chat-layout { grid-template-columns: 1fr; }
    .sidebar { border-left: 0; border-top: 1px solid #89a7c7; }
    .messages { height: 420px; }
    .users { min-height: 260px; }
    .top-link.right { margin-left: 0; }
}


.noselect { user-select: none; }
.pm-root {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10000;
}
.pm-window {
    position: fixed;
    width: 360px;
    height: 340px;
    background: #d7e4f1;
    border: 1px solid #345f94;
    box-shadow: 0 14px 28px rgba(0,0,0,.28);
    pointer-events: auto;
}
.pm-window.active { z-index: 10002; }
.pm-window.flash .pm-header {
    background: linear-gradient(#4d9cff, #0c56cf);
}
.pm-header {
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 8px 0 10px;
    color: #fff;
    font-weight: 700;
    cursor: move;
    background: linear-gradient(#2e7cea 0%, #1158cf 55%, #0742aa 100%);
    border-bottom: 1px solid #06388e;
}
.pm-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
}
.pm-close {
    width: 28px;
    height: 26px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 3px;
    background: linear-gradient(#ff8a72, #df4a21);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.pm-messages {
    height: 254px;
    margin: 8px;
    padding: 10px;
    overflow-y: auto;
    background: #fff;
    border: 2px inset #b8c9dc;
}
.pm-row {
    margin-bottom: 10px;
    max-width: 88%;
}
.pm-row.self { margin-left: auto; }
.pm-row.self .pm-text {
    background: #dcebff;
    border-color: #86a8dd;
}
.pm-row.other .pm-text {
    background: #fff6d5;
    border-color: #d6b55a;
}
.pm-meta {
    font-size: 12px;
    color: #476784;
    margin-bottom: 3px;
}
.pm-text {
    padding: 7px 9px;
    border: 1px solid;
    line-height: 1.35;
    font-size: 15px;
}
.pm-form {
    display: grid;
    grid-template-columns: 1fr 88px;
    gap: 8px;
    padding: 0 8px 8px;
}
.pm-input {
    min-height: 38px;
    padding: 9px 10px;
    border: 2px inset #b8c9dc;
    background: #fff;
    font-size: 15px;
}
.pm-send {
    min-height: 38px;
    border: 1px solid #6d8db1;
    background: linear-gradient(#ffffff, #dfe7f1);
    color: #17324e;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.pm-send:hover { background: linear-gradient(#fffefa, #f0dfa2); }
@media (max-width: 900px) {
    .pm-window {
        width: calc(100vw - 24px);
        left: 12px !important;
        right: auto !important;
        bottom: 12px !important;
    }
}
.message-name.system { color: #0f5a2f; }
.message-body.system { color: #0f5a2f; font-weight: 700; }
.form-stack { max-width: 520px; }
.notice-box {
    border: 1px solid #d39b20;
    background: #fff3c4;
    color: #5d4200;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 4px;
}
.profile-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 12px;
    margin-bottom: 16px;
    background: #eef4fb;
    border: 1px solid #8ca7c5;
    border-radius: 6px;
}
.profile-avatar { font-size: 42px; line-height: 1; }
.profile-name { font-size: 22px; font-weight: 700; color: #12365b; }
.profile-status { margin-top: 6px; color: #214f86; font-weight: 600; }
.auth-form textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #7f9cbb;
    background: #fff;
    border-radius: 4px;
    padding: 10px 12px;
    font: inherit;
}
.admin-action-form { display:flex; flex-direction:column; gap:8px; }
.admin-action-form input[type="text"] { min-height: 36px; }
.admin-action-grid { display:flex; gap:6px; flex-wrap:wrap; }

.msg-color-red{color:#b00000;font-weight:600;}
.msg-color-blue{color:#003ea8;font-weight:600;}
.msg-color-green{color:#146b2d;font-weight:600;}
.msg-color-purple{color:#6a2ca0;font-weight:600;}
.msg-color-orange{color:#b85a00;font-weight:600;}
.message-body strong{font-weight:800;}
.message-body u{text-decoration:underline;text-underline-offset:2px;}

.profile-modal {
    position: fixed;
    inset: 0;
    background: rgba(18,35,58,.45);
    display: grid;
    place-items: center;
    z-index: 9999;
}
.profile-modal.hidden { display: none; }
.profile-dialog {
    width: min(560px, calc(100vw - 30px));
    background: linear-gradient(#fefefe, #dbe6f2);
    border: 1px solid #587da8;
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
    position: relative;
    padding: 18px;
}
.profile-close {
    position: absolute;
    top: 8px;
    right: 8px;
    border: 1px solid #6d8db1;
    background: linear-gradient(#ffffff, #dfe7f1);
    min-width: 34px;
    min-height: 34px;
    cursor: pointer;
}
.profile-card.compact { align-items: flex-start; }
.profile-avatar.big { font-size: 48px; min-width: 72px; }
.profile-bio {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,.7);
    border: 1px solid #a6bcd4;
    line-height: 1.45;
}
.user-name.msg-color-red,.message-name.msg-color-red,.profile-name.msg-color-red{color:#b00000;}
.user-name.msg-color-blue,.message-name.msg-color-blue,.profile-name.msg-color-blue{color:#003ea8;}
.user-name.msg-color-green,.message-name.msg-color-green,.profile-name.msg-color-green{color:#146b2d;}
.user-name.msg-color-purple,.message-name.msg-color-purple,.profile-name.msg-color-purple{color:#6a2ca0;}
.user-name.msg-color-orange,.message-name.msg-color-orange,.profile-name.msg-color-orange{color:#b85a00;}


textarea { padding: 10px; border: 1px solid #7d9fc3; font-size: 16px; font-family: inherit; }
.admin-action-grid { display:grid; grid-template-columns: repeat(4,minmax(90px,1fr)); gap:6px; margin-top:6px; }
.compact-form { margin-top:10px; }
.danger-btn { background: linear-gradient(#ffd7d1,#ffb2a7); }
.smiley-modal.hidden { display:none; }
.smiley-modal { position: fixed; inset:0; background: rgba(0,0,0,.35); z-index:10020; display:grid; place-items:center; }
.smiley-dialog { width:min(620px, calc(100vw - 20px)); background:#dbe6f2; border:1px solid #345f94; box-shadow:0 14px 34px rgba(0,0,0,.28); }
.smiley-grid { display:grid; grid-template-columns: repeat(auto-fill,minmax(56px,1fr)); gap:8px; padding:14px; }
.smiley-close { float:right; border:1px solid #6d8db1; background:linear-gradient(#fff,#dfe7f1); cursor:pointer; }
.theme-dark-night { --xp-text:#eaf2ff; background: radial-gradient(circle at top, #2e3c57, #1c2435 45%, #111724 100%); }
.theme-dark-night .app-shell, .theme-dark-night .auth-window { background:#273247; border-color:#1a2335; color:#eaf2ff; }
.theme-dark-night .top-menu-bar, .theme-dark-night .status-bar, .theme-dark-night .panel-header, .theme-dark-night .welcome-strip, .theme-dark-night .chat-panel, .theme-dark-night .sidebar, .theme-dark-night .compose-toolbar, .theme-dark-night .pm-window, .theme-dark-night .smiley-dialog { background: linear-gradient(#34435f,#253149); color:#eaf2ff; }
.theme-dark-night .messages, .theme-dark-night .users, .theme-dark-night .pm-messages, .theme-dark-night .message-form input, .theme-dark-night .pm-input, .theme-dark-night .auth-form input, .theme-dark-night textarea, .theme-dark-night .admin-table { background:#131b28; color:#eaf2ff; border-color:#4b6287; }
.theme-dark-night .tool-btn, .theme-dark-night .retro-select, .theme-dark-night .message-form button, .theme-dark-night .context-menu button, .theme-dark-night .auth-form button { background: linear-gradient(#465678,#2d3a56); color:#fff; border-color:#6582aa; }
.theme-dark-night .context-menu { background:#1e2737; }
.theme-dark-night .user-row:hover, .theme-dark-night .user-row.active { background:#3a5f9c; }
.theme-dark-night .muted { color:#a8bdd8; }


.cs-modal.hidden { display:none; }
.cs-modal {
    position: fixed;
    inset: 0;
    background: rgba(13, 27, 46, .38);
    display: grid;
    place-items: center;
    z-index: 10050;
}
.cs-modal-box {
    width: min(520px, calc(100vw - 28px));
    background: linear-gradient(#fefefe, #dbe6f2);
    border: 1px solid #587da8;
    box-shadow: 0 18px 42px rgba(0,0,0,.28);
    padding: 18px;
}
.cs-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #143964;
    margin-bottom: 12px;
}
.cs-modal-text {
    color: #1c3958;
    font-size: 16px;
    line-height: 1.45;
    margin-bottom: 12px;
    white-space: pre-wrap;
}
.cs-modal-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #20456f;
}
.cs-modal-label.hidden, .cs-modal-input.hidden { display:none; }
.cs-modal-input {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 2px inset #b8c9dc;
    background: #fff;
    font: inherit;
    font-size: 17px;
}
.cs-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}
.cs-toast-root {
    position: fixed;
    top: 18px;
    right: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10060;
}
.cs-toast {
    min-width: 260px;
    max-width: min(420px, calc(100vw - 36px));
    background: linear-gradient(#fefefe, #dbe6f2);
    border: 1px solid #6f8db0;
    box-shadow: 0 12px 24px rgba(0,0,0,.22);
    padding: 12px 14px;
    color: #16375c;
    font-size: 15px;
    line-height: 1.4;
}
.cs-toast.info { border-left: 6px solid #2e7cea; }
.cs-toast.success { border-left: 6px solid #2f8a3f; }
.cs-toast.warn { border-left: 6px solid #d39b20; }
.cs-toast.error { border-left: 6px solid #c3412f; }
.theme-dark-night .cs-modal-box, .theme-dark-night .cs-toast {
    background: linear-gradient(#34435f,#253149);
    color: #eaf2ff;
    border-color: #6582aa;
}
.theme-dark-night .cs-modal-title, .theme-dark-night .cs-modal-text, .theme-dark-night .cs-modal-label { color:#eaf2ff; }
.theme-dark-night .cs-modal-input { background:#131b28; color:#eaf2ff; border-color:#4b6287; }

.room-announcement { margin: 8px 14px 0; }
.compact-chat .messages { font-size: 14px; }
.compact-chat .message-row { margin-bottom: 8px; }
.compact-chat .message-body { padding: 8px 10px; }
.compact-chat .users .user-row { padding: 10px 12px; }
.admin-window textarea { width: 100%; min-height: 90px; }

/* v16 surprise pack */
.pinned-notice{margin:8px 10px 0 10px;padding:8px 10px;background:#fff8cf;border:1px solid #d0a400;color:#10233c;box-shadow:inset 0 1px #fff}
.pinned-notice.hidden{display:none}.motd-box{border-left:4px solid #2f76d0}.user-row.friend-user .user-name{font-weight:800}.user-row.ignored-user{opacity:.45}.font-small .messages{font-size:13px}.font-normal .messages{font-size:15px}.font-large .messages{font-size:18px}.font-large #messageInput{font-size:18px}.font-small #messageInput{font-size:13px}.admin-table .danger-btn{background:#ffe5e5;color:#8a0000;border-color:#b54}

/* v17: modernere login + rollemerker */
.modern-login-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.32), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(59,110,165,.35), transparent 32%),
    linear-gradient(135deg, #315f8e, #83a9cf);
}
.modern-login-window {
  max-width: 520px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  background: rgba(232,243,255,.92);
  backdrop-filter: blur(8px);
}
.login-brand {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}
.login-brand h1 { margin: 0; }
.login-logo {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(#2b76d2, #0c4f9b);
  color: #fff;
  font-size: 30px;
  box-shadow: inset 0 1px rgba(255,255,255,.45), 0 8px 18px rgba(0,0,0,.22);
}
.primary-login-btn {
  font-weight: 800;
  border-radius: 12px !important;
  background: linear-gradient(#ffffff, #dbeaff) !important;
  border: 1px solid #7da8d7 !important;
}
.role-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 800;
  text-transform: uppercase;
  border: 1px solid rgba(0,0,0,.15);
  background: #eef5ff;
  color: #17436e;
  vertical-align: middle;
}
.role-badge.admin, .user-role.admin {
  background: #ffe9e9;
  color: #a40000;
}
.role-badge.mod, .user-role.mod {
  background: #fff4d8;
  color: #945800;
}
.user-name { font-weight: 700; }

/* v18: login overhaul + gjestemodus */
.pro-login-body { min-height:100vh; display:grid; place-items:center; padding:28px; background: radial-gradient(circle at 10% 15%, rgba(255,255,255,.38), transparent 24%), radial-gradient(circle at 88% 12%, rgba(30,112,220,.45), transparent 30%), radial-gradient(circle at 50% 100%, rgba(8,39,83,.55), transparent 42%), linear-gradient(135deg, #173a68 0%, #4f88bd 48%, #b8d7ef 100%); overflow-x:hidden; }
.pro-login-shell { width:min(1120px, calc(100vw - 28px)); min-height:640px; display:grid; grid-template-columns:1.05fr .95fr; border-radius:28px; overflow:hidden; box-shadow:0 34px 90px rgba(5,18,38,.42); border:1px solid rgba(255,255,255,.45); background:rgba(234,245,255,.38); backdrop-filter:blur(14px); }
.pro-login-hero { position:relative; padding:54px; color:#fff; isolation:isolate; background:linear-gradient(135deg, rgba(7,39,82,.95), rgba(20,98,177,.78)), repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 8px); }
.pro-login-hero:after { content:""; position:absolute; inset:0; background:linear-gradient(115deg, transparent 0 58%, rgba(255,255,255,.13) 58% 100%); z-index:-1; }
.pro-orb { position:absolute; border-radius:999px; filter:blur(.2px); opacity:.55; }
.pro-orb.one { width:170px; height:170px; right:42px; top:42px; background:radial-gradient(circle,#fff,transparent 66%); }
.pro-orb.two { width:230px; height:230px; left:-70px; bottom:-80px; background:radial-gradient(circle,#70c2ff,transparent 67%); }
.pro-login-badge { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.28); font-weight:900; letter-spacing:.08em; font-size:12px; }
.pro-login-hero h1 { margin:58px 0 18px; font-size:clamp(42px,6vw,72px); line-height:.95; letter-spacing:-.06em; text-shadow:0 12px 28px rgba(0,0,0,.28); }
.pro-login-hero p { font-size:20px; line-height:1.55; max-width:560px; color:rgba(255,255,255,.88); }
.pro-feature-grid { margin-top:38px; display:grid; grid-template-columns:repeat(2,minmax(160px,1fr)); gap:12px; }
.pro-feature-grid span { padding:13px 14px; border-radius:16px; background:rgba(255,255,255,.13); border:1px solid rgba(255,255,255,.18); box-shadow:inset 0 1px 0 rgba(255,255,255,.18); font-weight:800; }
.pro-login-card { padding:48px; background:rgba(247,251,255,.94); display:flex; flex-direction:column; justify-content:center; }
.pro-login-top { display:flex; align-items:center; gap:16px; margin-bottom:26px; }
.pro-login-top h2 { margin:0; font-size:32px; letter-spacing:-.03em; color:#11345a; }
.pro-login-logo { width:68px; height:68px; border-radius:22px; display:grid; place-items:center; background:linear-gradient(145deg,#3189ff,#0a4d99); color:#fff; font-size:32px; box-shadow:0 14px 34px rgba(13,77,153,.35), inset 0 1px 0 rgba(255,255,255,.45); }
.pro-auth-form label { font-weight:900; color:#1a436d; }
.pro-auth-form input { border-radius:14px; border:1px solid #9db8d4; background:#fff; box-shadow:inset 0 1px 0 rgba(255,255,255,.7); min-height:46px; }
.password-wrap { display:grid; grid-template-columns:1fr 72px; gap:8px; }
.ghost-small-btn { border-radius:14px; border:1px solid #9db8d4; background:linear-gradient(#fff,#eaf3ff); font-weight:900; cursor:pointer; }
.pro-primary-btn { min-height:52px; margin-top:6px; background:linear-gradient(135deg,#2e86ff,#09539d) !important; color:#fff !important; border:0 !important; box-shadow:0 12px 26px rgba(18,94,181,.32); }
.pro-login-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px; }
.pro-link-btn,.pro-guest-btn { display:grid; place-items:center; min-height:48px; border-radius:14px; border:1px solid #9db8d4; background:linear-gradient(#fff,#eaf3ff); color:#123d69; font-weight:900; text-decoration:none; cursor:pointer; width:100%; font-family:inherit; font-size:15px; box-sizing:border-box; }
.pro-guest-btn { background:linear-gradient(#fff7db,#ffe7a8); border-color:#d4ad42; }
.guest-form { margin:0; }
@media (max-width:860px){ .pro-login-body{padding:14px;} .pro-login-shell{grid-template-columns:1fr; min-height:auto;} .pro-login-hero{padding:34px;} .pro-login-hero h1{margin-top:34px;} .pro-login-card{padding:30px;} .pro-feature-grid{grid-template-columns:1fr;} }
@media (max-width:520px){ .pro-login-actions{grid-template-columns:1fr;} .password-wrap{grid-template-columns:1fr;} }

/* v19 quiz channel */
.quiz-box { border-color:#7b61ff; background:linear-gradient(180deg,#f7f3ff,#eee7ff); color:#24184f; }
.message-body.system:has(+ .nothing) { }

/* v21 guest-name login additions */
.pro-guest-name-form { width: 100%; margin-top: 10px; }
.pro-guest-name-form label { display:block; font-weight:700; margin-bottom:6px; color:#0b2d53; }
.guest-name-row { display:flex; gap:8px; align-items:stretch; }
.guest-name-row input { flex:1; min-width:0; padding:12px 14px; border:1px solid #8fb0d4; border-radius:12px; font-size:16px; background:#fff; }
.guest-name-row .pro-guest-btn { white-space:nowrap; }
@media (max-width:700px){ .guest-name-row { flex-direction:column; } }

/* v22: ryddigere gjestelogin på modern login */
.pro-login-actions.pro-login-actions-v22 {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.pro-login-actions-v22 .pro-link-btn {
  min-height: 50px;
}
.pro-guest-card {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid #c2d5ea;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(235,245,255,.84));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.guest-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.guest-card-head label {
  margin: 0 0 2px 0;
  font-size: 16px;
  font-weight: 900;
  color: #11345a;
}
.guest-pill {
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8f2ff;
  border: 1px solid #b7cde6;
  color: #17436e;
  font-size: 12px;
  font-weight: 900;
}
.pro-guest-card .guest-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  align-items: stretch;
}
.pro-guest-card .guest-name-row input {
  width: 100%;
  box-sizing: border-box;
}
.pro-guest-card .pro-guest-btn {
  min-height: 48px;
}
.guest-note {
  display: block;
  margin-top: 8px;
  line-height: 1.35;
}
@media (max-width: 560px) {
  .guest-card-head { flex-direction: column; }
  .pro-guest-card .guest-name-row { grid-template-columns: 1fr; }
}

/* v23 admin cleanup */
.admin-nav-cards {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap:12px;
  margin:18px 0 24px;
}
.admin-card-link {
  display:block;
  text-decoration:none;
  color:#0b2d53;
  background:linear-gradient(#ffffff,#e8f2fc);
  border:1px solid #8fb0d4;
  border-radius:12px;
  padding:16px 18px;
  box-shadow:0 2px 7px rgba(0,0,0,.08);
}
.admin-card-link:hover {
  background:linear-gradient(#ffffff,#dcecff);
  transform:translateY(-1px);
}
.admin-card-link strong {
  display:block;
  font-size:20px;
  margin-bottom:5px;
}
.admin-card-link span {
  display:block;
  color:#557291;
  font-size:14px;
}
.quiz-filter-form {
  display:grid;
  grid-template-columns: 90px minmax(220px, 1fr) 90px minmax(180px, 260px) auto auto;
  gap:8px;
  align-items:center;
  margin:10px 0 14px;
}
.quiz-filter-form label { margin:0; }
@media (max-width: 850px) {
  .quiz-filter-form { grid-template-columns:1fr; }
}

/* v24: romverktøy + live kontrollrom */
.room-tools{margin-top:12px;border:1px solid #9bb2ca;background:#eef5fc;padding:10px;font-size:13px;box-shadow:inset 0 1px 0 #fff}
.room-tools-title{font-weight:800;color:#0b2b4c;margin:4px 0 6px}
.room-tool-line{margin-bottom:3px}.room-chip{display:inline-block;margin:6px 5px 0 0;padding:3px 7px;border:1px solid #97b3cd;background:#fff;border-radius:12px;font-size:12px}.room-chip.locked{background:#fff1c7;border-color:#d9b54f}.quiz-mini{background:#fff;border:1px solid #bed0e3;padding:7px;margin-top:5px}.quiz-mini.active{background:#fff8d8;border-color:#dbb94f}.quiz-mini-top{margin:6px 0 0 18px;padding:0}.quiz-mini-top li{margin:2px 0}.live-dashboard{display:grid;grid-template-columns:1fr 1fr;gap:16px}.live-card{background:#f4f9ff;border:1px solid #b8cbe0;padding:14px;box-shadow:inset 0 1px 0 #fff}.live-card.wide{grid-column:1 / -1}.live-row{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #d6e2ef;padding:8px 0}.live-message{border-bottom:1px solid #d6e2ef;padding:8px 0;line-height:1.35}@media(max-width:850px){.live-dashboard{grid-template-columns:1fr}}


/* v29: typing indicator + security/admin polish */
.typing-indicator{min-height:18px;padding:4px 10px;font-size:12px;color:#31506f;background:#eef5fc;border-top:1px solid #c9d6e2;font-style:italic}
.typing-indicator.hidden{display:none}
.admin-card .security-badge{display:inline-block;padding:3px 7px;border-radius:10px;background:#eaf6ef;border:1px solid #9ccba9;color:#235b32;font-size:12px}


/* v30 / 3.0: responsive layout + functional chrome */
.xp-control{appearance:none;border:1px solid rgba(0,0,0,.35);background:linear-gradient(#fff,#c7d7ea);min-width:24px;height:20px;margin-left:3px;border-radius:2px;font-weight:bold;line-height:16px;cursor:pointer;color:#123;box-shadow:inset 0 1px rgba(255,255,255,.8)}
.xp-control.close{background:linear-gradient(#ffd4d4,#d66060);color:#fff}.xp-control:hover{filter:brightness(1.08)}
.top-link.disabled{opacity:.65;cursor:default;pointer-events:none}.message-row.search-hit,.user-row.search-hit{outline:2px solid #ffc400;background:#fff7bf!important;border-radius:4px}
.app-shell.window-minimized .workspace-frame,.app-shell.window-minimized .status-bar{display:none}.app-shell.window-minimized{max-width:760px;margin:10px auto}.app-shell.window-compact-mode{max-width:920px;margin:10px auto}.app-shell.window-compact-mode .messages{height:44vh}.profile-card .guest-note{margin-top:8px;color:#777}.help-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}.help-section{background:rgba(255,255,255,.72);border:1px solid #9fb3c8;border-radius:8px;padding:12px}.help-section h2{margin-top:0}.help-section code{background:#eef4fb;border:1px solid #c8d7e6;border-radius:4px;padding:1px 4px}.help-hero{background:linear-gradient(135deg,#edf6ff,#d5e8ff);border:1px solid #9fb3c8;border-radius:10px;padding:14px;margin-bottom:14px}.responsive-note{font-size:.92em;color:#31506e}
@media (max-width: 1100px){
  body{overflow:auto}.app-shell{width:calc(100vw - 16px);margin:8px;max-width:none}.top-menu-bar{display:flex;flex-wrap:wrap;gap:4px}.top-link{padding:6px 8px}.room-tabs{overflow-x:auto;white-space:nowrap;padding-bottom:4px}.chat-layout{grid-template-columns:1fr 220px;gap:8px}.messages{height:calc(100vh - 330px);min-height:260px}.compose-toolbar{flex-wrap:wrap}.pm-window{max-width:calc(100vw - 24px);max-height:calc(100vh - 28px)}
}
@media (max-width: 820px){
  .chat-layout{grid-template-columns:1fr}.sidebar{order:2}.chat-panel{order:1}.users{max-height:160px;overflow:auto}.messages{height:calc(100vh - 390px);min-height:240px}.window-title{font-size:13px}.pro-login-shell{grid-template-columns:1fr}.pro-login-hero{display:none}.message-form{display:grid;grid-template-columns:1fr auto}.compose-toolbar{max-height:84px;overflow:auto}.status-bar{font-size:12px}.sidebar-actions{display:flex;gap:6px;flex-wrap:wrap}
}
@media (max-height: 760px){
  .app-shell{margin-top:4px;margin-bottom:4px}.top-menu-bar{padding:4px}.workspace-frame{padding:6px}.room-tabs{margin-bottom:4px}.welcome-strip,.notice-box,.quiz-box,.motd-box{padding:5px 8px;margin:4px 0}.messages{height:calc(100vh - 310px);min-height:220px}.compose-toolbar{padding:4px}.status-bar{padding:4px 8px}.panel-header{padding:5px 8px}.message-form input{padding:8px}
}
@media (max-height: 620px){.messages{height:240px}.welcome-strip,.motd-box,.quiz-box{display:none}.sidebar{font-size:12px}.room-tools{display:none}}


/* v31 / 3.1: pro profile, command hints and tighter responsive mode */
.profile-pro-grid{display:grid;grid-template-columns:minmax(260px,340px) 1fr;gap:18px;align-items:start}.profile-preview-card{background:linear-gradient(#fff,#edf5ff);border:1px solid #a8bed6;border-radius:12px;padding:14px;box-shadow:inset 0 1px 0 #fff}.profile-badges{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}.profile-badges span{display:inline-block;background:#fff4c6;border:1px solid #d5b24e;border-radius:999px;padding:4px 8px;font-weight:800;font-size:12px}.profile-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0}.profile-stat-grid.mini{grid-template-columns:repeat(3,1fr)}.profile-stat-grid div{background:#fff;border:1px solid #c5d5e6;border-radius:9px;padding:9px;text-align:center}.profile-stat-grid strong{display:block;font-size:20px;color:#0b4ca8}.profile-stat-grid span{font-size:12px;color:#526c86}.profile-mini-preview{background:#f8fbff;border:1px dashed #9bb4cf;border-radius:9px;padding:10px;margin-top:10px}.command-hint{margin:6px 10px 0;background:#fff9d9;border:1px solid #d8b84c;border-radius:7px;padding:7px 9px;font-size:13px}.command-hint.hidden{display:none}.command-hint button{margin:2px 3px;border:1px solid #bda44b;background:#fff;border-radius:4px;padding:3px 6px;cursor:pointer}.command-hint button:hover{background:#ffef9e}.message-row{transition:background .15s ease}.message-row:hover{background:#f4f9ff}.profile-modal .profile-dialog{max-width:640px}.profile-modal .profile-stat-grid{margin-top:10px}.window-compact-mode .chat-layout{min-height:520px}.window-compact-mode .sidebar{font-size:13px}.window-compact-mode .top-link{padding:7px 10px}.window-compact-mode .room-tab{padding:7px 12px;min-height:32px}.window-compact-mode .welcome-strip{padding:8px 10px;font-size:15px}
@media (max-width: 980px){.profile-pro-grid{grid-template-columns:1fr}.profile-stat-grid{grid-template-columns:repeat(2,1fr)}.window-title{font-size:15px}.chat-layout{min-height:auto}.messages{margin:8px;height:calc(100vh - 300px)}.sidebar{max-height:260px;overflow:auto}.compose-toolbar .tool-btn,.retro-select{min-height:34px;font-size:13px;padding:5px 8px}.smiley-btn{font-size:20px}.message-form{padding:8px;gap:8px}.message-form input{font-size:16px}.message-form button{min-width:86px}}
@media (max-width: 680px){.xp-titlebar{min-height:38px;padding-left:8px}.xp-controls .xp-control{width:28px;height:26px}.room-tab{font-size:13px;padding:7px 10px}.welcome-strip{font-size:14px}.messages{height:calc(100vh - 360px);min-height:210px}.message-row{font-size:14px}.message-meta{font-size:11px}.panel-header{font-size:14px}.pm-window{left:8px!important;right:auto!important;top:8px!important;width:calc(100vw - 16px)!important}.pm-messages{max-height:45vh}}
@media (max-height: 700px){.chat-layout{min-height:auto}.top-menu-bar{gap:1px}.top-link{font-size:13px;padding:5px 7px}.room-tab{min-height:30px;padding:5px 10px}.messages{height:calc(100vh - 285px);min-height:190px}.compose-toolbar{gap:4px}.tool-btn,.retro-select,.message-form button{min-height:32px}.status-bar{display:none}.room-tools{font-size:12px}.users{max-height:190px;overflow:auto}}


/* v3.2 - prettier command help and real guest profile blocking */
.cs-modal.wide .cs-modal-box,
#chatspaceModal.wide .cs-modal-box {
  width: min(980px, calc(100vw - 28px));
  max-height: min(86vh, 820px);
  overflow: auto;
}
.command-help-pro { text-align:left; color:#082747; }
.command-help-intro {
  display:flex; flex-direction:column; gap:5px;
  padding:14px 16px; margin-bottom:14px;
  border:1px solid #9bb8d7; border-radius:12px;
  background:linear-gradient(#f7fbff,#dfeeff);
}
.command-help-intro strong { font-size:24px; }
.command-help-intro span { color:#54708f; }
.command-help-grid {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;
}
.command-help-grid section {
  border:1px solid #b7cce3; border-radius:12px; background:#f7fbff; padding:12px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.command-help-grid h3 { margin:0 0 9px; font-size:18px; color:#0a3f77; }
.command-help-grid p { margin:6px 0; line-height:1.35; }
.command-help-grid code {
  background:#e4eef9; border:1px solid #bbcee4; border-radius:6px; padding:1px 5px; white-space:nowrap;
}
.command-help-foot { margin-top:12px; padding:10px 12px; border-radius:10px; background:#fff3c8; border:1px solid #d8b84a; }
.guest-no-profile p { font-size:18px; line-height:1.45; color:#294765; }
@media (max-width:760px) { .command-help-grid { grid-template-columns:1fr; } }


/* v33 / 3.3: ryddigere adminpanel + søk + sikkerhetskort */
.admin-control-panel{margin:20px 0}.admin-section-card{background:rgba(255,255,255,.42);border:1px solid #9bb7d3;border-radius:12px;margin:16px 0;padding:14px 16px;box-shadow:0 2px 10px rgba(0,0,0,.05)}
.admin-section-card>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px}.admin-section-card>summary::-webkit-details-marker{display:none}.admin-section-card>summary h2{margin:0}.admin-section-card>summary:after{content:'▾';margin-left:auto;color:#315a83;font-weight:900}.admin-section-card:not([open])>summary:after{content:'▸'}
.admin-section-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:12px}.admin-search{min-width:280px;max-width:430px;width:35%;padding:12px;border:1px solid #8fb0d4;border-radius:10px;background:#fff;font-size:15px;box-shadow:inset 0 1px 2px rgba(0,0,0,.05)}
.admin-settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:14px;max-width:none}.admin-settings-card{background:linear-gradient(#fff,#eef6ff);border:1px solid #91aed0;border-radius:12px;padding:0;overflow:hidden;box-shadow:0 2px 7px rgba(0,0,0,.07)}
.admin-settings-card summary{padding:13px 16px;font-weight:900;font-size:18px;color:#0b2d53;background:linear-gradient(#f8fbff,#e2effd);border-bottom:1px solid #bdd0e5;cursor:pointer;list-style:none}.admin-settings-card summary::-webkit-details-marker{display:none}.settings-card-body{padding:14px 16px;display:grid;gap:8px}.settings-card-body input[type=number],.settings-card-body input[type=text],.settings-card-body select,.settings-card-body textarea{width:100%;box-sizing:border-box}.settings-two-col{grid-template-columns:minmax(180px,1fr) minmax(140px,220px);align-items:center}.settings-two-col label:has(input[type=checkbox]){grid-column:1/-1}.settings-wide{grid-column:1/-1}.admin-savebar{grid-column:1/-1;position:sticky;bottom:8px;background:rgba(226,240,252,.88);border:1px solid #91aed0;border-radius:12px;padding:10px;backdrop-filter:blur(3px);box-shadow:0 -2px 10px rgba(0,0,0,.08)}.admin-savebar button{font-weight:900;font-size:16px}
@media(max-width:820px){.admin-section-head{display:block}.admin-search{width:100%;max-width:none;min-width:0}.admin-settings-grid{grid-template-columns:1fr}.settings-two-col{grid-template-columns:1fr}.admin-section-card{padding:10px}.admin-table{font-size:13px}}

/* v3.4 rich compose */
.format-btn.active, .clear-format-btn:active {
    background: linear-gradient(#ffeaa0, #f0c150);
    border-color: #a77b00;
    box-shadow: inset 0 2px 4px rgba(0,0,0,.18);
}
.clear-format-btn { min-width: 48px; font-weight: 800; }
.active-format-label {
    font-size: 13px;
    color: #426488;
    background: rgba(255,255,255,.55);
    border: 1px solid #9fb9d5;
    padding: 6px 9px;
    border-radius: 4px;
}
#messageInput.compose-bold { font-weight: 800; }
#messageInput.compose-italic { font-style: italic; }
#messageInput.compose-underline { text-decoration: underline; }
#messageInput.compose-color-blue { color: #004ec2; }
#messageInput.compose-color-red { color: #c01818; }
#messageInput.compose-color-green { color: #117a24; }
#messageInput.compose-color-purple { color: #7930a8; }
#messageInput.compose-color-orange { color: #d56800; }
#messageInput.compose-bold::placeholder,
#messageInput.compose-italic::placeholder,
#messageInput.compose-underline::placeholder { font-weight: normal; font-style: normal; text-decoration: none; }
.command-suggestion { animation: suggestPop .12s ease-out; }
@keyframes suggestPop { from { transform: translateY(3px); opacity: .75; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 980px){ .active-format-label{display:none}.clear-format-btn{min-width:40px} }


/* v35 / 3.5: reactions, notification center, hovercards, PM minimize, status and themes */
.notice-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;border-radius:999px;background:#d60000;color:#fff;font-size:11px;font-weight:900;margin-left:4px;padding:0 5px}.notice-badge.hidden{display:none}
.notification-panel{position:fixed;right:18px;top:92px;width:330px;max-height:70vh;overflow:auto;background:#eef6ff;border:1px solid #5f86b0;box-shadow:0 12px 30px rgba(0,0,0,.28);z-index:9000;border-radius:10px;padding:10px}.notification-panel.hidden{display:none}.notification-list{display:grid;gap:7px;margin:8px 0}.notification-item{background:#fff;border:1px solid #c5d8ec;border-radius:8px;padding:8px}.notification-item.unread{border-color:#dfaa25;background:#fff8dc}.connection-banner{position:fixed;left:50%;top:8px;transform:translateX(-50%);z-index:10000;background:#fff0c7;border:1px solid #d39b14;color:#5a3600;border-radius:999px;padding:8px 16px;box-shadow:0 6px 18px rgba(0,0,0,.2);font-weight:800}.connection-banner.hidden{display:none}
.message-reactions{margin:2px 0 7px 78px;display:flex;gap:4px;opacity:.72}.message-row:hover .message-reactions{opacity:1}.reaction-btn{border:1px solid #b5cce4;background:linear-gradient(#fff,#e7f1fb);border-radius:999px;padding:2px 7px;cursor:pointer;font-size:12px;line-height:1.3}.reaction-btn:hover{background:#fff7d2;border-color:#d0aa22}.reaction-btn.active{background:#ffe48d;border-color:#c38d00;font-weight:900}.message-body.system+.message-reactions{display:none}
.user-status-dot{display:inline-block;margin-right:4px;font-size:12px}.user-row.status-away{opacity:.82}.user-row.status-busy .user-name{font-weight:900}.user-row.status-invisible{opacity:.65}.hover-card{position:fixed;z-index:9500;width:220px;background:linear-gradient(#ffffff,#eaf4ff);border:1px solid #7ea2c7;border-radius:10px;box-shadow:0 10px 24px rgba(0,0,0,.26);padding:10px;color:#0b2d53;font-size:13px;pointer-events:none}.hover-card.hidden{display:none}.hover-card strong{font-size:16px;color:#004aa8}
.pm-header{gap:5px}.pm-min,.pm-close{border:1px solid rgba(255,255,255,.7);background:rgba(255,255,255,.22);color:#fff;border-radius:4px;min-width:24px;height:22px;font-weight:900;cursor:pointer}.pm-min:hover,.pm-close:hover{background:rgba(255,255,255,.38)}.pm-window.minimized{height:auto!important;min-height:0}.pm-window.minimized .pm-messages,.pm-window.minimized .pm-form{display:none}.pm-window.minimized .pm-header{border-bottom:0}.pm-window.flash{animation:pmFlash .7s ease-in-out 2}@keyframes pmFlash{0%,100%{filter:none}50%{filter:brightness(1.22);box-shadow:0 0 0 3px rgba(255,215,0,.7),0 12px 28px rgba(0,0,0,.3)}}
.theme-classic-gray{background:linear-gradient(#9ca9b6,#677889)}.theme-classic-gray .xp-titlebar{background:linear-gradient(#717b86,#4e5965)}.theme-classic-gray .workspace-frame,.theme-classic-gray .admin-window,.theme-classic-gray .auth-window{background:#d8dde3}.theme-classic-gray .room-tab.active{background:#f4f4f4;color:#111}.theme-classic-gray .panel-header{background:linear-gradient(#eef0f3,#cdd5df)}
.theme-forest-terminal{background:linear-gradient(#264034,#0d1c16);color:#d9ffe8}.theme-forest-terminal .xp-titlebar{background:linear-gradient(#075b35,#013d22)}.theme-forest-terminal .workspace-frame,.theme-forest-terminal .admin-window,.theme-forest-terminal .auth-window{background:#dff3e8;color:#082515}.theme-forest-terminal .room-tab{background:linear-gradient(#1f7b4a,#0c4f2e)}.theme-forest-terminal .room-tab.active{background:#edfff5;color:#07391f}.theme-forest-terminal .messages,.theme-forest-terminal .users{background:#fbfffd}.theme-forest-terminal .panel-header{background:linear-gradient(#e8fff1,#c7ead5)}
@media(max-width:720px){.notification-panel{left:10px;right:10px;top:70px;width:auto}.message-reactions{margin-left:8px;flex-wrap:wrap}.hover-card{display:none!important}}


/* v3.6 - better help window and safer invisible mode */
.v36-help .command-help-intro{background:linear-gradient(135deg,#f9fcff,#dbeeff);border-color:#86abd2}
.v36-help .command-help-grid{grid-template-columns:repeat(2,minmax(280px,1fr));}
.v36-help .command-help-grid section{min-height:0;}
.v36-help .command-help-grid code{background:#eaf3ff;border:1px solid #bfd3ea;border-radius:5px;padding:1px 5px;white-space:nowrap}
.v36-help .command-help-foot{margin-top:12px;padding:10px 12px;border:1px solid #b7cce3;border-radius:10px;background:#fff9d7;color:#4b3a00}
.user-row.status-invisible{background:linear-gradient(90deg,#f3f3f3,#ffffff);border-left:3px solid #777;opacity:.9}
.user-row.status-invisible .user-name::after{content:' (usynlig)';font-size:11px;color:#666;font-weight:700;margin-left:4px}
.muted-text{font-size:13px;color:#5b7897;margin:4px 0 8px;line-height:1.35}
@media (max-width:720px){.v36-help .command-help-grid{grid-template-columns:1fr}.command-help-intro strong{font-size:20px}}

/* v3.8 community polish */
.profile-avatar.big img,
.user-avatar.img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.user-avatar.img {
  display: inline-flex;
  width: 22px;
  height: 22px;
  vertical-align: middle;
  border: 1px solid rgba(0,0,0,.25);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.level-badge {
  display: inline-block;
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid #8ba9ca;
  border-radius: 999px;
  background: linear-gradient(#fff7cf,#ffe799);
  color: #664400;
  margin-left: 4px;
  font-weight: 700;
}
.profile-level {
  display: inline-block;
  margin: 4px 0;
  padding: 3px 8px;
  background: #fff4bf;
  border: 1px solid #e0b84f;
  border-radius: 8px;
  color: #5a3e00;
  font-weight: 700;
}
.report-message-btn {
  margin-left: 42px;
  margin-top: 2px;
  border: 0;
  background: transparent;
  color: #6e86a4;
  cursor: pointer;
  opacity: .25;
  font-size: 13px;
}
.message-row:hover .report-message-btn { opacity: 1; }
.report-message-btn:hover { color: #b00000; transform: scale(1.08); }
.v38-help .command-help-intro { background: linear-gradient(#eaf5ff,#d8eaff); }

.room-tab.add-tab { font: inherit; cursor: pointer; border: 1px solid #1f5b9d; }
.room-tab.add-tab:hover { filter: brightness(1.08); }


/* v4.2 notification center polish */
.notification-panel {
    max-width: 420px;
}
.notification-actions {
    display: flex;
    gap: 8px;
    padding-top: 10px;
    align-items: center;
}
.notification-item {
    position: relative;
    padding: 12px 38px 12px 12px;
    margin: 8px 0;
    border: 1px solid #b7cce4;
    border-radius: 10px;
    background: linear-gradient(#ffffff, #edf5ff);
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.notification-item.unread {
    border-color: #5c94d6;
    background: linear-gradient(#fffdf0, #eef6ff);
}
.notification-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    line-height: 18px;
    border: 1px solid #a9bdd4;
    border-radius: 50%;
    background: #fff;
    color: #a32020;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}
.notification-delete:hover {
    background: #ffe9e9;
    border-color: #c44;
}
.danger-soft {
    color: #9b0000;
    border-color: #b94a48 !important;
}

.report-message-btn,
.message-report-btn,
[data-report-message],
.report-flag {
    font-size: 20px !important;
    padding: 4px 8px !important;
}
