/* RESET & GLOBAL */
:root {
    --primary-color: #2563eb;
    /* Azul Moderno */
    --primary-hover: #1d4ed8;
    --bg-sidebar: #0f172a;
    /* Azul Escuro Profundo */
    --bg-content: #f1f5f9;
    /* Cinza muito claro */
    --text-dark: #1e293b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-content);
    color: var(--text-dark);
}

/* LAYOUT DASHBOARD */
.dashboard-wrapper {
    display: flex;
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-shrink: 0;
}

.brand {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #60a5fa;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.menu-item {
    text-decoration: none;
    color: #94a3b8;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.menu-item.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.btn-back {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-back:hover {
    color: white;
}

/* CONTENT AREA */
.content-area {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active-section {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

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

.section-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #0f172a;
}

.section-header p {
    color: #64748b;
    margin-top: 5px;
}

/* TABLE STYLES */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table-container {
    padding: 0;
}

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

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

.data-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.data-table tr:hover {
    background-color: #f8fafc;
}

.text-right {
    text-align: right;
}

.badge-day {
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 4px;
    font-weight: 600;
}

.btn-icon-danger {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-icon-danger:hover {
    background-color: #fee2e2;
}

/* BUTTONS */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: #475569;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #f1f5f9;
}

/* MODAL */
.hidden {
    display: none !important;
}

.modal-overlay {
    display: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

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

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* FORMS */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-group-checkbox {
    align-self: end;
    margin-bottom: 16px;
    flex: 1;
}

.form-group-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
}

 
.form-select {
    flex: 2;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    width: -webkit-fill-available;
}


/* .form-group input, */
input[type="text"],
input[type="time"],
input[type="url"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-sizing: border-box;
    /* Garante que padding não estoure width */
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.day-check input {
    display: none;
}

.day-check span {
    display: block;
    text-align: center;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.day-check input:checked+span {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* MOCK & EMPTY STATES */
.mock-content,
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.mock-content i,
.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}


/* --- LAYOUT DE ABAS --- */
.tabs-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    background-color: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.tab-link {
    padding: 15px 25px;
    border: none;
    background: none;
    font-size: 1rem;
    color: #64748b;
    cursor: pointer;
    font-weight: 500;
    border-right: 1px solid #e2e8f0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-link:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.tab-link.active {
    background-color: white;
    color: var(--primary-color);
    border-bottom: 2px solid transparent;
    /* Truque para cobrir a borda de baixo */
    font-weight: 600;
    box-shadow: inset 0 3px 0 var(--primary-color);
}

.tab-content {
    display: none;
    padding: 25px;
    animation: fadeIn 0.3s ease;
}

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

.tab-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tab-actions h3 {
    margin: 0;
    color: #1e293b;
}

/* --- TABELAS --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px;
    background-color: #f8fafc;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.data-table tr:hover {
    background-color: #f8fafc;
}

/* --- AÇÕES DA TABELA --- */
.action-btn {
    border: none;
    background: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.action-btn.edit {
    color: #3b82f6;
}

.action-btn.edit:hover {
    background-color: #eff6ff;
}

.action-btn.delete {
    color: #ef4444;
}

.action-btn.delete:hover {
    background-color: #fef2f2;
}

/* --- MODAIS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 25px;
}

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

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

.close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

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

/* Botões utilitários */
.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary:hover {
    filter: brightness(110%);
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.btn-outline {
    width: 100%;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.destination-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.destination-item select,
.destination-item input {
    flex: 1;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
}

.btn-remove {
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
}