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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1, h2 {
    color: #333;
    margin-bottom: 20px;
}

.nav {
    background: #2c3e50;
    padding: 10px 15px;
    margin: -30px -30px 30px -30px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.nav a {
    color: white;
    text-decoration: none;
    margin-right: 4px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.3s;
    white-space: nowrap;
    line-height: 1.4;
}

.nav a:hover {
    background: #34495e;
}

.nav a[style*="float:right"], .nav span[style*="float:right"] {
    float: none !important;
    margin-left: auto;
}

.nav .nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
    transition: all 0.3s;
}

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

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

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

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

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

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

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

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

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

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

table th {
    background: #34495e;
    color: white;
}

/* 车辆管理表格单独使用浅色表头黑字 */
.printer-table th {
    background: #ecf0f1 !important;
    color: #222 !important;
}

.printer-table td {
    color: #222 !important;
    background: #fff !important;
}

.printer-table tr:nth-child(even) td {
    background: #f9f9f9 !important;
}

.printer-table tr:hover td {
    background: #f0f0f0 !important;
    color: #222 !important;
}

table tr:nth-child(even) {
    background: #f9f9f9;
}

table tr:hover {
    background: #f0f0f0;
}

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

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

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

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

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

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

.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.actions {
    margin: 20px 0;
}

.checkbox-group {
    margin: 10px 0;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
}

.supplier-select {
    margin-left: 30px;
    padding: 5px;
}

/* 回到顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 8px 14px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 9999;
    opacity: 0.85;
    transition: opacity 0.2s;
}
#back-to-top:hover { opacity: 1; }
