/* ============ 货运管理系统 - 苹果风格主题 ============ */

:root {
    --el-color-primary: #0071e3;
    --apple-bg: #f5f5f7;
    --apple-card: #ffffff;
    --apple-text: #1d1d1f;
    --apple-gray: #6e6e73;
    --apple-radius: 18px;
    --apple-radius-sm: 12px;
    --apple-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --apple-border: rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--apple-bg);
    color: var(--apple-text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
}

/* ---------- 登录页 ---------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #e8f0fe 0%, #f5f5f7 45%, #fde8f0 100%);
}
.login-card {
    width: 400px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    padding: 44px 40px;
}
.login-card h1 {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0 0 6px;
}
.login-sub {
    text-align: center;
    color: var(--apple-gray);
    font-size: 13px;
    margin-bottom: 32px;
}
.login-logo {
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0071e3, #42a5f5);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 26px;
}

/* ---------- 主布局 ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 232px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--apple-border);
    padding: 20px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.side-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 12px 20px;
    font-size: 17px; font-weight: 700;
}
.side-logo .dot {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, #0071e3, #42a5f5);
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.side-menu { flex: 1; overflow-y: auto; }
.side-user {
    border-top: 1px solid var(--apple-border);
    padding: 14px 12px 4px;
    display: flex; align-items: center; gap: 10px;
}
.side-user .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, #8e8e93, #c7c7cc);
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px;
    flex-shrink: 0;
}
.side-user .info { flex: 1; min-width: 0; }
.side-user .name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .role { font-size: 11px; color: var(--apple-gray); }

.main-area { flex: 1; min-width: 0; padding: 24px 28px 40px; }

/* 菜单项 */
.menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: var(--apple-radius-sm);
    color: var(--apple-text);
    cursor: pointer;
    margin-bottom: 2px;
    transition: background .18s, color .18s;
    font-size: 14px;
    user-select: none;
}
.menu-item:hover { background: rgba(0, 0, 0, 0.045); }
.menu-item.active {
    background: var(--el-color-primary);
    color: #fff;
    font-weight: 600;
}
.menu-item .el-icon { font-size: 17px; }
.menu-group-title {
    padding: 14px 14px 6px;
    font-size: 12px;
    color: var(--apple-gray);
}

/* ---------- 卡片 ---------- */
.apple-card {
    background: var(--apple-card);
    border-radius: var(--apple-radius);
    box-shadow: var(--apple-shadow);
    padding: 22px 24px;
    margin-bottom: 20px;
}
.card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title::before {
    content: '';
    display: none;
}
.section-title {
    font-size: 15px;
    font-weight: 700;
    padding: 16px 0 12px;
    border-bottom: 1px solid var(--apple-border);
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---------- Element Plus 苹果化微调 ---------- */
.el-button { border-radius: 10px; font-weight: 500; }
.el-button--primary { --el-button-bg-color: #0071e3; }
.el-input__wrapper, .el-select__wrapper, .el-textarea__inner {
    border-radius: 10px !important;
}
.el-table { --el-table-header-bg-color: #fafafa; --el-table-row-hover-bg-color: #f5f8ff; border-radius: var(--apple-radius-sm); }
.el-table th.el-table__cell { font-weight: 600; color: #48484a; }
.el-dialog { border-radius: 20px !important; }
.el-drawer__header { margin-bottom: 12px; font-weight: 700; color: var(--apple-text); }
.el-tag { border-radius: 8px; }
.el-pagination { justify-content: flex-end; margin-top: 16px; }
.el-form-item__label { font-weight: 500; color: #3a3a3c; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
    background: var(--apple-card);
    border-radius: var(--apple-radius);
    box-shadow: var(--apple-shadow);
    padding: 20px 22px;
    transition: transform .2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-label { color: var(--apple-gray); font-size: 13px; margin-bottom: 8px; }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -0.5px; }
.stat-value.blue { color: #0071e3; }
.stat-value.red { color: #ff3b30; }
.stat-value.green { color: #34c759; }
.stat-value.orange { color: #ff9500; }

/* 页面头部 */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.page-desc { color: var(--apple-gray); font-size: 13px; margin-top: 4px; }

/* 表格内小按钮 */
.link-btn { color: #0071e3; cursor: pointer; font-size: 13px; margin-right: 10px; }
.link-btn.danger { color: #ff3b30; }
.link-btn:hover { text-decoration: underline; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }

/* 打印 */
@media print {
    .sidebar, .no-print { display: none !important; }
    .main-area { padding: 0; }
    .apple-card { box-shadow: none; }
}
