/* Stress Prank 授权系统 - 管理后台样式 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* 头部 */
.header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #333;
    font-size: 28px;
}

.header .admin-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header .admin-name {
    color: #666;
    font-weight: 500;
}

.header .logout-btn {
    padding: 8px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.header .logout-btn:hover {
    background: #c82333;
}

/* 导航菜单 */
.nav-menu {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-menu li {
    flex: 1;
    min-width: 200px;
}

.nav-menu a {
    display: block;
    padding: 15px 25px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-menu a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

.nav-menu a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 登录表单 */
.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 400px;
    margin: 100px auto;
}

.login-box h2 {
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* 按钮 */
.btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6c757d;
    margin-top: 10px;
}

.btn-success {
    background: #28a745;
}

.btn-danger {
    background: #dc3545;
}

/* 主内容区 */
.main-content {
    display: none;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .value {
    color: #333;
    font-size: 32px;
    font-weight: bold;
}

/* 内容盒子 */
.content-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.content-box h3 {
    margin-bottom: 20px;
    color: #333;
}

.content-box h4 {
    margin-bottom: 15px;
    color: #555;
}

/* 表格 */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

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

table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    color: #666;
}

table tr:hover {
    background: #f8f9fa;
}

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* 操作按钮 */
.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 5px;
}

.action-btn.toggle {
    background: #ffc107;
    color: #000;
}

.action-btn.delete {
    background: #dc3545;
    color: white;
}

.delete-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    opacity: 0.8;
}

.action-btn:hover {
    opacity: 0.8;
}

/* 创建表单 */
.create-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.create-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

/* 消息提示 */
.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.show {
    display: block;
}

/* Token显示 */
.token-display {
    background: white;
    padding: 15px;
    border-radius: 5px;
    font-family: monospace;
    word-break: break-all;
    margin-top: 10px;
}

/* 刷新按钮 */
.refresh-btn {
    padding: 8px 15px;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    float: right;
}

.refresh-btn:hover {
    background: #138496;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu ul {
        flex-direction: column;
    }

    .nav-menu li {
        min-width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .create-form .form-row {
        grid-template-columns: 1fr;
    }
}
