/* SITE-1471 CENTRAL DATABASE
   Terminal Aesthetic Stylesheet
   Classification: SITE-1471 INTERNAL ONLY */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0a0a0a;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    position: relative;
}

/* Scanline overlay effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 999;
}

.container {
    display: flex;
    height: 100vh;
    width: 100%;
}

.sidebar {
    width: 280px;
    background-color: #050505;
    border-right: 2px solid #00ff41;
    padding: 20px;
    overflow-y: auto;
    box-shadow: inset 5px 0 20px rgba(0, 255, 65, 0.1);
}

.sidebar-header {
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #00ff41;
    text-transform: uppercase;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section-title {
    font-size: 10px;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #00aa00;
    text-transform: uppercase;
}

.department-node {
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: #0f0f0f;
    border: 1px solid #00ff41;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.department-node::before {
    content: '▶ ';
    margin-right: 5px;
    color: #00ff41;
}

.department-node:hover {
    background-color: #1a1a1a;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3), inset 0 0 10px rgba(0, 255, 65, 0.1);
    transform: translateX(5px);
}

.department-node.active {
    background-color: #1a3a1a;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5), inset 0 0 10px rgba(0, 255, 65, 0.2);
}

.user-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed #00ff41;
}

.o5-access-hint {
    margin: 10px 0 12px;
    padding: 8px 10px;
    border: 1px solid #ff0000;
    background: rgba(255, 0, 0, 0.08);
    color: #ff6666;
    font-size: 11px;
    letter-spacing: 0.4px;
    border-radius: 3px;
}

.user-info {
    font-size: 10px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-info span {
    display: flex;
    justify-content: space-between;
}

.clearance-badge {
    display: inline-block;
    background-color: #ff0000;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #0a0a0a;
}

.header {
    background-color: #050505;
    border-bottom: 2px solid #00ff41;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

.site-title {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #00ff41;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.content-area {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #0a0a0a;
}

.login-box {
    background-color: #050505;
    border: 2px solid #00ff41;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
}

.login-title {
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-align: center;
}

.login-subtitle {
    font-size: 10px;
    color: #00aa00;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 11px;
    margin-bottom: 6px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    background-color: #0f0f0f;
    border: 1px solid #00ff41;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    transition: all 0.3s ease;
}

input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5), inset 0 0 10px rgba(0, 255, 65, 0.1);
    background-color: #1a1a1a;
}

.btn {
    width: 100%;
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid #00ff41;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.btn:hover {
    background-color: #00ff41;
    color: #0a0a0a;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
}

.btn-secondary {
    background-color: transparent;
    color: #00aa00;
    border-color: #00aa00;
}

.btn-secondary:hover {
    background-color: #00aa00;
    color: #0a0a0a;
    box-shadow: 0 0 15px rgba(0, 170, 0, 0.5);
}

.protocol-section {
    background-color: #050505;
    border: 1px solid #00ff41;
    padding: 20px;
    margin-bottom: 15px;
}

.protocol-header {
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #00ff41;
    text-transform: uppercase;
}

.protocol-content {
    font-size: 12px;
    line-height: 1.6;
    color: #00ff41;
}

.redacted {
    background-color: #000;
    color: #000;
    padding: 2px 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border-bottom: 1px dotted #ff0000;
}

.redacted:hover {
    background-color: #1a1a1a;
    color: #00ff41;
    box-shadow: inset 0 0 10px rgba(255, 0, 0, 0.3);
}

.system-alert {
    background-color: #3a0000;
    border: 2px solid #ff0000;
    padding: 15px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #ff6666;
    letter-spacing: 1px;
    animation: breachAlert 0.6s ease;
}

@keyframes breachAlert {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
        border-color: #ff0000;
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 0, 0, 0.8);
        border-color: #ff6666;
    }
}

.system-alert::before {
    content: '⚠ SECURITY ALERT ⚠ ';
    font-weight: bold;
    margin-right: 10px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-top: 10px;
}

.data-table th {
    background-color: #1a1a1a;
    border: 1px solid #00ff41;
    padding: 10px;
    text-align: left;
    letter-spacing: 1px;
    font-weight: bold;
    text-transform: uppercase;
}

.data-table td {
    border: 1px solid #00aa00;
    padding: 10px;
}

.data-table tr:hover {
    background-color: #1a1a1a;
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.2);
}

.hidden-auth {
    display: none;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 14px;
}

.loading::after {
    content: '';
    animation: blink 1s infinite;
    margin-left: 5px;
}

/* When no department tab is selected, animate the init message area */
#contentArea.idle .loading {
    position: relative;
}

#contentArea.idle .loading::before {
    content: ' -';
    opacity: 0.9;
    margin-right: 8px;
    animation: idleScan 2s ease-in-out infinite;
}

@keyframes idleScan {
    0%, 100% { text-shadow: 0 0 0 rgba(0, 255, 65, 0.0); }
    50% { text-shadow: 0 0 12px rgba(0, 255, 65, 0.65); }
}



@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: #00ff41;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00aa00;
}

/* Auth Error Message Styling */
#authError {
    color: #ff6666;
    font-size: 11px;
    margin-top: 15px;
    display: none;
    letter-spacing: 0.5px;
}

/* Logout Button Styling */
.logout-btn {
    margin-top: 15px;
    width: 100%;
}

/* ========== O5 ADMIN PANEL STYLES ========== */

.o5-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.o5-modal-content {
    background: #0a0a0a;
    border: 3px solid #ff0000;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5), inset 0 0 20px rgba(255, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.o5-modal-header {
    background: linear-gradient(90deg, #1a0000, #330000);
    border-bottom: 2px solid #ff0000;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.o5-title {
    color: #ff0000;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px #ff0000;
}

.o5-close-btn {
    background: none;
    border: 1px solid #ff0000;
    color: #ff0000;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 3px;
    transition: all 0.3s;
}

.o5-close-btn:hover {
    background: #ff0000;
    color: #0a0a0a;
    text-shadow: none;
    box-shadow: 0 0 10px #ff0000;
}

.o5-tabs {
    display: flex;
    border-bottom: 2px solid #ff0000;
    background: #050505;
    flex-shrink: 0;
}

.o5-tab-btn {
    flex: 1;
    padding: 12px 15px;
    background: #0a0a0a;
    border: none;
    color: #00ff41;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s;
}

.o5-tab-btn:hover {
    background: #1a1a1a;
}

.o5-tab-btn.active {
    border-bottom-color: #ff0000;
    color: #ff0000;
    text-shadow: 0 0 5px #ff0000;
}

.o5-tab-content {
    padding: 20px;
    display: none;
    flex-grow: 1;
    overflow-y: auto;
    color: #00ff41;
}

.o5-tab-content.active {
    display: block;
}

.o5-tab-content h3 {
    color: #ff0000;
    margin-top: 0;
    text-shadow: 0 0 10px #ff0000;
    border-bottom: 2px solid #ff0000;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.o5-search {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.o5-input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #00ff41;
    color: #00ff41;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border-radius: 3px;
}

.o5-input::placeholder {
    color: #00aa00;
}

.o5-input:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.o5-btn {
    padding: 8px 16px;
    background: #ff0000;
    color: #0a0a0a;
    border: 1px solid #ff0000;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
}

.o5-btn:hover {
    box-shadow: 0 0 15px #ff0000;
    transform: scale(1.05);
}

.o5-list-container,
.o5-logs-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #00ff41;
    background: #0f0f0f;
    border-radius: 3px;
}

.o5-list-item {
    padding: 12px;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.o5-list-item:hover {
    background: #1a1a1a;
}

.o5-list-item:last-child {
    border-bottom: none;
}

.o5-item-info {
    flex: 1;
}

.o5-item-email {
    color: #00ff41;
    font-weight: bold;
    font-size: 13px;
}

.o5-item-detail {
    color: #00aa00;
    font-size: 11px;
    margin-top: 3px;
}

.o5-item-suspended {
    color: #ff0000;
}

.o5-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.o5-action-btn {
    padding: 6px 10px;
    font-size: 11px;
    background: #00ff41;
    color: #0a0a0a;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.o5-action-btn:hover {
    background: #00aa00;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.o5-action-btn.danger {
    background: #ff0000;
    color: #0a0a0a;
}

.o5-action-btn.danger:hover {
    background: #cc0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.o5-clearance-input {
    width: 60px;
    padding: 4px 8px;
    background: #1a1a1a;
    border: 1px solid #00ff41;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    border-radius: 3px;
}

.o5-clearance-input[type="number"] {
    width: 60px;
}

.o5-clearance-input[type="text"],
.o5-clearance-input:not([type="number"]) {
    width: 140px;
    min-width: 120px;
}

.o5-clearance-input option {
    background: #0a0a0a;
    color: #00ff41;
}

.o5-name-input {
    width: 180px;
}

.o5-setting {
    background: #1a1a1a;
    padding: 15px;
    border-left: 3px solid #ff0000;
    margin-bottom: 15px;
    border-radius: 3px;
}

.o5-setting-label {
    color: #ff0000;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

.o5-status {
    color: #00ff41;
    font-weight: bold;
    margin-right: 15px;
}

.o5-status.enabled {
    color: #00ff41;
    text-shadow: 0 0 5px #00ff41;
}

.o5-status.disabled {
    color: #ff0000;
    text-shadow: 0 0 5px #ff0000;
}

.o5-info {
    background: #0f0f0f;
    padding: 12px;
    border-left: 2px solid #00aa00;
    margin-top: 15px;
    font-size: 12px;
    color: #00aa00;
    border-radius: 3px;
}

.o5-info p {
    margin: 0;
    line-height: 1.5;
}

.o5-file-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 14px;
}

.o5-file-tab {
    padding: 6px 10px;
    font-size: 11px;
    background: #111111;
    border: 1px solid #00aa00;
    color: #00aa00;
    cursor: pointer;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    transition: all 0.2s;
}

.o5-file-tab:hover,
.o5-file-tab.active {
    background: #00ff41;
    color: #0a0a0a;
}

.o5-file-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.o5-files-container {
    display: grid;
    gap: 12px;
}

.o5-file-card {
    background: #111111;
    border: 1px solid #00aa00;
    border-left: 3px solid #ff0000;
    border-radius: 4px;
    padding: 12px;
}

.o5-file-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 8px;
}

.o5-file-title {
    color: #00ff41;
    font-weight: bold;
}

.o5-file-dept,
.o5-file-meta,
.o5-file-notes {
    color: #00aa00;
    font-size: 12px;
    margin-top: 4px;
}

.o5-file-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.o5-file-actions .o5-action-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.o5-log-entry {
    padding: 10px;
    border-bottom: 1px solid #1a1a1a;
    font-size: 11px;
    font-family: 'Courier New', monospace;
}

.o5-log-entry:hover {
    background: #1a1a1a;
}

.o5-log-timestamp {
    color: #00aa00;
    font-weight: bold;
}

.o5-log-user {
    color: #00ff41;
}

.o5-log-event {
    color: #ff0000;
}

.o5-log-details {
    color: #00aa00;
    margin-top: 3px;
}
