/* JXC 进销存系统 - 极简 Apple 风格样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.5;
    font-size: 15px;
}

/* ========== Header ========== */
.header {
    background-color: #f5f5f7;
    height: 56px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ========== 导航栏 ========== */
.nav {
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav .container {
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    gap: 18px;
    flex-wrap: nowrap;
}

.nav a {
    color: #1d1d1f;
    text-decoration: none;
    padding: 18px 20px;
    display: inline-block;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.2s, background-color 0.2s;
    position: relative;
    white-space: nowrap;
}

.nav a:hover {
    color: #007AFF;
    background-color: rgba(0, 122, 255, 0.06);
}

.nav a.active {
    font-weight: 600;
    color: #007AFF;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: #007AFF;
}

/* 品牌链接 */
.nav a.brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 8px 18px 0;
    text-decoration: none;
    transition: all 0.2s;
}

/* 品牌标识容器 */
.brand-mark {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* 后层方块 */
.mark-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 14px;
    height: 14px;
    border: 1.5px solid rgba(0, 122, 255, 0.35);
    border-radius: 3px;
    transform: translate(2px, 2px);
    transition: border-color 0.2s;
}

/* 前层方块 */
.mark-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 14px;
    height: 14px;
    border: 1.5px solid #007AFF;
    border-radius: 3px;
    background: transparent;
    transition: border-color 0.2s;
}

/* 品牌文字 */
.brand-text {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: 0.06em;
}

/* 品牌hover效果 */
.nav a.brand-link:hover .brand-text {
    color: #007AFF;
}

.nav a.brand-link:hover .mark-front {
    border-color: #0051D5;
}

/* 品牌链接永远不显示active底线 */
.nav a.brand-link.active::after {
    display: none;
}

/* 品牌链接active时保持默认颜色 */
.nav a.brand-link.active .brand-text {
    color: #1d1d1f;
}

.nav a.brand-link.active .mark-front {
    border-color: #007AFF;
}

/* 导航分隔线 */
.nav-divider {
    width: 1px;
    height: 20px;
    background-color: rgba(0,0,0,0.08);
    margin: 0 12px;
}

/* HELP 链接 */
.nav a.help-link {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: color 0.2s, background-color 0.2s;
    padding: 18px 8px;
    position: relative;
}

.nav a.help-link:hover {
    color: #007AFF;
    background-color: rgba(0, 122, 255, 0.06);
}

/* HELP链接永远不显示active底线 */
.nav a.help-link.active::after {
    display: none;
}

/* 纯CSS Tooltip */
.nav a.help-link::before {
    content: "使用说明";
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%) translateY(-8px);
    padding: 6px 12px;
    background-color: #1d1d1f;
    color: white;
    font-size: 12px;
    font-weight: 400;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
}

.nav a.help-link:hover::before {
    opacity: 1;
}

/* ========== 主内容区 ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
}

/* ========== 卡片 ========== */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 24px;
    margin-bottom: 24px;
}

.card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1d1d1f;
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1d1d1f;
}

/* ========== 表格 ========== */
table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e5e7;
}

table th {
    background-color: #f5f5f7;
    font-weight: 600;
    font-size: 14px;
    color: #1d1d1f;
}

table tr:hover {
    background-color: #f5f5f7;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007AFF;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 400;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #0051D5;
}

.btn:active {
    background-color: #0041b3;
}

.btn:disabled {
    background-color: #c7c7cc;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #007AFF;
}

.btn-success {
    background-color: #34C759;
}

.btn-warning {
    background-color: #FF9500;
}

.btn-danger {
    background-color: #FF3B30;
}

.btn-secondary {
    background-color: #8E8E93;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 15px;
    color: #1d1d1f;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* ========== 提示框 ========== */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========== 标签 ========== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* ========== 工具类 ========== */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ========== 快速导航区域 ========== */
.quick-nav-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 24px;
}

.quick-nav-section h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1d1d1f;
}

.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.quick-nav-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background-color: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.quick-nav-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 122, 255, 0.08);
    border-radius: 8px;
    color: #007AFF;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 2px;
}

.card-desc {
    font-size: 13px;
    color: #86868b;
}

/* ========== HELP Modal ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.18);
    width: 720px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #8e8e93;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: #f5f5f7;
    color: #1d1d1f;
}

.modal-body {
    padding: 24px;
}

.modal-body h3 {
    font-size: 15px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 12px;
    color: #1d1d1f;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.modal-body li {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 15px;
    color: #1d1d1f;
}

.modal-body p {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 15px;
    color: #1d1d1f;
}

/* ========== 分页组件（全局统一样式）========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 16px;
}

.pagination button {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    background-color: #f5f5f7;
    border-color: #007AFF;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination .page-info {
    color: #86868b;
    font-size: 14px;
}

/* ========== 筛选条控件（全局统一样式）========== */
.filter-control {
    height: 38px;
    padding: 8px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    line-height: 22px;
}

.filter-control[type="text"],
.filter-control[type="date"] {
    min-width: 200px;
}

select.filter-control {
    min-width: 150px;
}
