@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=VT323&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&family=VT323&display=swap');

:root {
    --font-primary: "Barlow", sans-serif;
    --font-mono: "VT323", monospace;
    --font-regular: 400;
    --font-medium: 500;
    --font-bold: 700;
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #9D9D9D;
    --color-text-tertiary: #757575;
    --color-text-quaternary: #303030;
    --color-text-accent: #FFFFFF;
    --color-background: #000000;
    --color-border: #6B6B6B;
    --terminal-bg: #000000;
    --terminal-green: #C9A961;
    --terminal-cyan: #C9A961;
    --terminal-red: #ff0040;
    --terminal-yellow: #C9A961;
    --terminal-gold: #C9A961;
}

* {
    -webkit-tap-highlight-color: transparent;
    -webkit-overflow-scrolling: touch;
}

html {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

html, body {
    overscroll-behavior: none;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.6;
    letter-spacing: 3px;
    min-height: 100vh;
    min-height: 100dvh;
    background-image: radial-gradient(#66666670 1px, transparent 0);
    background-size: 50px 50px;
    background-position: -19px -19px;
    overflow-x: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

html, body, .app-container {
    min-height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Banner and Navigation */
.banner {
    width: 100%;
    overflow-x: auto;
    position: relative;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    z-index: 2;
    width: max-content;
    flex-wrap: nowrap;
}

.nav-link {
    color: var(--color-text-primary);
    font-weight: var(--font-regular);
    text-decoration: none;
    margin-left: 34px;
    margin-top: 3px;
    font-size: 12px;
    transition: all 0.3s ease;
    padding: 10px 10px 0;
}

.nav-link:first-child {
    margin-left: 76px;
}

.nav-link:not(.active) {
    color: var(--color-text-tertiary);
}

.nav-link.active {
    box-shadow: 0 -5px 0 var(--color-text-primary);
    background: linear-gradient(180deg, #232323, transparent);
}

@media (max-width: 768px) {
    .nav-link {
        margin-left: 20px;
        font-size: 11px;
        white-space: nowrap;
    }
    
    .nav-link:first-child {
        margin-left: 20px;
    }
}

/* Main Container */
.main-container {
    display: flex;
    flex: 1;
    align-items: flex-start;
    overflow-x: hidden;
    overflow-y: visible;
    transition: all 0.4s ease-in-out;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
}

.main-container > *:first-child {
    flex: 1;
    transition: all 0.4s ease-in-out;
}

.left-panel {
    flex: 1;
    margin-left: 76px;
    margin-top: 40px;
    margin-right: 0;
    padding-right: 332.67px;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: visible;
    z-index: 1;
}

.right-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    max-width: 312.67px;
    min-width: 312.67px;
    overflow: hidden;
    transition: min-width 0.4s ease-in-out, max-width 0.4s ease-in-out, margin 0.4s ease-in-out;
    user-select: none;
    -webkit-user-select: none;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    justify-content: flex-start;
    width: 312.67px;
    transition: transform 0.4s ease-in-out;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    z-index: 50;
    border-left: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.7);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.right-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(80, 80, 80, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(70, 70, 70, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, rgba(60, 60, 60, 0.1) 0%, transparent 35%),
        linear-gradient(45deg, rgba(50, 50, 50, 0.1) 25%, transparent 25%, transparent 75%, rgba(50, 50, 50, 0.1) 75%),
        linear-gradient(-45deg, rgba(45, 45, 45, 0.1) 25%, transparent 25%, transparent 75%, rgba(45, 45, 45, 0.1) 75%),
        linear-gradient(to bottom, rgba(30, 30, 30, 0.4), rgba(20, 20, 20, 0.5));
    background-size: 200% 200%, 200% 200%, 300% 300%, 40px 40px, 40px 40px, 100% 100%;
    background-position: center;
    filter: grayscale(100%) brightness(0.35) contrast(1.4);
    opacity: 0.8;
    pointer-events: none;
    z-index: -1;
}

.right-panel > * {
    position: relative;
    z-index: 1;
}

.collapse-btn {
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(
        135deg,
        #F4E4BC 0%,
        #E8D4A6 20%,
        #D4AF37 40%,
        #C9A961 55%,
        #E8D4A6 70%,
        #F4E4BC 80%,
        #D4AF37 90%,
        #B8860B 100%
    );
    background-size: 250% 250%;
    color: var(--terminal-bg);
    border: 1px solid rgba(212, 175, 55, 0.9);
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 3px;
    transition: all 0.3s;
    box-shadow: 
        0 0 12px rgba(212, 175, 55, 0.6),
        0 0 18px rgba(201, 169, 97, 0.4),
        0 0 25px rgba(184, 134, 11, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(184, 134, 11, 0.4);
    animation: metallicShine 4.5s ease-in-out infinite;
}

.collapse-btn:hover {
    background: linear-gradient(
        135deg,
        #F4E4BC 0%,
        #E8D4A6 20%,
        #D4AF37 40%,
        #C9A961 55%,
        #E8D4A6 70%,
        #F4E4BC 80%,
        #D4AF37 90%,
        #B8860B 100%
    );
    background-size: 250% 250%;
    box-shadow: 
        0 0 18px rgba(212, 175, 55, 0.9),
        0 0 28px rgba(201, 169, 97, 0.7),
        0 0 40px rgba(184, 134, 11, 0.5),
        0 3px 10px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 6px rgba(184, 134, 11, 0.6);
    border-color: rgba(212, 175, 55, 1);
}

.right-panel.collapsed {
    width: 50px;
}

.right-panel.collapsed #info-panels {
    display: none;
}

/* Welcome Section */
.welcome-section {
    line-height: 30px;
}

.welcome-header {
    display: flex;
    align-items: center;
    gap: 9px;
}

.welcome-header h1 {
    font-size: 28px;
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
}

.logo-container {
    height: 28px;
    width: 28px;
    border: 2px solid rgba(212, 175, 55, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(244, 228, 188, 0.2) 0%, rgba(232, 212, 166, 0.15) 30%, rgba(212, 175, 55, 0.2) 50%, rgba(232, 212, 166, 0.15) 70%, rgba(244, 228, 188, 0.2) 100%);
    padding: 2px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 
        0 0 10px rgba(212, 175, 55, 0.5),
        0 0 15px rgba(201, 169, 97, 0.3),
        0 0 20px rgba(184, 134, 11, 0.2),
        inset 0 0 10px rgba(244, 228, 188, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo {
    font-size: 18px;
    font-weight: bold;
    color: var(--terminal-gold);
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.user-role {
    font-size: 18px;
    text-transform: uppercase;
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    transition: opacity 0.6s ease-in-out, filter 0.6s ease-in-out;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 4px;
}

/* Terminal Container */
.terminal-container {
    margin-top: 52px;
    position: relative;
    width: 100%;
}

.terminal-tabs {
    color: var(--color-text-tertiary);
    letter-spacing: 2px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    margin-top: 15px;
    margin-bottom: 10px;
    left: 0;
    font-family: var(--font-primary);
    z-index: 10;
    padding-right: 20px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.terminal-tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.terminal-tabs::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-radius: 6px;
}

.terminal-tabs::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        #F4E4BC 0%,
        #E8D4A6 15%,
        #D4AF37 30%,
        #C9A961 45%,
        #E8D4A6 60%,
        #F4E4BC 70%,
        #D4AF37 80%,
        #B8860B 100%
    );
    border: 1.5px solid rgba(212, 175, 55, 0.9);
    border-radius: 6px;
    box-shadow: 
        0 0 12px rgba(212, 175, 55, 0.6) inset,
        0 0 18px rgba(201, 169, 97, 0.4) inset,
        0 2px 0 rgba(255, 255, 255, 0.3) inset,
        0 -2px 4px rgba(184, 134, 11, 0.5) inset,
        0 0 8px rgba(212, 175, 55, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.7);
    animation: metallicShine 4.5s ease-in-out infinite;
}

.terminal-tabs::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        #F4E4BC 0%,
        #E8D4A6 15%,
        #D4AF37 30%,
        #C9A961 45%,
        #E8D4A6 60%,
        #F4E4BC 70%,
        #D4AF37 80%,
        #B8860B 100%
    );
    border: 1.5px solid rgba(212, 175, 55, 1);
    box-shadow: 
        0 0 15px rgba(212, 175, 55, 0.8) inset,
        0 0 22px rgba(201, 169, 97, 0.6) inset,
        0 2px 0 rgba(255, 255, 255, 0.4) inset,
        0 -2px 6px rgba(184, 134, 11, 0.6) inset,
        0 0 12px rgba(212, 175, 55, 0.6),
        0 3px 10px rgba(0, 0, 0, 0.8);
}

.terminal-tab {
    padding: 1px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    white-space: nowrap;
    color: var(--color-text-tertiary);
    font-weight: var(--font-regular);
}

.terminal-tab:hover {
    color: var(--color-text-secondary);
}

.terminal-tab.active {
    color: #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
    font-weight: var(--font-medium);
}

.terminal-tab-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--color-text-tertiary);
    transition: color 0.2s ease;
    cursor: pointer;
    line-height: 1;
    width: 16px;
    height: 16px;
    margin-left: 4px;
}

.terminal-tab-close:hover {
    color: var(--color-text-primary);
}

.terminal-tab:hover .terminal-tab-close {
    color: var(--color-text-secondary);
}

.terminal-tab.active .terminal-tab-close {
    color: var(--color-text-primary);
}

.terminal-tab-add {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 2px 8px;
    border: 1px solid #505050;
    transition: all 0.2s ease;
    color: var(--color-text-tertiary);
    font-size: 14px;
    line-height: 1;
    min-width: 24px;
    height: 18px;
}

.terminal-tab-add:hover {
    color: var(--color-text-secondary);
    border-color: var(--color-text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.terminal-body-container {
    margin-top: 0;
    border-left: 1px solid #6b6b6b;
    border-right: 1px solid #6b6b6b;
    padding-left: 9px;
    padding-right: 9px;
    position: relative;
    flex: 1;
}

.terminal-body-container::before {
    content: "";
    position: absolute;
    left: -85px;
    top: 0;
    bottom: 0;
    width: 79px;
    background-image: radial-gradient(circle at center, #242424 2px, transparent 0);
    background-size: 9px 9px;
    background-repeat: repeat;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    margin-top: 0;
    padding-top: 0;
    position: relative;
    z-index: 1;
}

.terminal-title {
    background-color: var(--color-text-primary);
    color: var(--color-background);
    font-family: var(--font-mono);
    font-size: 12px;
    display: table;
    padding: 0 4px;
    letter-spacing: 1px;
    line-height: 1.35;
    text-transform: uppercase;
}

.inbox-btn {
    background: transparent;
    border: 1px solid #505050;
    color: var(--color-text-primary);
    padding: 3px 0.6rem;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.inbox-btn span {
    font-size: 16px;
    font-weight: 300;
}

.inbox-btn:hover {
    background: #ffffff1a;
    border-color: gray;
}

.inbox-btn.has-unread {
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.mail-icon {
    font-size: 16px;
}

.mail-unread-badge {
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #d4af37;
    color: #000;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    margin-left: 4px;
}

.terminal-body {
    letter-spacing: normal;
    padding: 15px;
    background: linear-gradient(180deg, #10101073, #050505);
    height: calc(100vh - 327px);
    height: calc(100dvh - 327px);
    width: 100%;
    max-width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    font-variant-ligatures: none;
    position: relative;
    box-sizing: border-box;
    font-family: 'VT323', monospace;
    font-size: 17px;
    color: #fbfbfb;
    font-kerning: none;
    line-height: 17px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.terminal-body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/dni-logo.gif');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 300px;
    opacity: 0.12;
    filter: blur(7.5px);
    pointer-events: none;
    z-index: 0;
}

.terminal-body > * {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
    vertical-align: top;
}

.terminal-body > *:empty {
    display: none;
}

.terminal-body *::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.terminal-body *::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-body *::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 10px;
    border: 3px solid transparent;
}

.terminal-body *::-webkit-scrollbar-thumb:hover {
    background-color: #666;
}

.terminal-line {
    color: #fbfbfb;
    margin: 0;
    padding: 0;
    font-family: 'VT323', monospace;
    font-size: 17px;
    font-kerning: none;
    white-space: pre;
    letter-spacing: normal;
    display: block;
    line-height: 17px;
    min-height: 17px;
}


.terminal-title-line {
    color: var(--terminal-gold);
    text-align: left;
    margin: 0;
    padding: 0;
    font-family: 'VT323', monospace;
    font-size: 17px;
    display: block;
    line-height: 17px;
    min-height: 17px;
    background: linear-gradient(
        135deg,
        #F4E4BC 0%,
        #E8D4A6 10%,
        #D4AF37 25%,
        #C9A961 40%,
        #E8D4A6 55%,
        #F4E4BC 65%,
        #D4AF37 75%,
        #B8860B 85%,
        #D4AF37 95%,
        #F4E4BC 100%
    );
    background-size: 250% 250%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 1px 2px rgba(184, 134, 11, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.7),
        0 0 10px rgba(212, 175, 55, 0.5),
        0 0 20px rgba(212, 175, 55, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6)) drop-shadow(0 0 12px rgba(184, 134, 11, 0.4));
    animation: metallicShine 4s ease-in-out infinite;
}

@keyframes metallicShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.terminal-motto {
    color: var(--terminal-gold);
    text-align: left;
    font-weight: bold;
    font-size: 17px;
    margin: 0;
    padding: 0;
    font-family: 'VT323', monospace;
    display: block;
    line-height: 17px;
    min-height: 17px;
    background: linear-gradient(
        135deg,
        #F4E4BC 0%,
        #E8D4A6 10%,
        #D4AF37 25%,
        #C9A961 40%,
        #E8D4A6 55%,
        #F4E4BC 65%,
        #D4AF37 75%,
        #B8860B 85%,
        #D4AF37 95%,
        #F4E4BC 100%
    );
    background-size: 250% 250%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 1px 2px rgba(184, 134, 11, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.7),
        0 0 10px rgba(212, 175, 55, 0.5),
        0 0 20px rgba(212, 175, 55, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6)) drop-shadow(0 0 12px rgba(184, 134, 11, 0.4));
    animation: metallicShine 4s ease-in-out infinite;
}

.terminal-subtitle {
    color: var(--terminal-gold);
    text-align: left;
    margin: 0;
    padding: 0;
    font-family: 'VT323', monospace;
    font-size: 17px;
    display: block;
    line-height: 17px;
    min-height: 17px;
    background: linear-gradient(
        135deg,
        #F4E4BC 0%,
        #E8D4A6 10%,
        #D4AF37 25%,
        #C9A961 40%,
        #E8D4A6 55%,
        #F4E4BC 65%,
        #D4AF37 75%,
        #B8860B 85%,
        #D4AF37 95%,
        #F4E4BC 100%
    );
    background-size: 250% 250%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 1px 2px rgba(184, 134, 11, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.7),
        0 0 10px rgba(212, 175, 55, 0.5),
        0 0 20px rgba(212, 175, 55, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6)) drop-shadow(0 0 12px rgba(184, 134, 11, 0.4));
    animation: metallicShine 4s ease-in-out infinite;
}

.terminal-time {
    color: #fbfbfb;
    margin: 0;
    padding: 0;
    font-family: 'VT323', monospace;
    font-size: 17px;
    display: block;
    line-height: 17px;
    min-height: 17px;
}

.terminal-help,
.terminal-example {
    color: #fbfbfb;
    margin: 0;
    padding: 0;
    font-family: 'VT323', monospace;
    font-size: 17px;
    display: block;
    line-height: 17px;
    min-height: 17px;
}

.command-highlight {
    color: var(--terminal-gold);
    font-weight: bold;
    background: linear-gradient(
        135deg,
        #F4E4BC 0%,
        #E8D4A6 15%,
        #D4AF37 35%,
        #C9A961 50%,
        #D4AF37 65%,
        #E8D4A6 80%,
        #F4E4BC 100%
    );
    background-size: 250% 250%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 1px 2px rgba(184, 134, 11, 0.7),
        0 2px 3px rgba(0, 0, 0, 0.6),
        0 0 8px rgba(212, 175, 55, 0.4),
        0 0 15px rgba(212, 175, 55, 0.2),
        inset 0 -1px 1px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5)) drop-shadow(0 0 8px rgba(184, 134, 11, 0.3));
    animation: metallicShine 4s ease-in-out infinite;
}

.terminal-input-container {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0;
    background: transparent;
    border: none;
    margin: 0;
    font-family: 'VT323', monospace;
    font-size: 17px;
    position: relative;
    width: 100%;
    line-height: 17px;
    min-height: 17px;
    height: 17px;
    vertical-align: top;
    white-space: normal;
    flex-wrap: nowrap;
}

.terminal-prompt {
    color: #fbfbfb;
    font-weight: normal;
    font-family: 'VT323', monospace;
    font-size: 17px;
    white-space: pre;
    display: inline;
    flex-shrink: 0;
}

.terminal-prompt::after {
    content: "";
    display: inline-block;
    width: 6px;
}

.username {
    color: #fbfbfb;
}

.hostname {
    color: var(--terminal-gold);
    background: linear-gradient(
        135deg,
        #F4E4BC 0%,
        #E8D4A6 20%,
        #D4AF37 45%,
        #C9A961 65%,
        #D4AF37 85%,
        #F4E4BC 100%
    );
    background-size: 250% 250%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 1px 1px rgba(184, 134, 11, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.5),
        0 0 6px rgba(212, 175, 55, 0.4),
        inset 0 -1px 1px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.4));
    animation: metallicShine 4.5s ease-in-out infinite;
}

.path {
    color: var(--terminal-gold);
    background: linear-gradient(
        135deg,
        #F4E4BC 0%,
        #E8D4A6 20%,
        #D4AF37 45%,
        #C9A961 65%,
        #D4AF37 85%,
        #F4E4BC 100%
    );
    background-size: 250% 250%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 1px 1px rgba(184, 134, 11, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.5),
        0 0 6px rgba(212, 175, 55, 0.4),
        inset 0 -1px 1px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.4));
    animation: metallicShine 4.5s ease-in-out infinite;
}

.terminal-cursor {
    color: #fbfbfb;
    animation: blink 1s infinite;
    margin-left: 2px;
    display: inline-block;
    width: 8px;
    flex-shrink: 0;
    white-space: nowrap;
    height: 17px;
    line-height: 17px;
    vertical-align: baseline;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-input {
    background: transparent;
    border: none;
    color: #fbfbfb;
    font-family: 'VT323', monospace;
    font-size: 17px;
    outline: none;
    font-kerning: none;
    padding: 0;
    margin: 0;
    display: inline-block;
    height: 17px;
    line-height: 17px;
    /* Let the input size to its content so the fake cursor sits just after the text */
    width: auto;
    min-width: 1ch;
    flex: 0 0 auto;
    caret-color: #fbfbfb;
    white-space: nowrap;
    overflow: hidden;
    vertical-align: baseline;
}

.terminal-input-container:focus-within .terminal-cursor {
    visibility: hidden;
}

.terminal-input-container:not(:focus-within) .terminal-cursor {
    visibility: visible;
}

.terminal-input::placeholder {
    color: var(--text-secondary);
}

/* Info Panels */
.info-panels {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-height: 100%;
    position: relative;
    padding-bottom: 10px;
}

/* Geo Panel */
.geo-panel {
    padding: 10px 15px;
    position: relative;
    background: transparent;
    z-index: 1;
}

.panel-title {
    color: var(--color-text-secondary);
    font-size: 9px;
    font-weight: var(--font-bold);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-family: var(--font-primary);
}

.panel-data {
    color: var(--color-text-secondary);
    font-size: 10px;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-family: var(--font-primary);
    position: relative;
    padding-left: 8px;
}

.panel-data::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #373737;
}

.panel-site {
    font-size: 22px;
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    margin: 8px 0;
    text-transform: uppercase;
    transition: opacity 0.3s ease-in-out;
    line-height: 1.2;
}

.map-container {
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.3);
    margin-top: 5px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-map {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

#space-map {
    opacity: 1;
    z-index: 1;
}

.panel-map.fadeIn {
    opacity: 0.6;
}

.panel-map.fadeOut {
    opacity: 0;
}

/* Threat Panel */
.threat-panel {
    padding: 10px 15px;
    background: transparent;
    z-index: 1;
    position: relative;
    overflow: visible;
}

.panel-sub {
    color: var(--color-text-secondary);
    font-size: 9px;
    font-weight: var(--font-bold);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
    margin-top: 8px;
    font-family: var(--font-primary);
}

.panel-sub:first-child {
    margin-top: 0;
}

.hume-meter-wrapper {
    position: relative;
    width: 100%;
    height: 60px;
    margin-bottom: 8px;
    margin-left: 0;
    padding-left: 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-sizing: border-box;
}

.hume-meter-canvas,
.radar-canvas,
.hkg-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.radar-canvas {
    width: 80px;
    height: 80px;
    margin-right: 10px;
    flex-shrink: 0;
}

.panel-threat {
    display: flex;
    align-items: flex-start;
    margin-top: 6px;
    margin-bottom: 8px;
}

.panel-threat-data {
    flex: 1;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
    line-height: 1.6;
    min-width: 0;
}

.panel-threat-data > div {
    margin-bottom: 2px;
    word-break: break-word;
}

.panel-threat-data span {
    color: var(--color-text-primary);
}

.hkg-section {
    margin-top: 8px;
    margin-bottom: 8px;
}

.hkg-canvas {
    width: 100%;
    height: 45px;
}

.panel-additional {
    margin-top: 8px;
}

.panel-additional-data {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.file-display-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.file-display-title {
    margin: 0;
    font-size: 9px;
    letter-spacing: 2.5px;
}

.panel-pos {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
}


/* Event Log Section */
.event-log-section {
    padding: 10px 15px;
    background: transparent;
    margin-top: 0;
    z-index: 1;
}

.event-log-content {
    margin-top: 6px;
}

.event-list {
    margin-bottom: 10px;
}

.event-item {
    display: flex;
    margin-bottom: 8px;
    position: relative;
}

.timeline-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 10px;
    min-width: 20px;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-text-primary);
    border: 2px solid var(--color-background);
    flex-shrink: 0;
}

.timeline-line {
    width: 2px;
    flex: 1;
    background: var(--color-text-secondary);
    min-height: 20px;
    margin-top: 4px;
}

.event-content {
    flex: 1;
}

.event-row1 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.event-icon {
    font-size: 16px;
    color: var(--color-text-primary);
}

.event-type {
    font-size: 9px;
    font-weight: var(--font-bold);
    letter-spacing: 1px;
    color: var(--color-text-primary);
    text-transform: uppercase;
    font-family: var(--font-primary);
}

.event-row2 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
}

.event-time {
    color: var(--color-text-secondary);
}

.event-separator {
    color: var(--color-text-tertiary);
}

.event-message {
    color: var(--color-text-secondary);
}

.site-safety {
    margin-top: 20px;
}

.safety-progress-bar-container {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
}

.progress-bar-segment {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s ease;
}

.progress-bar-segment.active {
    background: rgba(255, 255, 255, 0.9);
}

.safety-index-text-container {
    margin-bottom: 8px;
}

.safety-index-text {
    font-size: 9px;
    font-weight: var(--font-bold);
    letter-spacing: 2.5px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    font-family: var(--font-primary);
}

.safety-percentage {
    font-size: 18px;
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
}

/* Command Output */
.command-output {
    color: #fbfbfb;
    margin: 0;
    padding: 0;
    font-family: 'VT323', monospace;
    font-size: 17px;
    white-space: pre;
    line-height: 17px;
    min-height: 17px;
    display: block;
}

.command-error {
    color: var(--terminal-red);
    font-family: 'VT323', monospace;
    font-size: 17px;
}

.command-info {
    color: var(--terminal-gold);
    font-family: 'VT323', monospace;
    font-size: 17px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

::-webkit-scrollbar-track {
    background: var(--terminal-bg);
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        #F4E4BC 0%,
        #E8D4A6 15%,
        #D4AF37 30%,
        #C9A961 45%,
        #E8D4A6 60%,
        #F4E4BC 70%,
        #D4AF37 80%,
        #B8860B 100%
    );
    border: 1.5px solid rgba(212, 175, 55, 0.9);
    border-radius: 6px;
    box-shadow: 
        0 0 12px rgba(212, 175, 55, 0.6) inset,
        0 0 18px rgba(201, 169, 97, 0.4) inset,
        0 2px 0 rgba(255, 255, 255, 0.3) inset,
        0 -2px 4px rgba(184, 134, 11, 0.5) inset,
        0 0 8px rgba(212, 175, 55, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.7);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        #F4E4BC 0%,
        #E8D4A6 15%,
        #D4AF37 30%,
        #C9A961 45%,
        #E8D4A6 60%,
        #F4E4BC 70%,
        #D4AF37 80%,
        #B8860B 100%
    );
    border: 1.5px solid rgba(212, 175, 55, 1);
    box-shadow: 
        0 0 15px rgba(212, 175, 55, 0.8) inset,
        0 0 22px rgba(201, 169, 97, 0.6) inset,
        0 2px 0 rgba(255, 255, 255, 0.4) inset,
        0 -2px 6px rgba(184, 134, 11, 0.6) inset,
        0 0 12px rgba(212, 175, 55, 0.6),
        0 3px 10px rgba(0, 0, 0, 0.8);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(
        180deg,
        #F4E4BC 0%,
        #E8D4A6 15%,
        #D4AF37 30%,
        #C9A961 45%,
        #E8D4A6 60%,
        #F4E4BC 70%,
        #D4AF37 80%,
        #B8860B 100%
    );
    border: 1.5px solid rgba(212, 175, 55, 1);
    box-shadow: 
        0 0 18px rgba(212, 175, 55, 0.9) inset,
        0 0 26px rgba(201, 169, 97, 0.7) inset,
        0 2px 0 rgba(255, 255, 255, 0.5) inset,
        0 -2px 8px rgba(184, 134, 11, 0.7) inset,
        0 0 15px rgba(212, 175, 55, 0.8),
        0 3px 12px rgba(0, 0, 0, 0.9);
}

/* Responsive Design */
@media screen and (max-width: 656px) {
    .terminal-body-container::before {
        display: none;
    }

    .left-panel {
        margin-left: 20px;
    }
}

@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }

    .right-panel {
        width: 100%;
        border-left: none;
        border-top: 2px solid var(--terminal-gold);
    }

    .collapse-btn {
        display: none;
    }
}

/* Access Denied Modal - SCP Style */
.access-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.access-modal.show {
    display: flex;
}

.access-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1 !important;
    pointer-events: auto;
}

.access-modal-content {
    position: relative;
    z-index: 10 !important;
    background: #2a2a2a;
    border: 1px solid #1a1a1a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    animation: errorFadeIn 0.2s ease-out;
}

.access-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #1a1a1a;
}

.access-modal-title {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: var(--font-bold);
    color: var(--terminal-yellow);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.access-modal-body {
    padding: 25px;
    background: #2a2a2a;
}

.access-modal-footer {
    padding: 15px 25px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #1a1a1a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.access-modal-btn {
    background: rgba(184, 134, 11, 0.2);
    border: 1px solid var(--terminal-yellow);
    color: var(--terminal-yellow);
    padding: 10px 25px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: var(--font-bold);
}

.access-modal-btn:hover {
    background: rgba(184, 134, 11, 0.3);
    box-shadow: 0 0 10px rgba(184, 134, 11, 0.3);
}

.access-modal-btn:active {
    transform: scale(0.98);
}

.auth-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text-secondary);
}

.auth-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.error-dialog {
    position: relative;
    z-index: 10001;
    background: #2a2a2a;
    border: 1px solid #1a1a1a;
    min-width: 400px;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    animation: errorFadeIn 0.2s ease-out;
}

@keyframes errorFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.error-dialog-header {
    padding: 10px 15px;
    position: relative;
}

.error-text {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: var(--font-bold);
    color: #4a90e2;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.6);
}

.error-red-bar {
    background: #cc0000;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.error-warning-icon {
    font-size: 20px;
    color: #ffffff;
    font-weight: bold;
    flex-shrink: 0;
}

.error-bar-text {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: var(--font-bold);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.error-dialog-body {
    padding: 20px 15px;
    background: #2a2a2a;
}

.error-message {
    font-family: var(--font-primary);
    font-size: 13px;
    color: #ffffff;
    line-height: 1.6;
}

.error-dialog-footer {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    background: #2a2a2a;
}

.error-ok-btn {
    background: #3a3a3a;
    border: none;
    color: #ffffff;
    padding: 8px 20px;
    font-family: var(--font-primary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: var(--font-bold);
}

.error-ok-btn:hover {
    background: #4a4a4a;
}

.error-ok-btn:active {
    background: #2a2a2a;
    transform: scale(0.98);
}

@media (max-width: 768px) {
    .error-dialog {
        min-width: 90%;
        max-width: 90%;
        margin: 20px;
    }
}

/* Authentication Modals */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.auth-modal.show {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.auth-modal-content,
.access-modal-content.auth-modal-content {
    position: relative !important;
    z-index: 10 !important;
    max-width: 550px;
    min-width: 500px;
    background: #2a2a2a !important;
    border: 1px solid #1a1a1a !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8) !important;
    animation: errorFadeIn 0.2s ease-out;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: var(--font-bold);
    color: var(--terminal-yellow);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.auth-input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(184, 134, 11, 0.4);
    border-left: 3px solid var(--terminal-yellow);
    color: var(--color-text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 12px 15px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    outline: none;
}

.auth-input:focus {
    border-color: var(--terminal-yellow);
    border-left-width: 4px;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 10px rgba(184, 134, 11, 0.3);
}

.auth-input::placeholder {
    color: var(--color-text-tertiary);
    opacity: 0.6;
}

.auth-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23B8860B' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.auth-select option {
    background: #1a1a1a;
    color: var(--color-text-primary);
    padding: 10px;
}

.auth-hint {
    font-family: var(--font-primary);
    font-size: 10px;
    color: var(--color-text-tertiary);
    letter-spacing: 0.5px;
    margin-top: -4px;
}

.auth-checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: -10px;
}

.auth-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--terminal-yellow);
}

.auth-checkbox-label {
    font-family: var(--font-primary);
    font-size: 11px;
    color: var(--color-text-secondary);
    letter-spacing: 1px;
    cursor: pointer;
    user-select: none;
}

.auth-error {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #ff4444;
    letter-spacing: 1px;
    padding: 10px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-left: 3px solid #ff4444;
    display: none;
}

.auth-error.show {
    display: block;
}

.auth-success {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #44ff44;
    letter-spacing: 1px;
    padding: 10px;
    background: rgba(68, 255, 68, 0.1);
    border: 1px solid rgba(68, 255, 68, 0.3);
    border-left: 3px solid #44ff44;
    display: none;
}

.auth-success.show {
    display: block;
}

.auth-btn-secondary {
    background: transparent;
    border: 2px solid var(--color-text-secondary);
    color: var(--color-text-secondary);
    margin-right: 10px;
}

.auth-btn-secondary:hover {
    background: var(--color-text-secondary);
    color: var(--color-background);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .auth-modal-content {
        min-width: 90%;
        max-width: 90%;
        margin: 20px;
    }
}

/* SCIPNET Window Styles */
.scipnet-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    max-width: 90vw;
    max-height: 90vh;
    background: #ffffff;
    border: 2px solid #333333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10001;
    resize: both;
    min-width: 500px;
    min-height: 400px;
}

.scipnet-window.minimized {
    height: auto;
    max-height: 40px;
}

.scipnet-window.maximized {
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw;
    max-height: 100vh;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    resize: none;
}

/* Window Dock */
.window-dock {
    position: fixed;
    left: 10px;
    bottom: 10px;
    display: flex;
    gap: 8px;
    z-index: 11000;
}

.window-dock-item {
    background: #1a1a1a;
    border: 1px solid #444;
    color: #ccc;
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.window-dock-item:hover {
    background: #222222;
    border-color: #666666;
}

.window-titlebar {
    background: linear-gradient(to bottom, #e8e8e8, #d0d0d0);
    border-bottom: 1px solid #333;
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    flex-shrink: 0;
}

.window-title {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    flex: 1;
}

.window-controls {
    display: flex;
    gap: 4px;
}

.window-control {
    width: 20px;
    height: 20px;
    border: 1px solid #666;
    background: #e0e0e0;
    color: #333;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    font-family: 'Courier New', monospace;
}

.window-control:hover {
    background: #d0d0d0;
}

.window-close:hover {
    background: #ff4444;
    color: white;
    border-color: #cc0000;
}

.window-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    color: #000000;
    font-family: 'Arial', sans-serif;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: #888 #f0f0f0;
}

.window-content::-webkit-scrollbar {
    width: 12px;
}

.window-content::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.window-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

.window-content::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* SCIPNET Header */
.scipnet-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
}

.scipnet-level {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.scipnet-logo {
    font-size: 40px;
    color: #333;
    margin: 10px 0;
    line-height: 1;
}

.scipnet-title {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    margin: 10px 0;
    letter-spacing: 1px;
}

.confidential-banner {
    background: #000;
    color: #fff;
    padding: 8px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-top: 15px;
    display: inline-block;
    width: 100%;
}

/* SCIPNET Intro */
.scipnet-intro {
    margin-bottom: 30px;
    line-height: 1.6;
}

.intro-section {
    display: flex;
    margin-bottom: 20px;
    gap: 15px;
}

.intro-number {
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.intro-content {
    flex: 1;
}

.intro-label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #000;
}

.intro-text {
    color: #333;
    font-size: 13px;
}

.intro-footer {
    margin-top: 20px;
    font-style: italic;
    color: #666;
    text-align: center;
}

/* SCIPNET Form */
.scipnet-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-section {
    border: 1px solid #ddd;
    padding: 20px;
    background: #fafafa;
}

.form-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: bold;
    color: #000;
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}

.form-hint {
    font-size: 11px;
    color: #666;
    font-style: italic;
    margin-bottom: 8px;
    line-height: 1.4;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #999;
    background: #fff;
    color: #000;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    box-sizing: border-box;
}

.form-input:focus {
    outline: 2px solid #4a90e2;
    border-color: #4a90e2;
}

.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #999;
    background: #fff;
    color: #000;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23333' d='M5 8L1 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}

.form-select:focus {
    outline: 2px solid #4a90e2;
    border-color: #4a90e2;
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    line-height: 1.5;
}

.checklist-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.form-footer-text {
    margin-top: 15px;
    font-size: 11px;
    color: #666;
    text-align: center;
}

.form-link {
    color: #4a90e2;
    text-decoration: underline;
}

.form-link:hover {
    color: #357abd;
}

.form-submit-container {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #333;
}

.form-submit-btn {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
}

.form-submit-btn:hover {
    background: #357abd;
}

.form-submit-btn:active {
    transform: scale(0.98);
}

/* Responsive */
@media (max-width: 768px) {
    .scipnet-window {
        width: 95vw;
        max-width: 95vw;
        min-width: 300px;
    }
}

/* Content Panels */
.content-panel {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.content-panel:not(.active) {
    display: none;
}

/* Database Panel */
.database-container {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 20px;
    overflow: visible;
    /* Glassy overlay similar to reference SCP database */
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.9) inset,
        0 18px 40px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(6px);
}

.database-header {
    padding: 10px 20px 8px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.7) 55%,
        rgba(0, 0, 0, 0.4) 100%
    );
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.database-title {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: var(--font-bold);
    color: #ffffff;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.database-path-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.database-path {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.database-path-label {
    opacity: 0.7;
    letter-spacing: 2px;
}

.database-path-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
}

.database-breadcrumb,
.database-breadcrumb-root {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--color-text-primary);
    padding: 3px 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: lowercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.database-breadcrumb-root {
    border-radius: 3px;
}

.database-breadcrumb-icon {
    font-size: 11px;
}

.database-breadcrumb-separator {
    color: rgba(255, 255, 255, 0.35);
    margin: 0 4px;
}

.database-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.database-toolbar-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--color-text-primary);
    padding: 6px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.database-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.35);
}

.database-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 20px 20px 20px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    /* Subtle grid overlay inside glass panel */
    background-image:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 100% 26px, 26px 100%;
}

.database-table-header {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 170px 110px;
    padding: 4px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-secondary);
}

.database-col-name,
.database-col-modified,
.database-col-size {
    white-space: nowrap;
}

.database-table-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0 10px 0;
}

.database-loading {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 14px;
    padding: 40px;
}

.database-empty,
.database-error {
    text-align: center;
    padding: 40px;
}

.database-empty-title,
.database-error-title {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: var(--font-bold);
    color: var(--terminal-gold);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.database-empty-message,
.database-error-message {
    color: var(--color-text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.database-file-list {
    display: block;
    padding: 0;
}

.database-file-item {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 170px 110px;
    padding: 6px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background 0.12s ease-in-out;
    align-items: center;
}

.database-file-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.database-file-icon {
    font-size: 14px;
    margin-right: 6px;
}

.database-file-name {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-text-primary);
    word-break: break-word;
}

.database-table-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 170px 110px;
    padding: 6px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    align-items: center;
    transition: background 0.12s ease-in-out;
}

.database-table-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.database-name-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
}

.database-row-icon {
    font-size: 12px;
}

.database-row-name {
    white-space: nowrap;
}

.database-modified-cell,
.database-size-cell {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.database-file-viewer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.database-viewer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.database-back-btn {
    padding: 8px 15px;
    background: rgba(184, 134, 11, 0.2);
    border: 1px solid var(--terminal-gold);
    color: var(--terminal-gold);
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.database-download-btn {
    padding: 8px 15px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: var(--color-text-primary);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.database-download-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
}

.database-back-btn:hover {
    background: rgba(184, 134, 11, 0.3);
}

.database-iframe {
    flex: 1;
    width: 100%;
    border: 1px solid rgba(184, 134, 11, 0.3);
    background: #ffffff;
}

.database-context-menu {
    position: absolute;
    z-index: 10000;
    min-width: 160px;
    background: rgba(0, 0, 0, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.9);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text-primary);
    display: none;
}

.database-context-item {
    padding: 8px 14px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.database-context-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Bounty Board */
.bounty-container {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 20px;
    overflow: visible;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.9) inset,
        0 18px 40px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(6px);
}

.bounty-header {
    padding: 10px 20px 8px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.96) 0%,
        rgba(0, 0, 0, 0.7) 55%,
        rgba(0, 0, 0, 0.4) 100%
    );
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bounty-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bounty-title {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: var(--font-bold);
    color: #ffffff;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.bounty-subtitle {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.bounty-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bounty-refresh-btn,
.bounty-admin-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--color-text-primary);
    padding: 6px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bounty-refresh-btn:hover,
.bounty-admin-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.35);
}

.bounty-body {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 2.8fr);
    gap: 0;
    padding: 10px 20px 20px 20px;
    min-height: 0;
}

.bounty-list {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    overflow-y: auto;
}

.bounty-details {
    padding-left: 20px;
    overflow-y: auto;
}

.bounty-loading,
.bounty-empty,
.bounty-error {
    padding: 30px 20px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text-secondary);
}

.bounty-empty-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.bounty-empty-message {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.bounty-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background 0.15s ease-in-out;
}

.bounty-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.bounty-item.selected {
    background: rgba(255, 255, 255, 0.09);
}

.bounty-item-main {
    flex: 1;
    min-width: 0;
}

.bounty-item-title {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.bounty-item-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text-secondary);
}

.bounty-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    text-align: right;
}

.bounty-status {
    padding: 3px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 10px;
}

.bounty-status-open {
    background: rgba(0, 200, 0, 0.2);
    border: 1px solid rgba(0, 255, 0, 0.6);
    color: #8cff8c;
}

.bounty-status-in-progress {
    background: rgba(255, 165, 0, 0.15);
    border: 1px solid rgba(255, 200, 0, 0.7);
    color: #ffd966;
}

.bounty-status-closed {
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.7);
    color: #ff8080;
}

.bounty-reward {
    font-size: 11px;
    color: var(--color-text-primary);
}

.bounty-sector {
    font-size: 10px;
    color: var(--color-text-secondary);
}

.bounty-details-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text-secondary);
    text-align: center;
}

.bounty-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bounty-details-title {
    font-family: var(--font-mono);
    font-size: 16px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.bounty-details-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.bounty-meta-label {
    color: var(--color-text-primary);
    font-weight: bold;
    margin-right: 4px;
}

.bounty-details-briefing-title {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-primary);
    margin-bottom: 6px;
}

.bounty-details-briefing-body {
    font-family: var(--font-primary);
    font-size: 13px;
    color: var(--color-text-primary);
    line-height: 1.6;
}

.bounty-admin-content {
    padding: 15px 20px;
}

.bounty-admin-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
}

.bounty-admin-list {
    border-right: 1px solid #333;
    padding-right: 15px;
}

.bounty-admin-list-header {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.bounty-admin-list-body {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #ccc;
    background: #f8f8f8;
}

.bounty-admin-item {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
}

.bounty-admin-item:hover {
    background: #e8e8e8;
}

.bounty-admin-item.selected {
    background: #d0e4ff;
}

.bounty-admin-item-title {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
}

.bounty-admin-item-sub {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #555;
}

.bounty-admin-new-btn {
    margin-top: 10px;
    width: 100%;
    padding: 6px 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    text-transform: uppercase;
    cursor: pointer;
}

.bounty-admin-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bounty-admin-form .form-row {
    margin-bottom: 10px;
}

.bounty-admin-form label {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.bounty-admin-form input,
.bounty-admin-form select,
.bounty-admin-form textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.bounty-admin-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.auth-btn-danger {
    background: #ff4444;
    border: 1px solid #cc0000;
    color: white;
}

.auth-btn-danger:hover {
    background: #cc0000;
}
