/* Equipment Inventory SaaS - Refreshed UI */
:root {
    --app-bg: #f4f7fb;
    --app-surface: rgba(255, 255, 255, 0.86);
    --app-surface-strong: #ffffff;
    --app-border: rgba(148, 163, 184, 0.18);
    --app-border-strong: rgba(148, 163, 184, 0.28);
    --app-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    --app-shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
    --app-text: #0f172a;
    --app-text-muted: #64748b;
    --app-primary: #2563eb;
    --app-primary-soft: rgba(37, 99, 235, 0.12);
    --app-radius-lg: 24px;
}
* { box-sizing: border-box; }
body {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fbff 0%, var(--app-bg) 100%);
    color: var(--app-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.01em;
}
.app-shell { position: relative; }
.app-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, rgba(59,130,246,0.12), transparent 32%),
        radial-gradient(circle at top right, rgba(16,185,129,0.10), transparent 26%),
        radial-gradient(circle at bottom center, rgba(99,102,241,0.08), transparent 28%);
    z-index: 0;
}
.app-main, .app-navbar { position: relative; z-index: 1; }
.app-container { max-width: 1440px; padding-left: 1.2rem; padding-right: 1.2rem; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.03em; font-weight: 700; color: var(--app-text); }
p, .text-muted, small, .form-text { color: var(--app-text-muted) !important; }
a { color: var(--app-primary); text-decoration: none; }
a:hover { color: #1d4ed8; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.75rem; border-radius: 999px;
    background: var(--app-primary-soft); color: var(--app-primary); font-size: 0.76rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.9rem;
}
.page-hero {
    padding: 1.4rem 1.6rem; border: 1px solid var(--app-border); border-radius: var(--app-radius-lg);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.82)); box-shadow: var(--app-shadow-soft);
    backdrop-filter: blur(12px);
}
.page-hero--compact { padding: 1.15rem 1.35rem; }
.app-navbar {
    margin: 1rem auto 0; width: calc(100% - 2rem); max-width: 1440px; border-radius: 22px;
    background: rgba(15,23,42,0.86) !important; backdrop-filter: blur(16px);
    box-shadow: 0 16px 36px rgba(15,23,42,0.22); border: 1px solid rgba(255,255,255,0.08);
    z-index: 1080;
    overflow: visible;
}
.app-brand { display: inline-flex; align-items: center; gap: 0.85rem; color: #fff !important; }
.app-brand__mark {
    width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.app-brand strong, .app-user-chip strong { display: block; font-size: 0.95rem; }
.app-brand small, .app-user-chip small { display: block; color: rgba(255,255,255,0.68); font-size: 0.74rem; }
.navbar .nav-link {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.95rem !important; border-radius: 14px;
    color: rgba(255,255,255,0.78) !important; transition: all 0.18s ease; font-weight: 500;
}
.navbar .nav-link:hover, .navbar .nav-link:focus, .navbar .nav-link.active { color: #fff !important; background: rgba(255,255,255,0.08); }
.app-user-chip { padding-right: 1rem !important; }
.dropdown-menu {
    border: 1px solid var(--app-border); border-radius: 16px; box-shadow: var(--app-shadow); padding: 0.55rem;
    z-index: 2000;
}
.app-navbar .navbar-collapse,
.app-navbar .dropdown,
.app-navbar .dropdown-menu {
    overflow: visible;
}
.modal {
    overflow-x: hidden;
    overflow-y: auto;
}
.modal,
.modal.show {
    z-index: 3000 !important;
}
.modal-dialog,
.modal.show .modal-dialog,
.modal-content {
    position: relative;
    z-index: auto;
}
.modal-backdrop,
.modal-backdrop.show {
    z-index: 2990 !important;
}
.dropdown-item { border-radius: 12px; padding: 0.65rem 0.9rem; }
.dropdown-item:hover { background: #f8fafc; }
.card {
    border: 1px solid var(--app-border); border-radius: var(--app-radius-lg);
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.84));
    box-shadow: var(--app-shadow-soft); backdrop-filter: blur(12px); margin-bottom: 1rem; overflow: hidden;
}
.card-header { background: transparent; border-bottom: 1px solid rgba(148,163,184,0.14); padding: 1.1rem 1.25rem; }
.card-body { padding: 1.25rem; }
.stats-card { color: #fff; border: none; }
.stats-card .card-body { padding: 1.35rem; }
.stats-card h2 { color: inherit; font-size: 2rem; margin: 0.25rem 0 0; }
.stats-card--primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.stats-card--success { background: linear-gradient(135deg, #16a34a, #15803d); }
.stats-card--warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stats-card--info { background: linear-gradient(135deg, #0891b2, #0e7490); }
.table-responsive { overflow-x: auto; }
.table { margin-bottom: 0; }
.table th {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; border-bottom-color: rgba(148,163,184,0.2);
}
.table td { vertical-align: middle; border-color: rgba(148,163,184,0.14); }
.table-modern tbody tr:hover, .table-hover tbody tr:hover { background: rgba(37,99,235,0.04); }
.badge { font-weight: 700; border-radius: 999px; padding: 0.45rem 0.72rem; }
.progress { height: 0.8rem; border-radius: 999px; background: rgba(148,163,184,0.18); }
.progress-soft { background: rgba(148,163,184,0.14); }
.progress-bar { border-radius: 999px; }
.list-group-clean .list-group-item {
    border: 1px solid rgba(148,163,184,0.14); border-radius: 16px; margin-bottom: 0.75rem; padding: 1rem 1.1rem;
}
.status-stack { display: grid; gap: 1.1rem; }
.status-row { display: grid; gap: 0.55rem; }
.empty-state { text-align: center; padding: 2rem 1rem; }
.empty-state--compact { padding: 1.2rem 0.8rem; }
.empty-state__icon {
    width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 20px; display: flex; align-items: center; justify-content: center;
    background: var(--app-primary-soft); color: var(--app-primary); font-size: 1.5rem;
}
.inventory-tabs .nav-link, .nav-tabs .nav-link {
    border: none; border-radius: 14px; color: #475569; padding: 0.75rem 0.95rem;
}
.inventory-tabs .nav-link.active, .nav-tabs .nav-link.active { background: var(--app-primary-soft); color: var(--app-primary); }
.inventory-panel {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.1rem;
    border-radius: 18px; background: rgba(248,250,252,0.92); border: 1px solid rgba(148,163,184,0.15);
}
.inventory-panel__label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; margin-bottom: 0.25rem; }
.inventory-panel__value { font-size: 1.1rem; font-weight: 700; }
.inventory-table-wrap { max-height: 420px; overflow-y: auto; }
.inventory-pill {
    display: inline-flex; align-items: center; padding: 0.4rem 0.7rem; border-radius: 999px; background: rgba(15,23,42,0.05); font-weight: 700;
}
.scanner-card { background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.92)); }
.scanner-stage {
    padding: 1rem; border-radius: 22px; background: linear-gradient(180deg, rgba(15,23,42,0.02), rgba(37,99,235,0.05)); border: 1px solid rgba(148,163,184,0.16);
}
.scanner-reader, #reader {
    width: 100%; min-height: 320px; border: 2px dashed rgba(37,99,235,0.28); border-radius: 18px; padding: 0.75rem; background: #fff;
}
#reader video { border-radius: 14px; width: 100% !important; height: auto !important; }
.scanner-help { display: grid; gap: 0.6rem; }
.scanner-help__item { display: flex; align-items: center; gap: 0.6rem; color: #475569; font-size: 0.94rem; }
.scanner-help__dot {
    width: 9px; height: 9px; border-radius: 999px; background: linear-gradient(135deg, #22c55e, #16a34a);
}
.scanner-alert { border-radius: 16px; border: none; box-shadow: var(--app-shadow-soft); }
.qr-selection-panel {
    border: 1px solid rgba(148,163,184,0.14); border-radius: 20px; background: rgba(248,250,252,0.9); padding: 1rem;
}
.qr-list { max-height: 420px; overflow-y: auto; display: grid; gap: 0.65rem; }
.qr-item-row {
    border: 1px solid rgba(148,163,184,0.14); border-radius: 16px; padding: 0.85rem 0.95rem; background: rgba(255,255,255,0.92);
}
.auth-shell { min-height: calc(100vh - 2rem); display: flex; align-items: center; justify-content: center; }
.auth-card { max-width: 560px; margin: 0 auto; }
.app-alert { border-radius: 18px; border: none; box-shadow: var(--app-shadow-soft); }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 12px; border: 1px solid rgba(148,163,184,0.28); min-height: 40px;
}
form[style*="display:none"] { display: none !important; }
.dataTables_wrapper .row:first-child,
.dataTables_wrapper .row:last-child {
    padding: 0.4rem 0 0;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin-top: 0.75rem;
}
.stats-card--soft {
    position: relative;
    overflow: hidden;
}
.stats-card--soft::after {
    content: '';
    position: absolute;
    inset: auto -30px -30px auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}
.stats-card__label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.78;
}
.stats-card__value {
    margin: 0.35rem 0 0;
    font-size: 2rem;
}
.stats-card__meta {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.45;
}
.status-summary-card {
    height: 100%;
    padding: 1.2rem;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(248, 250, 252, 0.9);
}
.status-summary-card--success {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.12), rgba(248, 250, 252, 0.96));
}
.status-summary-card--warning {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.14), rgba(248, 250, 252, 0.96));
}
.status-summary-card__label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.45rem;
}
.status-summary-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
}
.status-summary-card__meta {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}
@media (max-width: 991px) {
    .app-navbar { width: calc(100% - 1rem); margin-top: 0.5rem; border-radius: 18px; }
    .app-container { padding-left: 0.9rem; padding-right: 0.9rem; }
    .page-hero, .card-body, .card-header { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 768px) {
    .page-hero { padding: 1rem; }
    .btn { width: 100%; }
    .page-hero .btn { width: auto; }
}
