:root {
    --kfc-red: #a3080c;
    --kfc-red-dark: #7a0508;
    --kfc-red-light: #e31c23;
    --kfc-white: #ffffff;
    --kfc-gray: #f5f5f5;
    --kfc-border: #e0e0e0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--kfc-gray);
    color: #333;
}

/* ---------- 登录页 ---------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 0 20px;
}

.login-card {
    background: var(--kfc-white);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(163, 8, 12, 0.12);
    padding: 36px 32px;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.kfc-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 12px;
}

.logo-fallback {
    width: 72px;
    height: 72px;
    line-height: 72px;
    border-radius: 50%;
    background: var(--kfc-red);
    color: white;
    font-weight: bold;
    font-size: 22px;
    margin: 0 auto 12px;
}

.header-logo-fallback {
    display: none;
    width: 48px;
    height: 48px;
    line-height: 48px;
    border-radius: 50%;
    background: white;
    color: var(--kfc-red);
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 12px;
}

.login-title {
    color: var(--kfc-red);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.login-title small {
    font-size: 16px;
    font-weight: 400;
    color: #666;
}

.login-form .form-label {
    font-weight: 500;
    color: #444;
}

.btn-kfc {
    background-color: var(--kfc-red);
    border-color: var(--kfc-red);
    color: white;
    font-weight: 600;
    padding: 10px 0;
    border-radius: 6px;
}

.btn-kfc:hover {
    background-color: var(--kfc-red-dark);
    border-color: var(--kfc-red-dark);
    color: white;
}

.login-message {
    margin-top: 14px;
    text-align: center;
    font-size: 14px;
    min-height: 20px;
}

.login-message.error {
    color: var(--kfc-red);
}

/* ---------- Header ---------- */
.kfc-header {
    background-color: var(--kfc-red);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: white;
    border-radius: 50%;
    padding: 4px;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: white;
}

.user-info {
    font-size: 14px;
    display: flex;
    align-items: center;
}

/* ---------- 主内容 ---------- */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 40px;
}

.kfc-tabs {
    border-bottom: 1px solid var(--kfc-border);
    margin-bottom: 0;
    background: white;
    border-radius: 8px 8px 0 0;
    padding: 0 16px;
}

.kfc-tabs .nav-link {
    color: #666;
    font-weight: 500;
    border: none;
    padding: 14px 20px;
    border-bottom: 2px solid transparent;
}

.kfc-tabs .nav-link:hover {
    color: var(--kfc-red);
    border-color: transparent;
}

.kfc-tabs .nav-link.active {
    color: var(--kfc-red);
    border-bottom-color: var(--kfc-red);
    background: transparent;
    font-weight: 600;
}

.panel-card {
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px;
}

.panel-toolbar {
    margin-bottom: 18px;
}

.filter-bar {
    background: #fafafa;
    border: 1px solid var(--kfc-border);
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 20px;
}

/* ---------- 表格 ---------- */
.kfc-table {
    font-size: 14px;
    margin-bottom: 0;
}

.kfc-table thead th {
    background-color: #f8f9fa;
    color: #555;
    font-weight: 600;
    border-bottom: 1px solid var(--kfc-border);
    padding: 12px;
}

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

.kfc-table tbody tr:hover {
    background-color: #fff8f8;
}

.kfc-table tbody tr.total-row td {
    background-color: #eef1f4;
    font-weight: 600;
    color: #333;
    border-top: 2px solid var(--kfc-border);
}

.kfc-table tbody tr.total-row:hover td {
    background-color: #eef1f4;
}

/* ---------- 按钮 ---------- */
.btn-primary {
    background-color: #1890ff;
    border-color: #1890ff;
}

.btn-primary:hover {
    background-color: #1677d9;
    border-color: #1677d9;
}

.btn-link-action {
    color: #1890ff;
    text-decoration: none;
    font-size: 13px;
    margin-right: 10px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.btn-link-action:hover {
    color: #1677d9;
    text-decoration: underline;
}

.btn-link-delete {
    color: #ff4d4f;
}

.btn-link-delete:hover {
    color: #d9363e;
}

.hidden {
    display: none !important;
}

.readonly-hint {
    color: #888;
    font-size: 13px;
    margin-left: 12px;
}

/* ---------- 销售数据翻页 ---------- */
.sales-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sales-pager .pagination {
    margin-bottom: 0;
}

.sales-pager .page-link {
    cursor: pointer;
}

/* ---------- Modal ---------- */
.modal-header {
    border-bottom: 1px solid var(--kfc-border);
}

.modal-title {
    font-weight: 600;
    color: #333;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .header-title {
        font-size: 16px;
    }

    .main-container {
        padding: 12px;
    }

    .panel-card {
        padding: 16px;
    }
}
