:root {
    --bg-dark: #12121c;
    --bg-panel: rgba(30, 30, 46, 0.7);
    --bg-input: #2a2a3b;
    --text-main: #e2e2ec;
    --text-muted: #8e8ea0;
    --accent: #6d5dfc;
    --accent-hover: #8b7ffc;
    --border: rgba(255, 255, 255, 0.1);
    --success: #2ecd71;
    --error: #e74c3c;
    --radius: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-dark);
    height: 100vh;
    overflow: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(109, 93, 252, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(46, 205, 113, 0.05) 0%, transparent 50%);
}

.app-container {
    display: flex;
    height: 100vh;
}

/* ────────────────────────────────────────────────────────
 *  SIDEBAR
 * ──────────────────────────────────────────────────────── */
.sidebar {
    width: 250px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent);
    margin-bottom: 40px;
}

.brand h2 {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.nav-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-links li {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-links li i {
    font-size: 18px;
    width: 20px;
}

.nav-links li:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links li.active {
    color: white;
    background: var(--accent);
    box-shadow: 0 4px 15px rgba(109, 93, 252, 0.3);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(46, 205, 113, 0.1);
    border-radius: 8px;
    font-size: 13px;
    color: var(--success);
    font-weight: 500;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 205, 113, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(46, 205, 113, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 205, 113, 0);
    }
}

/* ────────────────────────────────────────────────────────
 *  MAIN CONTENT
 * ──────────────────────────────────────────────────────── */
.content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

header p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(20px);
}

.hidden {
    display: none !important;
}

/* ────────────────────────────────────────────────────────
 *  FORMS
 * ──────────────────────────────────────────────────────── */
.module-panel h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 18px;
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(109, 93, 252, 0.2);
}

select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%238e8ea0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 16px top 50%;
    background-size: 10px auto;
}

.disabled-input {
    opacity: 0.6;
    cursor: not-allowed;
}

.row-radio {
    display: flex;
    gap: 20px;
    background: var(--bg-input);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.row-radio label {
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    color: var(--text-main);
}

.row-radio label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.row-radio input[type="radio"] {
    accent-color: var(--accent);
}

.btn-launch {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(109, 93, 252, 0.3);
}

.btn-launch:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 93, 252, 0.4);
}

.btn-launch:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.optional-section {
    border-top: 1px solid var(--border);
    margin-top: 24px;
    padding-top: 24px;
}

.optional-section h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ────────────────────────────────────────────────────────
 *  RESULTS & TERMINAL
 * ──────────────────────────────────────────────────────── */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.terminal-box {
    background: #0d0d14;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    height: 250px;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.log-line {
    margin-bottom: 4px;
}

.log-line.system {
    color: var(--text-muted);
}

.log-line.info {
    color: #5bc0de;
}

.log-line.success {
    color: var(--success);
}

.log-line.error {
    color: var(--error);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--bg-input);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.stat-value.success {
    color: var(--success);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ────────────────────────────────────────────────────────
 *  LOGIN OVERLAY
 * ──────────────────────────────────────────────────────── */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(18, 18, 28, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 400px;
    padding: 40px;
}

.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.captcha-container {
    width: 100%;
    height: 80px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-container img {
    max-width: 100%;
    height: auto;
}

.login-error {
    margin-top: 16px;
    padding: 12px;
    background: rgba(231, 76, 60, 0.1);
    color: var(--error);
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 40px;
}

#togglePassword {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

#togglePassword:hover {
    color: var(--text-main);
}