:root {
    --sidebar-width: 250px;
}
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f5f7fa;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body > .d-flex {
    flex: 1;
    min-height: 0;
}

/* ─── Sidebar ─── */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.sidebar-header {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
}
.sidebar-search {
    flex-shrink: 0;
}
.sidebar-search input::placeholder {
    color: rgba(255,255,255,0.35);
}
.sidebar-nav {
    flex: 1;
}
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.sidebar-link.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
    border-left: 3px solid var(--bs-primary);
    padding-left: calc(1rem - 3px);
}
.sidebar-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        bottom: 0;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        min-height: 0;
        height: auto;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-backdrop.show {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1049;
        background: rgba(0,0,0,0.4);
    }
}

.main-content {
    padding: 1.5rem;
    min-width: 0;
    flex: 1;
}
@media (max-width: 991.98px) {
    .main-content {
        padding: 1rem;
    }
}
.card {
    border: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}
.card:hover {
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
}
.card-stat {
    border-left: 4px solid var(--bs-primary);
}
.card-stat.success { border-left-color: var(--bs-success); }
.card-stat.warning { border-left-color: var(--bs-warning); }
.card-stat.info { border-left-color: var(--bs-info); }

.table th {
    background: #f8f9fc;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
}
.table th:hover { color: var(--bs-primary); }
.table th .sort-icon { opacity: 0.3; margin-left: 4px; }
.table th .sort-icon.active { opacity: 1; }

.password-strength-bar {
    height: 6px;
    border-radius: 3px;
    transition: width 0.3s, background 0.3s;
}
.password-strength-text {
    font-size: 0.8rem;
    font-weight: 500;
}

.watermark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-30deg);
    font-size: 14px;
    color: rgba(0,0,0,0.08);
    user-select: none;
}

.visor-toolbar {
    background: #2c3e50;
    color: white;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.visor-canvas {
    background: #6c757d;
    display: flex;
    justify-content: center;
    padding: 20px;
    min-height: 500px;
}
.visor-canvas canvas {
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.step-indicator .step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    opacity: 0.4;
}
.step-indicator .step.active { opacity: 1; background: #e8f4fd; }
.step-indicator .step.completed { opacity: 1; }
.step-indicator .step .step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}
.step-indicator .step.active .step-number { background: var(--bs-primary); }
.step-indicator .step.completed .step-number { background: var(--bs-success); }
.step-indicator .step:not(.active):not(.completed) .step-number { background: #ccc; }
