
/* 华为5G CPE授权管理后台样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    margin: 0;
    padding: 0;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    text-align: center;
    min-width: 400px;
    max-width: 500px;
    width: 100%;
}

.login-box h1 {
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

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

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #2d3748;
    font-size: 24px;
}

.auth-section {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-direction: column;
}

.auth-section input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
    transition: border-color 0.3s ease;
}

.auth-section input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.auth-section button {
    padding: 12px 24px;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    max-width: 300px;
    transition: all 0.3s ease;
    position: relative;
}

.auth-section button:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.auth-section button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

header .auth-section {
    flex-direction: row;
    gap: 10px;
}

header .auth-section input,
header .auth-section button {
    width: auto;
    max-width: none;
    padding: 8px 16px;
    font-size: 14px;
}

section {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

section h2 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 18px;
}

.form-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.form-group label {
    font-weight: 500;
    color: #4a5568;
}

.form-group select,
.form-group input {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.form-group button {
    padding: 8px 16px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.form-group button:hover {
    background: #38a169;
}

.result-box {
    margin-top: 15px;
    padding: 15px;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

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

.controls button {
    padding: 6px 12px;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.count-info {
    font-size: 12px;
    color: #718096;
}

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

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

table th,
table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
}

.loading {
    text-align: center;
    color: #718096;
    font-style: italic;
}

.status-badge {
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
}

.status-active {
    background: #c6f6d5;
    color: #22543d;
}

.status-expired {
    background: #fed7d7;
    color: #742a2a;
}

.status-revoked {
    background: #e2e8f0;
    color: #4a5568;
}

/* 在线状态样式 */
.online-status {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    display: inline-block;
    margin-top: 2px;
}

.online-status.online {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.online-status.recently-online {
    background: #fef5e7;
    color: #744210;
    border: 1px solid #f6e05e;
}

.online-status.offline {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

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

.stat-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #718096;
}

.refresh-info {
    margin-top: 15px;
    padding: 10px;
    background: #f0f9ff;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #374151;
}

.refresh-time {
    color: #6b7280;
}

.auto-refresh-status {
    color: #059669;
    font-weight: 500;
}

.message-box {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.message-box.show {
    transform: translateX(0);
}

.message-box.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message-box.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.message-box.info {
    background: #bee3f8;
    color: #2a4365;
    border: 1px solid #90cdf4;
}

button.danger {
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button.danger:hover {
    background: #c53030;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    min-width: 50px;
}

.btn-primary {
    background: #4299e1;
    color: white;
}

.btn-primary:hover {
    background: #3182ce;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-warning {
    background: #ed8936;
    color: white;
}

.btn-warning:hover {
    background: #dd6b20;
}

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

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

/* 折叠展开动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .form-group {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
