/* ============================================
   牛运国际物流 - 前端样式 v3.0
   专业登录页 + 客户门户 + 自适应
   ============================================ */

/* ── 全局重置 ── */
.ny-login-wrapper,
.ny-portal {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a1a2e;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   登录页
   ============================================ */
.ny-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 20px;
}

.ny-login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
}

.ny-login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.ny-logo-icon {
    margin-bottom: 16px;
}
.ny-logo-icon svg {
    width: 56px;
    height: 56px;
}

.ny-login-title {
    font-size: 22px;
    font-weight: 700;
    color: #0A6EBD;
    margin: 0 0 4px;
}

.ny-login-subtitle {
    font-size: 13px;
    color: #8c8c8c;
    margin: 0;
}

.ny-login-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.ny-login-form .ny-form-group {
    margin-bottom: 18px;
}

.ny-login-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.ny-login-form input[type="text"],
.ny-login-form input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: #fafafa;
}

.ny-login-form input:focus {
    border-color: #0A6EBD;
    outline: none;
    box-shadow: 0 0 0 3px rgba(10,110,189,0.12);
    background: #fff;
}

.ny-login-form input::placeholder {
    color: #bfbfbf;
}

.ny-login-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #0A6EBD;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.ny-login-btn:hover {
    background: #095a9e;
}

.ny-login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
}

.ny-login-footer .ny-link {
    color: #0A6EBD;
    text-decoration: none;
}

.ny-login-footer .ny-link:hover {
    text-decoration: underline;
}

.ny-login-footer .ny-divider {
    color: #d9d9d9;
    margin: 0 8px;
}

/* ============================================
   客户门户 - 布局
   ============================================ */
.ny-portal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.ny-portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 24px;
}

.ny-portal-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ny-brand-text {
    font-size: 18px;
    font-weight: 700;
    color: #0A6EBD;
}

.ny-portal-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ny-user-name {
    font-size: 14px;
    color: #555;
}

.ny-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    padding: 8px 18px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    transition: all 0.25s ease;
    cursor: pointer;
    white-space: nowrap;
}

.ny-logout-btn:hover {
    color: #cf1322;
    border-color: #cf1322;
    background: #fff1f0;
    box-shadow: 0 2px 8px rgba(207,19,34,0.1);
}

.ny-logout-btn svg {
    flex-shrink: 0;
}

.ny-portal-content {
    min-height: 60vh;
}

.ny-portal-footer {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid #eee;
    margin-top: 40px;
    color: #999;
    font-size: 13px;
}

/* ── 页面标题 ── */
.ny-page-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px;
}

/* ── 空状态 ── */
.ny-empty-state,
.ny-portal-notice {
    text-align: center;
    padding: 60px 20px;
    color: #8c8c8c;
}

.ny-empty-icon,
.ny-notice-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ny-empty-state h3,
.ny-portal-notice h3 {
    font-size: 18px;
    color: #333;
    margin: 12px 0 8px;
}

.ny-empty-hint {
    font-size: 13px;
}

.ny-back-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 20px;
    background: #0A6EBD;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
}

.ny-back-btn:hover {
    background: #095a9e;
}

/* ============================================
   订单列表 - PC 表格
   ============================================ */
.ny-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #eee;
}

.ny-order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ny-order-table th {
    background: #f7f8fa;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    border-bottom: 2px solid #eee;
}

.ny-order-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.ny-order-table tbody tr:hover {
    background: #f9fbfd;
}

.ny-detail-btn {
    display: inline-block;
    padding: 4px 14px;
    background: #0A6EBD;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background 0.2s;
}

.ny-detail-btn:hover {
    background: #095a9e;
    color: #fff;
}

/* ── 手机端卡片 ── */
.ny-card-list {
    display: none;
}

.ny-order-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.ny-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ny-card-order-num {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a2e;
}

.ny-card-body {
    margin-bottom: 12px;
}

.ny-card-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.ny-card-row span:first-child {
    color: #8c8c8c;
}

.ny-card-row span:last-child {
    color: #333;
    font-weight: 500;
}

.ny-card-detail-btn {
    display: block;
    text-align: center;
    padding: 8px;
    background: #0A6EBD;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.ny-card-detail-btn:hover {
    background: #095a9e;
    color: #fff;
}

/* ============================================
   订单详情
   ============================================ */
.ny-back-link {
    display: inline-block;
    color: #0A6EBD;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
}

.ny-back-link:hover {
    text-decoration: underline;
}

.ny-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.ny-detail-header .ny-page-title {
    margin: 0;
}

.ny-detail-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.ny-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0A6EBD;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e6f0fa;
}

.ny-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.ny-detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ny-detail-item.ny-detail-full {
    grid-column: 1 / -1;
}

.ny-label {
    font-size: 12px;
    color: #8c8c8c;
    font-weight: 500;
}

.ny-value {
    font-size: 15px;
    color: #1a1a2e;
    font-weight: 500;
}

.ny-value-highlight {
    font-size: 17px;
    font-weight: 700;
    color: #0A6EBD;
}

.ny-cargo-items-wrapper {
    margin-top: 16px;
    overflow-x: auto;
}

.ny-cargo-items-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.ny-cargo-items-table th,
.ny-cargo-items-table td {
    padding: 10px 12px;
    border: 1px solid #e8eef5;
    text-align: left;
    font-size: 13px;
}

.ny-cargo-items-table th {
    background: #f6f9fc;
    color: #4a5568;
    font-weight: 700;
}

.ny-cargo-items-table td {
    color: #1a1a2e;
}

.ny-value-money {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

.ny-detail-finance {
    background: #f7fafc;
    border-color: #d6e4f0;
}

.ny-remark-box {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 14px;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}

/* ── 进度条 ── */
.ny-progress-wrap {
    margin-top: 20px;
}

.ny-progress-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.ny-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0A6EBD, #28a745);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.ny-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.ny-step {
    text-align: center;
    font-size: 11px;
    color: #bfbfbf;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ny-step-dot {
    width: 8px;
    height: 8px;
    background: #d9d9d9;
    border-radius: 50%;
}

.ny-step.active {
    color: #28a745;
    font-weight: 600;
}

.ny-step.active .ny-step-dot {
    background: #28a745;
}

/* ============================================
   状态徽章
   ============================================ */
.ny-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ny-badge-lg {
    font-size: 14px;
    padding: 5px 16px;
}

.ny-badge-pending_quote { background: #fff7e6; color: #d48806; }
.ny-badge-quoted        { background: #e6f7ff; color: #0958d9; }
.ny-badge-confirmed     { background: #f6ffed; color: #389e0d; }
.ny-badge-in_transit    { background: #e6f7ff; color: #0958d9; }
.ny-badge-delivered     { background: #f6ffed; color: #389e0d; }
.ny-badge-completed     { background: #28a745; color: #fff; }
.ny-badge-cancelled     { background: #fff1f0; color: #cf1322; }

/* 付款状态 */
.ny-pay-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.ny-pay-unpaid  { background: #fff1f0; color: #cf1322; }
.ny-pay-partial { background: #fff7e6; color: #d48806; }
.ny-pay-paid    { background: #f6ffed; color: #389e0d; }

/* ============================================
   询价表单（保留）
   ============================================ */
.niuyun-inquiry-form,
.niuyun-tracker {
    max-width: 800px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.niuyun-form-section {
    margin-bottom: 24px;
}

.niuyun-form-section h4 {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #0A6EBD;
    color: #1a1a2e;
}

.niuyun-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    margin-bottom: 8px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #0A6EBD;
    outline: none;
    box-shadow: 0 0 0 2px rgba(10,110,189,0.1);
}

.niuyun-btn {
    background: #0A6EBD !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    cursor: pointer;
    transition: background 0.2s;
}

.niuyun-btn:hover {
    background: #095a9e !important;
}

.niuyun-success {
    padding: 24px;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 8px;
    text-align: center;
}

.niuyun-error {
    padding: 24px;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 8px;
    text-align: center;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
    /* 登录页 */
    .ny-login-card {
        padding: 32px 24px;
        border-radius: 8px;
    }

    .ny-login-title {
        font-size: 20px;
    }

    /* 门户 */
    .ny-portal-header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        justify-content: space-between;
    }

    .ny-portal-user {
        margin-left: auto;
    }

    .ny-logout-btn {
        padding: 6px 14px;
        font-size: 13px;
    }

    .ny-page-title {
        font-size: 18px;
    }

    /* 表格隐藏，卡片显示 */
    .ny-table-wrapper {
        display: none;
    }

    .ny-card-list {
        display: block;
    }

    /* 详情 */
    .ny-detail-grid {
        grid-template-columns: 1fr;
    }

    .ny-detail-section {
        padding: 16px;
    }

    .ny-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .ny-progress-steps {
        overflow-x: auto;
        gap: 4px;
    }

    .ny-step {
        font-size: 10px;
        min-width: 44px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .ny-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
