:root {
    --accent: #a855f7;
    --accent-hover: #c084fc;
    --bg: #0a0a0b;
    --panel: #101113;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    font-family: Montserrat, Segoe UI, sans-serif;
    color: #fff;
}

.view {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.card {
    width: 380px;
    background: var(--panel);
    border-top: 2px solid var(--accent);
    box-shadow: 0 0 1.5em 0.2em rgba(0, 0, 0, 0.6);
}

.dashboard-card {
    width: 640px;
}

.tab-bar {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    padding: 12px 10px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.85);
}

.tab-btn.active {
    color: #fff;
    border-bottom-color: var(--accent);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.card-body {
    padding: 18px;
}

.login-body {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
}

.btn-primary {
    background: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary:disabled {
    background: rgba(168, 85, 247, 0.3);
    cursor: not-allowed;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
}

.btn-small {
    padding: 6px 10px;
    font-size: 11px;
}

.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    padding: 32px 16px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    color: #fff;
}

.notes-input {
    width: 100%;
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    resize: vertical;
}

.notes-input:focus {
    outline: none;
    border-color: var(--accent);
}

.notes-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.deploy-btn {
    width: 100%;
    margin-top: 14px;
}

.progress-section {
    margin-top: 18px;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.25s ease;
}

.progress-fill.error {
    background: #e53935;
}

.progress-log {
    margin-top: 12px;
    max-height: 220px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    font-size: 11px;
    font-family: 'Consolas', monospace;
    color: rgba(255, 255, 255, 0.75);
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.08);
}

.progress-log div {
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-log::-webkit-scrollbar {
    width: 6px;
}

.progress-log::-webkit-scrollbar-thumb {
    background: var(--accent);
}

.segmented {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.segmented-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
}

.segmented-btn.active {
    background: var(--accent);
    color: #fff;
}

.select-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    padding: 8px 10px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.check-row input {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* ---- Full-screen Manual Obfuscate dashboard ---- */

.manual-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    font-family: Montserrat, "Segoe UI", sans-serif;
}

.mf-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--panel);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.mf-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
}

.mf-brand-mark {
    color: var(--accent);
    font-family: 'Cascadia Code', Consolas, monospace;
}

.mf-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mf-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.mf-status.err { color: #f14c4c; }
.mf-status.warn { color: var(--accent-hover); }
.mf-status.ok { color: #4ec9b0; }

.mf-columns {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 340px 1fr;
    min-height: 0;
}

.mf-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.mf-pane:last-child {
    border-right: none;
}

.mf-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--panel);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    flex-shrink: 0;
}

.mf-pane-actions {
    display: flex;
    gap: 6px;
}

.btn-ghost-sm {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
}

.btn-ghost-sm:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.mf-editor-host {
    flex: 1;
    min-height: 0;
}

.mf-settings-pane {
    background: var(--panel);
}

.mf-settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mf-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mf-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 700;
}

.mf-sub-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    padding-left: 20px;
}

.mf-sub-row input[type="range"] {
    flex: 1;
    accent-color: var(--accent);
}

.mf-obfuscate-btn {
    width: 100%;
}

.mf-stats {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px 12px;
    display: none;
    flex-direction: column;
    gap: 4px;
    font-family: 'Consolas', monospace;
}

.mf-stats.visible {
    display: flex;
}

.mf-stats b {
    color: #fff;
}

.mf-stats .mf-fallback-warn {
    color: var(--accent-hover);
}

@media (max-width: 900px) {
    .mf-columns {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr auto;
        overflow-y: auto;
    }
}
