: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}}
