/* ==========================================
   家庭仓储 — 全局样式
   ========================================== */

/* 朴素卡片样式 */
.action-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border-radius: 12px;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

/* 卡片通用间距 */
.card {
    border-radius: 10px;
}

.card-body {
    padding: 1.5rem;
}

/* 大按钮入口 */
.btn-lg {
    border-radius: 10px;
    padding: 0.75rem 2rem;
}

/* 摄像头预览全屏样式 */
.camera-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-preview video {
    max-width: 100%;
    max-height: 100%;
}

.camera-preview .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1060;
}

/* ==========================================
   三端导航样式
   ========================================== */

/* Mobile Tab Bar */
#mobileTabBar {
    z-index: 1030;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
#mobileTabBar .dropdown-menu {
    z-index: 1040;
    margin-bottom: 4px;
}
#mobileTabBar .tab-btn {
    color: #888;
    transition: color .15s;
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0;
    min-height: 56px;
}
#mobileTabBar .tab-btn.active,
#mobileTabBar .tab-btn:active {
    color: var(--xlc-primary, #14B8A6);
}

/* Tablet Sidebar */
.sidebar-nav .sidebar-item {
    color: #666;
    display: block;
    transition: background .15s, color .15s;
    text-decoration: none;
    min-height: 48px;
}
.sidebar-nav .sidebar-item small {
    font-size: 0.7rem !important;
}
.sidebar-nav .sidebar-item:hover {
    background: #f5f5f5;
    color: var(--xlc-primary, #14B8A6);
}
.sidebar-nav .sidebar-item.active {
    color: var(--xlc-primary, #14B8A6);
    background: rgba(20, 184, 166, 0.08);
}

/* Body padding for mobile tab bar */
body {
    padding-bottom: 0;
}
@media (max-width: 575.98px) {
    body.has-mobile-tab {
        padding-bottom: 72px;
    }
}

/* ==========================================
   三端首页按钮布局
   ========================================== */

/* Tablet main content offset */
@media (min-width: 576px) and (max-width: 991.98px) {
    .main-content {
        margin-left: 64px;
    }
}

/* Mobile: stacked buttons */
.home-action-btn {
    border-radius: 16px;
    padding: 1.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: white;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 120px;
}
.home-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    color: white;
}
.home-action-btn i {
    font-size: 2rem;
}
.home-action-btn small {
    font-weight: 400;
    opacity: 0.8;
    font-size: 0.8rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .action-card .card-body {
        padding: 2rem 1rem;
    }

    .action-card .display-1 {
        font-size: 3rem;
    }
}

/* 表格响应式包装 */
.table-responsive {
    border-radius: 8px;
}

/* 提示消息美化 */
.alert {
    border-radius: 10px;
    border: none;
}

/* 表单控件 */
.form-control, .form-select {
    border-radius: 8px;
    padding: 0.6rem 1rem;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(33, 37, 41, 0.15);
    border-color: #212529;
}

/* ==========================================
   位置过滤器高亮
   ========================================== */
.filter-highlight {
    background-color: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    padding: 14px;
    font-weight: 600;
}
.filter-highlight .form-label,
.filter-highlight label {
    font-weight: 700 !important;
    color: #1e1b4b;
}
.filter-highlight .form-select,
.filter-highlight .form-control {
    background-color: #ffffff;
    border-color: #a5b4fc;
    font-weight: 500;
}
.filter-highlight .form-select:focus,
.filter-highlight .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.2);
}

/* ==========================================
   小米浏览器摄像头卡顿修复 — 手机端预览容器缩小
   ========================================== */
@media (max-width: 576px) {
    #camera-container { max-height: 40vh !important; }
}
