/* ============================================================
   DaoHang 遥望侣途 - 后台管理样式
   版权所有：东台市讯淘网络科技有限公司/王阳
   ============================================================ */

/* ----- 全局重置 ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}
a { color: #4a90d9; text-decoration: none; }
a:hover { color: #2471c8; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }

/* ----- 后台布局 ----- */
.admin-wrap { display: flex; flex-direction: column; min-height: 100vh; }

/* ----- 顶部导航栏 ----- */
.admin-header {
    display: flex;
    align-items: center;
    background: #1e293b;
    color: #fff;
    height: 54px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.header-logo a {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-right: 32px;
    white-space: nowrap;
}
.header-nav { display: flex; flex: 1; gap: 4px; overflow-x: auto; }
.header-nav a {
    color: #cbd5e1;
    padding: 6px 14px;
    border-radius: 4px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.header-nav a:hover, .header-nav a.active { background: #334155; color: #fff; }
.header-user { display: flex; align-items: center; gap: 12px; margin-left: 20px; white-space: nowrap; }
.header-user span { color: #94a3b8; font-size: 13px; }
.btn-link { color: #7dd3fc !important; font-size: 13px; padding: 4px 8px; }
.btn-link:hover { color: #fff !important; }

/* ----- 主内容区 ----- */
.admin-content { flex: 1; padding: 24px; max-width: 1280px; width: 100%; }

/* ----- 页面标题 ----- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.page-header h2 { font-size: 20px; font-weight: 600; color: #1e293b; }

/* ----- 面板 ----- */
.panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    margin-bottom: 20px;
}
.panel-header {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.panel-header h3 { font-size: 15px; font-weight: 600; color: #374151; }
.panel-body { padding: 20px; }

/* ----- 表单 ----- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: #374151; }
.form-group input[type=text],
.form-group input[type=password],
.form-group input[type=email],
.form-group input[type=number],
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 520px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74,144,217,.15);
}
.form-group .hint { font-size: 12px; color: #9ca3af; margin-top: 4px; display: block; }

/* ----- 按钮 ----- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: opacity .15s, box-shadow .15s;
}
.btn:hover { opacity: .88; }
.btn:active { opacity: .75; }
.btn-primary { background: #4a90d9; color: #fff; }
.btn-danger  { background: #ef4444; color: #fff; }
.btn-success { background: #22c55e; color: #fff; }
.btn-default { background: #e5e7eb; color: #374151; }
.btn + .btn  { margin-left: 8px; }

/* ----- 数据表格 ----- */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f9fafb; }
.empty-cell { text-align: center; color: #9ca3af; padding: 32px; }

/* ----- 徽章 ----- */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-info    { background: #dbeafe; color: #1e40af; }

/* ----- 分页 ----- */
.pagination { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
    color: #374151;
}
.pagination a:hover { background: #f0f2f5; border-color: #d1d5db; }
.pagination .current { background: #4a90d9; color: #fff; border-color: #4a90d9; }
.pagination .ellipsis { border: none; color: #9ca3af; }

/* ----- 上传区域 ----- */
.upload-row { display: flex; gap: 32px; flex-wrap: wrap; }
.upload-item { flex: 0 0 220px; }
.upload-item label { display: block; margin-bottom: 8px; font-weight: 500; }
.upload-preview {
    width: 160px;
    height: 80px;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    overflow: hidden;
}
.upload-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.upload-tip { font-size: 12px; color: #9ca3af; }
.upload-hint { font-size: 12px; color: #9ca3af; margin-top: 4px; }

/* ----- 欢迎面板 ----- */
.welcome-box { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; border-radius: 10px; padding: 28px 32px; margin-bottom: 20px; }
.welcome-box h2 { font-size: 22px; margin-bottom: 6px; }
.welcome-box p  { opacity: .85; }

/* ----- 统计卡片 ----- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card  {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.stat-icon { font-size: 32px; }
.stat-num  { font-size: 28px; font-weight: 700; color: #1e293b; }
.stat-label{ font-size: 12px; color: #6b7280; margin-top: 2px; }

/* ----- 底部 ----- */
.admin-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: #9ca3af;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

/* ----- 登录页 ----- */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 26px; color: #1e293b; }
.login-logo p  { color: #6b7280; margin-top: 4px; }
.login-error {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
}
.login-form .form-item { margin-bottom: 16px; }
.login-form label { display: block; margin-bottom: 6px; font-weight: 500; color: #374151; }
.login-form input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color .2s;
}
.login-form input:focus { outline: none; border-color: #4a90d9; }
.btn-login {
    width: 100%;
    padding: 11px;
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity .15s;
}
.btn-login:hover { opacity: .9; }
.login-footer { text-align: center; margin-top: 20px; font-size: 12px; color: #9ca3af; }
.login-footer a { color: #4a90d9; }
