/* ============================================
   NULL HUMAN SERVICES - BASE THEME
   Combined: NHS Base + Quark2 custom overrides
   (cleaned: no important overrides)
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0a;
    color: #c0c0c0;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
    min-height: 100vh;
}

.nhs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* --- HEADER --- */
.nhs-header {
    border-bottom: 2px solid #00ff41;
    padding-bottom: 20px;
    margin-bottom: 40px;
}

.nhs-header h1 {
    color: #00ff41;
    font-size: 24px;
    font-weight: normal;
    letter-spacing: 2px;
}

.nhs-subtitle {
    color: #666;
    font-size: 12px;
    margin-top: 8px;
}

/* --- STRUCTURE --- */
#header {
    background: #0a0a0a;
    border-bottom: 2px solid #00ff41;
    padding: 20px 0;
}

#header .logo, #header h1 {
    color: #00ff41;
    letter-spacing: 3px;
    font-size: 24px;
}

#footer {
    background: #0a0a0a;
    border-top: 1px solid #333;
    color: #666;
    font-size: 11px;
    text-align: center;
    padding: 20px 0;
}

.content-wrapper {
    background: #0a0a0a;
    padding: 40px 20px;
}

/* --- CONTENT --- */
.nhs-content {
    min-height: 400px;
}

/* --- FOOTER --- */
.nhs-footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center;
    color: #666;
    font-size: 11px;
}

/* --- LINKS --- */
a {
    color: #00ff41;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #0a0a0a;
    background: #00ff41;
}

/* --- HEADINGS --- */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    font-weight: normal;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }

p { color: #c0c0c0; }

/* --- NAVIGATION --- */
nav, .navbar, #navbar {
    background: #111;
    border-bottom: 1px solid #333;
}

nav a, .navbar a, #navbar a {
    color: #888;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 15px;
}

nav a:hover, .navbar a:hover, #navbar a:hover {
    color: #00ff41;
    background: transparent;
    border-bottom: 1px solid #00ff41;
}

/* --- NAVIGATION (FORCE HORIZONTAL) --- */
.nhs-nav {
    background: #111;
    border-bottom: 1px solid #333;
    margin-bottom: 30px;
    width: 100%;
}

.nhs-nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    width: 100%;
}

.nhs-nav li {
    display: inline-block;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

.nhs-nav a {
    color: #888;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 20px;
    display: inline-block;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.nhs-nav a:hover {
    color: #00ff41;
    background: transparent;
    border-bottom: 2px solid #00ff41;
}

.nhs-nav a.active {
    color: #00ff41;
    border-bottom: 2px solid #00ff41;
}

/* --- PANELS --- */
.nhs-panel {
    background: #0d0d0d;
    border: 1px solid #333;
    padding: 25px;
    margin-bottom: 25px;
}

.nhs-panel-header {
    color: #fff;
    font-size: 16px;
    border-bottom: 1px solid #444;
    padding-bottom: 12px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nhs-panel > * {
    margin-bottom: 15px;
}

.nhs-panel > *:last-child {
    margin-bottom: 0;
}

/* --- STATUS BAR --- */
.nhs-status-bar {
    background: #111;
    border: 1px solid #333;
    padding: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.nhs-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nhs-indicator {
    width: 8px;
    height: 8px;
    background: #00ff41;
    border-radius: 50%;
    animation: nhs-pulse 2s infinite;
}

.nhs-indicator.warning { background: #ffaa00; }
.nhs-indicator.error { background: #ff3333; }

@keyframes nhs-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- DATA ROWS --- */
.nhs-data-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #1a1a1a;
}

.nhs-data-label { color: #888; }
.nhs-data-value { color: #c0c0c0; }
.nhs-data-value.success { color: #00ff41; }
.nhs-data-value.warning { color: #ffaa00; }
.nhs-data-value.error { color: #ff3333; }

/* --- ACTION LINKS --- */
.nhs-action-list { list-style: none; padding: 0; }

.nhs-action-link {
    color: #00ff41;
    text-decoration: none;
    padding: 10px 15px;
    border: 1px solid #333;
    display: block;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.nhs-action-link:hover {
    background: #00ff41;
    color: #0a0a0a;
    border-color: #00ff41;
}

/* --- NOTICES --- */
.nhs-notice {
    background: #111;
    border-left: 3px solid #ffaa00;
    padding: 15px;
    margin: 20px 0;
    font-size: 13px;
    color: #ffaa00;
}

.nhs-notice.error {
    border-left-color: #ff3333;
    color: #ff3333;
}

/* --- TERMINAL OUTPUT --- */
.nhs-terminal {
    background: #000;
    border: 1px solid #222;
    padding: 15px;
    font-size: 13px;
    color: #00ff41;
    margin: 15px 0;
    font-family: 'Courier New', Courier, monospace;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    box-sizing: border-box;
}

.nhs-terminal .prompt { color: #666; }

/* --- GRID --- */
.nhs-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .nhs-grid-2 { grid-template-columns: 1fr; }
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; }
::-webkit-scrollbar-thumb:hover { background: #00ff41; }

/* --- SELECTION --- */
::selection {
    background: #00ff41;
    color: #0a0a0a;
}

/* ============================================
   NODE CLUSTER LIVE FEED
   ============================================ */

/* Log entries fit properly */
.nhs-log-entry {
    line-height: 1.4;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    animation: nhs-log-fade-in 0.3s ease-in forwards;
}

/* Terminal fills container */
#node-log-terminal {
    height: 200px;
    overflow: hidden;
    position: relative;
}

#node-log-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
}

@keyframes nhs-log-fade-in {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Obfuscated data styling */
span[style*="color: #444"], span[style*="color: #666"] {
    user-select: none;
}

/* --- GRAV FORM STYLING --- */
.nhs-input {
    width: 100%;
    background: #000;
    border: 1px solid #333;
    color: #00ff41;
    padding: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    outline: none;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.nhs-input:focus {
    border-color: #00ff41;
}

.nhs-input::placeholder {
    color: #444;
}

/* Style the Grav form labels */
label[for] {
    color: #888;
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Style Grav form validation messages */
form .errors {
    color: #ff3333;
    font-size: 12px;
    margin-top: 5px;
}

/* --- PROGRESS BARS --- */
.nhs-progress-container {
    width: 100%;
    height: 8px;
    background: #111;
    border: 1px solid #333;
    position: relative;
}

.nhs-progress-bar {
    height: 100%;
    background: #00ff41;
    transition: width 0.5s ease;
}

/* --- NHS CARDS --- */
.nhs-card {
    background: #0d0d0d;
    border: 1px solid #333;
    padding: 15px;
    transition: border-color 0.2s;
}

.nhs-card:hover {
    border-color: #00ff41;
}

/* --- GARBLED TEXT EFFECT --- */
.nhs-garbled {
    font-family: 'Courier New', Courier, monospace;
    color: #444;
    letter-spacing: 1px;
}

.nhs-garbled div {
    margin-bottom: 4px;
}

@keyframes nhs-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
/* --- WORKSPACE SPECIFIC STYLES --- */

/* Model Select Dropdown */
.nhs-select {
    background: #000 !important;
    border: 1px solid #333 !important;
    color: #00ff41 !important;
    padding: 5px 10px !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 14px !important;
    outline: none !important;
    cursor: pointer;
}

.nhs-select option {
    background: #0a0a0a !important;
    color: #c0c0c0 !important;
}

/* Collapsible Accordions */
.nhs-accordion {
    border: 1px solid #333;
    margin-bottom: 10px;
    background: #0d0d0d;
}

.nhs-accordion-header {
    padding: 12px 15px;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #c0c0c0;
    list-style: none; /* Hide default triangle */
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.nhs-accordion-header::-webkit-details-marker {
    display: none;
}

.nhs-accordion-header:hover {
    background: #1a1a1a;
    color: #00ff41;
}

.nhs-accordion-content {
    padding: 15px;
    border-top: 1px solid #333;
    font-size: 13px;
}

/* Override button hover for action links to prevent text color issue */
button.nhs-action-link:hover {
    color: #0a0a0a !important;
}


/* --- WORKSPACE BUTTON FIXES --- */
.nhs-panel button.nhs-action-link {
    background: transparent !important;
    color: #00ff41 !important;
    border: 1px solid #00ff41 !important;
    font-family: 'Courier New', Courier, monospace !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.nhs-panel button.nhs-action-link:hover {
    background: #00ff41 !important;
    color: #0a0a0a !important;
}

/* Specific override for the Flag button to keep it red */
.nhs-panel button.nhs-action-link.flag-btn,
.nhs-panel button.nhs-action-link[style*="ff3333"] {
    color: #ff3333 !important;
    border-color: #ff3333 !important;
}

.nhs-panel button.nhs-action-link.flag-btn:hover,
.nhs-panel button.nhs-action-link[style*="ff3333"]:hover {
    background: #ff3333 !important;
    color: #0a0a0a !important;
}


/* --- AGGRESSIVE WORKSPACE BUTTON RESET --- */
.nhs-panel button, 
.nhs-panel button.nhs-action-link {
    background: transparent !important;
    background-color: transparent !important;
    color: #00ff41 !important;
    border: 1px solid #00ff41 !important;
    font-family: 'Courier New', Courier, monospace !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    padding: 8px 12px !important;
    font-size: 11px !important;
    display: inline-block !important;
}

.nhs-panel button:hover, 
.nhs-panel button.nhs-action-link:hover {
    background: #00ff41 !important;
    background-color: #00ff41 !important;
    color: #0a0a0a !important;
}

/* Flag Button Exception */
.nhs-panel button[style*="ff3333"], 
.nhs-panel button.flag-btn {
    color: #ff3333 !important;
    border-color: #ff3333 !important;
}

.nhs-panel button[style*="ff3333"]:hover, 
.nhs-panel button.flag-btn:hover {
    background: #ff3333 !important;
    color: #0a0a0a !important;
}

/* --- AGGRESSIVE WORKSPACE BUTTON RESET --- */
.nhs-panel button, 
.nhs-panel button.nhs-action-link {
    background: transparent !important;
    background-color: transparent !important;
    color: #00ff41 !important;
    border: 1px solid #00ff41 !important;
    font-family: 'Courier New', Courier, monospace !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    padding: 8px 12px !important;
    font-size: 11px !important;
    display: inline-block !important;
}

.nhs-panel button:hover, 
.nhs-panel button.nhs-action-link:hover {
    background: #00ff41 !important;
    background-color: #00ff41 !important;
    color: #0a0a0a !important;
}

/* Flag Button Exception */
.nhs-panel button[style*="ff3333"], 
.nhs-panel button.flag-btn {
    color: #ff3333 !important;
    border-color: #ff3333 !important;
}

.nhs-panel button[style*="ff3333"]:hover, 
.nhs-panel button.flag-btn:hover {
    background: #ff3333 !important;
    color: #0a0a0a !important;
}
