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

body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 22px;
    font-weight: 600;
}

.user-info {
    font-size: 14px;
}

.user-info a {
    color: #bbdefb;
    text-decoration: none;
    margin-left: 10px;
}

.user-info a:hover {
    color: #fff;
    text-decoration: underline;
}

.nav {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
}

.nav a {
    display: inline-block;
    padding: 14px 24px;
    color: #444;
    text-decoration: none;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.nav a:hover {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    background: #f8f9ff;
}

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

.message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c8e6c9;
    font-size: 14px;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    border-color: #ffcdd2;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1a237e;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8eaf6;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 28px;
    margin-bottom: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

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

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

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}

.form-group .checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.form-group .checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.form-group .checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    text-align: center;
}

.btn-primary {
    background: #1a73e8;
    color: #fff;
}

.btn-primary:hover {
    background: #1557b0;
}

.btn-success {
    background: #0f9d58;
    color: #fff;
}

.btn-success:hover {
    background: #0b8043;
}

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

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

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

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

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

.btn-group {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th {
    background: #f5f7fa;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #444;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

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

table tbody tr:hover {
    background: #f8f9ff;
}

.serial-code {
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 3px;
    display: inline-block;
    margin: 2px 4px;
    white-space: nowrap;
}

.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-bar input {
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    width: 250px;
}

.search-bar input:focus {
    outline: none;
    border-color: #1a73e8;
}

.login-container {
    max-width: 420px;
    margin: 80px auto;
}

.login-container .card {
    text-align: center;
}

.login-container .form-group input {
    max-width: 100%;
}

.login-container .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 10px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #1a237e;
}

.empty-row {
    text-align: center;
    color: #999;
    padding: 40px 10px !important;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .nav a {
        padding: 10px 14px;
        font-size: 13px;
    }

    .card {
        padding: 18px;
    }

    .container {
        padding: 0 12px;
        margin: 16px auto;
    }

    .form-group input[type="text"],
    .form-group input[type="password"],
    .form-group input[type="date"],
    .form-group select {
        max-width: 100%;
    }
}

.alert {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert-info {
    background: #e3f2fd;
    color: #0d47a1;
    border-color: #bbdefb;
}

.alert-warning {
    background: #fff8e1;
    color: #e65100;
    border-color: #ffecb3;
}

.alert-danger {
    background: #ffebee;
    color: #b71c1c;
    border-color: #ffcdd2;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-admin {
    background: #e3f2fd;
    color: #0d47a1;
}

.badge-user {
    background: #e8f5e9;
    color: #1b5e20;
}

.badge-expired {
    background: #ffebee;
    color: #b71c1c;
}

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

.lang-switch-login {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}

.lang-switch-login a {
    color: #888;
    text-decoration: none;
    padding: 0 4px;
    transition: color 0.2s;
}

.lang-switch-login a:hover {
    color: #1a73e8;
}

.lang-switch-login a.active {
    color: #333;
    font-weight: 600;
    cursor: default;
}

.lang-switch-login .lang-divider {
    color: #ddd;
}

.lang-switch-header {
    text-align: right;
    font-size: 14px;
    margin-top: 2px;
}

.lang-switch-header a {
    color: #90caf9;
    text-decoration: none;
}

.lang-switch-header a:hover {
    color: #fff;
    text-decoration: underline;
}

.lang-switch-header a.active {
    color: #fff;
    font-weight: 600;
    cursor: default;
}

.lang-switch-header .lang-divider {
    color: #64b5f6;
}
