/* ========================================================
   PHP Shop Mall - Admin Control Panel Stylesheet
======================================================== */

.admin-body {
    background: #f0f2f5;
    margin: 0;
    font-size: 14px;
    color: #333333;
}

/* 顶部导航 */
.admin-topbar {
    height: 56px;
    background: #181c24;
    color: #ffffff;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
    z-index: 100;
}

.admin-logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.logo-mark {
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: #d21e20;
    color: #ffffff;
    font-weight: bold;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 18px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
}

.topbar-link {
    color: #8c9ba5;
}

.topbar-link:hover {
    color: #ffffff;
}

.user-info {
    color: #ffffff;
}

.btn-logout-link {
    color: #ff7875;
}

/* 后台两栏布局 */
.admin-main-wrap {
    display: flex;
    min-height: calc(100vh - 56px);
}

.admin-sidebar {
    width: 210px;
    background: #202634;
    flex-shrink: 0;
}

.admin-nav {
    padding-top: 16px;
}

.admin-nav li a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #a6b0c3;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-nav li a .icon {
    font-size: 18px;
    margin-right: 12px;
}

.admin-nav li:hover a, .admin-nav li.active a {
    background: #151923;
    color: #ffffff;
    border-left: 4px solid #d21e20;
    padding-left: 20px;
}

.admin-content-area {
    flex: 1;
    padding: 24px 30px;
    overflow-x: hidden;
}

/* 页面内容头部 */
.content-header {
    margin-bottom: 24px;
}

.content-header h2 {
    font-size: 22px;
    color: #1f2d3d;
    font-weight: 700;
    margin-bottom: 4px;
}

.content-header .sub {
    font-size: 13px;
    color: #8492a6;
}

/* 按钮组 */
.btn-primary-action {
    display: inline-block;
    padding: 8px 20px;
    background: #d21e20;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(210, 30, 32, 0.25);
}

.btn-default-action {
    display: inline-block;
    padding: 8px 18px;
    background: #e0e6ed;
    color: #475669;
    font-size: 13px;
    border-radius: 4px;
}

/* 统计卡片网格 */
.stat-cards-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    flex: 1;
    background: #ffffff;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card-icon {
    width: 52px;
    height: 52px;
    line-height: 52px;
    text-align: center;
    font-size: 28px;
    border-radius: 10px;
    margin-right: 16px;
}

.icon-money { background: #fff1f0; }
.icon-today { background: #e6f7ff; }
.icon-order { background: #f6ffed; }
.icon-goods { background: #fffbe6; }
.icon-user { background: #f9f0ff; }

.card-meta .val {
    font-size: 22px;
    font-weight: 800;
    color: #1f2d3d;
}

.card-meta .lbl {
    font-size: 12px;
    color: #8492a6;
    margin-top: 2px;
}

/* 通用表格卡片 */
.table-card {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
    margin-bottom: 24px;
}

.table-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-card-header h3 {
    font-size: 16px;
    color: #1f2d3d;
}

.header-link {
    font-size: 13px;
    color: #d21e20;
}

.admin-data-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-data-table th {
    background: #f8fafc;
    color: #475669;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
}

.admin-data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    vertical-align: middle;
}

.table-thumb {
    width: 48px;
    height: 48px;
    border: 1px solid #edf2f7;
    border-radius: 3px;
    object-fit: contain;
}

.price-txt {
    color: #d21e20;
    font-size: 14px;
}

.sub-txt {
    font-size: 12px;
    color: #8492a6;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 2px;
}

.badge-success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.badge-warning { background: #fffbe6; color: #faad14; border: 1px solid #ffe58f; }
.badge-status-0 { background: #fff1f0; color: #f5222d; border: 1px solid #ffa39e; }
.badge-status-1 { background: #fffbe6; color: #fa8c16; border: 1px solid #ffd591; }
.badge-status-2 { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.badge-status-3 { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.badge-status-4 { background: #f5f5f5; color: #8c8c8c; border: 1px solid #d9d9d9; }

.btn-table-op {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 3px;
    border: 1px solid #d9d9d9;
    background: #ffffff;
    color: #475669;
    cursor: pointer;
    margin-right: 4px;
}

.btn-op-danger {
    color: #ff4d4f;
    border-color: #ffa39e;
}

.btn-op-ship {
    background: #1890ff;
    color: #ffffff;
    border-color: #1890ff;
    font-weight: bold;
}

.btn-toggle-sale {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-toggle-sale.on {
    background: #f6ffed;
    color: #52c41a;
    border-color: #b7eb8f;
}

.btn-toggle-sale.off {
    background: #fff2f0;
    color: #ff4d4f;
    border-color: #ffccc7;
}

/* 筛选区 */
.filter-panel {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.filter-form {
    display: flex;
    gap: 12px;
}

.form-input, .form-select {
    height: 36px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 13px;
}

.btn-filter {
    padding: 0 20px;
    height: 36px;
    background: #1890ff;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 表单卡片 */
.form-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

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

.form-label {
    float: left;
    width: 160px;
    text-align: right;
    padding-top: 8px;
    font-size: 13px;
    color: #475669;
    font-weight: bold;
}

.form-label.required::before {
    content: "* ";
    color: #f56c6c;
}

.form-input-box {
    margin-left: 180px;
}

.form-control {
    width: 500px;
    height: 38px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    padding: 0 12px;
}

textarea.form-control {
    height: auto;
    padding: 10px 12px;
}

.btn-submit-primary {
    padding: 10px 36px;
    background: #d21e20;
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 12px;
}

.btn-cancel-default {
    display: inline-block;
    padding: 10px 24px;
    background: #e4e7ed;
    color: #606266;
    font-size: 14px;
    border-radius: 4px;
}

/* 后台登录页专用 */
.admin-login-body {
    background: linear-gradient(135deg, #1f2430 0%, #0f131a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card-container {
    width: 420px;
}

.login-card-box {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
    padding: 40px;
}

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

.brand-badge {
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background: #d21e20;
    color: #ffffff;
    font-size: 26px;
    font-weight: bold;
    border-radius: 50%;
    margin: 0 auto 12px auto;
    box-shadow: 0 4px 14px rgba(210, 30, 32, 0.4);
}

.login-header h2 {
    font-size: 20px;
    color: #1f2d3d;
    margin-bottom: 4px;
}

.login-header p {
    font-size: 11px;
    color: #8492a6;
    letter-spacing: 1px;
}

.alert-error-bar {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
    padding: 10px;
    font-size: 13px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.admin-login-form .form-group {
    margin-bottom: 20px;
}

.admin-login-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #475669;
    font-weight: bold;
}

.admin-login-form .form-control {
    width: 100%;
}

.btn-admin-login {
    width: 100%;
    height: 44px;
    background: #d21e20;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(210, 30, 32, 0.3);
    margin-top: 10px;
}

.btn-admin-login:hover {
    background: #e4393c;
}

.default-credential-tip {
    margin-top: 24px;
    background: #f4f6f8;
    border: 1px dashed #dcdfe6;
    padding: 8px 12px;
    font-size: 12px;
    color: #606266;
    border-radius: 4px;
    text-align: center;
}
