:root {
    /* Color Palette - Premium Dark Theme */
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-sidebar: #1e293b;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.3);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --sidebar-width: 260px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-blur: blur(12px);
}

/* Color date/month picker icons to match theme blue */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    filter: invert(61%) sepia(85%) saturate(3025%) hue-rotate(170deg) brightness(101%) contrast(97%);
    cursor: pointer;
}

.light-theme {
    --bg-dark: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-sidebar: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

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

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 2rem 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    width: 100%;
}

.logo-icon {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 12px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 32px;
    height: 32px;
    background: transparent;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Main Content Styling */
.main-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.05), transparent);
}

.top-header {
    height: 80px;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: var(--glass-blur);
    position: sticky;
    top: 0;
    z-index: 90;
}

.top-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.date-display {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    width: 100%;
}

.content-area {
    padding: 2.5rem 2.5rem 4rem 2.5rem;
    flex: 1;
    overflow-y: auto;
}

/* Loader Styling */
.loader-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(56, 189, 248, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

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

/* Responsive Grid/Cards (to be used later) */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Dashboard Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    min-height: 120px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    width: 20px;
    height: 20px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.chart-card {
    grid-column: span 2;
    min-height: 400px;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .chart-card {
        grid-column: 1 / -1;
    }
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-sidebar);
    width: 90%;
    max-width: 550px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-content.large {
    max-width: 1100px;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
}

select.form-control option {
    background-color: var(--bg-sidebar);
    color: var(--text-primary);
    padding: 10px;
}

/* Utility Components */
.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--accent-glow);
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success { background: rgba(34, 197, 94, 0.1); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.2); }
.badge-error { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }

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

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Login Overlay & Card */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-overlay.active {
    display: flex;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 3rem;
    animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header .logo {
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: -0.5rem;
}

.status-indicator {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 1rem;
    letter-spacing: 0.05em;
    border: 1px solid var(--accent-glow);
}

.login-footer {
    text-align: center;
    margin-top: 2.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.6;
}

.config-section {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.config-section:hover {
    border-color: rgba(56, 189, 248, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.config-section h3 {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-top: 1rem;
}

#login-form .btn-primary:active {
    transform: scale(0.98);
}

/* ==========================================================================
   ESTRUTURAÇÃO ORGANIZACIONAL (Organograma / Job Descriptions / Simulação de Atividades)
   Classes prefixadas "qd-" (Quadro Dinâmico) para não colidir com o restante do app.
   ========================================================================== */
:root {
    --qd-purple: #a78bfa;
    --qd-pink: #f472b6;
    --qd-green: #34d399;
    --qd-amber: #fbbf24;
    --qd-cyan: #06b6d4;
    --qd-danger: #f87171;
}

.icon-btn.btn-delete-col:hover {
    color: var(--qd-danger);
    background-color: rgba(248, 113, 113, 0.1);
}

/* --- Kanban Board --- */
.qd-board-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    overflow-x: auto;
    padding: 0 24px 24px 24px;
}

.qd-board-column {
    width: 320px;
    flex-shrink: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: opacity 0.2s ease;
}

.qd-board-column.qd-collapsed {
    width: 50px;
    overflow: hidden;
    align-items: center;
}

.qd-board-column.qd-collapsed .qd-column-header,
.qd-board-column.qd-collapsed .qd-cards-container,
.qd-board-column.qd-collapsed .qd-column-footer {
    display: none;
}

.qd-board-column .qd-collapsed-title {
    display: none;
}

.qd-board-column.qd-collapsed .qd-collapsed-title {
    display: block;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 16px 8px;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    letter-spacing: 1px;
}

.qd-board-column.qd-dragging-col {
    opacity: 0.4;
    border: 2px dashed var(--accent);
}

.qd-board-column.qd-drag-over-col {
    background-color: rgba(56, 189, 248, 0.08);
    border: 1px dashed var(--accent);
}

.qd-column-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qd-column-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}

.qd-column-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    border: none;
    background: transparent;
    width: 80%;
    outline: none;
    padding: 2px 4px;
    border-radius: 4px;
}

.qd-column-title:focus {
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 2px var(--accent);
}

.qd-column-subtitle {
    font-size: 11.5px;
    color: var(--text-secondary);
    border: none;
    background: transparent;
    outline: none;
    padding: 2px 4px;
    border-radius: 4px;
    width: 100%;
}

.qd-column-subtitle:focus {
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 2px var(--accent);
}

.qd-column-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.qd-card-count-badge {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.qd-column-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.qd-cards-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex-grow: 1;
    min-height: 60px;
}

.qd-card-item {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    cursor: move;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    user-select: none;
}

.qd-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.15);
}

.qd-card-item.qd-dragging {
    opacity: 0.4;
    border: 2px dashed var(--accent);
}

.qd-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    gap: 6px;
}

.qd-card-id {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.qd-card-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.qd-card-item:hover .qd-card-actions {
    opacity: 1;
}

.qd-card-title {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.qd-card-desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: none;
    margin-bottom: 8px;
    background-color: rgba(0, 0, 0, 0.15);
    padding: 8px;
    border-radius: 6px;
    border-left: 2px solid rgba(255, 255, 255, 0.15);
}

.qd-card-desc.qd-expanded {
    display: block;
}

.qd-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.qd-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    background-color: rgba(56, 189, 248, 0.12);
    color: var(--accent);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.qd-badge-details-btn {
    font-size: 10px;
    color: var(--accent);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-top: 4px;
    font-weight: 600;
}

.qd-column-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

.qd-btn-add-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.qd-btn-add-card:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.2);
}

.qd-add-column-placeholder {
    width: 320px;
    height: 150px;
    flex-shrink: 0;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    gap: 8px;
}

.qd-add-column-placeholder:hover {
    color: var(--accent);
    border-color: var(--accent);
    background-color: rgba(56, 189, 248, 0.02);
}

/* --- Organograma (Tree) --- */
.qd-org-chart-viewport {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    padding: 24px;
    cursor: grab;
    text-align: center;
}

.qd-zoom-controls {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.qd-zoom-controls .icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.qd-tree {
    display: inline-flex;
    text-align: left;
    transform-origin: top center;
    transition: transform 0.15s ease;
}

.qd-tree ul {
    padding-top: 24px;
    position: relative;
    display: flex;
    justify-content: center;
    margin: 0;
}

.qd-tree li {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 24px 10px 0 10px;
    list-style-type: none;
}

.qd-tree li::before, .qd-tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid var(--border-color);
    width: 50%;
    height: 24px;
    z-index: 1;
}

.qd-tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid var(--border-color);
}

.qd-tree li:only-child::after, .qd-tree li:only-child::before {
    display: none;
}

.qd-tree li:first-child::before, .qd-tree li:last-child::after {
    border: none;
}

.qd-tree li:last-child::before {
    border-right: 2px solid var(--border-color);
    border-radius: 0 8px 0 0;
}

.qd-tree li:first-child::after {
    border-radius: 8px 0 0 0;
}

.qd-tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid var(--border-color);
    width: 0;
    height: 24px;
    z-index: 1;
}

.qd-tree-node {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
    min-width: 170px;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: move;
}

.qd-tree-node::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 12px 12px 0 0;
    background-color: var(--qd-node-accent, var(--text-secondary));
}

.qd-tree-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.qd-tree-node.qd-drag-over-node {
    border: 2px dashed var(--accent) !important;
    transform: scale(1.05);
}

.qd-tree-node.qd-dragging-node {
    opacity: 0.5;
}

.qd-tree-node-title {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--text-primary);
    margin-bottom: 4px;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.qd-tree-node-subtitle {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.qd-tree-node-coreport {
    font-size: 10px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    padding: 3px 6px;
    border-radius: 6px;
    margin-top: 6px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    font-weight: 600;
}

.qd-tree-node-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.qd-tree-node:hover .qd-tree-node-actions {
    opacity: 1;
}

.qd-tree-node-actions .icon-btn {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 4px;
}

/* --- Job Descriptions --- */
.qd-job-desc-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 24px 24px 24px;
}

.qd-job-desc-slider-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.qd-job-slider-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: grab;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.qd-job-slider-btn:active {
    cursor: grabbing;
}

.qd-job-slider-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.qd-job-slider-btn.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.qd-job-slider-btn.qd-drag-over {
    border: 1px dashed var(--accent) !important;
    background: rgba(56, 189, 248, 0.15) !important;
    transform: scale(1.05);
}

.qd-job-desc-slide {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    min-height: 0;
}

@media (max-width: 1024px) {
    .qd-job-desc-slide {
        grid-template-columns: 1fr;
    }
}

.qd-job-desc-left {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.08) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.qd-job-card-decor {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--qd-theme-glow, var(--accent-glow)) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(20px);
    opacity: 0.5;
}

.qd-job-desc-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.qd-job-desc-form-group label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    font-weight: 600;
}

.qd-job-role-input,
.qd-job-role-select,
.qd-job-role-textarea {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: inherit;
    width: 100%;
    outline: none;
    transition: all 0.2s ease;
}

.qd-job-role-input {
    font-size: 20px;
    font-weight: 700;
}

.qd-job-role-select {
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
}

.qd-job-role-textarea {
    font-size: 14px;
    line-height: 1.5;
    height: 100px;
    resize: none;
}

.qd-job-role-input:focus,
.qd-job-role-select:focus,
.qd-job-role-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.qd-btn-delete-role {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(248, 113, 113, 0.05);
    border: 1px solid var(--qd-danger);
    color: var(--qd-danger);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
    width: 100%;
}

.qd-btn-delete-role:hover {
    background: var(--qd-danger);
    color: #ffffff;
}

.qd-job-desc-right {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
}

.qd-job-desc-right-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.qd-job-desc-right-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.qd-responsibilities-count-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.qd-job-responsibilities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
}

.qd-job-resp-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.2s ease;
}

.qd-job-resp-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.qd-job-resp-item.qd-drag-over {
    border: 1px dashed var(--accent) !important;
    background: rgba(56, 189, 248, 0.08) !important;
    transform: translateY(2px);
}

.qd-job-resp-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--qd-theme-bullet, var(--accent));
    margin-top: 10px;
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--qd-theme-bullet, var(--accent));
}

.qd-job-resp-textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13.5px;
    line-height: 1.5;
    resize: none;
    outline: none;
    padding: 2px 0;
    font-family: inherit;
    height: auto;
    min-height: 24px;
}

.qd-job-resp-drag-handle {
    color: var(--text-secondary);
    cursor: grab;
    padding: 6px;
    margin-right: -4px;
    user-select: none;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

.qd-job-resp-item:hover .qd-job-resp-drag-handle {
    opacity: 0.8;
}

.qd-btn-delete-resp {
    opacity: 0.3;
    transition: opacity 0.2s ease, color 0.2s ease;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

.qd-job-resp-item:hover .qd-btn-delete-resp {
    opacity: 0.8;
}

.qd-btn-delete-resp:hover {
    opacity: 1 !important;
    color: var(--qd-danger) !important;
    background: rgba(248, 113, 113, 0.1);
}

.qd-btn-add-resp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.05);
    border: 1px dashed var(--accent);
    color: var(--accent);
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    width: 100%;
}

.qd-btn-add-resp:hover {
    background: rgba(56, 189, 248, 0.1);
    color: #ffffff;
}
