/* 里程表管理系统 - 全局样式 */

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 通用表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}

.data-table th {
    background: #fafafa;
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e8e8e8;
    white-space: nowrap;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.data-table tr:active {
    background: #f9f9ff;
}

.data-table tr.row-selected {
    background: #e8e4ff;
}

.data-table tr.row-selected td {
    color: #333;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 2px;
}

/* 安全区域适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .modal-footer {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* 禁止长按选中 */
body {
    -webkit-user-select: none;
    user-select: none;
}

input, textarea {
    -webkit-user-select: auto;
    user-select: auto;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Toast */
.toast-msg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    max-width: 80%;
    text-align: center;
}

.toast-msg.show {
    opacity: 1;
}

/* 响应式 */
@media screen and (min-width: 768px) {
    .data-table {
        font-size: 14px;
    }
    .data-table th,
    .data-table td {
        padding: 12px 16px;
    }
}
