:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --sidebar-width: 240px;
    --header-height: 60px;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f5f6fa;
    color: #2c3e50;
}

/* 登录页面样式优化 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    min-width: 380px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.login-box h2 {
    margin-bottom: 30px;
    text-align: center;
    color: var(--dark-color);
    font-size: 24px;
    font-weight: 600;
}

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

/* 后台布局样式优化 */
.top-header {
    background: white;
    color: var(--dark-color);
    padding: 0 25px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

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

.user-info span {
    font-weight: 500;
}

.user-info a {
    color: #666;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.user-info a:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

.sidebar {
    width: var(--sidebar-width);
    background: white;
    height: calc(100vh - var(--header-height));
    position: fixed;
    left: 0;
    top: var(--header-height);
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    padding-top: 20px;
}

.sidebar nav ul li {
    margin-bottom: 5px;
}

.sidebar nav ul li a {
    color: #666;
    text-decoration: none;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar nav ul li a:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.sidebar nav ul li a.active {
    background: rgba(76, 175, 80, 0.1);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 30px;
}

.footer {
    text-align: center;
    padding: 15px;
    background: white;
    color: #666;
    position: fixed;
    bottom: 0;
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    border-top: 1px solid #eee;
}

/* 现代化卡片样式 */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 25px;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* 表格样式优化 */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem 0;
}

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

.table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.table tr:hover {
    background-color: #f8f9fa;
}

/* 按钮样式优化 */
.btn {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn i {
    font-size: 14px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 表单样式优化 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #eee;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

/* 搜索框样式优化 */
.search-box {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-form .form-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}

.search-form .form-control {
    height: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 操作按钮统一样式 */
.btn-action {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    min-width: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0 3px;
}

.btn-save {
    background: var(--primary-color);
    color: white;
}

.btn-save:hover {
    background: #45a049;
}

/* 状态标签样式 */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.status-inactive {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .col-md-3, .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* 表单样式 */
.settings-form, .card-form {
    max-width: 600px;
    margin: 20px 0;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 按钮样式 */
.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

/* 提示消息样式 */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 到期时间显示优化 */
.expiry-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.permanent-tag {
    color: #666;
    font-size: 13px;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.generated-cards {
    margin-top: 30px;
}

.generated-cards h3 {
    margin-bottom: 15px;
    color: #333;
}

/* 表格响应式 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 内联表单 */
.inline-form {
    display: inline-block;
    margin: 0 5px;
}

.form-control-sm {
    padding: 4px 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 小按钮样式 */
.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

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

.btn-danger:hover {
    background: #c82333;
}

/* 提示框样式 */
.alert {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
}

/* 卡片头部样式 */
.card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    margin-bottom: 5px;
}

.text-muted {
    color: #6c757d;
    font-size: 14px;
}

/* 表单布局 */
.form-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding-right: 10px;
    padding-left: 10px;
}

.form-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
}

/* 按钮组 */
.form-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

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

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

.btn-success:hover {
    background: #218838;
}

/* 导出操作按钮 */
.export-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

/* 复制按钮反馈 */
.copy-btn.success {
    background: #28a745;
}

.copy-btn.success:after {
    content: ' ✓';
}

/* 调整表单布局 */
.form-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* 调整输入框组样式 */
.form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
}

.form-group label {
    margin-bottom: 8px;
    text-align: center;
}

.form-group input,
.form-group select {
    width: 100%;
    text-align: center;
}

/* 按钮容器居中 */
.button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* 生成卡密按钮样式 */
.btn-generate {
    min-width: 200px;
    text-align: center;
}

/* 用户统计样式 */
.user-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    border-right: 1px solid #eee;
}

.stat-item:last-child {
    border-right: none;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
} 