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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

/* LOGIN */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-box {
    background: #16213e;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    width: 360px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid #233554;
}

.login-box h1 {
    color: #4fc3f7;
    margin-bottom: 8px;
    font-size: 1.8em;
}

.login-box p {
    color: #90a4ae;
    margin-bottom: 24px;
}

.login-box input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #233554;
    border-radius: 8px;
    background: #1a1a2e;
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px;
    outline: none;
}

.login-box input:focus {
    border-color: #4fc3f7;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #4fc3f7;
    color: #1a1a2e;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-box button:hover {
    background: #29b6f6;
}

.error-msg {
    color: #ef5350;
    margin-top: 12px;
    font-size: 14px;
}

/* MAIN PANEL */
.main-panel {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    background: #16213e;
    border-right: 1px solid #233554;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #233554;
}

.sidebar-header h2 {
    color: #4fc3f7;
    font-size: 1.3em;
}

.nav-menu {
    list-style: none;
    padding: 12px 0;
}

.nav-menu li {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.nav-menu li:hover {
    background: #1a1a2e;
    border-left-color: #4fc3f7;
}

.nav-menu li.active {
    background: #1a1a2e;
    border-left-color: #4fc3f7;
    color: #4fc3f7;
}

.nav-menu li i {
    width: 20px;
    margin-right: 10px;
}

/* CONTENT */
.content {
    margin-left: 240px;
    flex: 1;
    padding: 24px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page h1 {
    margin-bottom: 20px;
    color: #fff;
    font-size: 1.5em;
}

/* CARDS */
.card {
    background: #16213e;
    border: 1px solid #233554;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.card h3 {
    color: #4fc3f7;
    margin-bottom: 16px;
    font-size: 1.1em;
}

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #16213e;
    border: 1px solid #233554;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card i {
    font-size: 2em;
    color: #4fc3f7;
}

.stat-info span {
    display: block;
    font-size: 1.3em;
    font-weight: 600;
    color: #fff;
}

.stat-info small {
    color: #90a4ae;
    font-size: 0.85em;
}

/* FORMS */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 13px;
    color: #90a4ae;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    padding: 10px 12px;
    border: 1px solid #233554;
    border-radius: 6px;
    background: #1a1a2e;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #4fc3f7;
}

.form-inline {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.form-inline input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #233554;
    border-radius: 6px;
    background: #1a1a2e;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.form-inline input:focus {
    border-color: #4fc3f7;
}

/* BUTTONS */
.btn-primary {
    padding: 10px 20px;
    background: #4fc3f7;
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #29b6f6;
}

.btn-success {
    padding: 10px 20px;
    background: #66bb6a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-success:hover {
    background: #43a047;
}

.btn-secondary {
    padding: 10px 20px;
    background: #455a64;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #37474f;
}

.btn-danger {
    padding: 6px 12px;
    background: #ef5350;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.btn-danger:hover {
    background: #d32f2f;
}

/* TOOLBAR */
.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

/* TABLES */
.table-wrap {
    overflow-x: auto;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #233554;
    font-size: 13px;
}

.table-wrap th {
    background: #1a1a2e;
    color: #4fc3f7;
    font-weight: 600;
}

.table-wrap tr:hover {
    background: #1a1a2e;
}

/* RESULTS & LOGS */
.result-area {
    margin-top: 12px;
    padding: 12px;
    background: #1a1a2e;
    border-radius: 6px;
    font-size: 13px;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

.log-area {
    padding: 12px;
    background: #0d1117;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.5;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #16213e;
    padding: 24px;
    border-radius: 10px;
    width: 400px;
    border: 1px solid #233554;
}

.modal-content h3 {
    color: #4fc3f7;
    margin-bottom: 16px;
}

.modal-content input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #233554;
    border-radius: 6px;
    background: #1a1a2e;
    color: #fff;
    font-size: 14px;
    margin-bottom: 16px;
    outline: none;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

/* STATUS BADGES */
.badge-ok {
    color: #66bb6a;
    font-weight: 600;
}

.badge-error {
    color: #ef5350;
    font-weight: 600;
}

.badge-warn {
    color: #ffa726;
    font-weight: 600;
}

/* STEP RESULTS */
.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid #233554;
}

.step-item:last-child {
    border-bottom: none;
}

.step-icon-ok { color: #66bb6a; }
.step-icon-error { color: #ef5350; }
.step-icon-warn { color: #ffa726; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .sidebar-header h2 {
        display: none;
    }
    .nav-menu li {
        text-align: center;
        padding: 12px;
    }
    .nav-menu li span {
        display: none;
    }
    .content {
        margin-left: 60px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
