/* ================================================================
   报单王 - 通用样式 (所有页面共用)
   ================================================================ */

/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
    background: #f2f4f7;
    color: #1e293b;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 9999;
    backdrop-filter: blur(6px);
    max-width: 260px;
    text-align: center;
    animation: toastIn 0.2s ease;
}
@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.94); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== 按钮通用 ===== */
.btn {
    padding: 8px 18px;
    border-radius: 30px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: #1a3a6b;
    color: #fff;
}
.btn-primary:hover {
    background: #0b2a5a;
}

.btn-success {
    background: #1f8b4c;
    color: #fff;
}
.btn-success:hover {
    background: #167a3e;
}

.btn-danger {
    background: #e53e3e;
    color: #fff;
}
.btn-danger:hover {
    background: #c53030;
}

.btn-warning {
    background: #ff8c00;
    color: #fff;
}
.btn-warning:hover {
    background: #e67e00;
}

.btn-outline {
    background: transparent;
    color: #4a5a72;
    border: 1.5px solid #d0d6e0;
}
.btn-outline:hover {
    background: #f7f9fc;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* ===== 状态标签 ===== */
.status-tag {
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}
.status-tag.active {
    background: #e8f5ed;
    color: #1f8b4c;
}
.status-tag.inactive {
    background: #fce8e8;
    color: #e53e3e;
}

/* ===== 弹窗通用 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.show {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 480px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal .modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal .modal-title .close {
    font-size: 24px;
    color: #8a99b3;
    cursor: pointer;
}

.modal .form-group {
    margin-bottom: 14px;
}
.modal .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 4px;
}
.modal .form-group input,
.modal .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dce1ea;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: 0.15s;
    background: #fafbfc;
}
.modal .form-group input:focus,
.modal .form-group select:focus {
    border-color: #1a3a6b;
    background: #fff;
}

.modal .btn-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.modal .btn-row .btn {
    flex: 1;
    justify-content: center;
}

/* ===== 响应式 ===== */
@media (max-width: 400px) {
    .modal { padding: 20px 16px; }
}