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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    color: #2980b9;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

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

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

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

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

.btn-success {
    background-color: #2ecc71;
    color: #fff;
}

.btn-success:hover {
    background-color: #27ae60;
    color: #fff;
}

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

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

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

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

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

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

.btn-block {
    display: block;
    width: 100%;
}

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

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

.form-group label.required::after {
    content: " *";
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group input:disabled,
.form-group select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.form-group .help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
}

.form-horizontal {
    max-width: 600px;
}

.form-actions {
    margin-top: 20px;
}

.panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.panel-body {
    padding: 20px;
}

.panel-actions {
    display: flex;
    gap: 10px;
}

.total-count {
    font-size: 13px;
    color: #888;
}

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

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

.data-table th {
    font-weight: 600;
    color: #555;
    background-color: #f9f9f9;
}

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

.data-table .text-center {
    text-align: center;
}

.action-btns {
    white-space: nowrap;
}

.action-btns .btn {
    margin-right: 5px;
}

.action-btns .btn:last-child {
    margin-right: 0;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 3px;
}

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

.status-2 {
    background-color: #cce5ff;
    color: #004085;
}

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

.status-4 {
    background-color: #fff3cd;
    color: #856404;
}

.status-5 {
    background-color: #e2e3e5;
    color: #383d41;
}

.cabinet-status-1 {
    background-color: #d4edda;
    color: #155724;
}

.cabinet-status-2 {
    background-color: #f8d7da;
    color: #721c24;
}

.cabinet-status-3 {
    background-color: #fff3cd;
    color: #856404;
}

.cabinet-status-4 {
    background-color: #e2e3e5;
    color: #6c757d;
}

.cabinet-status-5 {
    background-color: #d4edda;
    color: #155724;
}

.cabinet-status-6 {
    background-color: #f8d7da;
    color: #721c24;
}

.position-status-0 {
    background-color: #d4edda;
    color: #155724;
}

.position-status-1 {
    background-color: #f8d7da;
    color: #721c24;
}

.role-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 3px;
}

.role-badge.super {
    background-color: #cce5ff;
    color: #004085;
}

.role-badge.normal {
    background-color: #e2e3e5;
    color: #383d41;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
}

.pagination a:hover {
    background-color: #f5f5f5;
    color: #3498db;
}

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

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-header .close {
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.modal-header .close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.empty-data {
    text-align: center;
    padding: 40px;
    color: #888;
}

code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.info-item {
    display: flex;
    gap: 10px;
}

.info-item.full-width {
    grid-column: span 2;
}

.info-item label {
    font-weight: 500;
    color: #555;
    min-width: 80px;
}

.search-form {
    margin-bottom: 0;
}

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-box h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 10px;
    color: #333;
}

.login-box h2 {
    font-size: 16px;
    text-align: center;
    margin-bottom: 25px;
    color: #888;
    font-weight: normal;
}

.admin-page .admin-header {
    background: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.admin-page .site-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.admin-page .admin-badge {
    background: #3498db;
    color: #fff;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
}

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

.admin-page .welcome {
    color: #555;
}

.admin-page .admin-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.admin-page .admin-sidebar {
    width: 220px;
    background: #2c3e50;
    padding-top: 20px;
    flex-shrink: 0;
}

.admin-page .sidebar-menu {
    list-style: none;
}

.admin-page .sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #b8c7ce;
    transition: all 0.3s;
}

.admin-page .sidebar-menu li a:hover {
    background: #1e2a38;
    color: #fff;
}

.admin-page .sidebar-menu li.active a {
    background: #3498db;
    color: #fff;
}

.admin-page .sidebar-menu .menu-icon {
    font-size: 16px;
}

.admin-page .sidebar-menu .menu-text {
    font-size: 14px;
}

.admin-page .main-content {
    flex: 1;
    padding: 20px;
    overflow-x: auto;
}

.admin-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-page .page-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.admin-page .dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.admin-page .stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-page .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}

.admin-page .stat-info h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.admin-page .stat-info p {
    font-size: 13px;
    color: #888;
}

.front-page {
    min-height: 100vh;
    background: #fff;
}

.front-page .front-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.front-page .front-header {
    text-align: center;
    padding: 40px 0;
    color: #333;
}

.front-page .front-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.front-page .front-header p {
    font-size: 18px;
    opacity: 0.8;
}

.front-page .search-panel {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.front-page .search-panel .panel-header {
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.front-page .search-panel .panel-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.front-page .search-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

.front-page .form-actions {
    text-align: center;
    margin-top: 20px;
}

.front-page .result-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.front-page .goods-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.front-page .goods-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.front-page .goods-card:hover {
    border-color: #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
}

.front-page .goods-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.front-page .goods-no {
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    color: #3498db;
}

.front-page .goods-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.front-page .goods-location {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.front-page .goods-location span {
    margin-right: 10px;
}

.front-page .goods-category {
    font-size: 12px;
    color: #888;
}

.front-page .front-footer {
    text-align: center;
    padding: 30px 0;
    color: #888;
}

.front-page .front-footer a {
    color: #3498db;
    margin-left: 20px;
}

.front-page .detail-info {
    font-size: 14px;
}

.front-page .detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.front-page .detail-row:last-child {
    border-bottom: none;
}

.front-page .detail-row label {
    min-width: 80px;
    font-weight: 500;
    color: #555;
}

.front-page .detail-row span {
    flex: 1;
}

@media (max-width: 768px) {
    .admin-page .admin-container {
        flex-direction: column;
    }
    
    .admin-page .admin-sidebar {
        width: 100%;
    }
    
    .admin-page .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 0 10px;
    }
    
    .admin-page .sidebar-menu li {
        flex-shrink: 0;
    }
    
    .admin-page .sidebar-menu li a {
        padding: 10px 15px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item.full-width {
        grid-column: span 1;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        min-width: 100%;
    }
}
