* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* ===== Login ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    width: 400px;
    max-width: 90%;
}

.login-box h1 { font-size: 24px; text-align: center; margin-bottom: 8px; color: #333; }
.login-box h2 { font-size: 18px; text-align: center; margin-bottom: 20px; color: #666; font-weight: 400; }

.login-desc {
    font-size: 13px;
    color: #999;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ===== Layout ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #001529;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1 { font-size: 18px; font-weight: 600; }

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-item:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-item.active { color: #fff; background: #1890ff; }

.nav-icon { margin-right: 10px; font-size: 16px; }

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer a { color: rgba(255,255,255,0.45); text-decoration: none; font-size: 13px; }
.sidebar-footer a:hover { color: #fff; }

.main-content {
    margin-left: 240px;
    flex: 1;
}

.topbar {
    background: #fff;
    padding: 16px 24px;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.topbar h2 { font-size: 18px; font-weight: 500; }

.content-area { padding: 24px; }

/* ===== Components ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: #666; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.2);
}

textarea { resize: vertical; min-height: 100px; }

.btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary { background: #1890ff; color: #fff; }
.btn-primary:hover { background: #40a9ff; }

.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #ff7875; }

.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #73d13d; }

.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-block { display: block; width: 100%; }
.btn + .btn { margin-left: 8px; }

.error-msg { color: #ff4d4f; font-size: 13px; margin-top: 12px; }
.success-msg { color: #52c41a; font-size: 13px; margin-top: 12px; }

/* ===== Cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-card .stat-label { font-size: 14px; color: #999; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: 600; color: #333; }
.stat-card .stat-value.pending { color: #faad14; }
.stat-card .stat-value.success { color: #52c41a; }

/* ===== Tables ===== */
.table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #fafafa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #e8e8e8;
}

table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

table tr:hover td { background: #fafafa; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.badge-pending { background: #fff7e6; color: #fa8c16; }
.badge-approved { background: #f6ffed; color: #52c41a; }
.badge-rejected { background: #fff2f0; color: #ff4d4f; }
.badge-public { background: #e6f7ff; color: #1890ff; }
.badge-private { background: #f5f5f5; color: #999; }
.badge-active { background: #f6ffed; color: #52c41a; }
.badge-banned { background: #fff2f0; color: #ff4d4f; }

/* ===== Search ===== */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-bar input { flex: 1; }
.search-bar .btn { align-self: flex-end; }

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8e8e8;
}

.tab-item {
    padding: 8px 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-item:hover { color: #1890ff; }
.tab-item.active { color: #1890ff; border-bottom-color: #1890ff; }

/* ===== Settings ===== */
.settings-form {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    max-width: 600px;
}

.form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}
