/* General Resets & CSS Variables */
:root {
    --font-primary: 'Outfit', sans-serif;
    
    /* OneCo Corporate Colors */
    --oneco-purple: #6d1d6c;
    --oneco-purple-dark: #412050;
    --oneco-green: #1c9d5b;
    --oneco-teal: #007058;
    --oneco-orange: #f6931d;
    --oneco-blue: #1867b3;
    
    /* Theme: Ledig (Emerald Green) */
    --ledig-bg-start: #04140e;
    --ledig-bg-end: #010604;
    --ledig-glow: rgba(28, 157, 91, 0.12);
    --ledig-accent: var(--oneco-green);
    --ledig-accent-glow: rgba(28, 157, 91, 0.35);
    
    /* Theme: Opptatt (Crimson Red) */
    --opptatt-bg-start: #1c060b;
    --opptatt-bg-end: #070102;
    --opptatt-glow: rgba(239, 68, 68, 0.12);
    --opptatt-accent: #ef4444;
    --opptatt-accent-glow: rgba(239, 68, 68, 0.35);

    /* Theme: Starter Snart / Møte avsluttes snart (Amber/Orange) */
    --orange-bg-start: #1a0f03;
    --orange-bg-end: #070400;
    --orange-glow: rgba(246, 147, 29, 0.12);
    --orange-accent: var(--oneco-orange);
    --orange-accent-glow: rgba(246, 147, 29, 0.35);

    /* Theme: OneCo Purple (Brand Mode) */
    --purple-bg-start: #150616;
    --purple-bg-end: #050105;
    --purple-glow: rgba(109, 29, 108, 0.15);
    --purple-accent: var(--oneco-purple);
    --purple-accent-glow: rgba(109, 29, 108, 0.4);

    /* Active Colors (defaults to Ledig) */
    --bg-start: var(--ledig-bg-start);
    --bg-end: var(--ledig-bg-end);
    --glow-color: var(--ledig-glow);
    --accent-color: var(--ledig-accent);
    --accent-glow: var(--ledig-accent-glow);

    /* Common Card Styles */
    --card-bg: rgba(255, 255, 255, 0.025);
    --card-border: rgba(255, 255, 255, 0.05);
    --card-border-hover: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    transition: background 1s ease, color 0.5s ease;
}

/* Theme states applied to body */
body.theme-ledig {
    --bg-start: var(--ledig-bg-start);
    --bg-end: var(--ledig-bg-end);
    --glow-color: var(--ledig-glow);
    --accent-color: var(--ledig-accent);
    --accent-glow: var(--ledig-accent-glow);
}

body.theme-opptatt {
    --bg-start: var(--opptatt-bg-start);
    --bg-end: var(--opptatt-bg-end);
    --glow-color: var(--opptatt-glow);
    --accent-color: var(--opptatt-accent);
    --accent-glow: var(--opptatt-accent-glow);
}

body.theme-orange {
    --bg-start: var(--orange-bg-start);
    --bg-end: var(--orange-bg-end);
    --glow-color: var(--orange-glow);
    --accent-color: var(--orange-accent);
    --accent-glow: var(--orange-accent-glow);
}

body.theme-purple-brand {
    --bg-start: var(--purple-bg-start);
    --bg-end: var(--purple-bg-end);
    --glow-color: var(--purple-glow);
    --accent-color: var(--purple-accent);
    --accent-glow: var(--purple-accent-glow);
}

/* Background Glow Effects */
.glow-bg {
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    transition: background 1s ease;
    filter: blur(90px);
}

/* Container Layout */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 2.2rem;
    position: relative;
    z-index: 1;
}

/* Header Styling */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
}

.room-info-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand-logo-container {
    height: 55px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    padding: 0.4rem 1rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    max-height: 100%;
    object-fit: contain;
}

.room-details {
    display: flex;
    flex-direction: column;
}

.room-name {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.room-badge {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.time-info {
    text-align: right;
}

.current-time {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.current-date {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: capitalize;
    margin-top: 0.2rem;
}

/* Main Content Grid */
.main-content {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 2rem;
    flex-grow: 1;
    min-height: 0;
}

/* Card Common Styling (Glassmorphism) */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(30px) saturate(170%);
    -webkit-backdrop-filter: blur(30px) saturate(170%);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: clamp(1.2rem, 2.2vh, 2.2rem);
    box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.3);
    transition: border 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.glass-card:hover {
    border-color: var(--card-border-hover);
    box-shadow: 0 20px 56px 0 rgba(0, 0, 0, 0.4);
}

/* Left Column: Status Card */
.status-panel {
    display: flex;
    flex-direction: column;
    gap: clamp(0.8rem, 1.8vh, 2rem);
    min-height: 0;
    flex: 1 1 0px;
}

.status-card {
    flex-grow: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 8px solid var(--accent-color);
    transition: border-color 0.5s ease;
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--glow-color) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    transition: background 1s ease;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    z-index: 1;
}

.pulse-ring {
    width: 16px;
    height: 16px;
    background-color: var(--accent-color);
    border-radius: 50%;
    position: relative;
    transition: background-color 0.5s ease;
}

.pulse-ring::after {
    content: '';
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    animation: pulse 2s infinite;
    transition: background-color 0.5s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

.status-label {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    transition: color 0.5s ease;
}

.meeting-details {
    margin: clamp(0.6rem, 1.5vh, 1.8rem) 0;
    z-index: 1;
}

.meeting-subject {
    font-size: clamp(1.5rem, 3.8vh, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.8px;
    margin-bottom: clamp(0.5rem, 1.2vh, 1.2rem);
    overflow-wrap: break-word;
    word-break: break-word;
}

.meeting-meta {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.meeting-meta p {
    font-size: 1.25rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.meeting-meta i {
    color: var(--accent-color);
    transition: color 0.5s ease;
    width: 24px;
    text-align: center;
}

/* Meeting Progress Bar Widget */
.progress-bar-container {
    z-index: 1;
    margin-bottom: 2rem;
}

.progress-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.progress-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color) 0%, #ffffff 150%);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.progress-time-left {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0.6rem;
    color: var(--text-main);
}

.status-notice {
    font-size: 1.05rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem 1.6rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: inline-flex;
    align-items: center;
    width: fit-content;
    z-index: 1;
}

.status-notice i {
    margin-right: 0.6rem;
    color: var(--accent-color);
}

/* Right Column: Info Panel (Schedule & QR) */
.info-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Schedule Card */
.schedule-card {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

.schedule-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.schedule-card h3 i {
    color: var(--accent-color);
}

.schedule-list {
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.5rem;
}

.schedule-list::-webkit-scrollbar {
    width: 6px;
}

.schedule-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
    border-radius: 10px;
}

.schedule-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.schedule-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.schedule-item {
    display: grid;
    grid-template-columns: 125px 1fr;
    padding: 1.1rem;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 18px;
    align-items: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.schedule-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.schedule-item.active {
    border-left: 5px solid var(--accent-color);
    background: rgba(255, 255, 255, 0.02);
}

.item-time {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
}

.item-subject {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}

.item-organizer {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* QR Code Card */
.qr-card {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 1.8rem);
    padding: clamp(0.8rem, 1.8vh, 1.8rem);
    overflow: hidden;
}

.qr-container {
    background: #ffffff;
    padding: 0.6rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    overflow: hidden;
    max-width: 100%;
}

#qrcode {
    width: clamp(90px, 12vh, 150px);
    height: clamp(90px, 12vh, 150px);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 12px;
}

#qrcode canvas,
#qrcode img,
#qrcode svg {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 8px;
}

.qr-info h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.qr-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Footer Styling */
.main-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: clamp(0.6rem, 1.5vh, 1.8rem);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: clamp(0.5rem, 1vh, 1.2rem);
    flex-shrink: 0;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.levert-av-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.brand-logo-container-footer {
    height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    padding: 0.4rem 1.2rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-footer {
    max-height: 100%;
    object-fit: contain;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.online {
    background-color: var(--oneco-green);
    box-shadow: 0 0 10px var(--oneco-green);
}

.status-dot.offline {
    background-color: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

.btn-connect-ms {
    background: var(--oneco-purple, #6d1d6c);
    color: white;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.btn-connect-ms:hover {
    background: #501250;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(109, 29, 108, 0.3);
}

.btn-connect-ms:active {
    transform: translateY(0);
}

.developer-info-badge {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.developer-info-badge:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.demo-badge {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--oneco-orange, #f59e0b);
    padding: 0.3rem 0.7rem;
    border-radius: 10px;
    text-transform: uppercase;
}

.levert-av {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.levert-av strong {
    color: var(--text-main);
}

.btn-settings {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-settings:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--card-border-hover);
    transform: rotate(35deg);
}

/* Modals Common */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1.2rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.btn-close:hover {
    color: var(--text-main);
}

/* Settings Modal Specific */
.settings-card-layout {
    width: 650px;
    max-width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.scrollable-modal-body {
    overflow-y: auto;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.scrollable-modal-body::-webkit-scrollbar {
    width: 6px;
}

.scrollable-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.settings-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 1.5rem;
}

.settings-section:last-of-type {
    border-bottom: none;
}

.settings-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 0.8rem 1.1rem;
    color: var(--text-main);
    font-family: var(--font-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-group select option {
    background: #0d0607;
    color: var(--text-main);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus {
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 0 12px rgba(74, 189, 172, 0.2);
}

.form-group.row {
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.form-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.btn-save {
    background: var(--accent-color);
    border: none;
    color: #ffffff;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1rem;
    border-radius: 14px;
    cursor: pointer;
    transition: filter 0.3s ease;
    width: 100%;
}

.btn-save:hover {
    filter: brightness(1.15);
}

/* PIN Keyboard Modal Specific */
.pin-card {
    width: 320px;
    text-align: center;
    animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.pin-display {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.pin-dot.filled {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-color);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    width: 100%;
}

.pin-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    transition: all 0.2s ease;
}

.pin-btn:active, .pin-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--card-border-hover);
    transform: scale(1.05);
}

.pin-btn.clear, .pin-btn.cancel {
    background: none;
    border: none;
    color: var(--text-muted);
}

.pin-btn.clear:hover {
    color: #ef4444;
}

.pin-btn.cancel:hover {
    color: var(--text-main);
}

.pin-error {
    color: #ef4444;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
}

/* LOCKDOWN OVERLAY STYLE */
.lockdown-overlay {
    display: none; /* Controlled by JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, #2d0a11 0%, #080203 100%);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.lockdown-content {
    width: 450px;
    max-width: 90%;
    text-align: center;
    border-top: 6px solid #ef4444;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.lock-icon {
    font-size: 4rem;
    color: #ef4444;
    animation: lockPulse 2s infinite;
}

@keyframes lockPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 15px #ef4444); }
    100% { transform: scale(1); opacity: 0.8; }
}

.lockdown-ip {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-muted);
}

.btn-unlock-admin {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-unlock-admin:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--card-border-hover);
}

/* NIGHT MODE COVER STYLE */
.night-mode-cover {
    display: none; /* Controlled by JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #010403;
    z-index: 150;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.night-mode-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    color: rgba(255, 255, 255, 0.25);
}

.night-mode-content i {
    font-size: 3rem;
    animation: moonFloating 4s ease-in-out infinite;
}

@keyframes moonFloating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

#nightTime {
    font-size: 6rem;
    font-weight: 800;
    letter-spacing: -2px;
}

.night-notice {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* Developer Info Modal Specific */
.dev-card {
    width: 420px;
    animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dev-contact-details {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 1.25rem;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
}

.contact-row i {
    color: var(--accent-color);
    width: 20px;
    font-size: 1.1rem;
    text-align: center;
}

.contact-row a {
    color: var(--accent-color);
    text-decoration: none;
}

.contact-row a:hover {
    text-decoration: underline;
}

.dev-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.dev-version-badge {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.8rem;
    letter-spacing: 0.5px;
}

@keyframes modalSlide {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive adjustments for tablet / desktop resizing */
@media (max-width: 1100px) {
    .container {
        padding: 1.5rem;
    }
    .main-content {
        gap: 1.5rem;
    }
    .room-name {
        font-size: 1.8rem;
    }
    .current-time {
        font-size: 2.8rem;
    }
    .status-label {
        font-size: 1.2rem;
    }
    .meeting-subject {
        font-size: 1.6rem;
    }
}

@media (max-width: 900px) {
    /* Stack panels vertically on tablet portrait or small displays */
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        overflow-y: auto;
        gap: 1.5rem;
    }
    .container {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }
    .schedule-card {
        height: 400px; /* give it a fixed height when stacked so it doesn't expand infinitely */
    }
    .main-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        text-align: center;
    }
    .footer-left {
        flex-direction: column;
        gap: 0.8rem;
    }
    .footer-right {
        margin-top: 0.5rem;
    }
}

@media (max-height: 850px) {
    /* Adjustments for low-height devices to prevent vertical overflow */
    .container {
        padding: 1rem;
    }
    .main-header {
        margin-bottom: 1rem;
    }
    .main-footer {
        margin-top: 1rem;
        padding-top: 0.8rem;
    }
    .room-name {
        font-size: 2.2rem;
    }
    .room-badge {
        font-size: 0.95rem;
    }
    .current-time {
        font-size: 3.5rem;
    }
    .current-date {
        font-size: 1.15rem;
    }
    .meeting-subject {
        font-size: 1.5rem;
    }
    .glass-card {
        padding: 1.5rem;
    }
    .status-panel {
        gap: 1rem;
    }
    .schedule-item {
        padding: 0.8rem;
    }
    #qrcode {
        width: 120px;
        height: 120px;
    }
}

/* OTHER ROOMS STATUS MODAL & DASHBOARD BUTTON STYLING */
.btn-check-other-rooms {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 0.9rem 1.6rem;
    border-radius: 18px;
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.btn-check-other-rooms:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--card-border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.btn-check-other-rooms:active {
    transform: translateY(0);
}

.other-rooms-modal {
    z-index: 130 !important;
}

.other-rooms-card-layout {
    width: 90% !important;
    max-width: 1200px !important;
    max-height: 85vh !important;
    display: flex;
    flex-direction: column;
    animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.other-rooms-grid-container {
    overflow-y: auto;
    flex-grow: 1;
    padding: 1.5rem 0.5rem;
    min-height: 0;
}

.other-rooms-grid {
    display: grid;
    gap: 1.5rem;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.other-room-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.other-room-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--card-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.other-room-card.ledig {
    border-top: 5px solid var(--oneco-green);
    box-shadow: inset 0 8px 20px -8px rgba(16, 185, 129, 0.1);
}

.other-room-card.opptatt {
    border-top: 5px solid #ef4444;
    box-shadow: inset 0 8px 20px -8px rgba(239, 68, 68, 0.1);
}

.other-room-card.starting-soon,
.other-room-card.ending-soon {
    border-top: 5px solid var(--oneco-orange);
    box-shadow: inset 0 8px 20px -8px rgba(245, 158, 11, 0.1);
}

.other-room-header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.other-room-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.other-room-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.other-room-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.other-room-status-indicator.ledig {
    color: var(--oneco-green);
}

.other-room-status-indicator.opptatt {
    color: #ef4444;
}

.other-room-status-indicator.starting-soon,
.other-room-status-indicator.ending-soon {
    color: var(--oneco-orange);
}

.other-room-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.other-room-subject {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.other-room-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.other-room-meta i {
    color: var(--accent-color);
}

.other-room-timeline {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.6rem;
}

.other-room-timeline-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    gap: 0.5rem;
}

.other-room-timeline-time {
    font-weight: 700;
    color: var(--text-main);
    flex-shrink: 0;
}

.other-room-timeline-subject {
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.other-rooms-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    width: 100%;
    color: var(--text-muted);
}

.other-rooms-loading i {
    font-size: 2.5rem;
    color: var(--accent-color);
}

/* SETTINGS MODAL TABS STYLING */
.settings-tabs-header {
    display: flex;
    gap: 0.5rem;
    padding: 0.2rem 1.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1.1rem;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 12px 12px 0 0;
    border-bottom: 3px solid transparent;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.03);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* FULLSCREEN BADGE STYLING */
.btn-fullscreen-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 0.4rem 0.9rem;
    border-radius: 10px;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-fullscreen-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--card-border-hover);
    color: var(--text-main);
    transform: translateY(-1px);
}

.btn-fullscreen-badge:active {
    transform: translateY(0);
}

/* SIDE-BY-SIDE ACTIONS CONTAINER */
.left-actions-container {
    display: flex;
    gap: 1.5rem;
    width: 100%;
}

.left-actions-container .qr-card {
    flex: 1 1 0px;
    margin: 0;
}

.left-actions-container .btn-check-other-rooms {
    flex: 1 1 0px;
    margin: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.left-actions-container .btn-check-other-rooms:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--card-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.left-actions-container .btn-check-other-rooms:active {
    transform: translateY(0);
}

.left-actions-container .btn-check-other-rooms i {
    font-size: 2.2rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.left-actions-container .btn-check-other-rooms:hover i {
    transform: scale(1.1);
}

/* Responsiveness: on mobile (max-width: 900px), stack actions vertically */
@media (max-width: 900px) {
    .left-actions-container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Ensure PIN modal overlays the lockdown screen */
#pinModal {
    z-index: 300 !important;
}

/* ============================================================================
   Systembannere (v3.5): auth-varsel og standard-PIN-advarsel
   ============================================================================ */
.banner-stack {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900; /* under nattmodus/lockdown-overlays, over alt annet innhold */
    display: flex;
    flex-direction: column;
}

.app-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.banner-error {
    background: linear-gradient(90deg, #b91c1c, #dc2626);
}

.banner-warning {
    background: linear-gradient(90deg, #b45309, #d97706);
}

.banner-action {
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 8px;
    padding: 0.3rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.banner-action:hover {
    background: rgba(255, 255, 255, 0.3);
}
