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

html, body {
    height: 100%;
}

body {
    font-family: 'Microsoft YaHei', 'Source Han Sans CN', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.system-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2px;
}

.system-subtitle {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    gap: 5px;
}

.nav-item {
    display: flex;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 15px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.15);
}

.nav-link.active {
    background: rgba(255,255,255,0.2);
    font-weight: 500;
}

.main-content {
    flex: 1;
    padding: 30px 0;
}

.section-title {
    font-size: 18px;
    color: #2563eb;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2563eb;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 30px;
}

.form-card-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 4px 4px 0 0;
    margin: -30px -30px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-card-header h3 {
    font-size: 16px;
    font-weight: 500;
}

.form-card-header .icon {
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

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

.form-label .required {
    color: #cc0000;
    margin-right: 3px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #333;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.form-control.input-error {
    border-color: #cc0000;
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.upload-section {
    background: #fafafa;
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
}

.upload-section:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.upload-icon {
    font-size: 40px;
    color: #999;
    margin-bottom: 10px;
}

.upload-text {
    color: #666;
    font-size: 14px;
}

.upload-text strong {
    color: #2563eb;
}

.upload-preview {
    max-width: 100%;
    max-height: 150px;
    margin-top: 10px;
    border-radius: 4px;
    display: none;
    border: 2px solid #28a745;
}

/* 上传进度条样式 */
.upload-progress {
    margin-top: 10px;
}

.progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #666;
    display: block;
    text-align: center;
    margin-top: 5px;
}

.upload-status {
    font-size: 12px;
    margin-top: 8px;
    word-break: break-all;
}

.upload-section.success {
    border-color: #28a745;
    background: #f0fff4;
}

.upload-section {
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-section:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.image-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .image-upload-grid {
        grid-template-columns: 1fr;
    }
}

.image-upload-item {
    display: flex;
    flex-direction: column;
}

.image-upload-item .form-label {
    text-align: left;
}

.file-input {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-outline {
    background: transparent;
    border: 1px solid #2563eb;
    color: #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
}

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

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.search-box {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 25px;
}

.search-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.search-form .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.search-form .btn {
    height: 40px;
    white-space: nowrap;
}

.result-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.result-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plate-badge {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 3px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.status-badge.active {
    background: #2e7d32;
}

.status-badge.inactive {
    background: #c62828;
}

.result-body {
    padding: 25px;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row label {
    width: 120px;
    color: #666;
    font-size: 14px;
}

.info-row span {
    flex: 1;
    color: #333;
    font-weight: 500;
}

.images-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.images-section label {
    display: block;
    color: #666;
    margin-bottom: 15px;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.image-item {
    text-align: center;
}

.image-item span {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-results .icon {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: 1fr;
    }
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

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

.data-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

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

.data-table .actions {
    display: flex;
    gap: 8px;
}

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

.login-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: #2563eb;
    font-size: 22px;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.footer {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 20px 0;
    margin-top: auto;
}

.footer-content {
    text-align: center;
}

.footer-copyright {
    font-size: 14px;
    margin-bottom: 5px;
}

.footer-copyright a {
    color: #99ccff;
    text-decoration: none;
}

.footer-disclaimer {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.pagination .active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-warning {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
}

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

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

.admin-sidebar {
    width: 220px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    min-height: calc(100vh - 60px);
    padding: 20px 0;
}

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

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

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

.sidebar-menu a i {
    margin-right: 10px;
    width: 20px;
}

.admin-main {
    flex: 1;
    padding: 25px;
}

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

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

.stat-card {
    background: white;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.green { background: #e8f5e9; color: #2e7d32; }
.stat-icon.orange { background: #fff3e0; color: #e65100; }
.stat-icon.purple { background: #f3e5f5; color: #6a1b9a; }

.stat-info h4 {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-info .number {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.settings-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 20px;
}

.settings-section h3 {
    font-size: 16px;
    color: #2563eb;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.setting-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.setting-item label {
    width: 150px;
    color: #333;
    font-weight: 500;
}

.setting-item .form-control {
    flex: 1;
    max-width: 400px;
}

@media (max-width: 768px) {
    .header-main {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-form .form-group,
    .search-form .btn {
        width: 100%;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .info-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .info-row label {
        width: auto;
    }
}

@media print {
    .header, .footer, .btn, .nav-menu {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .form-card {
        box-shadow: none;
        border: none;
    }
    
    .result-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
