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

:root {
    --primary: #ff6a00;        /* Laranja Aura */
    --primary-dark: #e65c00;   /* Laranja mais escuro (hover) */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --secondary: #6b7280;
    --bg: #f9fafb;
    --bg-card: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px var(--shadow);
}

.login-box h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 2rem;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header{
    padding:18px 16px;
    border-bottom:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:center; /* CENTRALIZA O LOGO */
    position:relative; /* necessário para o botão */
}

.btn-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s;
}

.nav-item:hover {
    background: var(--bg);
}

.nav-item.active {
    background: var(--bg);
    border-left: 3px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.nav-item .icon {
    margin-right: 12px;
    font-size: 1.2rem;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

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

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

.btn-logout {
    display: block;
    text-align: center;
    padding: 8px;
    background: var(--danger);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: opacity 0.2s;
}

.btn-logout:hover {
    opacity: 0.9;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    padding-bottom: 80px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 10px 0;
    z-index: 1000;
}

.mobile-nav a {
    flex: 1;
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px;
}

.mobile-nav a.active {
    color: var(--primary);
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 1px 3px var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 12px;
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.1);
}

.stat-icon.danger {
    background: rgba(239, 68, 68, 0.1);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
}

.stat-content h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-value.positive {
    color: var(--success);
}

.stat-value.negative {
    color: var(--danger);
}

.stat-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background-color: #ff6a00; /* laranja do logo */
    color:#ffffff; /* TEXTO BRANCO */
    border: none;
}

.btn-primary:hover {
    background-color: #e65c00;
}


.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

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

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

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

.btn-block {
    display: block;
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-group.flex-2 {
    grid-column: span 2;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.filters-form .form-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

.form-text-display {
    font-weight: 600;
    padding: 10px;
    background: var(--bg);
    border-radius: 6px;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

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

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

.table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
}

.table tbody tr:hover {
    background: var(--bg);
}

.table tfoot {
    font-weight: 700;
    background: var(--bg);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-info {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

.badge-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: var(--secondary);
}

.badge-pendente {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-pago {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-atrasado {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-cancelado {
    background: rgba(107, 114, 128, 0.1);
    color: var(--secondary);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideIn 0.3s;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info);
    border: 1px solid var(--info);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-close:hover {
    color: var(--text);
}

.modal-content h2 {
    margin-bottom: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Utilities */
.text-center {
    text-align: center;
}

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

.positive {
    color: var(--success);
}

.negative {
    color: var(--danger);
}

/* Kanban Styles */
.kanban-boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.board-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.board-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--shadow);
}

.board-card h3 {
    margin-bottom: 10px;
    color: var(--text);
}

.board-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 10px;
}

.board-client {
    color: var(--primary);
    font-size: 0.875rem;
    margin-bottom: 15px;
}

.board-actions {
    display: flex;
    gap: 10px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state p:first-child {
    font-size: 3rem;
    margin-bottom: 10px;
}

.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-picker label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s;
}

.color-picker label:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.color-picker input[type="radio"] {
    width: auto;
    margin: 0;
}

.color-picker span {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* Kanban Board */
.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.kanban-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    min-height: 500px;
}

.kanban-list {
    flex: 0 0 300px;
    background: var(--bg);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 250px);
}

.list-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.list-header h3 {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.card-count {
    background: var(--secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 4px;
}

.btn-icon:hover {
    opacity: 1;
}

.cards-container {
    flex: 1;
    overflow-y: auto;
    min-height: 100px;
    padding: 5px;
    border-radius: 8px;
    transition: background 0.2s;
}

.cards-container.drag-over {
    background: rgba(59, 130, 246, 0.1);
    border: 2px dashed var(--primary);
}

.kanban-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px var(--shadow);
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

.kanban-card:active {
    cursor: grabbing;
}

.card-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.card-label {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    display: inline-block;
}

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

.card-header-mini strong {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text);
}

.card-actions-mini {
    display: flex;
    gap: 4px;
}

.btn-icon-mini {
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 2px;
}

.btn-icon-mini:hover {
    opacity: 1;
}

.card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-user {
    background: var(--bg);
    padding: 4px 8px;
    border-radius: 4px;
}

.card-due {
    background: var(--bg);
    padding: 4px 8px;
    border-radius: 4px;
}

.btn-add-card {
    width: 100%;
    padding: 10px;
    background: none;
    border: 2px dashed var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
    font-size: 0.875rem;
}

.btn-add-card:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
}

/* Etiquetas */
.etiquetas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.etiqueta-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.etiqueta-preview-large {
    padding: 15px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    text-align: center;
    font-size: 1.1rem;
}

.etiqueta-info {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.etiqueta-actions {
    display: flex;
    gap: 10px;
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.color-picker-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border: 2px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s;
}

.color-picker-grid label:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.color-picker-grid input[type="radio"] {
    width: auto;
    margin: 0;
}

.color-picker-grid span {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
}

.etiquetas-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.etiqueta-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

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

.etiqueta-preview {
    padding: 4px 10px;
    border-radius: 4px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Histórico */
.card-transfer-name {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.modal-large {
    max-width: 700px;
}

.historico-timeline {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--bg-card);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 17px;
    bottom: -20px;
    width: 2px;
    background: var(--border);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-content {
    background: var(--bg);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.timeline-header strong {
    color: var(--text);
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-body {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 999;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .btn-toggle {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-group.flex-2 {
        grid-column: span 1;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .kanban-board {
        flex-direction: column;
    }
    
    .kanban-list {
        flex: 1;
        max-height: none;
    }
    
    .kanban-boards-grid {
        grid-template-columns: 1fr;
    }
}
/* ============================
MODAL GRANDE DO CARD
============================ */

.modal-large {
  width: min(1200px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
}

/* Corpo do modal */
.card-view-body {
    margin-top: 15px;
}

/* Seção interna */
.card-view-section h4 {
    margin-bottom: 8px;
    font-weight: 600;
}

/* Texto do card */
.card-view-text {
    white-space: pre-wrap;   /* mantém quebra de linha */
    line-height: 1.6;
    padding: 16px;

    border-radius: 12px;
    border: 1px solid #e5e7eb;

    background-color: #fafafa;

    min-height: 250px;
}

/* ============================
MELHORIA UX — CARD CLICÁVEL
============================ */

.kanban-card {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.kanban-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* evita efeito hover enquanto arrasta */
.kanban-card.dragging {
    cursor: grabbing;
    transform: none;
    box-shadow: none;
}

.login-logo{
    width: 220px;
    margin-bottom: 10px;
}

.login-box{
    text-align: center;
}

.sidebar-logo{
    width:64px;
    height:auto;
    display:block;
}


/* Sidebar collapsed (desktop) */
@media (min-width: 769px) {
  .sidebar.collapsed {
    width: 72px;
  }
  .sidebar.collapsed .sidebar-nav .text,
  .sidebar.collapsed .sidebar-footer .user-info {
    display: none;
  }
  .sidebar.collapsed .sidebar-header {
    justify-content: center;
    gap: 0;
  }
}
