:root {
    --bg-main: #121519;
    --metal-plate: linear-gradient(145deg, #2a313a, #181d24);
    --metal-header: linear-gradient(180deg, #3a4450, #222931);
    --metal-highlight: #4e5a6b;
    --border-steel: #3f4956;
    --text-silver: #d1d5db;
    --text-bright: #ffffff;
    --text-muted: #8a99ad;

    --neon-cyan: #00f0ff;
    --neon-green: #39ff14;
    --neon-red: #ff3131;
    --neon-amber: #ffaa00;

    --radius: 4px;
    --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Consolas', 'Courier New', monospace, sans-serif;
    background-color: var(--bg-main);
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-silver);
    line-height: 1.5;
    padding: 2rem 1rem;
}

.app-container {
    max-width: 1240px;
    margin: 0 auto;
}

.app-header {
    background: var(--metal-header);
    border: 2px solid var(--border-steel);
    border-bottom: 4px solid #111;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-heavy);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.app-header::before,
.app-header::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #555;
    border-radius: 50%;
    box-shadow: inset 1px 1px 2px #000, 1px 1px 1px rgba(255,255,255,0.2);
    top: 6px;
}
.app-header::before { left: 6px; }
.app-header::after  { right: 6px; }

.brand h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-bright);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 0 10px rgba(255,255,255,0.1);
}

.subtitle {
    font-size: 0.8rem;
    color: var(--neon-cyan);
    margin-top: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

kbd {
    background: #222;
    color: var(--neon-amber);
    padding: 2px 6px;
    border: 1px solid #444;
    border-radius: 3px;
    font-size: 0.75rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}

.controls-card {
    background: #1e242c;
    border: 1px solid var(--border-steel);
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.input-group label {
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--text-silver);
    text-transform: uppercase;
}

select {
    padding: 0.5rem 1.5rem 0.5rem 0.75rem;
    border: 1px solid #111;
    border-top: 1px solid #444;
    border-radius: var(--radius);
    background: linear-gradient(to bottom, #2d3540, #1b2026);
    color: var(--text-bright);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

select:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

select option {
    background-color: #1b2026;
    color: #ffffff;
    padding: 0.5rem;
}

.btn {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-weight: bold;
    font-size: 0.85rem;
    font-family: inherit;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid #111;
    border-top: 1px solid #666;
    transition: all 0.1s ease;
    box-shadow: 0 3px 0 #111, 0 4px 6px rgba(0,0,0,0.5);
}

.btn-primary {
    background: linear-gradient(to bottom, #3b4859, #222a35);
    color: var(--text-bright);
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #445367, #28323f);
    color: var(--neon-cyan);
}

.btn-primary:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 #111, inset 0 2px 4px rgba(0,0,0,0.6);
}

.status-bar {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    border: 1px solid #000;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
}

.status-info    { background: #161f2b; color: var(--neon-cyan);  border-left: 4px solid var(--neon-cyan); }
.status-success { background: #14241b; color: var(--neon-green); border-left: 4px solid var(--neon-green); }
.status-error   { background: #28171a; color: var(--neon-red);   border-left: 4px solid var(--neon-red); }
.hidden { display: none; }

.data-wrapper {
    background: var(--metal-plate);
    border: 2px solid var(--border-steel);
    border-radius: var(--radius);
    box-shadow: var(--shadow-heavy);
    padding: 4px;
}

.table-responsive {
    overflow-x: auto;
    border: 1px solid #111;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
    background: #191f26;
}

.modern-table th {
    background: linear-gradient(to bottom, #2f3743, #1d222a);
    padding: 1rem;
    font-weight: bold;
    color: var(--text-bright);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid #111;
    border-right: 1px solid var(--border-steel);
}

.modern-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #1a2026;
    border-right: 1px solid #222a33;
    color: var(--text-silver);
}

.interactive-cell {
    cursor: pointer;
    position: relative;
}

.interactive-cell:hover {
    background-color: #242c37;
    color: var(--text-bright);
    box-shadow: inset 0 0 4px rgba(255,255,255,0.05);
}

.placeholder-text {
    color: var(--text-muted);
    padding: 4rem !important;
    text-align: center;
    font-style: italic;
    background: #14191f;
}

.row-modified {
    background-color: #2c271e !important;
    border-left: 3px solid var(--neon-amber);
}

.table-inline-input {
    width: 100%;
    padding: 0.3rem 0.5rem;
    background: #0d1115;
    border: 1px solid var(--neon-cyan);
    border-radius: 2px;
    color: var(--neon-cyan);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}

.action-cell {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.btn-action {
    width: 26px;
    height: 26px;
    border-radius: 3px;
    border: 1px solid #111;
    border-top: 1px solid #555;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #3a4450, #232931);
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
    transition: transform 0.05s ease;
}

.btn-action:active { transform: scale(0.92); }

.btn-save { color: var(--neon-green); }
.btn-save:hover:not([disabled]) {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 8px var(--neon-green);
}
.btn-save[disabled] { opacity: 0.15; cursor: not-allowed; border-top-color: #333; }

.btn-delete { color: var(--neon-red); }
.btn-delete:hover {
    background: var(--neon-red);
    color: #000;
    box-shadow: 0 0 8px var(--neon-red);
}

.btn-clone { color: var(--neon-cyan); }
.btn-clone:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 8px var(--neon-cyan);
}

.text-center { text-align: center; }
.text-danger  { color: var(--neon-red); }

.modern-table tbody tr:nth-child(even) {
    background: #1c232c;
}
