/* ===================== 移动端全局适配 ===================== */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}
*, *::before, *::after {
    box-sizing: border-box;
}
img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}
input, select, textarea, button {
    max-width: 100%;
}

/* 安全区域适配（刘海屏） */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* 隐藏滚动条但保持可滚动 */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* 卡片点击反馈 */
.card-press {
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card-press:active {
    transform: scale(0.985);
}

/* 抽屉移动端全屏 */
@media (max-width: 767px) {
    .drawer-fullscreen {
        max-width: 100vw !important;
        width: 100vw !important;
    }
    .drawer-fullscreen .drawer-body {
        padding: 16px !important;
    }
}

/* 详情/编辑模式栅格移动端堆叠 */
@media (max-width: 767px) {
    .grid-mobile-stack {
        grid-template-columns: 1fr !important;
    }
    .grid-mobile-stack-2 {
        grid-template-columns: 1fr !important;
    }
}

/* 表单项移动端全宽 */
@media (max-width: 767px) {
    .input-mobile-full {
        width: 100% !important;
    }
}

/* 移动端底部安全间距 */
@media (max-width: 767px) {
    .mb-safe-area {
        margin-bottom: env(safe-area-inset-bottom, 16px);
    }
}

/* ===================== Tailwind 补充样式（动画/过渡/特殊交互） ===================== */

/* Toast 提示 */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    animation: toastSlideIn 0.3s ease-out;
    min-width: 200px;
}

.toast.success { background: #10b981; }
.toast.error   { background: #ef4444; }
.toast.warning { background: #f59e0b; }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

/* 加载旋转 */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* 表格水平滚动 */
.table-container { overflow-x: auto; }

/* 滚动表格 */
.scrollable-table { max-height: calc(100vh - 280px); overflow-y: auto; }
