:root {
    --bg-color: #0b0e14;
    --sidebar-bg: #11151c;
    --card-bg: #161b22;
    --primary-color: #ff4b4b;
    --text-color: #fafafa;
    --text-muted: #8b949e;
    --border-color: #30363d;
    --success-bg: rgba(46, 204, 113, 0.15);
    --success-color: #2ecc71;
    --info-bg: rgba(52, 152, 219, 0.15);
    --info-color: #3498db;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    display: flex;
}

/* Sidebar Moderna Estilo SaaS Dark */
.sidebar {
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #0d1117 0%, #11151c 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 14px 30px 14px;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    z-index: 100;
}

/* Custom Scrollbar da Sidebar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 18px 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.sidebar-brand i {
    font-size: 1.15rem;
    color: var(--primary-color, #ff4b4b);
    filter: drop-shadow(0 0 8px rgba(255, 75, 75, 0.6));
}

.sidebar-brand span {
    background: linear-gradient(90deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar h3 {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.nav-group-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 8px 10px 4px 10px;
    margin: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    margin-bottom: 2px;
    position: relative;
    border-left: 3px solid transparent;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.15s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

.nav-item:hover i {
    transform: scale(1.15);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(255, 75, 75, 0.16) 0%, rgba(255, 75, 75, 0.02) 100%);
    color: #ffffff;
    font-weight: 600;
    border-left: 3px solid var(--primary-color, #ff4b4b);
}

.nav-item.active::before {
    display: none;
}

.nav-badge {
    margin-left: auto;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 75, 75, 0.2);
    color: #ff4b4b;
    border: 1px solid rgba(255, 75, 75, 0.3);
    letter-spacing: 0.5px;
}

.system-status {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.status-pill {
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-weight: 500;
}

.status-check {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Home Layout */
.main-content {
    margin-left: 260px;
    padding: 40px;
    width: calc(100% - 260px);
    box-sizing: border-box;
}

.header-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-box h4 {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.stat-box .number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 5px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

/* Tabela Estilo Foto */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 12px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    color: #c9d1d9;
}

/* Botões Estilo Foto */
.btn-red {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: white;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

input[type="text"],
input[type="range"] {
    width: 100%;
    background: #0d1117;
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 6px;
    color: white;
    margin-bottom: 15px;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    background: #1e293b;
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    color: white;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #30363d;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.source-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid var(--border-color);
}

.btn-icon {
    background: #262730;
    border: 1px solid var(--border-color);
    color: #e74c3c;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}