:root {
    --primary: #2563eb;
    --success: #10b981;
    --bg: #f1f5f9;
    --white: #ffffff;
    --text: #1f2937;
    --border: #e2e8f0;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-sub: #64748b;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

#login-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

#main-content {
    display: none;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    box-sizing: border-box;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-badge {
    font-size: 0.8rem;
    background: #dbeafe;
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.btn-logout {
    background: none;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: 0.2s;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

.progress-container {
    background: var(--white);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.9rem;
}

.progress-bar-bg {
    background: #e2e8f0;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

#progress-fill {
    background: var(--success);
    height: 100%;
    width: 0%;
    transition: 0.5s ease;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #cbd5e1;
    padding: 6px;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 700;
    color: #475569;
    border-radius: 8px;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

#roadmap-list {
    position: relative;
    padding-left: 50px;
}

#roadmap-list::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #cbd5e1;
    border-radius: 2px;
}

.step {
    position: relative;
    margin-bottom: 30px;
    display: none;
}

.step.active {
    display: block;
}

.dot {
    position: absolute;
    left: -41px;
    top: 15px;
    width: 22px;
    height: 22px;
    background: var(--white);
    border: 5px solid var(--primary);
    border-radius: 50%;
    z-index: 2;
}

.content-card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.topic-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 5px;
    margin-bottom: 15px;
    font-style: italic;
}

.status-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    margin-left: 10px;
}

.status-pending {
    background: var(--warning);
    color: white;
}

.subtopic-item {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
}

.sub-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.subtopic-text {
    cursor: pointer;
    font-weight: 500;
    flex-grow: 1;
}

.subtopic-item.done .subtopic-text {
    text-decoration: line-through;
    color: #94a3b8;
}

.check-btn {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.subtopic-item.done .check-btn {
    background: var(--success);
    border-color: var(--success);
}

.subtopic-item.done .check-btn::after {
    content: '✓';
    color: white;
    font-weight: bold;
}

.collapse-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: transform 0.3s;
}

.collapse-btn.active {
    transform: rotate(180deg);
}

.sub-desc-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-left: 34px;
    border-left: 2px solid var(--border);
    padding-left: 10px;
}

.sub-desc-container.open {
    max-height: 200px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.sub-desc {
    font-size: 0.75rem;
    color: #64748b;
    background: #f8fafc;
    padding: 8px;
    border-radius: 4px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.modal {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    max-width: 600px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
}

.btn-new {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.btn-edit {
    background: var(--warning);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
}

.btn-vote {
    background: var(--success);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
}

.sub-input-row {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

input, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-top: 5px;
    box-sizing: border-box;
    font-family: inherit;
}

.commit-info {
    font-size: 0.65rem;
    font-family: monospace;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

.step[draggable="true"]:hover {
    border: 1px dashed var(--primary);
    background-color: #f8fafc;
}

.step.dragging {
    opacity: 0.5;
}

.subtopic-link {
    text-decoration: none;
    font-size: 0.9rem;
    padding: 2px 5px;
    border-radius: 4px;
    transition: background 0.2s;
    filter: grayscale(1); /* Deixa o emoji discreto */
}

.subtopic-link:hover {
    filter: grayscale(0);
    background: rgba(0, 0, 0, 0.05);
}

.subtopic-item.done .subtopic-link {
    opacity: 0.5;
}

.checkbox-group-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    max-height: 180px;
    overflow-y: auto;
    margin-top: 5px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    gap: 8px;
    cursor: pointer;
    padding: 4px;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.checkbox-group {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    max-height: 150px;
    overflow-y: auto;
    background: white;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-item input {
    width: auto;
    margin: 0;
}

#Item\ novo {
    background-color: #dcfce7;
    color: var(--success);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    border: 1px solid #bbf7d0;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    letter-spacing: 0.05em;
    animation: pulse-new 2s infinite;
}

@keyframes pulse-new {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}