:root {
    --app-bg: #f4f6f9;
    --app-card: #ffffff;
    --app-border: #e9edf2;
    --app-text: #1f2937;
    --app-muted: #6b7280;
    --app-primary: #0d6efd;
    --app-dark: #111827;
}

body {
    background: linear-gradient(180deg, #eef2f8 0%, var(--app-bg) 220px);
    color: var(--app-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1 0 auto;
}

.app-footer {
    border-top: 1px solid var(--app-border);
    background: rgba(255, 255, 255, .7);
}

.app-navbar {
    background: linear-gradient(90deg, #111827 0%, #1f2937 100%);
    box-shadow: 0 8px 24px rgba(17, 24, 39, .18);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: .2px;
}

.card,
.form-section {
    border: 1px solid var(--app-border);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.card-counter {
    border: 0;
    background: var(--app-card);
}

.card-counter.emphasis {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
}

.counter-label {
    color: var(--app-muted);
    font-size: .92rem;
    margin-bottom: .4rem;
}

.counter-value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
}

.dashboard-chip {
    background: rgba(13, 110, 253, .08);
    color: #0b3f91;
    border: 1px solid rgba(13, 110, 253, .12);
    border-radius: 999px;
    padding: .55rem .9rem;
    font-size: .92rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .65rem 0;
    border-bottom: 1px solid var(--app-border);
}

.table thead th {
    white-space: nowrap;
    color: #475569;
    font-size: .86rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.table > :not(caption) > * > * {
    padding-top: .8rem;
    padding-bottom: .8rem;
}

.badge-tipo {
    font-size: .8rem;
}

.form-section {
    background: var(--app-card);
    padding: 1.2rem;
}

.progress {
    height: 10px;
    border-radius: 999px;
    background: #e9eef7;
}

.progress-thin {
    height: 8px;
}

.progress-bar {
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.is-disabled {
    opacity: .6;
}

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

.hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    margin-left: .35rem;
    border-radius: 50%;
    border: 1px solid #9ca3af;
    color: #4b5563;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    user-select: none;
    vertical-align: middle;
    background: #fff;
}

.grid-sortable-th {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.2rem;
}

.grid-sortable-th::after {
    content: "<>";
    position: absolute;
    right: .3rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .72rem;
    color: #94a3b8;
}

.grid-sortable-th[data-sort-dir="asc"]::after {
    content: "^";
    color: #2563eb;
}

.grid-sortable-th[data-sort-dir="desc"]::after {
    content: "v";
    color: #2563eb;
}
