/* =========================
   RESET / BASE
========================= */
body {
    font-size: 0.95rem;
    background: #f5f7fb;
    color: #111827;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* =========================
   CONTAINER / LAYOUT
========================= */
main.container,
.page-wrap {
    max-width: 720px;
}

/* =========================
   CARDS
========================= */
.card-kpi,
.surface-card {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

.card-kpi .card-header {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
}

/* =========================
   BOTONES
========================= */
.btn {
    min-height: 46px;
    border-radius: 14px !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

/* variantes más suaves */
.btn-outline-danger:hover {
    background-color: #dc3545;
    color: #fff;
}

.btn-outline-success:hover {
    background-color: #198754;
    color: #fff;
}

/* =========================
   FORMULARIOS
========================= */
.form-control,
.form-select,
textarea,
input {
    min-height: 46px;
    border-radius: 14px !important;
    border: 1px solid #e5e7eb;
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}

textarea.form-control {
    min-height: 90px;
}

/* =========================
   TOM SELECT
========================= */
.ts-control {
    border-radius: 14px !important;
    min-height: 46px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    border: 1px solid #e5e7eb !important;
}

.ts-dropdown {
    border-radius: 14px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

/* =========================
   ALERTAS
========================= */
.alert {
    border-radius: 14px;
    border: 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    font-size: 0.9rem;
}

/* =========================
   LIST GROUP
========================= */
.list-group-item {
    border: 0;
    border-bottom: 1px solid #f1f5f9;
}

.list-group-item:last-child {
    border-bottom: 0;
}

/* =========================
   TEXTOS
========================= */
.text-muted {
    color: #6b7280 !important;
}

/* =========================
   NAVBAR SUPERIOR
========================= */
.navbar {
    border-bottom: 1px solid rgba(255,255,255,.05);
}

/* =========================
   NAVBAR INFERIOR
========================= */
.bottom-nav {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-link-go {
    transition: all 0.2s ease;
}

.nav-link-go:hover {
    transform: translateY(-2px);
}

/* =========================
   QUICK ACTIONS
========================= */
.quick-actions-bar {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.quick-actions-bar::-webkit-scrollbar {
    display: none;
}

.quick-action-btn {
    white-space: nowrap;
    border-radius: 999px;
}

/* =========================
   DASHBOARD CARDS
========================= */
.card-kpi .fs-3 {
    letter-spacing: -0.5px;
}

.card-kpi .small {
    font-size: 0.8rem;
}

/* =========================
   ESTADOS VISUALES
========================= */
.badge {
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 500;
}

/* estados de obra (para usar después) */
.badge-pendiente { background: #f1f5f9; color: #475569; }
.badge-en_curso { background: #dbeafe; color: #1d4ed8; }
.badge-finalizada { background: #dcfce7; color: #166534; }
.badge-cancelada { background: #fee2e2; color: #991b1b; }

/* =========================
   SCROLL MOBILE
========================= */
body {
    overscroll-behavior-y: contain;
}

/* =========================
   MICRO INTERACCIONES
========================= */
a {
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: none;
}

/* =========================
   MOBILE AJUSTES
========================= */
@media (max-width: 576px) {
    .card-kpi {
        border-radius: 16px;
    }

    .btn {
        font-size: 0.9rem;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .btn-icon-action {
        width: 40px;
        height: 40px;
        min-height: 40px !important;
        padding: 0 !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px !important;
        flex-shrink: 0;
        transition: all 0.18s ease;
    }

    .btn-icon-action i {
        font-size: 1rem;
        line-height: 1;
    }

    .btn-icon-action:hover {
        transform: translateY(-1px) scale(1.04);
    }

    .movement-amount {
        white-space: nowrap;
    }

    @media (max-width: 576px) {
        .btn-icon-action {
            width: 42px;
            height: 42px;
            min-height: 42px !important;
            border-radius: 13px !important;
        }
    }
}