/* ============================================================
   dhaynes.net - Hacker Terminal Theme
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* --- Theme Variables --- */
:root {
    --bg: #000000;
    --bg-card: #0a0a0a;
    --bg-card-hover: #111111;
    --bg-input: #050505;
    --border: #1a3a1a;
    --border-focus: #00ff41;
    --text: #00ff41;
    --text-dim: #008f24;
    --text-heading: #00ff41;
    --accent: #00ff41;
    --accent-hover: #33ff6b;
    --accent-dim: rgba(0, 255, 65, 0.08);
    --success: #00ff41;
    --warning: #ffff00;
    --danger: #ff0040;
    --danger-bg: rgba(255, 0, 64, 0.1);
    --font: 'Courier New', 'Lucida Console', monospace;
    --font-mono: 'Courier New', 'Lucida Console', monospace;
    --radius: 2px;
    --shadow: 0 0 10px rgba(0, 255, 65, 0.1);
    --header-bg: #000000;
    --status-online: #00ff41;
    --status-offline: #ff0040;
}

/* --- Global Styles --- */
html { font-size: 15px; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

/* --- Header --- */
header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}
.logo::before { content: "$ "; color: var(--text-dim); }
nav { display: flex; align-items: center; gap: 1.25rem; }
nav a { color: var(--text-dim); font-size: 0.875rem; }
nav a:hover { color: var(--text); }

/* --- Main --- */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: all 0.2s;
}
.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}
.card h3 {
    color: var(--text-heading);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.card h3::before { content: "["; color: var(--text-dim); }
.card h3::after { content: "]"; color: var(--text-dim); }

/* --- Section Headers --- */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.section-title::before { content: "## "; color: var(--text-dim); }

/* --- Server Status --- */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.status-card .server-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-heading);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.server-name::before { content: "$ "; color: var(--text-dim); font-weight: 400; }
.status-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
}
.status-dot.online { background: var(--status-online); box-shadow: 0 0 6px var(--status-online); }
.status-dot.offline { background: var(--status-offline); box-shadow: 0 0 6px var(--status-offline); }

.status-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.metric-label { color: var(--text-dim); font-size: 0.75rem; }
.metric-value { color: var(--text); font-size: 0.85rem; font-family: var(--font-mono); }

/* --- Progress Bars --- */
.progress-bar {
    width: 100%;
    height: 3px;
    background: var(--border);
    margin-top: 0.25rem;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    transition: width 0.3s;
}
.progress-fill.good { background: var(--success); }
.progress-fill.warn { background: var(--warning); }
.progress-fill.crit { background: var(--danger); }

/* --- Login Form --- */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
}
.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}
.login-box h2 {
    color: var(--text-heading);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.login-box h2::before { content: "[ "; }
.login-box h2::after { content: " ]"; }
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-group label::after { content: ":"; }
.form-group input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: border-color 0.15s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--border-focus);
}
.btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.btn:hover { background: var(--accent); color: #000; }

/* --- Alerts --- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.85rem;
}
.alert-error {
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    color: var(--danger);
}
.alert-error::before { content: "[ERROR] "; font-weight: bold; }
.alert-success {
    background: rgba(0, 255, 65, 0.08);
    border: 1px solid var(--success);
    color: var(--success);
}
.alert-success::before { content: "[OK] "; font-weight: bold; }

/* --- 2FA Setup --- */
.totp-setup {
    text-align: center;
}
.totp-setup .secret-key {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin: 1rem 0;
    word-break: break-all;
}
.qr-container {
    margin: 1.5rem 0;
    display: inline-block;
    padding: 1rem;
    background: #ffffff;
    border-radius: var(--radius);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .status-grid { grid-template-columns: 1fr; }
    .header-inner { padding: 0 1rem; }
    main { padding: 1.5rem 1rem; }
}
