:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.5;
}

/* Regras de padronização do Header Unificado TurisOne */
.ts-header-logo img {
    height: 40px !important;
    max-height: 40px !important;
    width: auto !important;
    display: block !important;
}

.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 65px);
    margin-top: 65px;
}

.dashboard-sidebar {
    width: 260px;
    background-color: #ffffff;
    border-right: 1px solid var(--border-color);
    padding: 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-sidebar.collapsed {
    width: 80px;
}

.dashboard-sidebar.collapsed .sidebar-nav .nav-item span,
.dashboard-sidebar.collapsed .ts-biz-selector-text,
.dashboard-sidebar.collapsed #sidebar-divider-after-brand {
    opacity: 0;
    visibility: hidden;
    width: 0;
    display: none;
}

.dashboard-sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.dashboard-sidebar.collapsed .nav-item i {
    font-size: 18px;
    margin: 0;
}

.sidebar-expander {
    position: absolute;
    top: 24px;
    right: -12px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    z-index: 110;
    transition: transform 0.3s ease, background-color 0.2s ease;
    color: #475569;
}

.sidebar-expander:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.dashboard-sidebar.collapsed .sidebar-expander i {
    transform: rotate(180deg);
}

.sidebar-nav {
    list-style: none;
    padding: 0 12px;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(2, 132, 199, 0.08);
    color: var(--primary);
    font-weight: 600;
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dashboard-main {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

/* Cards de Resumo */
.summary-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.icon-blue { background: rgba(2, 132, 199, 0.1); color: #0284c7; }
.icon-purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.icon-emerald { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.icon-amber { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.card-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

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

.view-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    color: var(--text-main);
}

.view-header p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Botões Padrão */
.ts-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ts-btn-primary { background: var(--primary); color: #ffffff; }
.ts-btn-primary:hover { background: var(--primary-dark); }

.ts-btn-secondary { background: #e2e8f0; color: #334155; }
.ts-btn-secondary:hover { background: #cbd5e1; }

.ts-btn-danger { background: #ef4444; color: #ffffff; }
.ts-btn-danger:hover { background: #dc2626; }

.ts-btn-success { background: #10b981; color: #ffffff; }
.ts-btn-success:hover { background: #059669; }

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

/* Formulários & Tabela */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.ts-input, .ts-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border 0.2s ease;
}

.ts-input:focus, .ts-select:focus {
    border-color: var(--primary);
}

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

.ts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

.ts-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
}

/* Modais */
.ts-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ts-modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px;
    width: 100%;
    max-width: 580px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    position: relative;
}

.ts-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
}

.badge-tag { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; background: #e2e8f0; color: #334155; }
.badge-success { background: rgba(16, 185, 129, 0.15); color: #047857; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #b91c1c; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-neutral { background: #f1f5f9; color: #64748b; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-gold { background: #fef08a; color: #854d0e; }
