/* ========== 全局基础样式 ========== */
* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    overscroll-behavior: none;
    margin: 0;
    padding: 0;
}

/* 安全区域适配 */
.safe-area-top {
    padding-top: env(safe-area-inset-top, 20px);
}

.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
    display: none;
}

/* ========== 状态颜色渐变 ========== */
.status-normal {
    background: linear-gradient(135deg, #10b981, #059669);
}

.status-soon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.status-expired {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ========== 动画过渡 ========== */
/* 页面切换 */
.page-enter-active,
.page-leave-active {
    transition: all 0.3s ease;
}

.page-enter-from {
    opacity: 0;
    transform: translateX(30px);
}

.page-leave-to {
    opacity: 0;
    transform: translateX(-30px);
}

/* 弹窗淡入淡出 */
.modal-enter-active,
.modal-leave-active {
    transition: all 0.3s ease;
}

.modal-enter-from,
.modal-leave-to {
    opacity: 0;
}

.modal-enter-from .modal-content,
.modal-leave-to .modal-content {
    transform: scale(0.9) translateY(20px);
}

/* 底部滑入 */
.slide-up-enter-active,
.slide-up-leave-active {
    transition: all 0.3s ease;
}

.slide-up-enter-from,
.slide-up-leave-to {
    transform: translateY(100%);
}

/* Toast 淡入淡出 */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

/* ========== 通用按钮样式 ========== */
.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-danger {
    background: #fef2f2;
    color: #ef4444;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:active {
    transform: scale(0.98);
}

/* ========== 输入框样式 ========== */
.input-field {
    width: 100%;
    padding: 12px 16px;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.input-field:focus {
    border-color: #10b981;
    background: white;
}

/* ========== 卡片样式 ========== */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.card:active {
    transform: scale(0.98);
}
