:root {
    --ici-primary: #2563eb;
    --ici-primary-600: #1d4ed8;
    --ici-primary-50: #eff6ff;
    --ici-accent: #ff7a00;
    --ici-accent-2: #ffb200;
    --ici-surface: #ffffff;
    --ici-bg: #f3f6fb;
    --ici-border: #dbe4f2;
    --ici-text: #0f172a;
    --ici-muted: #64748b;
    --ici-shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.06);
    --ici-shadow-md: 0 14px 36px rgba(37, 99, 235, 0.14);
    --ici-radius: 14px;
    --ici-radius-sm: 10px;
}

body.bg-light {
    background: radial-gradient(circle at top right, #e8f0ff 0, transparent 34%),
                linear-gradient(180deg, #f8fbff 0%, var(--ici-bg) 100%);
    color: var(--ici-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Topbar (app navbar) */
.app-topbar {
    background: linear-gradient(90deg, #0b4fd6 0%, #1b62ea 60%, #0b4fd6 100%);
    box-shadow: var(--ici-shadow-sm);
}
.app-topbar .navbar-brand {
    letter-spacing: .2px;
}
.app-accent-line {
    height: 4px;
    background: linear-gradient(90deg, var(--ici-accent) 0%, var(--ici-accent-2) 50%, var(--ici-accent) 100%);
}
.app-topbar .app-search .input-group {
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
    border: 1px solid rgba(255,255,255,.22);
    background: #fff;
}
.app-topbar .app-search .input-group-text {
    background: transparent;
    border: 0;
    color: #0b4fd6;
}
.app-topbar .app-search .form-control {
    border: 0;
    box-shadow: none;
}
.app-topbar .app-search .form-control::placeholder {
    color: #6c757d;
}
.app-topbar .app-search-results {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.08);
    max-height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.app-topbar .app-search-results .list-group-item {
    border-left: 0;
    border-right: 0;
}

.navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.55);
}

.card {
    border: 1px solid var(--ici-border);
    border-radius: var(--ici-radius);
    box-shadow: var(--ici-shadow-sm);
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.card-header {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border-bottom: 1px solid var(--ici-border);
}

.card.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.10);
    border-color: rgba(37, 99, 235, 0.28);
}

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    background: #f8fbff;
    color: #334155;
    border-bottom-width: 1px;
}

.table-hover > tbody > tr:hover > * {
    background-color: #f6faff;
}

.btn {
    border-radius: var(--ici-radius-sm);
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(180deg, #3b82f6, var(--ici-primary));
    border-color: var(--ici-primary-600);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(180deg, #2563eb, #1e40af);
    border-color: #1e3a8a;
}

.btn-outline-secondary {
    border-color: #c7d2e4;
    color: #334155;
}

.btn-outline-secondary:hover {
    background: #eaf1ff;
    border-color: #93c5fd;
    color: #1e3a8a;
}

.form-control,
.form-select {
    border-radius: var(--ici-radius-sm);
    border-color: #cbd5e1;
}

.form-control:focus,
.form-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

.badge {
    font-weight: 600;
}

.modal-content {
    border-radius: 16px;
    border: 1px solid var(--ici-border);
    box-shadow: var(--ici-shadow-md);
}

.dropdown-menu {
    border: 1px solid var(--ici-border);
    border-radius: 12px;
    box-shadow: var(--ici-shadow-md);
}

.alert {
    border-radius: 12px;
}

code {
    background: #f1f5f9;
    color: #1e3a8a;
    border-radius: 6px;
    padding: 1px 6px;
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
}

/* Acessibilidade: foco visível */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid rgba(255, 178, 0, 0.55);
    outline-offset: 2px;
}

/* Dashboard */
.dashboard-title {
    letter-spacing: -0.2px;
}
.dashboard-section-title {
    letter-spacing: 0.06em;
}
.module-handle { cursor: grab; }
.module-handle:active { cursor: grabbing; }
.dashboard-module.sortable-ghost { opacity: 0.45; }
.dashboard-module-title {
    font-size: 1.05rem;
    line-height: 1.15;
}
.dashboard-module-icon i {
    font-size: 1.15rem;
}
.card-header {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; }
    .card { transition: none !important; }
}

