/* Inventário TI — UX mobile-first */

:root {
    --touch-min: 44px;
    --bottom-nav-h: 64px;
    --fab-size: 56px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body.has-bottom-nav { padding-bottom: calc(var(--bottom-nav-h) + 16px); }

.login-page { background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 50%, #084298 100%); }
.login-icon { width: 64px; height: 64px; }

.sidebar { min-height: calc(100vh - 56px); }
.sidebar .nav-link {
    color: #333; padding: 0.65rem 1rem; border-radius: 0.375rem;
    margin: 0.15rem 0.5rem; font-size: 0.9rem; min-height: var(--touch-min);
    display: flex; align-items: center;
}
.sidebar .nav-link:hover { background-color: #f0f4ff; color: #0d6efd; }
.sidebar .nav-link.active { background-color: #0d6efd; color: #fff; }

.btn-touch, .btn-touch.btn-sm {
    min-height: var(--touch-min); min-width: var(--touch-min);
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.5rem 1rem;
}

.global-search { position: relative; max-width: 480px; }
.global-search-results {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 1050;
    max-height: 70vh; overflow-y: auto; margin-top: 4px;
}
.global-search-results .search-item {
    display: block; padding: 0.75rem 1rem; text-decoration: none; color: inherit;
    border-bottom: 1px solid #eee; min-height: var(--touch-min);
}
.global-search-results .search-item:hover,
.global-search-results .search-item.active { background: #f0f4ff; }
.global-search-results .search-group-label {
    padding: 0.5rem 1rem; font-size: 0.75rem; text-transform: uppercase;
    color: #6c757d; background: #f8f9fa; font-weight: 600;
}

.fab-wrap { position: fixed; bottom: calc(var(--bottom-nav-h) + 12px); right: 16px; z-index: 1040; }
@media (min-width: 768px) {
    .fab-wrap { bottom: 24px; display: block !important; }
    body.has-bottom-nav { padding-bottom: 0; }
}
.fab-btn { width: var(--fab-size); height: var(--fab-size); font-size: 1.5rem; transition: transform 0.2s; }
.fab-btn.open { transform: rotate(45deg); }
.fab-menu {
    position: absolute; bottom: calc(var(--fab-size) + 8px); right: 0;
    background: #fff; border-radius: 12px; min-width: 200px; overflow: hidden;
}
.fab-item {
    display: flex; align-items: center; padding: 0.85rem 1rem;
    text-decoration: none; color: #333; min-height: var(--touch-min);
    border-bottom: 1px solid #eee;
}
.fab-item:hover { background: #f0f4ff; color: #0d6efd; }

.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-h);
    background: #fff; border-top: 1px solid #dee2e6;
    display: flex; justify-content: space-around; align-items: stretch;
    z-index: 1030; padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; text-decoration: none; color: #6c757d;
    font-size: 0.65rem; gap: 2px; min-height: var(--touch-min);
}
.bottom-nav-item i { font-size: 1.25rem; }
.bottom-nav-item.active, .bottom-nav-item.bottom-nav-scan { color: #0d6efd; }
.bottom-nav-scan i { font-size: 1.5rem; }

.mobile-card-list { display: none; }
@media (max-width: 767.98px) {
    .table-desktop { display: none !important; }
    .mobile-card-list { display: block; }
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate { display: none; }
    main.main-content { padding-bottom: 1rem !important; }
}
.mobile-asset-card {
    background: #fff; border-radius: 12px; padding: 1rem;
    margin-bottom: 0.75rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); border: 1px solid #eee;
}
.mobile-asset-card .card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

.nav-tabs .nav-link { min-height: var(--touch-min); display: flex; align-items: center; }
.action-banner { background: linear-gradient(135deg, #d1e7dd 0%, #cfe2ff 100%); border-radius: 12px; padding: 1rem 1.25rem; }
.card-clickable { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.card-clickable:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1) !important; }
.stat-icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
#qr-reader { width: 100%; max-width: 400px; margin: 0 auto; }
:focus-visible { outline: 2px solid #0d6efd; outline-offset: 2px; }
.status-badge { font-weight: 500; }
.footer { margin-bottom: var(--bottom-nav-h); }
@media (min-width: 768px) { .footer { margin-bottom: 0; } }
