/* 现代管理系统样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #f4f6f7;
    --text-color: #2c3e50;
    --error-color: #e74c3c;
    --success-color: #27ae60;
}

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

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* 布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
    background-color: #f5f6fa;
}

/* 侧边栏 */
.sidebar {
    width: 200px;
    background-color: #2c3e50;
    color: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 0 20px;
    margin-bottom: 20px;
    text-align: center;
}

.sidebar-header h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: white;
}

.sidebar-header p {
    font-size: 0.9em;
    opacity: 0.8;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar nav a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar nav a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.sidebar nav a.active {
    background-color: var(--primary-color);
    color: white;
}

/* 主内容区 */
.main-content {
    margin-left: 200px;
    padding: 20px;
    background-color: #f5f6fa;
    min-height: 100vh;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h2 {
    font-size: 1.8em;
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* 控制面板样式 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    padding: 10px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.05);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    background-color: #f8f9fa;
    border-color: var(--primary-color);
}

.card-icon {
    margin-right: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 12px;
    flex-shrink: 0;
}

.card-icon i {
    font-size: 2em;
    color: var(--primary-color);
}

.card-content {
    flex: 1;
}

.card-content h3 {
    font-size: 1.4em;
    margin-bottom: 8px;
    color: var(--text-color);
}

.card-content p {
    color: #666;
    margin-bottom: 12px;
    font-size: 0.95em;
}

.card-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9em;
}

.card-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.dashboard-card:hover .card-link i {
    transform: translateX(5px);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-warning {
    background-color: #f1c40f;
    color: #2c3e50;
}

.btn-warning:hover {
    background-color: #f39c12;
}

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

.btn-danger:hover {
    background-color: #c0392b;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.button-group button {
    min-width: 80px;
}

/* 提示框样式 */
.alert {
    padding: 15px;
    margin: 20px 0;
    border: 1px solid transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-size: 14px;
}

.alert:before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
    font-size: 16px;
}

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

.alert-success:before {
    content: "\f00c";
    color: #28a745;
}

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

.alert-danger:before {
    content: "\f071";
    color: #dc3545;
}

/* 欢迎信息样式 */
.welcome-message {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.welcome-message p {
    margin: 5px 0;
    color: #666;
    font-size: 1.1em;
}

.welcome-message p:first-child {
    color: #888;
    font-size: 0.95em;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.pagination span.current {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-info {
    color: #666;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .admin-panel {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    table {
        font-size: 14px;
    }
}

@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

@media screen and (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
}

/* 表格容器 */
.table-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

/* 表格样式 - 全新定义 */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 0;
    border-radius: 8px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border: 1px solid #dee2e6;
}

.table thead {
    background-color: #34495e;
    color: white;
}

.table th {
    padding: 15px;
    font-weight: 600;
    text-align: left;
    border: 1px solid #34495e;
    font-size: 14px;
    text-transform: uppercase;
}

.table td {
    padding: 15px;
    border: 1px solid #dee2e6;
    font-size: 14px;
    vertical-align: middle;
    background-color: white;
}

.table tbody tr:nth-child(even) td {
    background-color: #f8f9fa;
}

.table tbody tr:hover td {
    background-color: #e8f4fc;
}

/* 单元格样式 */
.code-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.holder-cell {
    font-weight: 500;
}

.product-cell {
    color: #2c3e50;
}

.spec-cell {
    color: #7f8c8d;
    font-size: 13px;
}

.order-cell {
    font-family: 'Courier New', monospace;
    color: #7f8c8d;
}

.action-cell {
    width: 200px;
}

/* 状态 */
.status {
    text-align: center;
}

.status-genuine, .status-fake {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
}

.status-genuine {
    background-color: #d4f9e3;
    color: #1d9c5a;
    border: 1px solid #a3e2be;
}

.status-fake {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #f5c4c8;
}

/* 金额样式 */
.amount {
    font-family: 'Courier New', monospace;
    text-align: right;
    font-weight: 600;
    color: #2c3e50;
}

/* 操作按钮容器 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* 操作按钮样式 */
.btn-info, .btn-danger {
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-info {
    background-color: #3498db;
    color: white;
}

.btn-info:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

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

.btn-danger:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* 工具栏样式增强 */
.toolbar {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    align-items: center;
}

.search-form .input-group {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.search-form input {
    border: 1px solid #e1e8ed;
    padding: 10px 15px;
    width: 280px;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    outline: none;
}

.search-form input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-form button {
    border-radius: 0 6px 6px 0 !important;
    padding: 10px 20px !important;
    margin: 0 !important;
}
