/* ============================================
   天天发圈 - Admin Panel Stylesheet
   极简白+黑+灰配色
   ============================================ */

.admin-body { background: #f5f5f5; }
.admin-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.admin-sidebar {
    width: 220px; background: #2a2a2a; color: #bbb;
    position: fixed; top: 0; left: 0; height: 100vh;
    display: flex; flex-direction: column; z-index: 100;
}
.admin-sidebar-header {
    padding: 18px; border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 17px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px;
}
.admin-sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 0; }
.admin-nav-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 18px;
    font-size: 13px; cursor: pointer; color: #bbb;
}
.admin-nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.admin-nav-item.active { background: rgba(255,255,255,0.1); color: #fff; border-right: 2px solid #888; }
.admin-nav-item .nav-icon { font-size: 15px; width: 20px; text-align: center; }

/* Main */
.admin-main { flex: 1; margin-left: 220px; display: flex; flex-direction: column; min-height: 100vh; }
.admin-topbar {
    height: 52px; background: #fff; border-bottom: 1px solid #e5e5e5;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 22px; position: sticky; top: 0; z-index: 50;
}
.admin-topbar-title { font-size: 15px; font-weight: 600; }
.admin-content { flex: 1; padding: 22px; max-width: 1400px; }

/* Stats */
.admin-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.admin-stat-card { background: #fff; border-radius: 8px; padding: 18px; border: 1px solid #e5e5e5; }
.admin-stat-value { font-size: 26px; font-weight: 700; }
.admin-stat-label { font-size: 12px; color: #888; margin-top: 2px; }

/* Tables */
.admin-table-wrap { background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid #e5e5e5; margin-bottom: 22px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { background: #fafafa; padding: 10px 14px; text-align: left; font-weight: 600; border-bottom: 1px solid #e5e5e5; white-space: nowrap; }
.admin-table td { padding: 8px 14px; border-bottom: 1px solid #f0f0f0; }
.admin-table tr:hover td { background: #fafafa; }

/* Badges */
.admin-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.admin-badge-success { background: #e8e8e8; color: #333; }
.admin-badge-warning { background: #e8e8e8; color: #333; }
.admin-badge-danger { background: #e8e8e8; color: #333; }
.admin-badge-info { background: #e8e8e8; color: #333; }
.admin-badge-purple { background: #ddd; color: #111; font-weight: 600; }

/* Forms */
.admin-form-group { margin-bottom: 14px; }
.admin-form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.admin-form-input {
    width: 100%; padding: 8px 11px; border: 1px solid #d4d4d4; border-radius: 5px;
    font-size: 13px; outline: none; background: #fff;
}
.admin-form-input:focus { border-color: #888; }
.admin-form-textarea { min-height: 110px; resize: vertical; }

/* Buttons */
.admin-btn {
    padding: 7px 14px; border-radius: 5px; font-size: 13px; font-weight: 500; cursor: pointer;
    border: 1px solid #d4d4d4; background: #fff; color: #111; display: inline-flex; align-items: center; gap: 5px;
}
.admin-btn:hover { background: #f0f0f0; }
.admin-btn-primary { background: #111; color: #fff; border-color: #111; }
.admin-btn-primary:hover { background: #333; color: #fff; }
.admin-btn-outline { border: 1px solid #d4d4d4; background: #fff; color: #111; }
.admin-btn-danger { background: #666; color: #fff; border-color: #666; }
.admin-btn-sm { padding: 4px 9px; font-size: 11px; }
.admin-btn-success { background: #111; color: #fff; border-color: #111; }

/* Modal */
.admin-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; align-items: center; justify-content: center; }
.admin-modal.active { display: flex; }
.admin-modal-content { background: #fff; border-radius: 8px; width: 100%; max-width: 540px; max-height: 80vh; overflow-y: auto; border: 1px solid #e5e5e5; }
.admin-modal-header { padding: 14px 18px; border-bottom: 1px solid #e5e5e5; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.admin-modal-body { padding: 18px; }
.admin-modal-footer { padding: 14px 18px; border-top: 1px solid #e5e5e5; display: flex; gap: 8px; justify-content: flex-end; }

/* Charts */
.admin-chart-wrap { background: #fff; border-radius: 8px; padding: 18px; border: 1px solid #e5e5e5; margin-bottom: 22px; }
.admin-chart-title { font-size: 14px; font-weight: 600; margin-bottom: 14px; }

/* Section */
.admin-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.admin-section-title { font-size: 17px; font-weight: 700; }

/* Login */
.admin-login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: #f5f5f5;
}
.admin-login-card {
    background: #fff; border-radius: 10px; padding: 38px;
    width: 100%; max-width: 380px; border: 1px solid #e5e5e5; text-align: center;
}
.admin-login-card h1 { font-size: 21px; margin-bottom: 6px; }
.admin-login-card .subtitle { font-size: 12px; color: #888; margin-bottom: 22px; }

/* Pagination */
.admin-pagination { display: flex; justify-content: center; gap: 5px; margin-top: 18px; }
.admin-page-btn { padding: 5px 10px; border: 1px solid #d4d4d4; border-radius: 4px; font-size: 12px; cursor: pointer; background: #fff; }
.admin-page-btn.active { background: #111; color: #fff; border-color: #111; }
.admin-page-btn:hover:not(.active) { background: #f0f0f0; }

@media (max-width: 768px) {
    .admin-sidebar { width: 100%; height: auto; position: relative; flex-direction: row; }
    .admin-sidebar-nav { display: flex; overflow-x: auto; }
    .admin-nav-item { padding: 10px 14px; white-space: nowrap; flex-shrink: 0; }
    .admin-main { margin-left: 0; }
    .admin-content { padding: 14px; }
    .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-table-wrap { overflow-x: auto; }
}
