/* ======================================
   CSS Variables & Base Styles
====================================== */
:root {
    /* Backgrounds - Slightly Lighter for Contrast */
    --bg-primary: #0f0f0f;
    --bg-secondary: #1c1c1c;
    --bg-tertiary: #262626;
    --bg-card: #222222;

    /* Text */
    --text-primary: #f5f5f5;
    --text-secondary: #a8a8a8;
    --text-muted: #6a6a6a;

    /* Accent - Orange ONLY */
    --accent: #e67e22;
    --accent-hover: #d35400;
    --accent-glow: rgba(230, 126, 34, 0.25);

    /* Legacy aliases for compatibility */
    --accent-purple: #e67e22;
    --accent-blue: #e67e22;
    --accent-green: #e67e22;
    --accent-yellow: #e67e22;
    --accent-orange: #e67e22;
    --accent-red: #c0392b;
    --accent-pink: #e67e22;

    /* Border */
    --border-color: #2a2a2a;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);

    /* Radius */
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    /* Transition */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======================================
   Light Theme Variables
====================================== */
body.light-theme {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8e8;
    --bg-card: #ffffff;

    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;

    --accent: #d35400;
    --accent-hover: #e67e22;
    --accent-glow: rgba(211, 84, 0, 0.1);

    --border-color: #d0d0d0;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Light Theme Button Overrides */
body.light-theme .btn-primary,
body.light-theme .btn-success,
body.light-theme .btn-warning,
body.light-theme .btn-info,
body.light-theme .btn-orange,
body.light-theme .btn-purple,
body.light-theme .btn-cyan,
body.light-theme .btn-duplicar,
body.light-theme .btn-editar {
    color: #1a1a1a;
    text-shadow: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

body.light-theme .btn-primary:hover,
body.light-theme .btn-success:hover,
body.light-theme .btn-warning:hover,
body.light-theme .btn-info:hover,
body.light-theme .btn-orange:hover,
body.light-theme .btn-purple:hover,
body.light-theme .btn-cyan:hover,
body.light-theme .btn-duplicar:hover,
body.light-theme .btn-editar:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.light-theme .btn:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.light-theme .btn-secondary,
body.light-theme .btn-delegar {
    background: #ffffff;
    color: #1a1a1a;
    border-color: #d0d0d0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

body.light-theme .btn-secondary:hover,
body.light-theme .btn-delegar:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ======================================
   Utility Classes
====================================== */
.hidden {
    display: none !important;
}

.page {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ======================================
   Buttons
====================================== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-primary,
.btn-success,
.btn-warning,
.btn-info,
.btn-orange,
.btn-purple,
.btn-cyan,
.btn-duplicar,
.btn-editar {
    background: var(--grad-orange);
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover,
.btn-success:hover,
.btn-warning:hover,
.btn-info:hover,
.btn-orange:hover,
.btn-purple:hover,
.btn-cyan:hover,
.btn-duplicar:hover,
.btn-editar:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.btn-danger,
.btn-excluir {
    background: linear-gradient(135deg, var(--bg-tertiary), #2c0b0b);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover,
.btn-excluir:hover {
    background: var(--accent-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-secondary,
.btn-delegar {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,
.btn-delegar:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--glow-accent);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ======================================
   Login Page — Premium Animated
====================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #0a0a14;
}

/* ── Animated Background ── */
.login-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    will-change: transform;
    --mx: 0px;
    --my: 0px;
}

.login-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #e67e22 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation: orbFloat1 12s ease-in-out infinite;
}

.login-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #d35400 0%, transparent 70%);
    bottom: -15%;
    right: -10%;
    animation: orbFloat2 15s ease-in-out infinite;
}

.login-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(var(--mx), var(--my)) scale(1); }
    25% { transform: translate(calc(60px + var(--mx)), calc(40px + var(--my))) scale(1.1); }
    50% { transform: translate(calc(30px + var(--mx)), calc(80px + var(--my))) scale(0.95); }
    75% { transform: translate(calc(-20px + var(--mx)), calc(30px + var(--my))) scale(1.05); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(var(--mx), var(--my)) scale(1); }
    25% { transform: translate(calc(-50px + var(--mx)), calc(-30px + var(--my))) scale(1.08); }
    50% { transform: translate(calc(-20px + var(--mx)), calc(-70px + var(--my))) scale(0.92); }
    75% { transform: translate(calc(30px + var(--mx)), calc(-20px + var(--my))) scale(1.05); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(calc(-50% + var(--mx)), calc(-50% + var(--my))) scale(1); }
    33% { transform: translate(calc(-40% + var(--mx)), calc(-60% + var(--my))) scale(1.15); }
    66% { transform: translate(calc(-60% + var(--mx)), calc(-40% + var(--my))) scale(0.9); }
}

/* Grid overlay */
.login-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 80%);
}

/* ── Login Card — Glassmorphism ── */
.login-card {
    position: relative;
    z-index: 1;
    background: rgba(18, 18, 30, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 48px 40px 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: cardFadeIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transition: transform 0.15s ease-out;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.login-card-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(230, 126, 34, 0.3);
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    from { box-shadow: 0 4px 16px rgba(230, 126, 34, 0.2); }
    to { box-shadow: 0 4px 24px rgba(230, 126, 34, 0.5); }
}

.login-card h1 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

/* Input wrappers with icons */
.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    color: rgba(255, 255, 255, 0.25);
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}

.login-input-wrap input {
    padding-left: 44px !important;
}

.login-input-wrap:focus-within .login-input-icon {
    color: #e67e22;
}

/* Submit button */
.btn-login-submit {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(230, 126, 34, 0.3);
    margin-top: 8px;
}

.btn-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230, 126, 34, 0.45);
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.btn-login-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}

/* Register link */
.register-link {
    text-align: center;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.register-link a {
    color: #e67e22;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.register-link a:hover {
    color: #f39c12;
    text-decoration: none;
}

/* ======================================
   Forms — Global Styles
====================================== */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.error-message {
    color: var(--accent-red);
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
}

.success-message {
    display: none;
    color: #2ecc71;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
    line-height: 1.45;
}

/* ======================================
   Header — Single Unified Bar
====================================== */
.header {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.header-unified {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 48px;
    gap: 0;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.brand-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    white-space: nowrap;
}

/* Vertical separators */
.header-sep {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.08);
    margin: 0 12px;
    flex-shrink: 0;
}

.header-sep-sm {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,0.06);
    margin: 0 6px;
    flex-shrink: 0;
}

/* Nav tabs */
.header-nav {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    padding: 15px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    position: relative;
    font-family: inherit;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

.nav-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* Inline filters */
.header-filters {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Spacer pushes actions to the right */
.header-spacer {
    flex: 1;
    min-width: 8px;
}

/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-nova {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    border: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(230,126,34,0.3);
    font-family: inherit;
}

.btn-nova:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(230,126,34,0.4);
    filter: brightness(1.1);
}

.btn-nova svg {
    width: 12px;
    height: 12px;
}

/* Profile Chip */
.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border-radius: 50px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: default;
    transition: all 0.2s ease;
}

.header-profile:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.1);
}

.header-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(230,126,34,0.3);
}

.header-profile-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.header-profile-name {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    line-height: 1.2;
}

.header-profile-role {
    color: var(--accent);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    opacity: 0.8;
}

.btn-logout {
    background: none;
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: rgba(192,57,43,0.15);
    border-color: rgba(192,57,43,0.4);
    color: #e74c3c;
}

/* Filter Chips */
.filter-chip {
    padding: 4px 10px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}

.filter-chip:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

.filter-chip.active {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
    border-color: rgba(230,126,34,0.3);
}

/* ======================================
   Kanban Board — Full Height
====================================== */
.kanban-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 12px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    min-height: 0;
    align-items: stretch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.kanban-container::-webkit-scrollbar {
    display: none;
}

.kanban-column {
    flex: 1;
    min-width: 0;
    background: var(--bg-secondary);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.kanban-column:hover {
    border-color: rgba(255,255,255,0.1);
}

/* Column accent colors */
.kanban-column[data-status="A_FAZER"] .column-header { border-top: 3px solid #e67e22; }
.kanban-column[data-status="EM_ANDAMENTO"] .column-header { border-top: 3px solid #f39c12; }
.kanban-column[data-status="PARA_APROVACAO"] .column-header { border-top: 3px solid #e67e22; }
.kanban-column[data-status="EM_REVISAO"] .column-header { border-top: 3px solid #d35400; }
.kanban-column[data-status="APROVADO"] .column-header { border-top: 3px solid #e67e22; }

.kanban-column::before {
    display: none;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
}

.column-title {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.column-count {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: none;
}

.column-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Scrollbar for column cards */
.column-cards::-webkit-scrollbar {
    width: 4px;
}
.column-cards::-webkit-scrollbar-track {
    background: transparent;
}
.column-cards::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
}
.column-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.15);
}

.empty-message {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 30px 16px;
    font-size: 13px;
}

/* ======================================
   Inline Header Filters
====================================== */
.header-filters {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.header-filters .filter-period-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-filters .filter-period-inputs .filter-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-filters .filter-period-inputs .filter-input {
    padding: 3px 6px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 11px;
}

.header-filters .filter-period-inputs label {
    color: var(--text-secondary);
    font-size: 11px;
}

.kanban-date-wrapper {
    position: relative;
}

.kanban-date-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.kanban-date-trigger:hover {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
}

.kanban-date-trigger.has-value {
    color: var(--text-primary);
    border-color: rgba(230,126,34,0.3);
}

.kanban-range-area {
    display: flex;
    align-items: center;
}

.kanban-range-info {
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
    padding: 6px 0 2px;
    letter-spacing: 0.3px;
}

/* Etiqueta Filter */
.etiqueta-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.etiqueta-filter-bar .filter-label {
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.etiqueta-filter-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.etiqueta-filter-pill {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
}

.etiqueta-filter-pill:hover {
    background: rgba(255,255,255,0.06);
}

.etiqueta-filter-pill.active {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
    border-color: rgba(230,126,34,0.3);
}

/* ======================================
   Demand Card — Jira Premium Dark
====================================== */
.demand-card {
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 14px 14px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: none;
    position: relative;
    margin-bottom: 0;
    box-sizing: border-box;
    overflow: hidden;
    flex-shrink: 0;
}

.demand-card::before {
    display: none;
}

.demand-card:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.05);
    border-color: rgba(230,126,34,0.25);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10;
}

.demand-card-id {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}

/* Card Header */
.card-header-row {
    margin-bottom: 8px;
}

.demand-card-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-primary);
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Card Meta Row — tags + deadline inline */
.card-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* Etiqueta — chip/pill with background */
.etq-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 7px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.etq-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Nivel — bar indicator (completely different from TAG) */
.nivel-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: default;
}

.nivel-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.nivel-bar {
    width: 3px;
    border-radius: 1px;
    display: block;
}

/* Fácil — 1 small green bar */
.nivel-bars-FACIL .nivel-bar {
    height: 5px;
    background: #34d399;
}

/* Médio — 2 medium yellow bars */
.nivel-bars-MEDIO .nivel-bar:nth-child(1) {
    height: 6px;
    background: #fbbf24;
}

.nivel-bars-MEDIO .nivel-bar:nth-child(2) {
    height: 10px;
    background: #fbbf24;
}

/* Difícil — 3 tall red bars */
.nivel-bars-DIFICIL .nivel-bar:nth-child(1) {
    height: 5px;
    background: #f87171;
}

.nivel-bars-DIFICIL .nivel-bar:nth-child(2) {
    height: 9px;
    background: #f87171;
}

.nivel-bars-DIFICIL .nivel-bar:nth-child(3) {
    height: 13px;
    background: #f87171;
}

/* Deadline inline */
.card-deadline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

.card-deadline svg {
    opacity: 0.6;
}

.deadline-danger {
    color: var(--accent-red) !important;
}

.deadline-danger svg {
    opacity: 1;
}

/* Info rows (kept for detail view compatibility) */
.demand-card-info {
    margin-bottom: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 4px;
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
}

.text-danger {
    color: var(--accent-red) !important;
}

/* Timer — compact */
.demand-card-timer {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 6px 0;
    margin-bottom: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.timer-esgotado {
    color: var(--accent-red);
    font-style: italic;
}

.timer-concluida {
    color: var(--accent-green, #2ecc71);
    font-style: normal;
    font-weight: 700;
}

/* Footer */
.demand-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.demand-card-requester {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.requester-name {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-avatar {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    aspect-ratio: 1;
    line-height: 1;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-iniciar {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-iniciar span {
    font-size: 14px;
}

/* ======================================
   Reference Card Design (non-diretoria)
====================================== */
.ref-card {
    border-left-width: 4px !important;
    border-left-style: solid !important;
    padding: 14px 16px 12px !important;
}

/* ─ Top Row: nivel dot + deadline ─ */
.ref-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ref-nivel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--nivel-color);
}

.ref-nivel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nivel-color);
    box-shadow: 0 0 6px var(--nivel-color), 0 0 12px var(--nivel-color);
    flex-shrink: 0;
}

.ref-deadline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
}

.ref-deadline svg {
    opacity: 0.5;
}

.ref-deadline-danger {
    color: #f87171 !important;
}

.ref-deadline-danger svg {
    opacity: 1;
}

/* ─ Title ─ */
.ref-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* ─ Tags with LED glow ─ */
.ref-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.ref-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--tag-color, #8b5cf6);
    box-shadow: 0 0 8px var(--tag-color, #8b5cf6),
        inset 0 0 2px var(--tag-color, #8b5cf6);
    transition: box-shadow 0.3s ease;
}

.ref-tag:hover {
    box-shadow: 0 0 14px var(--tag-color, #8b5cf6),
        0 0 4px var(--tag-color, #8b5cf6);
}

/* ─ Footer: avatar (with glow) + play btn ─ */
.ref-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ref-avatar-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ref-avatar-name {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.1px;
}

.ref-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a2a1a, #0d1a0d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: #34d399;
    border: 1.5px solid #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.3),
        0 0 2px rgba(52, 211, 153, 0.5);
}

.ref-play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    padding: 0;
}

.ref-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.5);
}

.ref-play-btn svg {
    margin-left: 2px;
}

/* ─ Info Strip: description + time OUTSIDE card body ─ */
.ref-info-strip {
    margin: 12px -16px -12px -16px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ref-info-desc {
    font-size: 11px;
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.35);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.1px;
}

.ref-info-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
}

.ref-info-time svg {
    opacity: 0.4;
    flex-shrink: 0;
}

.ref-info-time-danger {
    color: #f87171;
}

.ref-info-time-danger svg {
    opacity: 0.9;
    stroke: #f87171;
}

/* ─ Concluded Card State ─ */
.ref-card-concluded {
    border-left-color: #22c55e !important;
    opacity: 0.85;
}

.ref-card-concluded .ref-title {
    text-decoration: line-through;
    text-decoration-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
}

.ref-concluded-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #34d399;
    padding: 4px 0;
}

.ref-concluded-badge svg {
    stroke: #34d399;
    flex-shrink: 0;
}

/* Hidden timer (keeps live timer data for updates) */
.ref-hidden-timer {
    display: none !important;
}


/* Column Tabs (A Fazer / Fixos) */
.column-tabs {
    display: flex;
    gap: 8px;
}

.column-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    padding: 4px 8px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.column-tab:hover {
    color: var(--text-primary);
}

.column-tab.active {
    color: var(--accent);
    border-color: var(--accent);
}

/* Modal Small */
.modal-sm {
    max-width: 400px;
}

/* ======================================
   Funcionarios — Jira Premium Dark
====================================== */
.funcionarios-section {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.funcionarios-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.funcionarios-header h2 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    margin: 0;
    flex: 1;
}

.funcionarios-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.funcionarios-body::-webkit-scrollbar {
    width: 4px;
}

.funcionarios-body::-webkit-scrollbar-track {
    background: transparent;
}

.funcionarios-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 24px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.table th {
    background: rgba(0,0,0,0.2);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.table td {
    font-size: 13px;
    color: var(--text-primary);
}

.table tr:hover td {
    background: rgba(255,255,255,0.03);
}

.table tr:last-child td {
    border-bottom: none;
}

/* Cargo Badges */
.cargo-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cargo-ADM {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
    border: none;
}

.cargo-DIRETOR {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
    border: none;
}

.cargo-GERENTE {
    background: rgba(59,130,246,0.15);
    color: var(--accent-blue);
    border: none;
}

.cargo-COORDENADOR {
    background: rgba(139,92,246,0.15);
    color: var(--accent-purple);
    border: none;
}

.cargo-COLABORADOR {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: none;
}

.cargo-DESIGN {
    background: rgba(6,182,212,0.15);
    color: var(--accent-cyan);
    border: none;
}

.cargo-AUDIOVISUAL {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
    border: none;
}

/* Table Action Buttons */
.table .btn-sm {
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.table .btn-edit-cargo {
    background: rgba(59,130,246,0.15);
    color: var(--accent-blue);
    border: none;
}

.table .btn-edit-cargo:hover {
    background: rgba(59,130,246,0.25);
}

.table .btn-delete-user {
    background: rgba(239,68,68,0.12);
    color: var(--accent-red);
    border: none;
    margin-left: 6px;
}

.table .btn-delete-user:hover {
    background: rgba(239,68,68,0.25);
}

/* ======================================
   Tarefas por Usuário — Jira Premium Dark
====================================== */
.tarefas-usuario-section {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.tarefas-usuario-section .section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.section-header-left h2 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 11px;
    font-style: normal;
    white-space: nowrap;
    display: none;
}

.section-header-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin-left: auto;
}

.section-header-filters .filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.section-header-filters .filter-group label {
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
}

.section-header-filters .filter-input,
.section-header-filters .filter-select {
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 12px;
    min-width: 100px;
}

.section-header-filters .filter-input:focus,
.section-header-filters .filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Quick Date Buttons */
.filter-date-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-quick-btns {
    display: flex;
    gap: 4px;
}

.filter-quick-btn {
    padding: 4px 10px;
    font-size: 11px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}

.filter-quick-btn:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

.filter-quick-btn.active {
    background: rgba(230,126,34,0.15);
    border-color: rgba(230,126,34,0.3);
    color: var(--accent);
}

/* Status toggle: Concluídas / A Fazer */
.filter-status-btns {
    display: flex;
    gap: 3px;
    padding: 3px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 7px;
}

.filter-status-btn {
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 600;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}

.filter-status-btn:hover {
    color: var(--text-primary);
}

#filter-status-concluidas.active {
    background: rgba(39,174,96,0.15);
    border-color: rgba(39,174,96,0.4);
    color: #2ecc71;
}

#filter-status-afazer.active {
    background: rgba(230,126,34,0.15);
    border-color: rgba(230,126,34,0.4);
    color: var(--accent);
}

.filter-period-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-period-inputs .filter-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-period-inputs .filter-input {
    min-width: 100px;
}

/* User Kanban Container */
.user-kanban-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 12px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    min-height: 0;
    align-items: stretch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.user-kanban-container::-webkit-scrollbar {
    display: none;
}

.user-kanban-column {
    flex: 0 0 auto;
    width: calc((100% - 40px) / 5);
    min-width: 180px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.2s ease;
    position: relative;
}

.user-kanban-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 10px 10px 0 0;
}

.user-kanban-column:hover {
    border-color: rgba(255,255,255,0.1);
}

.user-column-header {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.15);
    margin-top: 3px;
}

.user-column-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-column-count {
    background: var(--accent);
    color: white;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* Dual per-user badges: A Fazer (laranja) + Concluídas (verde) */
.user-column-counts {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: stretch;
    flex-shrink: 0;
    width: 96px;
}

/* Labeled pill: "A Fazer 2" / "Concluídas 1" */
.user-column-count.count-afazer,
.user-column-count.count-concluidas {
    width: 100%;
    min-width: 0;
    height: auto;
    border-radius: 5px;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    opacity: 0.4;
    filter: grayscale(0.65);
    transition: all 0.15s ease;
    cursor: default;
    background: transparent;
    border: 1px solid transparent;
}

.user-column-count .count-label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.user-column-count .count-num {
    font-size: 10px;
    font-weight: 800;
    background: rgba(0,0,0,0.25);
    border-radius: 8px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-column-count.count-afazer {
    color: var(--accent);
    background: rgba(230,126,34,0.12);
    border-color: rgba(230,126,34,0.25);
}

.user-column-count.count-concluidas {
    color: #2ecc71;
    background: rgba(39,174,96,0.12);
    border-color: rgba(39,174,96,0.25);
}

/* Highlight the badge matching the active filter, so the current view is obvious */
.user-column-count.active {
    opacity: 1;
    filter: none;
}

.user-column-count.count-afazer.active {
    background: rgba(230,126,34,0.22);
    border-color: rgba(230,126,34,0.6);
    box-shadow: 0 0 0 1px rgba(230,126,34,0.35);
}

.user-column-count.count-concluidas.active {
    background: rgba(39,174,96,0.22);
    border-color: rgba(39,174,96,0.6);
    box-shadow: 0 0 0 1px rgba(39,174,96,0.35);
}

.user-column-cards {
    padding: 8px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
}

/* Custom scrollbar */
.user-column-cards::-webkit-scrollbar {
    width: 4px;
}

.user-column-cards::-webkit-scrollbar-track {
    background: transparent;
}

.user-column-cards::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
}

.user-column-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.15);
}

/* User Task Cards */
.user-task-card {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    border-left: 3px solid var(--accent);
    transition: all 0.2s ease;
    cursor: pointer;
}

.user-task-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.user-task-id {
    font-size: 10px;
    color: var(--accent);
    margin-bottom: 4px;
    font-weight: 600;
    opacity: 0.7;
}

.user-task-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.user-task-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    color: var(--text-muted);
}

.user-task-assignee {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ======================================
   Modal
====================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #161618;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.03) inset;
    position: relative;
    animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content::-webkit-scrollbar { width: 3px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-sm {
    max-width: 380px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h2 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.modal-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 12px;
}

.modal-close:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.1);
}

.modal-content form {
    padding: 30px;
}

.modal-nova form {
    padding: 0 !important;
}

.modal-nova {
    max-width: 640px;
}

.modal-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(230,126,34,0.2), rgba(230,126,34,0.05));
    border: 1px solid rgba(230,126,34,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.modal-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

.modal-form-body {
    padding: 24px 28px;
    max-height: calc(90vh - 160px);
    overflow-y: auto;
}

.modal-form-body::-webkit-scrollbar {
    width: 4px;
}

.modal-form-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-form-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.modal-nova .form-group {
    margin-bottom: 16px;
}

.modal-nova .form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-nova .form-group label svg {
    opacity: 0.5;
    flex-shrink: 0;
}

.modal-nova .form-group input,
.modal-nova .form-group select,
.modal-nova .form-group textarea {
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    font-size: 13px;
    box-shadow: none;
    transition: all 0.2s ease;
}

.modal-nova .form-group input:focus,
.modal-nova .form-group select:focus,
.modal-nova .form-group textarea:focus {
    border-color: rgba(230,126,34,0.4);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 0 3px rgba(230,126,34,0.08);
}

.modal-nova .form-group input::placeholder,
.modal-nova .form-group textarea::placeholder {
    color: rgba(255,255,255,0.2);
}

.modal-nova .form-group textarea {
    min-height: 70px;
    resize: vertical;
}

.modal-nova .form-group input[type="datetime-local"],
.modal-nova .form-group input[type="number"] {
    color-scheme: dark;
}

/* File upload drop zone */
.file-upload-zone {
    position: relative;
    border: 1.5px dashed rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(255,255,255,0.015);
}

.file-upload-zone:hover {
    border-color: rgba(230,126,34,0.3);
    background: rgba(230,126,34,0.03);
}

.file-input-hidden {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100% !important;
    padding: 0 !important;
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.file-upload-content span {
    font-size: 11px;
    color: var(--text-muted);
}

.file-upload-zone.has-file {
    border-color: rgba(230,126,34,0.2);
    padding: 12px;
}

/* File Preview */
.file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-top: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    animation: filePreviewIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes filePreviewIn {
    from { opacity: 0; transform: translateY(6px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.file-preview-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.06);
}

.file-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-thumb .file-icon {
    color: var(--accent);
    opacity: 0.6;
}

.file-preview-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-preview-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.file-preview-remove {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(239,68,68,0.08);
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.file-preview-remove:hover {
    background: rgba(239,68,68,0.2);
    transform: scale(1.1);
}

/* Checklist add button */
.btn-checklist-add {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: rgba(230,126,34,0.15);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.btn-checklist-add:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.05);
}

/* Modal footer */
.modal-form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 28px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.1);
    border-radius: 0 0 24px 24px;
}

.btn-modal-cancel {
    padding: 9px 20px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.btn-modal-submit {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #d35400);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(230,126,34,0.25);
}

.btn-modal-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230,126,34,0.35);
    filter: brightness(1.1);
}

/* Modal Custom Date Picker */
.modal-date-wrapper {
    position: relative;
}

.modal-date-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.modal-date-trigger:hover {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
}

.modal-date-trigger.has-value {
    color: var(--text-primary);
}

#modal-cal-popup {
    left: 0;
    right: auto;
}

.modal-cal-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
    margin-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.modal-time-select {
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    min-width: 55px;
    appearance: none;
    -webkit-appearance: none;
}

.modal-time-select:focus {
    outline: none;
    border-color: rgba(230,126,34,0.4);
}

.modal-cal-time .bi-date-sep {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
}

.modal-body {
    padding: 18px 22px;
}

.modal-footer {
    padding: 12px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    gap: 8px;
    align-items: center;
}

.modal-footer select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 11px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}

.modal-footer select:focus {
    border-color: rgba(255,255,255,0.12);
}

.modal-footer .btn-primary {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.15s ease;
}

.modal-footer .btn-primary:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.15);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ======================================
   Nivel da Demanda (Difficulty Level) 
====================================== */
.nivel-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nivel-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    border: 1.5px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.nivel-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.nivel-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nivel-pill svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    width: 12px;
    height: 12px;
}

.nivel-pill:hover svg {
    transform: scale(1.15);
}

/* Fácil - Emerald Green */
.nivel-pill.nivel-facil:hover {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.nivel-pill.nivel-facil.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.08));
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.25), 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Médio - Amber */
.nivel-pill.nivel-medio:hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.nivel-pill.nivel-medio.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.08));
    border-color: #f59e0b;
    color: #f59e0b;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.25), 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Difícil - Red */
.nivel-pill.nivel-dificil:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.nivel-pill.nivel-dificil.active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.08));
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.25), 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Nivel Badge (for cards and detail view) */
.nivel-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.nivel-badge:hover {
    opacity: 1;
}

.nivel-badge-FACIL {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.nivel-badge-MEDIO {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.nivel-badge-DIFICIL {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Inline Nível Editor (Detail Modal) */
.nivel-editable-row {
    grid-column: 1 / -1;
}

.nivel-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.nivel-clickable:hover {
    opacity: 0.85;
}

.nivel-clickable .nivel-badge {
    cursor: pointer;
    transition: all 0.2s ease;
}

.nivel-clickable .nivel-badge:hover {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nivel-placeholder {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 5px;
    border: 1px dashed rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nivel-placeholder:hover {
    border-color: rgba(230,126,34,0.4);
    background: rgba(230,126,34,0.08);
    color: var(--accent);
}

.nivel-inline-editor {
    margin-top: 10px;
    animation: editorSlideIn 0.2s ease-out;
}

.nivel-inline-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.nivel-inline-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-family: inherit;
}

.nivel-inline-pill:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.nivel-inline-pill.active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Fácil pill */
.nivel-pill-FACIL:hover,
.nivel-pill-FACIL.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

/* Médio pill */
.nivel-pill-MEDIO:hover,
.nivel-pill-MEDIO.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

/* Difícil pill */
.nivel-pill-DIFICIL:hover,
.nivel-pill-DIFICIL.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* Nenhum pill */
.nivel-pill-none:hover,
.nivel-pill-none.active {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    color: var(--text-muted);
}

/* ======================================
   Etiquetas (Custom Labels) System
====================================== */
.etiqueta-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 30px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.etiqueta-filter-bar .filter-label {
    white-space: nowrap;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.etiqueta-filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.etiqueta-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.etiqueta-filter-pill:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.etiqueta-filter-pill.active {
    color: white;
    border-color: transparent;
    background: var(--accent);
}

.etiqueta-filter-pill .filter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Etiqueta Input Group (text + color picker) */
.etiqueta-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.etiqueta-color-palette {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 4px 0;
}

.color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    outline: none;
    position: relative;
}

.color-dot:hover {
    transform: scale(1.15);
}

.color-dot.active {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2), 0 0 8px rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Etiqueta Preview */
.etiqueta-preview {
    min-height: 24px;
    display: flex;
    align-items: center;
}

/* Etiqueta Badge (detail view, filter pills) */
.etq-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.etq-badge:hover {
    opacity: 1;
}

/* Title row with inline etiqueta */
.demand-card-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Inline Etiqueta Editor (Detail View) */
.etiqueta-editable-row {
    grid-column: 1 / -1;
}

.etiqueta-clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.etiqueta-clickable:hover {
    opacity: 0.75;
}

.etiqueta-clickable:hover::after {
    content: ' ✏️';
    font-size: 11px;
}

.etiqueta-clickable .etq-badge {
    cursor: pointer;
}

.etiqueta-clickable .etq-badge:hover {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

.etiqueta-inline-editor {
    margin-top: 10px;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    animation: editorSlideIn 0.2s ease-out;
}

@keyframes editorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.etiqueta-inline-editor input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.etiqueta-inline-editor input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.15);
}

.inline-palette {
    margin-bottom: 10px;
}

.etiqueta-inline-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ======================================
   Modal Tabs
====================================== */
.modal-tabs {
    display: flex;
    gap: 4px;
    padding: 6px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: transparent;
}

.modal-tab {
    padding: 7px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

.modal-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.modal-tab.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.07);
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

/* ======================================
   Anexos Preview
====================================== */
.anexos-body {
    min-height: 200px;
}

#anexos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.anexo-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 15px;
    border: 1px solid var(--border-color);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.anexo-imagem {
    max-width: 100%;
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.anexo-imagem:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow);
}

.anexo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.anexo-link:hover {
    background: var(--accent);
    color: white;
}

.detail-desc-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.25);
    margin-bottom: 6px;
}

.detail-desc-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
}

.demanda-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    margin-top: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    overflow: hidden;
}

.demanda-info-grid div {
    font-size: 12px;
    color: var(--text-primary);
    padding: 10px 14px;
    background: #161618;
}

.demanda-info-grid strong {
    color: rgba(255,255,255,0.25);
    font-weight: 500;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: block;
    margin-bottom: 3px;
}

/* ======================================
   Notas e Checklist
====================================== */
.notas-body {
    padding: 25px 30px;
}

.notas-section,
.checklist-section {
    margin-bottom: 25px;
}

.notas-header,
.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.notas-header h4,
.checklist-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

#campo-observacoes {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}

#campo-observacoes:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.2);
}

.checklist-add {
    display: flex;
    gap: 8px;
}

.checklist-add input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
}

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

.checklist-items {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.checklist-item:hover {
    border-color: var(--accent);
    background: rgba(230, 126, 34, 0.05);
}

.checklist-item.concluido {
    opacity: 0.7;
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.3);
}

.checklist-item.concluido .checklist-texto {
    text-decoration: line-through;
    color: var(--text-muted);
}

.checklist-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checklist-checkbox:hover {
    border-color: var(--accent);
}

.checklist-checkbox.checked {
    background: var(--accent);
    border-color: var(--accent);
}

.checklist-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checklist-texto {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-word;
}

.checklist-delete {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checklist-delete:hover {
    background: var(--accent-red);
    color: white;
}

.checklist-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #f39c12);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0;
}

.progress-text {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ======================================
   Checklist no Formulário de Criação
====================================== */
.checklist-form-section {
    margin-top: 10px;
}

.form-helper-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    margin-top: 4px;
}

.checklist-add-form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.checklist-add-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
}

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

.checklist-preview {
    max-height: 180px;
    overflow-y: auto;
}

.checklist-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    border: 1px solid var(--border-color);
    font-size: 13px;
}

.checklist-preview-item .item-icon {
    color: var(--accent);
    font-size: 14px;
}

.checklist-preview-item .item-text {
    flex: 1;
    color: var(--text-primary);
}

.checklist-preview-item .item-remove {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.checklist-preview-item .item-remove:hover {
    background: var(--accent-red);
    color: white;
}

/* ======================================
   Demand Actions Bar
====================================== */
.demand-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 22px 14px;
    background: transparent;
    border-radius: 0 0 16px 16px;
}

.actions-left,
.actions-right {
    display: flex;
    gap: 6px;
}

.demand-actions .btn {
    font-size: 10px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.btn-excluir {
    background: transparent;
    color: rgba(220, 80, 70, 0.7);
    border: 1px solid rgba(220, 80, 70, 0.12);
}

.btn-excluir:hover {
    background: rgba(220, 80, 70, 0.08);
    border-color: rgba(220, 80, 70, 0.25);
    color: rgba(220, 80, 70, 0.9);
}

.btn-duplicar {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-duplicar:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.btn-delegar {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-delegar:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.btn-editar {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-editar:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ======================================
   Footer
====================================== */
.footer {
    background: var(--bg-secondary);
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--border-color);
}

/* ======================================
   Drag & Drop States
====================================== */
.dragging {
    opacity: 0.5;
}

.drag-over {
    background: rgba(230, 126, 34, 0.1);
    border-color: var(--accent);
}

/* ======================================
   Custom Delete Confirmation Modal
====================================== */
/* ======================================
   Custom Delete Confirmation Modal
====================================== */
.delete-modal-content {
    text-align: left;
    padding: 32px 32px 28px !important;
    background: #111111 !important;
    /* Very dark, almost black background */
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    max-width: 440px !important;
}

.delete-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.delete-modal-icon {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-modal-icon svg {
    width: 22px;
    height: 22px;
}

.delete-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.delete-modal-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    /* Bright and legible text */
    line-height: 1.6;
    margin-bottom: 32px;
    letter-spacing: 0.2px;
}

.delete-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.delete-modal-actions .btn {
    padding: 12px 24px;
    border-radius: 30px;
    /* Pill shape */
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    border: none;
}

/* Cancel Button */
.btn-cancel-pill {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.btn-cancel-pill:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

/* Confirm Delete Button (Danger) */
.btn-danger-pill {
    background: rgba(248, 113, 113, 0.08);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3) !important;
    box-shadow: inset 0 0 10px rgba(248, 113, 113, 0.05);
}

.btn-danger-pill:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.5) !important;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.15), inset 0 0 10px rgba(248, 113, 113, 0.1);
    transform: translateY(-1px);
}

/* ======================================
   Responsive
====================================== */
@media (max-width: 1200px) {
    .kanban-container {
        padding: 20px;
    }

    .kanban-column {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .header-unified {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .header-filters {
        display: none;
    }

    .user-greeting {
        display: none;
    }

    .demanda-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================================
   BI Dashboard — Jira Premium Dark
====================================== */
.bi-dashboard-section {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.bi-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.bi-header-left {
    flex-shrink: 0;
}

.bi-header-left h2 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.bi-subtitle {
    display: none;
}

.bi-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* Date Period Filter */
.bi-date-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px 4px;
    flex-wrap: wrap;
}

.bi-date-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.bi-date-pill {
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    will-change: transform, background;
}

.bi-date-pill:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.bi-date-pill.active {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
    border-color: rgba(230,126,34,0.3);
    box-shadow: 0 0 12px rgba(230,126,34,0.1);
}


.bi-date-range-wrapper {
    position: relative;
}

.bi-date-range-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
    font-family: inherit;
    white-space: nowrap;
}

.bi-date-range-trigger:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.bi-date-range-trigger.active {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
    border-color: rgba(230,126,34,0.3);
}

/* Custom Calendar Popup */
.bi-calendar-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    width: 300px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
    backdrop-filter: blur(20px);
    padding: 16px;
    animation: calFadeIn 0.2s ease;
}

@keyframes calFadeIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.bi-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.bi-cal-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.bi-cal-nav {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.bi-cal-nav:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
}

.bi-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 6px;
}

.bi-cal-weekdays span {
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 0;
}

.bi-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.bi-cal-day {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.bi-cal-day:hover:not(.empty):not(.disabled) {
    background: rgba(255,255,255,0.08);
    transform: scale(1.1);
}

.bi-cal-day.today {
    color: var(--accent);
    font-weight: 700;
}

.bi-cal-day.today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.bi-cal-day.selected {
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(230,126,34,0.35);
}

.bi-cal-day.in-range {
    background: rgba(230,126,34,0.12);
    border-radius: 0;
}

.bi-cal-day.range-start {
    border-radius: 8px 0 0 8px;
}

.bi-cal-day.range-end {
    border-radius: 0 8px 8px 0;
}

.bi-cal-day.other-month {
    color: rgba(255,255,255,0.15);
}

.bi-cal-day.empty {
    visibility: hidden;
}

.bi-cal-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.bi-cal-clear,
.bi-cal-apply {
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.bi-cal-clear {
    background: transparent;
    color: var(--text-muted);
}

.bi-cal-clear:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.bi-cal-apply {
    background: var(--accent);
    color: #fff;
}

.bi-cal-apply:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230,126,34,0.3);
}

/* Month Picker Grid */
.dash-month-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px 0;
}

.dash-month-btn {
    padding: 12px 8px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dash-month-btn:hover {
    background: rgba(230,126,34,0.15);
    border-color: rgba(230,126,34,0.3);
    color: #fff;
}

.dash-month-btn.today {
    color: var(--accent);
    border-color: rgba(230,126,34,0.2);
}

.dash-month-btn.selected {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Calendar Title — Split clickable parts */
.dash-cal-title-part {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.dash-cal-title-part:hover {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
}

.dash-cal-title-part.active {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bi-select {
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 12px;
    min-width: 160px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bi-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* BI Body — scrollable content */
.bi-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.bi-body::-webkit-scrollbar {
    width: 4px;
}

.bi-body::-webkit-scrollbar-track {
    background: transparent;
}

.bi-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
}

/* KPI Cards */
.bi-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    flex-shrink: 0;
}

.bi-kpi-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    border-left: 3px solid var(--accent);
    transition: all 0.2s ease;
    position: relative;
}

.bi-kpi-card::before {
    display: none;
}

.bi-kpi-card:hover {
    background: rgba(255,255,255,0.04);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.1);
}

.kpi-blue { border-left-color: var(--accent-blue); }
.kpi-green { border-left-color: var(--accent-green); }
.kpi-orange { border-left-color: var(--accent-orange); }
.kpi-red { border-left-color: var(--accent-red); }

.kpi-icon {
    display: none;
}

.kpi-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -1px;
}

.kpi-blue .kpi-value { color: var(--accent-blue); }
.kpi-green .kpi-value { color: var(--accent-green); }
.kpi-orange .kpi-value { color: var(--accent-orange); }
.kpi-red .kpi-value { color: var(--accent-red); }

/* Charts Row */
.bi-charts-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.bi-chart-card,
.bi-table-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s ease;
}

.bi-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.bi-table-header h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.2px;
}

.bi-table-search {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 5px 12px;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.bi-table-search:focus-within {
    border-color: rgba(230,126,34,0.3);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 12px rgba(230,126,34,0.08);
}

.bi-table-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
    width: 140px;
}

.bi-table-search input::placeholder {
    color: var(--text-muted);
}

.bi-th-sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.bi-th-sortable:hover {
    color: var(--text-primary) !important;
}

.bi-th-sortable.bi-th-active {
    color: var(--accent) !important;
}

.sort-arrow {
    font-size: 10px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.bi-th-active .sort-arrow {
    opacity: 1;
    color: var(--accent);
}

.bi-chart-card:hover,
.bi-table-card:hover {
    border-color: rgba(255,255,255,0.1);
}

.bi-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.bi-chart-header h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    border: none;
    letter-spacing: -0.2px;
    flex-shrink: 0;
}

.bi-chart-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.bi-tab {
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    will-change: transform, background, color;
}

.bi-tab:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.bi-tab.active {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
    border-color: rgba(230,126,34,0.3);
    box-shadow: 0 0 12px rgba(230,126,34,0.1);
}

.bi-chart-card h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    letter-spacing: -0.2px;
}

.chart-container {
    height: 240px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom Chart Bars */
.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 180px;
    padding: 10px 0;
    overflow: hidden;
}

.chart-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 0 1 48px;
    min-width: 28px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chart-bar-item:hover {
    transform: translateY(-3px);
}

.chart-bar-item:hover .chart-bar-label {
    color: #fff;
}

.chart-bar {
    width: 36px;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    min-height: 6px;
}

.chart-bar:hover {
    filter: brightness(1.3);
}

.chart-bar-label {
    font-size: 9px;
    color: var(--text-muted);
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-bar-value {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Donut Chart */
.donut-chart-container {
    position: relative;
    width: 180px;
    height: 180px;
}

.donut-chart {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-center-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.donut-center-label {
    font-size: 10px;
    color: var(--text-muted);
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-muted);
}

.legend-color {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

/* BI Table */
.bi-table-card h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    letter-spacing: -0.2px;
}

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

.bi-table th,
.bi-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.bi-table th {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(0,0,0,0.15);
}

.bi-table th:first-child {
    border-radius: 6px 0 0 0;
}

.bi-table th:last-child {
    border-radius: 0 6px 0 0;
}

.bi-table td {
    font-size: 13px;
    color: var(--text-primary);
}

.bi-table tr:hover td {
    background: rgba(255,255,255,0.03);
}

.bi-table tr:last-child td {
    border-bottom: none;
}

.bi-table .user-name {
    font-weight: 600;
}

.bi-table .count-cell {
    text-align: center;
    font-weight: 500;
}

.bi-table .count-highlight {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

/* Responsive BI */
@media (max-width: 1200px) {
    .bi-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .bi-charts-row {
        grid-template-columns: 1fr;
    }
}

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

    .bi-header {
        flex-direction: column;
        gap: 10px;
    }

    .bi-header-right {
        width: 100%;
        flex-direction: column;
    }

    .bi-select {
        width: 100%;
    }
}

/* ======================================
/* ======================================
   Cronograma — Jira Premium Dark
====================================== */
.cronograma-section {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.cronograma-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.cronograma-header-left {
    flex-shrink: 0;
}

.cronograma-header-left h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.cronograma-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: nowrap;
}

.cronograma-filters .filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cronograma-filters .filter-group label {
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
}

.cronograma-filters .filter-select {
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 12px;
    min-width: 80px;
}

.cronograma-filters .filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

.cronograma-filters .filter-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cronograma-filters .filter-checkbox label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted);
}

.cronograma-filters .filter-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--accent);
}

/* Day Columns Container */
.cronograma-kanban {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 12px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    min-height: 0;
    align-items: stretch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cronograma-kanban::-webkit-scrollbar {
    display: none;
}

/* Day Column */
.cronograma-day-column {
    flex: 0 0 auto;
    width: calc((100% - 40px) / 5);
    min-width: 180px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: border-color 0.2s ease;
}

.cronograma-day-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 10px 10px 0 0;
}

.cronograma-day-column:hover {
    border-color: rgba(255,255,255,0.1);
}

/* Day Header */
.cronograma-day-header {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.15);
    margin-top: 3px;
}

.cronograma-day-number {
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
}

.cronograma-day-name {
    font-size: 11px;
    color: var(--text-muted);
}

.cronograma-day-count {
    margin-left: auto;
    background: var(--accent);
    color: white;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* Day Cards Container */
.cronograma-day-cards {
    padding: 8px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    min-height: 0;
}

.cronograma-day-cards::-webkit-scrollbar {
    width: 4px;
}

.cronograma-day-cards::-webkit-scrollbar-track {
    background: transparent;
}

.cronograma-day-cards::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
}

/* Cronograma Card */
.cronograma-card {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.05);
    border-left: 3px solid var(--accent-green);
    transition: all 0.2s ease;
    cursor: pointer;
}

.cronograma-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.cronograma-card.andamento {
    border-left-color: var(--accent-blue);
}

.cronograma-card-id {
    font-size: 10px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 3px;
    opacity: 0.7;
}

.cronograma-card-title {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.cronograma-card-desc {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 6px;
    opacity: 0.7;
}

.cronograma-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.cronograma-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cronograma-card-user {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.cronograma-card-status {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: rgba(34,197,94,0.15);
    color: var(--accent-green);
}

.cronograma-card.andamento .cronograma-card-status {
    background: rgba(59,130,246,0.15);
    color: var(--accent-blue);
}
/* ======================================
   User Dashboard — Jira Premium Dark
====================================== */
.user-dashboard-section {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.user-dashboard-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(0,0,0,0.15);
    border-bottom: none;
    flex-shrink: 0;
}

.user-dashboard-header-left {
    flex-shrink: 0;
}

.user-dashboard-header-left h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.user-dashboard-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: nowrap;
}

.user-dashboard-filters .filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-dashboard-filters .filter-group label {
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
}

/* Dashboard Body — scrollable content area */
.dashboard-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.dashboard-body::-webkit-scrollbar {
    width: 4px;
}

.dashboard-body::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
}

/* Stat Cards Row */
.user-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    flex-shrink: 0;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 20px 16px;
    border: 1px solid rgba(255,255,255,0.05);
    border-left: 3px solid var(--accent);
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.stat-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.stat-total {
    border-left-color: var(--accent);
}

.stat-total .stat-number {
    color: var(--accent);
}

.stat-afazer {
    border-left-color: var(--accent-orange);
}

.stat-afazer .stat-number {
    color: var(--accent-orange);
}

.stat-andamento {
    border-left-color: var(--accent-blue);
}

.stat-andamento .stat-number {
    color: var(--accent-blue);
}

.stat-concluidas {
    border-left-color: var(--accent-green);
}

.stat-concluidas .stat-number {
    color: var(--accent-green);
}

/* Demands List Panel */
.user-dashboard-demands {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.user-dashboard-demands h3 {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.demands-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    flex: 1;
}

.demands-list::-webkit-scrollbar {
    width: 4px;
}

.demands-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
}

.demand-item {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.04);
    border-left: 3px solid rgba(255,255,255,0.08);
    transition: all 0.2s ease;
    cursor: pointer;
}

.demand-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    border-left-color: var(--accent);
}

.demand-item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.demand-item-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.3;
}

.demand-item-status {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.status-a-fazer {
    background: rgba(249,115,22,0.15);
    color: var(--accent-orange);
}

.status-fixo {
    background: rgba(139,92,246,0.15);
    color: var(--accent-purple);
}

.status-em-andamento {
    background: rgba(59,130,246,0.15);
    color: var(--accent-blue);
}

.status-para-aprovacao {
    background: rgba(6,182,212,0.15);
    color: var(--accent-cyan);
}

.status-em-revisao {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
}

.status-aprovado {
    background: rgba(34,197,94,0.15);
    color: var(--accent-green);
}

.demand-item-meta {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Button teal color */
.btn-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
}

.btn-teal:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}

/* ======================================
   DIRETORIA DEMANDS — Industrial Premium
   Black & Orange distinctive theme
   Applied to demands created by SOLICITANTE
====================================== */

/* Diretoria Badge */
.diretoria-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(230, 126, 34, 0.12);
    color: #f39c12;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(230, 126, 34, 0.3);
    margin-bottom: 8px;
    animation: diretoriaPulse 3s ease-in-out infinite;
    max-width: 100%;
    box-sizing: border-box;
}

.diretoria-badge-icon {
    width: 14px;
    height: 14px;
    fill: #f39c12;
    flex-shrink: 0;
}

@keyframes diretoriaPulse {

    0%,
    100% {
        border-color: rgba(230, 126, 34, 0.3);
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0);
    }

    50% {
        border-color: rgba(230, 126, 34, 0.6);
        box-shadow: 0 0 8px 0 rgba(230, 126, 34, 0.15);
    }
}

/* Card — Deep black with warm undertone */
.demand-card-diretoria {
    background: linear-gradient(135deg, #1a1208 0%, #0d0d0d 60%, #1a0f05 100%) !important;
    border: 1px solid rgba(230, 126, 34, 0.25) !important;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(230, 126, 34, 0.08),
        0 0 0 0 rgba(230, 126, 34, 0) !important;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* Left accent bar — signature element */
.demand-card-diretoria::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    bottom: 8px;
    width: 3px;
    background: linear-gradient(180deg, #e67e22, #f39c12, #e67e22);
    border-radius: 0 3px 3px 0;
    animation: diretoriaBarPulse 2.5s ease-in-out infinite;
}

@keyframes diretoriaBarPulse {

    0%,
    100% {
        opacity: 0.7;
        box-shadow: 0 0 4px rgba(230, 126, 34, 0.3);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(230, 126, 34, 0.5);
    }
}

/* Top edge glow — replaces the default white gradient */
.demand-card-diretoria::before {
    background: linear-gradient(90deg, transparent, rgba(230, 126, 34, 0.3), transparent) !important;
}

/* Hover — intense orange glow */
.demand-card-diretoria:hover {
    border-color: rgba(230, 126, 34, 0.7) !important;
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(230, 126, 34, 0.2),
        0 0 0 1px rgba(230, 126, 34, 0.5) !important;
}

/* Card ID — brighter orange */
.demand-card-diretoria .demand-card-id {
    color: #f39c12;
}

/* Timer borders — orange tinted */
.demand-card-diretoria .demand-card-timer {
    border-top-color: rgba(230, 126, 34, 0.15);
    border-bottom-color: rgba(230, 126, 34, 0.15);
}

/* Avatar — solid orange accent */
.demand-card-diretoria .user-avatar {
    background: linear-gradient(135deg, #e67e22, #d35400);
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}

/* Start button — enhanced for diretoria cards */
.demand-card-diretoria .btn-iniciar {
    border: 1px solid rgba(230, 126, 34, 0.3);
}

/* ======================================
   Demand Origin Themes — 3 Types
====================================== */

/* --- Origin Badge (in header title) --- */
.origin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 8px;
    position: relative;
    top: -1px;
}

.origin-badge svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

/* Diretoria — Warm orange filled */
.origin-diretoria {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.2), rgba(243, 156, 18, 0.15));
    color: #f39c12;
    border: 1px solid rgba(230, 126, 34, 0.3);
}

/* IA — Solid violet filled */
.origin-ia {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.5);
    box-shadow: 0 1px 4px rgba(139, 92, 246, 0.25);
}

/* Manual/User — Ghost outline */
.origin-user {
    background: transparent;
    color: var(--text-muted);
    border: 1px dashed rgba(168, 168, 168, 0.25);
}

/* --- Modal Theme: Diretoria --- */
.modal-content.modal-diretoria {
    border: 1px solid rgba(230, 126, 34, 0.2) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(230, 126, 34, 0.06) !important;
}

.modal-content.modal-diretoria .modal-header {
    border-bottom: 1px solid rgba(230, 126, 34, 0.1);
}

.modal-content.modal-diretoria .modal-header h2::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, #e67e22, #f39c12);
    border-radius: 2px;
    margin-right: 10px;
    flex-shrink: 0;
}

.modal-content.modal-diretoria .modal-tab.active {
    color: #f39c12;
    background: rgba(230, 126, 34, 0.1);
}

.modal-content.modal-diretoria .modal-tab:hover {
    background: rgba(230, 126, 34, 0.06);
}

.modal-content.modal-diretoria .demanda-info-grid {
    border-color: rgba(230, 126, 34, 0.08);
}

/* --- Modal Theme: IA --- */
.modal-content.modal-ia-origin {
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7), 0 0 60px rgba(139, 92, 246, 0.04) !important;
}

.modal-content.modal-ia-origin .modal-header {
    border-bottom: 1px solid rgba(139, 92, 246, 0.08);
}

.modal-content.modal-ia-origin .modal-header h2::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, #8b5cf6, #a78bfa);
    border-radius: 2px;
    margin-right: 10px;
    flex-shrink: 0;
}

.modal-content.modal-ia-origin .modal-tab.active {
    color: #a78bfa;
    background: rgba(139, 92, 246, 0.1);
}

.modal-content.modal-ia-origin .modal-tab:hover {
    background: rgba(139, 92, 246, 0.06);
}

.modal-content.modal-ia-origin .demanda-info-grid {
    border-color: rgba(139, 92, 246, 0.08);
}

/* --- Modal Theme: Normal User --- */
.modal-content.modal-user-origin {
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.modal-content.modal-user-origin .modal-header h2::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* ======================================
   IA Demandas — AI Chat Feature
====================================== */

/* Button */
.btn-ia {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-ia:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.45);
    filter: brightness(1.12);
}

.btn-ia::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.08) 50%, transparent 60%);
    animation: iaShimmer 3s ease-in-out infinite;
}

@keyframes iaShimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.btn-ia svg {
    width: 12px;
    height: 12px;
}

.btn-ia--manutencao {
    background: #4b5563;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: auto;
    filter: none;
    opacity: 0.7;
    overflow: visible;
}

.btn-ia--manutencao::after {
    display: none;
}

.btn-ia--manutencao:hover {
    transform: none;
    box-shadow: none;
    filter: none;
}

.btn-ia--manutencao::before {
    content: 'Em manutenção';
    position: absolute;
    top: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #f9fafb;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
}

.btn-ia--manutencao:hover::before {
    opacity: 1;
}

/* Modal */
.modal-ia {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
}

.modal-ia-content {
    background: linear-gradient(160deg, #1a1a2e, #141420);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    border: 1px solid rgba(139, 92, 246, 0.15);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(139, 92, 246, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header */
.ia-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 12px;
}

.ia-header-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.ia-header-text {
    flex: 1;
}

.ia-header-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.ia-header-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}

.ia-close {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.ia-close:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

/* Chat Area */
.ia-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ia-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    max-height: 340px;
}

.ia-messages::-webkit-scrollbar { width: 4px; }
.ia-messages::-webkit-scrollbar-track { background: transparent; }
.ia-messages::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.2); border-radius: 4px; }

/* Messages */
.ia-msg {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    animation: iaMsgIn 0.3s ease;
}

@keyframes iaMsgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.ia-msg-user {
    flex-direction: row-reverse;
}

.ia-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.ia-msg-avatar-user {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.ia-msg-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-primary);
}

.ia-msg-bot .ia-msg-bubble {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.05);
    border-bottom-left-radius: 4px;
}

.ia-msg-user .ia-msg-bubble {
    background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(99,102,241,0.2));
    border: 1px solid rgba(139,92,246,0.2);
    border-bottom-right-radius: 4px;
}

.ia-msg-hint {
    color: var(--text-muted);
    font-style: italic;
    font-size: 11px;
}

/* Typing indicator */
.ia-typing-bubble {
    display: flex;
    gap: 4px;
    padding: 12px 16px !important;
}

.ia-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(139,92,246,0.6);
    animation: iaTyping 1.4s ease-in-out infinite;
}

.ia-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ia-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes iaTyping {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Input Bar */
.ia-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.15);
}

.ia-input-bar textarea {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 9px 14px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
    min-height: 38px;
    max-height: 140px;
}

.ia-input-bar textarea:focus {
    border-color: rgba(139,92,246,0.4);
}

.ia-input-bar textarea::placeholder {
    color: var(--text-muted);
}

.ia-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ia-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(139,92,246,0.4);
}

.ia-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== MIC BUTTON ===== */

.ia-mic-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.ia-mic-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    transform: scale(1.05);
}

.ia-mic-btn.recording {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.ia-mic-btn.recording:hover {
    background: rgba(239, 68, 68, 0.25);
}

.ia-mic-btn .mic-icon-on { display: none; }
.ia-mic-btn.recording .mic-icon-off { display: none; }
.ia-mic-btn.recording .mic-icon-on { display: block; }

/* Pulsing ring when recording */
.mic-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    pointer-events: none;
    opacity: 0;
}

.ia-mic-btn.recording .mic-pulse {
    animation: micPulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes micPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        opacity: 1;
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
        opacity: 0;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        opacity: 0;
    }
}

/* ===== RECORDING VISUALIZER ===== */

.ia-recording-viz {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 4px 12px;
    min-height: 38px;
    animation: recFadeIn 0.3s ease;
}

.ia-recording-viz::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
    animation: recDotBlink 1s ease-in-out infinite;
}

.ia-recording-viz canvas {
    flex: 1;
    height: 34px;
    display: block;
}

.ia-rec-timer {
    font-size: 11px;
    font-weight: 600;
    color: #ef4444;
    font-variant-numeric: tabular-nums;
    min-width: 30px;
    text-align: right;
    flex-shrink: 0;
}

.ia-rec-live-wrapper {
    padding: 4px 16px 2px;
    animation: recFadeIn 0.3s ease;
    overflow: hidden;
}

.ia-rec-live {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    direction: rtl;
    text-align: left;
}

/* During recording, hide the send button — only show stop */
.ia-input-bar.recording .ia-send-btn {
    display: none;
}

@keyframes recDotBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes recFadeIn {
    from { opacity: 0; transform: scaleX(0.95); }
    to { opacity: 1; transform: scaleX(1); }
}

/* Recording state: textarea gets .hidden class, vizContainer loses .hidden class (managed by JS) */

/* ===== PREVIEW STATE ===== */

.ia-preview-area {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ia-preview-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ia-preview-toolbar label {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.ia-preview-toolbar select {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

.ia-preview-toolbar select:focus {
    border-color: rgba(139,92,246,0.4);
}

.ia-preview-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 480px;
}

.ia-preview-scroll::-webkit-scrollbar { width: 4px; }
.ia-preview-scroll::-webkit-scrollbar-track { background: transparent; }
.ia-preview-scroll::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.2); border-radius: 4px; }

/* Preview Card */
.ia-preview-card {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    transition: all 0.2s ease;
    opacity: 0.5;
    animation: iaCardIn 0.3s ease forwards;
}

.ia-preview-card.selected {
    opacity: 1;
    border-color: rgba(139,92,246,0.2);
    background: rgba(139,92,246,0.04);
}

@keyframes iaCardIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

.ia-preview-card:nth-child(2) { animation-delay: 0.05s; }
.ia-preview-card:nth-child(3) { animation-delay: 0.1s; }
.ia-preview-card:nth-child(4) { animation-delay: 0.15s; }
.ia-preview-card:nth-child(5) { animation-delay: 0.2s; }

.ia-preview-check {
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

/* Custom Checkbox */
.ia-checkbox {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ia-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.ia-checkmark {
    position: absolute;
    top: 0; left: 0;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid rgba(255,255,255,0.15);
    background: transparent;
    transition: all 0.2s ease;
}

.ia-checkbox input:checked ~ .ia-checkmark {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border-color: #8b5cf6;
}

.ia-checkbox input:checked ~ .ia-checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ia-preview-body {
    flex: 1;
    min-width: 0;
}

.ia-preview-title {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 0 4px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.ia-preview-title:focus {
    border-bottom-color: rgba(139,92,246,0.5);
}

.ia-preview-desc {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

.ia-preview-meta {
    margin-top: 6px;
}

.ia-preview-status {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

.ia-preview-status:focus {
    border-color: rgba(139,92,246,0.4);
}

/* IA Card Extras (Optional Fields) */
.ia-extras {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.04);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ia-extras-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
}

.ia-extras-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    min-width: 42px;
    flex-shrink: 0;
}

.ia-nivel-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.ia-nivel-pill {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.08);
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    transition: all 0.15s ease;
}

.ia-nivel-pill:hover {
    border-color: rgba(255,255,255,0.15);
    color: var(--text-secondary);
}

.ia-nivel-pill.active {
    font-weight: 600;
}

.ia-nivel-FACIL.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.ia-nivel-MEDIO.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.ia-nivel-DIFICIL.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.ia-nivel-none.active {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    color: var(--text-secondary);
}

.ia-link-input {
    flex: 1;
    min-width: 0;
    padding: 3px 8px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
    font-size: 10px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.ia-link-input:focus {
    border-color: rgba(139,92,246,0.4);
}

.ia-link-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.ia-file-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.ia-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.ia-file-label:hover .ia-file-btn {
    border-color: rgba(139,92,246,0.3);
    color: #8b5cf6;
    background: rgba(139,92,246,0.08);
}

.ia-file-name {
    font-size: 9px;
    color: var(--text-muted);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ia-file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 10px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.15s ease;
    font-family: inherit;
}

.ia-file-remove:hover {
    color: #f87171;
    background: rgba(239,68,68,0.1);
}

/* Preview Footer */
.ia-preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    gap: 10px;
}

.ia-btn-back {
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.ia-btn-back:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}

.ia-btn-create {
    padding: 8px 20px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border: none;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ia-btn-create:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139,92,246,0.4);
}

.ia-btn-create:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== SUCCESS STATE ===== */

.ia-success-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    gap: 16px;
    text-align: center;
}

.ia-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(99,102,241,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iaSuccessPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes iaSuccessPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.ia-success-icon svg {
    width: 28px;
    height: 28px;
    color: #8b5cf6;
}

.ia-success-count {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ia-success-text {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 280px;
    line-height: 1.5;
}

.ia-btn-close-success {
    padding: 8px 24px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    margin-top: 8px;
}

.ia-btn-close-success:hover {
    background: rgba(255,255,255,0.1);
}

/* Spinner */
.ia-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: iaSpin 0.6s linear infinite;
}

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

/* ======================================
   TOAST NOTIFICATIONS
====================================== */

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100% - 40px);
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(30, 30, 45, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.04);
    color: #e8e8f0;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(40px) scale(0.95);
}

.toast-enter {
    animation: toastSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toast-exit {
    animation: toastSlideOut 0.3s cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(40px) scale(0.9); }
}

.toast-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.toast-body {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    word-break: break-word;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 18px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.2s;
}

.toast-close:hover {
    color: rgba(255, 255, 255, 0.8);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    border-radius: 0 0 12px 12px;
}

/* Success */
.toast-success { border-color: rgba(39, 174, 96, 0.25); }
.toast-success .toast-icon { background: rgba(39, 174, 96, 0.15); color: #27ae60; }
.toast-success .toast-progress-bar { background: #27ae60; }

/* Error */
.toast-error { border-color: rgba(231, 76, 60, 0.25); }
.toast-error .toast-icon { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.toast-error .toast-progress-bar { background: #e74c3c; }

/* Warning */
.toast-warning { border-color: rgba(243, 156, 18, 0.25); }
.toast-warning .toast-icon { background: rgba(243, 156, 18, 0.15); color: #f39c12; }
.toast-warning .toast-progress-bar { background: #f39c12; }

/* Info */
.toast-info { border-color: rgba(139, 92, 246, 0.25); }
.toast-info .toast-icon { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.toast-info .toast-progress-bar { background: #8b5cf6; }

/* ======================================
   Planejamento Section
====================================== */
.planejamento-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.planejamento-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px;
    flex-shrink: 0;
}

.planejamento-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.planejamento-header .section-subtitle {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Grid de documentos */
.planejamento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
    padding: 8px 24px 24px;
    overflow-y: auto;
    flex: 1;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.plan-card:hover {
    border-color: rgba(230,126,34,0.3);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.plan-card-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(230,126,34,0.1);
    border-radius: 10px;
}

.plan-card-body { flex: 1; min-width: 0; }

.plan-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plan-card-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.plan-card-vis {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 5px;
}

.plan-card-vis-solo {
    background: rgba(231,76,60,0.1);
    color: #e74c3c;
}

.plan-card-vis-shared {
    background: rgba(230,126,34,0.1);
    color: var(--accent);
}

.plan-card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.plan-card:hover .plan-card-actions { opacity: 1; }

.plan-card-delete,
.plan-card-pessoas {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.plan-card-delete:hover { color: #e74c3c; background: rgba(231,76,60,0.1); }
.plan-card-pessoas:hover { color: var(--accent); background: rgba(230,126,34,0.1); }

/* Type selection modal */
.plan-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.plan-type-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    color: inherit;
}

.plan-type-card:hover {
    border-color: var(--accent);
    background: rgba(230,126,34,0.08);
    transform: translateY(-2px);
}

.plan-type-icon { font-size: 36px; }
.plan-type-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.plan-type-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* Toolbars */
.mindmap-toolbar,
.notion-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.plan-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.plan-toolbar-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.plan-toolbar-btn.accent {
    background: rgba(230,126,34,0.15);
    border-color: rgba(230,126,34,0.3);
    color: var(--accent);
}

.plan-toolbar-btn.accent:hover { background: rgba(230,126,34,0.25); }

/* Botão Gerar com IA */
.plan-toolbar-btn.ai-btn {
    background: linear-gradient(135deg, rgba(124,92,252,0.22), rgba(230,126,34,0.18));
    border-color: rgba(124,92,252,0.45);
    color: #b9a6ff;
    font-weight: 600;
}
.plan-toolbar-btn.ai-btn:hover {
    background: linear-gradient(135deg, rgba(124,92,252,0.35), rgba(230,126,34,0.28));
    color: #fff;
}

/* ── Exportar PDF do Dashboard ── */
.bi-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    background: rgba(230,126,34,0.12);
    border: 1px solid rgba(230,126,34,0.35);
    color: var(--accent);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.bi-pdf-btn:hover {
    background: rgba(230,126,34,0.2);
    border-color: rgba(230,126,34,0.55);
}

.bi-pdf-modal { max-width: 480px; width: calc(100% - 40px); }
.bi-pdf-desc { color: var(--text-secondary); font-size: 13px; line-height: 1.5; margin-bottom: 16px; }
.bi-pdf-field { margin-bottom: 16px; }
.bi-pdf-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.3px; }
.bi-pdf-dates { display: flex; align-items: center; gap: 8px; position: relative; }
.bi-pdf-dates-sep { color: var(--text-secondary); font-size: 12px; }

/* Dark inputs inside the PDF modal (override any light default) */
.bi-pdf-modal .filter-input {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 13.5px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.bi-pdf-modal .filter-input::placeholder { color: rgba(255,255,255,0.35); }
.bi-pdf-modal .filter-input:focus {
    outline: none;
    border-color: rgba(230,126,34,0.55);
    box-shadow: 0 0 0 3px rgba(230,126,34,0.15);
}

/* Custom date trigger buttons */
.bi-pdf-datepick {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}
.bi-pdf-datepick svg { color: var(--accent); flex-shrink: 0; }
.bi-pdf-datepick.has-value { color: var(--text-primary); }
.bi-pdf-datepick:hover { border-color: rgba(255,255,255,0.2); }
.bi-pdf-datepick.active {
    border-color: rgba(230,126,34,0.55);
    box-shadow: 0 0 0 3px rgba(230,126,34,0.15);
}

/* Inline calendar — reuses .bi-cal-* look, sits in flow below the date row */
.bi-pdf-cal {
    margin-top: 10px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 10px 12px;
}
/* Compact overrides so the calendar stays small and never overflows the modal */
.bi-pdf-cal .bi-cal-header { margin-bottom: 6px; }
.bi-pdf-cal .bi-cal-title { font-size: 13px; }
.bi-pdf-cal .bi-cal-nav { width: 26px; height: 26px; font-size: 15px; }
.bi-pdf-cal .bi-cal-weekdays { margin-bottom: 2px; }
.bi-pdf-cal .bi-cal-weekdays span { font-size: 9.5px; padding: 2px 0; }
.bi-pdf-cal .bi-cal-days { gap: 2px; }
.bi-pdf-cal .bi-cal-day {
    height: 30px;
    min-height: 0;
    padding: 0;
    font-size: 12px;
    border-radius: 6px;
}
.bi-pdf-users-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.bi-pdf-users-head .bi-pdf-label { margin-bottom: 0; }
.bi-pdf-selall {
    background: none; border: none; color: var(--accent);
    font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; padding: 2px 4px;
}
.bi-pdf-selall:hover { text-decoration: underline; }
.bi-pdf-search { width: 100%; margin-bottom: 8px; }
.bi-pdf-users {
    max-height: 240px; overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; padding: 6px;
    display: flex; flex-direction: column; gap: 2px;
}
.bi-pdf-user-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 7px; cursor: pointer;
    transition: background 0.12s;
}
.bi-pdf-user-item:hover { background: rgba(255,255,255,0.05); }
.bi-pdf-user-cb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    background: rgba(0,0,0,0.3);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    position: relative;
    transition: all 0.15s;
}
.bi-pdf-user-cb:hover { border-color: rgba(230,126,34,0.5); }
.bi-pdf-user-cb:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.bi-pdf-user-cb:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1.5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.bi-pdf-user-name { flex: 1; font-size: 13.5px; color: var(--text-primary); }
.bi-pdf-user-cargo {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px;
    color: var(--text-secondary); background: rgba(255,255,255,0.06);
    padding: 2px 7px; border-radius: 10px;
}
.bi-pdf-empty { color: var(--text-secondary); font-size: 13px; padding: 14px; text-align: center; }
.bi-pdf-footer { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px 20px; border-top: none; }
.bi-pdf-generate {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: 9px; font-size: 13px; font-weight: 600; font-family: inherit;
    background: linear-gradient(135deg, #e67e22, #d35400); border: none; color: #fff; cursor: pointer;
    box-shadow: 0 4px 14px rgba(230,126,34,0.3); transition: all 0.15s;
}
.bi-pdf-generate:hover { filter: brightness(1.07); box-shadow: 0 6px 18px rgba(230,126,34,0.42); }
.bi-pdf-status { margin-top: 12px; padding: 10px 13px; border-radius: 8px; font-size: 12.5px; }
.bi-pdf-status.error { background: rgba(231,76,60,0.12); border: 1px solid rgba(231,76,60,0.3); color: #e74c3c; }

/* Modal IA do mapa mental */
#modal-mindmap-ia .modal-content {
    max-width: 460px;
    width: calc(100% - 40px);
}
#modal-mindmap-ia .modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
#modal-mindmap-ia .modal-body {
    padding: 20px 24px 8px;
}
.mindmap-ia-desc {
    color: var(--text-secondary);
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.5;
}
.mindmap-ia-modes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.mindmap-ia-mode {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px 12px;
    background: rgba(124,92,252,0.06);
    border: 1px solid rgba(124,92,252,0.18);
    border-radius: 8px;
}
.mindmap-ia-mode-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #b9a6ff;
}
.mindmap-ia-mode-ex {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
}
.mindmap-ia-textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    padding: 12px 14px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.mindmap-ia-textarea::placeholder {
    color: rgba(255,255,255,0.32);
    font-family: inherit;
}
.mindmap-ia-textarea:focus {
    outline: none;
    border-color: rgba(124,92,252,0.6);
    box-shadow: 0 0 0 3px rgba(124,92,252,0.15);
}

.mindmap-ia-examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
}
.mindmap-ia-examples-label {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-right: 2px;
}
.mindmap-ia-chip {
    padding: 5px 11px;
    font-size: 11.5px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.mindmap-ia-chip:hover {
    background: rgba(124,92,252,0.16);
    border-color: rgba(124,92,252,0.45);
    color: #fff;
}
.mindmap-ia-status {
    margin-top: 14px;
    padding: 10px 13px;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.4;
}
.mindmap-ia-status.loading {
    background: rgba(124,92,252,0.12);
    border: 1px solid rgba(124,92,252,0.3);
    color: #b9a6ff;
}
.mindmap-ia-status.error {
    background: rgba(231,76,60,0.12);
    border: 1px solid rgba(231,76,60,0.3);
    color: #e74c3c;
}

/* Footer + botões */
.mindmap-ia-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 24px 20px;
    border-top: none;
}
.mindmap-ia-btn-cancel,
.mindmap-ia-btn-generate {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}
.mindmap-ia-btn-cancel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.14);
    color: var(--text-secondary);
}
.mindmap-ia-btn-cancel:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}
.mindmap-ia-btn-generate {
    background: linear-gradient(135deg, #7C5CFC, #E67E22);
    border: none;
    color: #fff;
    box-shadow: 0 4px 14px rgba(124,92,252,0.3);
}
.mindmap-ia-btn-generate:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 18px rgba(124,92,252,0.42);
}
.mindmap-ia-btn-generate:disabled {
    opacity: 0.6;
    cursor: default;
    filter: none;
    box-shadow: none;
}

.plan-toolbar-btn.danger:hover {
    background: rgba(231,76,60,0.15);
    border-color: rgba(231,76,60,0.3);
    color: #e74c3c;
}

.plan-title-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    padding: 6px 10px;
    border-radius: 6px;
    outline: none;
    min-width: 0;
}

.plan-title-input:focus {
    background: rgba(255,255,255,0.05);
}

.mindmap-tools {
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar-sep {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.1);
    margin: 0 4px;
}

.zoom-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 36px;
    text-align: center;
    user-select: none;
}

/* Mind Map Canvas */
#mindmap-canvas {
    width: 100%;
    flex: 1;
    display: block;
    background: #0f0f0f;
    cursor: default;
}

#planejamento-mindmap-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
}

.mindmap-inline-input {
    position: absolute;
    z-index: 10;
    font-family: 'Inter', system-ui, sans-serif;
    padding: 6px 12px;
    border: 2px solid;
    outline: none;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.08), 0 4px 24px rgba(0,0,0,0.6);
    resize: none;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
}

.mindmap-inline-input.hidden { display: none; }

.mindmap-shortcuts-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 16px;
    background: rgba(15,15,15,0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    font-size: 11px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 5;
}

.mindmap-shortcuts-hint kbd {
    display: inline-block;
    padding: 1px 5px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 3px;
    font-family: inherit;
}

/* Notion Editor */
#planejamento-notion-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.notion-editor-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.notion-editor-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    justify-content: center;
    position: relative;
}

.notion-editor {
    width: 100%;
    max-width: 720px;
    min-height: 400px;
}

/* Notion Sidebar */
.notion-sidebar {
    width: 200px;
    flex-shrink: 0;
    border-left: 1px solid rgba(255,255,255,0.06);
    background: rgba(15,15,15,0.6);
    padding: 16px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Hide mobile-only elements on desktop */
.mobile-kanban-tabs,
.notion-sidebar-toggle,
.notion-sidebar-overlay {
    display: none;
}

.nsb-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nsb-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0 6px 6px;
}

.nsb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 0 2px;
}

.nsb-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.12s;
}

.nsb-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.12);
}

.nsb-btn.active {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
    border-color: rgba(230,126,34,0.3);
}

.nsb-btn-danger:hover {
    background: rgba(231,76,60,0.15);
    color: #e74c3c;
    border-color: rgba(231,76,60,0.3);
}

.nsb-btn code {
    font-size: 10px;
    font-family: 'SF Mono', monospace;
}

.nsb-block-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.12s;
    text-align: left;
    width: 100%;
}

.nsb-block-btn:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

.nsb-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.nsb-block-btn:hover .nsb-icon {
    background: rgba(230,126,34,0.12);
    color: var(--accent);
}

/* People Picker Modal */
.plan-pessoa-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s;
    font-size: 13px;
    color: var(--text-primary);
}

.plan-pessoa-item:hover {
    background: rgba(255,255,255,0.05);
}

.plan-pessoa-item input[type="checkbox"] {
    display: none;
}

.plan-pessoa-item input[type="checkbox"]:checked ~ .plan-pessoa-avatar {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.plan-pessoa-item input[type="checkbox"]:checked ~ .plan-pessoa-name {
    color: var(--accent);
}

.plan-pessoa-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.plan-pessoa-name {
    flex: 1;
    font-weight: 500;
}

.plan-pessoa-cargo {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

.plan-pessoa-perm {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 22px;
}

.plan-pessoa-perm:not(:disabled):hover {
    border-color: var(--accent);
}

.plan-pessoa-perm:disabled {
    opacity: 0.3;
    cursor: default;
}

.plan-pessoa-perm option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.plan-pessoas-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.plan-pessoas-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Card people button */
.plan-card-pessoas {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.12s;
}

.plan-card-pessoas:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

.plan-card-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

/* Notion Blocks */
.notion-block {
    outline: none;
    padding: 4px 8px;
    margin-bottom: 2px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: border-color 0.15s, background 0.15s;
    line-height: 1.6;
    position: relative;
    color: var(--text-primary);
    white-space: normal;
}

/* Prevent contenteditable from creating block-level children */
[contenteditable="true"] > div,
[contenteditable="true"] > p,
[contenteditable="true"] > br + div {
    display: inline !important;
}

.notion-callout-content > div,
.notion-callout-content > p,
.notion-numbered-content > div,
.notion-numbered-content > p {
    display: inline !important;
}

.notion-block:hover { background: rgba(255,255,255,0.02); }
.notion-block:focus { border-color: rgba(230,126,34,0.2); background: rgba(255,255,255,0.03); }

.notion-block:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    pointer-events: none;
    font-style: italic;
}

/* No placeholder text for checklist and bullet — just the icon */
.notion-bullet:empty::before {
    content: '•';
    position: absolute;
    left: 12px;
    color: var(--accent);
    font-weight: bold;
    font-style: normal;
}

.notion-checklist:empty::before {
    /* Override the placeholder — show the checkbox even when empty */
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    font-style: normal;
    color: transparent;
    pointer-events: auto;
    transition: all 0.15s;
}

.notion-h1 { font-size: 28px; font-weight: 700; padding: 10px 8px 6px; margin-top: 12px; }
.notion-h2 { font-size: 22px; font-weight: 600; padding: 8px 8px 4px; margin-top: 8px; }
.notion-h3 { font-size: 17px; font-weight: 600; padding: 6px 8px 4px; margin-top: 6px; color: var(--text-secondary); }
.notion-p { font-size: 15px; }

.notion-bullet {
    font-size: 15px;
    padding-left: 28px;
}

.notion-bullet::before {
    content: '•';
    position: absolute;
    left: 12px;
    color: var(--accent);
    font-weight: bold;
}

.notion-checklist {
    font-size: 15px;
    padding-left: 38px;
    cursor: text;
}

.notion-checklist::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.notion-checklist.checked::before {
    background: var(--accent);
    border-color: var(--accent);
}

.notion-checklist.checked::after {
    content: '✓';
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    pointer-events: none;
}

.notion-checklist.checked { color: var(--text-muted); text-decoration: line-through; }

.notion-quote {
    font-size: 15px;
    font-style: italic;
    padding-left: 24px;
    border-left: 3px solid var(--accent);
    color: var(--text-secondary);
}

.notion-divider {
    padding: 8px 0;
    cursor: default;
}

.notion-divider hr {
    border: none;
    height: 1px;
    background: var(--border-color);
}

/* Slash Command Menu */
.slash-menu {
    position: absolute;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    min-width: 220px;
    backdrop-filter: blur(12px);
}

.slash-menu-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 6px 10px 4px;
}

.slash-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: background 0.12s;
}

.slash-item:hover,
.slash-item.active {
    background: rgba(230,126,34,0.12);
    color: var(--accent);
}

.slash-item.hidden { display: none; }

.slash-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.slash-item:hover .slash-icon,
.slash-item.active .slash-icon {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
}

/* Floating Format Toolbar */
.format-toolbar {
    position: absolute;
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
}

.format-toolbar.hidden { display: none; }

.fmt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.12s;
}

.fmt-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

.fmt-btn.active {
    background: rgba(230,126,34,0.15);
    color: var(--accent);
}

.fmt-btn code {
    font-size: 11px;
    font-family: 'SF Mono', 'JetBrains Mono', monospace;
}

.fmt-sep {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,0.08);
    margin: 0 3px;
}

/* New Block Types */
.notion-callout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(230,126,34,0.08);
    border: 1px solid rgba(230,126,34,0.15);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
}

.notion-callout-icon {
    font-size: 18px;
    flex-shrink: 0;
    user-select: none;
}

.notion-callout-content {
    flex: 1;
    outline: none;
    min-height: 1.4em;
}

.notion-code {
    background: #161616;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 14px 16px;
    font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
    tab-size: 4;
}

.notion-numbered {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.notion-numbered-num {
    color: var(--text-muted);
    font-weight: 600;
    min-width: 20px;
    text-align: right;
    flex-shrink: 0;
    user-select: none;
}

.notion-numbered-content {
    flex: 1;
    outline: none;
    min-height: 1.4em;
}

/* Inline Formatting Styles */
.notion-editor mark {
    background: rgba(230,126,34,0.25);
    color: inherit;
    padding: 1px 3px;
    border-radius: 3px;
}

.notion-editor code {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 3px;
    padding: 1px 5px;
    font-family: 'SF Mono', 'JetBrains Mono', monospace;
    font-size: 0.88em;
    color: #f0a060;
}