/**
 * TERMINAL 3270 STYLESHEET
 * ========================
 * IBM 3278/3279 Green Screen Terminal Emulation
 * 16-Color IBM Mainframe Aesthetic
 * 
 * COLOR PALETTE:
 * - Base: #0f0 (Green) on #000 (Black)
 * - Bright Green: #0f0 (High intensity)
 * - Dim Green: #0a0 (Low intensity)
 * - Amber: #fc0 (Warning/Attention)
 * - Red: #f00 (Error/Critical)
 * - Blue: #00f (Information)
 */

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

body {
    background-color: #000;
    color: #0f0;
    font-family: 'Courier New', 'IBM EGA', 'VT220', monospace;
    font-size: 16px;
    line-height: 1.4;
    padding: 20px;
    height: 100vh;
    overflow-y: auto;
    position: relative;
}

/* CRT Screen Effect */
body::before {
    content: "";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(0, 255, 0, 0.03) 50%,
        rgba(0, 0, 0, 0.03) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 10px; }
}

/* Terminal Container */
.terminal {
    max-width: 1200px;
    margin: 0 auto;
    border: 2px solid #0f0;
    padding: 20px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

/* Header Section */
.terminal-header {
    border-bottom: 1px solid #0f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
}

.system-title {
    color: #0f0;
    font-weight: bold;
    letter-spacing: 2px;
}

.system-status {
    color: #0f0;
}

/* Main Content */
.terminal-content {
    min-height: 400px;
}

/* Footer */
.terminal-footer {
    border-top: 1px solid #0f0;
    margin-top: 20px;
    padding-top: 10px;
    font-size: 14px;
    color: #0a0;
}

/* Tables - Terminal Grid Style */
.terminal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.terminal-table th {
    border-bottom: 2px solid #0f0;
    padding: 8px;
    text-align: left;
    text-transform: uppercase;
    color: #0f0;
    font-weight: bold;
}

.terminal-table td {
    border-bottom: 1px solid #0a0;
    padding: 8px;
    vertical-align: middle;
}

.terminal-table tr:hover {
    background-color: #0a0;
    color: #000;
}

.terminal-table tr:hover td {
    color: #000;
}

.terminal-table tr:hover .blink-dot {
    opacity: 1;
}

/* Form Elements - Terminal Style */
.terminal-form {
    margin: 20px 0;
}

.terminal-field {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.terminal-label {
    width: 200px;
    text-transform: uppercase;
    color: #0f0;
}

.terminal-input {
    background-color: #000;
    border: 1px solid #0f0;
    color: #0f0;
    padding: 8px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    width: 300px;
}

.terminal-input:focus {
    outline: none;
    border-color: #0f0;
    box-shadow: 0 0 5px #0f0;
}

.terminal-select {
    background-color: #000;
    border: 1px solid #0f0;
    color: #0f0;
    padding: 8px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    width: 300px;
}

/* Buttons - Terminal Style */
.terminal-button {
    background-color: #000;
    border: 2px solid #0f0;
    color: #0f0;
    padding: 10px 20px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    text-transform: uppercase;
    cursor: pointer;
    margin-right: 10px;
}

.terminal-button:hover {
    background-color: #0f0;
    color: #000;
}

.terminal-button.active {
    background-color: #0f0;
    color: #000;
}

.terminal-button:disabled {
    border-color: #0a0;
    color: #0a0;
    cursor: not-allowed;
}

/* Confidence Indicators - Blinking Dots */
.confidence-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 5px;
    animation: blink 1s infinite;
}

.confidence-HIGH {
    background-color: #0f0;
    box-shadow: 0 0 5px #0f0;
}

.confidence-MEDIUM {
    background-color: #fc0;
    box-shadow: 0 0 5px #fc0;
}

.confidence-LOW {
    background-color: #f00;
    box-shadow: 0 0 5px #f00;
}

.confidence-UNVERIFIED {
    background-color: #00f;
    box-shadow: 0 0 5px #00f;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Part Number Display - Proper Spacing */
.part-number {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    font-weight: bold;
}

.part-number-a {
    color: #0f0;
}

.part-number-b {
    color: #fc0;
}

.part-number-n {
    color: #00f;
}

.part-number-w {
    color: #f0f;
}

/* Navigation Menu */
.terminal-menu {
    margin: 20px 0;
    padding: 10px 0;
    border-top: 1px solid #0f0;
    border-bottom: 1px solid #0f0;
}

.terminal-menu ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.terminal-menu a {
    color: #0f0;
    text-decoration: none;
    text-transform: uppercase;
    padding: 5px 10px;
}

.terminal-menu a:hover {
    background-color: #0f0;
    color: #000;
}

/* Status Messages */
.terminal-success {
    border: 1px solid #0f0;
    padding: 10px;
    margin: 10px 0;
    color: #0f0;
}

.terminal-error {
    border: 1px solid #f00;
    padding: 10px;
    margin: 10px 0;
    color: #f00;
}

.terminal-warning {
    border: 1px solid #fc0;
    padding: 10px;
    margin: 10px 0;
    color: #fc0;
}

/* Boxes and Containers */
.terminal-box {
    border: 1px solid #0f0;
    padding: 15px;
    margin: 15px 0;
}

.terminal-box-title {
    border-bottom: 1px solid #0f0;
    padding-bottom: 5px;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

/* Scrollbar - Terminal Style */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
    border: 1px solid #0f0;
}

::-webkit-scrollbar-thumb {
    background: #0f0;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a0;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 14px;
    }
    
    .terminal {
        padding: 10px;
    }
    
    .terminal-field {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .terminal-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .terminal-input,
    .terminal-select {
        width: 100%;
    }
    
    .terminal-menu ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .terminal-table {
        display: block;
        overflow-x: auto;
    }
}
