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

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

.container {
    max-width: 600px;
    margin: 50px auto;
}

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

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
}

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

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

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

small {
    color: #999;
    font-size: 13px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
    width: auto;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

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

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    margin-left: 8px;
    width: auto;
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
}

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

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

.message.warning {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.message.info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    opacity: 0.9;
}

/* 管理员后台样式 */
.admin-header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.admin-header h1 {
    margin: 0;
}

.admin-header .btn {
    width: auto;
}

.admin-content {
    display: grid;
    gap: 20px;
}

.team-item {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

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

.team-header h3 {
    margin: 0;
    color: #333;
}

.badge {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.team-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.team-info p {
    margin: 8px 0;
    color: #555;
}

code {
    background: #f4f4f4;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #e83e8c;
}

.keys-section {
    margin: 20px 0;
}

.keys-section h4 {
    margin-bottom: 12px;
    color: #555;
}

.key-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
}

.key-item.used {
    background: #e9ecef;
    opacity: 0.7;
}

.key-number {
    font-weight: 600;
    color: #667eea;
    margin-right: 10px;
    min-width: 30px;
}

.key-code {
    flex: 1;
    font-size: 12px;
    word-break: break-all;
}

.key-status {
    color: #28a745;
    font-size: 13px;
    margin-left: 10px;
}

.team-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.team-actions .btn {
    width: auto;
    flex: 1;
}

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

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

.invitations-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.status-success {
    color: #28a745;
}

.status-failed {
    color: #dc3545;
}

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

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
    }

    .admin-header .btn {
        width: 100%;
    }

    .team-actions {
        flex-direction: column;
    }
}

/* 自动踢人配置样式 */
.status-success {
    color: #10b981;
    font-weight: 500;
}

.status-failed {
    color: #ef4444;
    font-weight: 500;
}

input[type="time"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-right: 8px;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Teams 网格布局 */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.team-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    transition: all 0.3s;
}

.team-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.team-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.team-info {
    margin-bottom: 15px;
}

.team-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

.team-info code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #e83e8c;
}

.team-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #e0e0e0;
    color: #666;
}

.badge-owner {
    background: #ffd700;
    color: #333;
}

.badge-temp {
    background: #ff9800;
    color: white;
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-error {
    background: #ef4444;
    color: white;
}

/* 成员列表 */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    gap: 15px;
}

.member-info {
    flex: 1;
}

.member-info strong {
    font-size: 15px;
    color: #333;
}

.member-info .badge {
    margin-left: 10px;
}

.member-meta {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.member-meta small {
    color: #999;
    font-size: 12px;
}

/* 邀请码列表 */
.keys-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.key-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    gap: 15px;
}

.key-info {
    flex: 1;
}

.key-code {
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #e83e8c;
    border: 1px solid #e0e0e0;
    display: inline-block;
}

.key-meta {
    margin-top: 8px;
}

.key-meta small {
    color: #999;
    font-size: 12px;
}

/* 日志表格 */
.log-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

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

.log-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.log-table td {
    font-size: 13px;
    color: #666;
}

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

/* 响应式 */
@media (max-width: 768px) {
    .teams-grid {
        grid-template-columns: 1fr;
    }

    .team-actions {
        flex-direction: column;
    }

    .team-actions .btn {
        width: 100%;
    }

    .member-item,
    .key-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

/* =========================================
   User Login Page Redesign (Scoped)
   ========================================= */

body.user-login-page {
    --primary-color: #1a2b3c;
    --success-color: #10b981;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --input-bg: #f5f5f5;
    --text-secondary: #6b7280;
    --border-radius-pill: 50px;
    --border-radius-card: 24px;

    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top));
    padding-right: calc(20px + env(safe-area-inset-right));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    padding-left: calc(20px + env(safe-area-inset-left));
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.user-login-page .container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
}

/* Toast Notification */
.user-login-page .toast-notification {
    position: fixed;
    top: calc(20px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
    max-width: 520px;
    box-sizing: border-box;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.2);
    animation: slideDown 0.5s ease-out;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.user-login-page .toast-notification.toast-hidden {
    opacity: 0;
    transform: translate(-50%, -12px);
    pointer-events: none;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -20px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Main Card */
.user-login-page .card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius-card);
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 0;
}

.user-login-page h1 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.3;
}

.user-login-page .subtitle {
    color: var(--text-secondary);
    text-align: center;
    font-size: 15px;
    margin-bottom: 40px;
}

/* Input Groups */
.user-login-page .input-group {
    position: relative;
    margin-bottom: 20px;
}

.user-login-page .operation-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(26, 43, 60, 0.1);
}

.user-login-page .operation-tab {
    flex: 1;
    height: 38px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #5b6472;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-login-page .operation-tab.active {
    color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.user-login-page .operation-tab:focus-visible {
    outline: 2px solid rgba(26, 43, 60, 0.28);
    outline-offset: 2px;
}

.user-login-page .operation-panel {
    display: none;
}

.user-login-page .operation-panel.active {
    display: block;
}

.user-login-page .operation-block {
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(26, 43, 60, 0.08);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 0;
}

.user-login-page .operation-block-secondary {
    background: rgba(243, 247, 252, 0.72);
}

.user-login-page .operation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.user-login-page .operation-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    color: var(--primary-color);
    font-weight: 700;
}

.user-login-page .operation-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.24);
}

.user-login-page .operation-desc {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #5b6472;
}

.user-login-page .operation-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-login-page .batch-join-modal-container {
    width: min(1280px, calc(100vw - 40px));
    max-width: 1280px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 32px 32px 28px;
    border-radius: 24px;
    text-align: left;
}

.user-login-page .batch-join-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.user-login-page .batch-join-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.user-login-page .batch-join-modal-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-login-page .batch-join-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    transform: rotate(90deg);
}

.user-login-page .batch-join-modal-desc {
    margin: 0 0 12px;
    font-size: 13px;
    color: #64748b;
}

.user-login-page .batch-join-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 24px;
}

.user-login-page .batch-join-field {
    min-width: 0;
}

.user-login-page .batch-join-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #475569;
    font-weight: 700;
}

.user-login-page .batch-join-textarea {
    width: 100%;
    min-height: 350px;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.94);
    font-family: 'Fira Code', 'Courier New', monospace;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.user-login-page .batch-join-textarea:focus {
    outline: none;
    border-color: rgba(26, 43, 60, 0.35);
    box-shadow: 0 0 0 3px rgba(26, 43, 60, 0.08);
}

.user-login-page .batch-join-actions {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.user-login-page .batch-join-actions .pill-btn {
    margin-top: 0;
    height: 46px;
}

.user-login-page .batch-check-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(320px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.user-login-page .batch-check-form .batch-join-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

.user-login-page .batch-check-form .batch-join-textarea {
    min-height: 300px;
}

.user-login-page .batch-check-form-actions {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.user-login-page .batch-check-form-actions .pill-btn {
    margin-top: 0;
    height: 46px;
}

.user-login-page .batch-check-side-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-login-page .batch-check-bucket {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 10px;
    background: rgba(248, 250, 252, 0.82);
}

.user-login-page .batch-check-bucket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.user-login-page .batch-check-bucket-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.user-login-page .batch-check-copy-btn {
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

.user-login-page .batch-check-bucket-textarea {
    width: 100%;
    min-height: 150px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.55;
    resize: vertical;
    color: #1f2937;
    background: #fff;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.user-login-page .batch-check-bucket-textarea:focus {
    outline: none;
    border-color: rgba(26, 43, 60, 0.35);
    box-shadow: 0 0 0 3px rgba(26, 43, 60, 0.08);
}

.user-login-page .batch-join-result-summary {
    margin-top: 12px;
}

.user-login-page .batch-join-result-list {
    margin-top: 10px;
}

.user-login-page .batch-join-table-wrap {
    max-height: 50vh;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.user-login-page .batch-join-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.user-login-page .batch-join-table th,
.user-login-page .batch-join-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    vertical-align: top;
    line-height: 1.45;
}

.user-login-page .batch-join-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
}

.user-login-page .batch-join-status-success {
    color: #16a34a;
    font-weight: 700;
}

.user-login-page .batch-join-status-fail {
    color: #dc2626;
    font-weight: 700;
}

.user-login-page .input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.user-login-page .pill-input {
    width: 100%;
    height: 54px;
    padding: 0 20px 0 55px;
    border-radius: var(--border-radius-pill);
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 16px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.user-login-page .pill-input:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 43, 60, 0.1);
    outline: none;
}

.user-login-page .pill-input::placeholder {
    color: #9ca3af;
}

/* Buttons */
.user-login-page .pill-btn {
    width: 100%;
    height: 54px;
    border-radius: var(--border-radius-pill);
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.user-login-page .operation-actions .pill-btn {
    margin-top: 0;
}

.user-login-page .pill-btn.button-with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.user-login-page .pill-btn.button-with-icon svg {
    flex-shrink: 0;
}

.user-login-page .pill-btn-secondary {
    background: rgba(255, 255, 255, 0.75);
    color: var(--primary-color);
    border: 1px solid rgba(26, 43, 60, 0.14);
}

.user-login-page .pill-btn-accent {
    background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
}

.user-login-page .pill-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(26, 43, 60, 0.2);
}

.user-login-page .pill-btn-secondary:hover {
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.user-login-page .pill-btn-accent:hover {
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.34);
}

.user-login-page .pill-btn:active {
    transform: translateY(0);
}

.user-login-page .pill-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.user-login-page .footer {
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 12px;
    opacity: 0.6;
}

/* Message Override */
.user-login-page .message {
    margin-top: 20px;
    border-radius: 16px;
    text-align: left;
    line-height: 1.6;
    padding: 14px 16px;
}

.user-login-page .team-status-message {
    margin-top: 12px;
    font-size: 14px;
}

.user-login-page .team-status-summary {
    font-weight: 700;
    margin-bottom: 8px;
}

.user-login-page .team-status-hint {
    font-size: 13px;
    opacity: 0.9;
}

.user-login-page .team-status-progress {
    margin-top: 10px;
}

.user-login-page .team-status-progress-track {
    position: relative;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(59, 130, 246, 0.14);
}

.user-login-page .team-status-progress-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    transition: width 0.2s ease;
}

.user-login-page .team-status-progress-text {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

@media (max-width: 1080px) {
    .user-login-page .batch-check-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body.user-login-page {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .user-login-page .container {
        margin-top: 8px;
    }

    .user-login-page .card {
        padding: 32px 22px;
    }

    .user-login-page h1 {
        font-size: 22px;
    }

    .user-login-page .subtitle {
        margin-bottom: 28px;
    }

    .user-login-page .operation-block {
        padding: 14px;
    }

    .user-login-page .operation-tab {
        font-size: 12px;
    }

    .user-login-page .operation-title {
        font-size: 14px;
    }

    .user-login-page .batch-join-modal-container {
        width: calc(100% - 20px);
        max-width: none;
        max-height: calc(100dvh - 20px);
        padding: 18px 16px 16px;
        border-radius: 16px;
    }

    .user-login-page .batch-join-modal-title {
        font-size: 18px;
    }

    .user-login-page .batch-join-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .user-login-page .batch-check-form-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .user-login-page .batch-join-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .user-login-page .batch-join-table-wrap {
        max-height: 32vh;
    }

    .user-login-page .toast-notification {
        top: calc(12px + env(safe-area-inset-top));
        padding: 10px 16px;
        max-width: calc(100vw - 24px);
    }

    /* --- 6.1 批量操作表格滚动 --- */
    .user-login-page .batch-join-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .user-login-page .batch-join-table {
        min-width: 480px;
    }

    /* --- 6.3 分页组件触控优化 --- */
    .user-login-page .batch-join-actions .pill-btn,
    .user-login-page .batch-check-form-actions .pill-btn {
        min-width: 44px;
        min-height: 44px;
    }

    /* --- 7.2 背景装饰性能优化 --- */
    .bg-icon {
        display: none !important;
    }

    .background-decoration {
        backdrop-filter: blur(40px) !important;
        -webkit-backdrop-filter: blur(40px) !important;
    }
}

@media (max-width: 360px) {
    .user-login-page .card {
        padding: 28px 18px;
    }

    .user-login-page .pill-input,
    .user-login-page .pill-btn {
        height: 50px;
    }

    /* --- 6.2 极小屏幕适配 --- */
    .user-login-page .operation-tab {
        font-size: 11px;
        padding: 6px 8px;
    }

    .user-login-page .operation-block {
        padding: 12px;
    }

    .user-login-page .batch-join-actions {
        flex-direction: column;
    }

    .user-login-page .batch-join-actions .pill-btn {
        width: 100%;
    }
}

@media (max-height: 520px) and (pointer: coarse) {
    body.user-login-page {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .user-login-page .container {
        margin-top: 8px;
    }
}

/* =========================================
   Background Decoration (User Login Page)
   ========================================= */

/* Container */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind everything */
    overflow: hidden;
    pointer-events: none;
    /* Non-interactive */
}

/* 1. Technical Grid (科技感网格) */
.bg-grid {
    position: absolute;
    inset: 0;
    /* Very subtle grid lines */
    background-image:
        linear-gradient(rgba(26, 43, 60, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 43, 60, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    /* Fade out towards edges */
    mask-image: radial-gradient(ellipse 80% 80% at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at center, black 40%, transparent 100%);
    animation: grid-breathe 8s ease-in-out infinite;
}

@keyframes grid-breathe {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* 2. Ambient Orbs (氛围光晕) */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    /* Heavy blur for soft light */
    opacity: 0.12;
    /* Very subtle */
    z-index: 1;
}

.bg-orb-1 {
    /* Primary Blue - Top Left */
    width: 600px;
    height: 600px;
    background: var(--primary-color);
    top: -200px;
    left: -200px;
    animation: float-orb-1 20s infinite alternate ease-in-out, breathe-orb 6s infinite ease-in-out;
}

.bg-orb-2 {
    /* Success Green - Bottom Right */
    width: 500px;
    height: 500px;
    background: var(--success-color);
    bottom: -150px;
    right: -150px;
    animation: float-orb-2 25s infinite alternate-reverse ease-in-out, breathe-orb 8s infinite ease-in-out 2s;
}

.bg-orb-3 {
    /* Purple Accent - Center Right */
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: 40%;
    right: -100px;
    opacity: 0.08;
    animation: float-orb-3 22s infinite alternate ease-in-out, breathe-orb 7s infinite ease-in-out 1s;
}

@keyframes float-orb-1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(60px, 40px) scale(1.15);
    }
}

@keyframes float-orb-2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-50px, -30px) scale(1.1);
    }
}

@keyframes float-orb-3 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-40px, 50px) scale(1.2);
    }
}

@keyframes breathe-orb {

    0%,
    100% {
        opacity: 0.12;
    }

    50% {
        opacity: 0.18;
    }
}

/* 3. Floating Icons (装饰图标) */
.bg-icon {
    position: absolute;
    color: var(--primary-color);
    opacity: 0.04;
    /* Subtle watermark effect */
    z-index: 0;
}

.bg-icon svg {
    width: 100%;
    height: 100%;
}

.bg-icon-1 {
    /* Top Right area - Chip */
    top: 12%;
    right: 8%;
    width: 120px;
    height: 120px;
    animation: float-icon 12s infinite ease-in-out, rotate-slow 60s infinite linear;
}

.bg-icon-2 {
    /* Bottom Left area - Lock */
    bottom: 18%;
    left: 6%;
    width: 90px;
    height: 90px;
    animation: float-icon 14s infinite ease-in-out 1s;
}

.bg-icon-3 {
    /* Top Left - Zap */
    top: 25%;
    left: 12%;
    width: 70px;
    height: 70px;
    opacity: 0.03;
    animation: float-icon 10s infinite ease-in-out 2s, pulse-icon 4s infinite ease-in-out;
}

.bg-icon-4 {
    /* Center Right - Code */
    top: 50%;
    right: 15%;
    width: 100px;
    height: 100px;
    opacity: 0.025;
    animation: float-icon 16s infinite ease-in-out 3s;
}

.bg-icon-5 {
    /* Bottom Right - Terminal */
    bottom: 25%;
    right: 5%;
    width: 80px;
    height: 80px;
    opacity: 0.03;
    animation: float-icon 13s infinite ease-in-out 4s;
}

.bg-icon-6 {
    /* Top Center - Shield */
    top: 8%;
    left: 35%;
    width: 60px;
    height: 60px;
    opacity: 0.025;
    animation: float-icon 11s infinite ease-in-out 5s;
}

.bg-icon-7 {
    /* Bottom Center - Globe */
    bottom: 10%;
    left: 40%;
    width: 75px;
    height: 75px;
    opacity: 0.03;
    animation: float-icon 15s infinite ease-in-out 2.5s, rotate-slow 90s infinite linear reverse;
}

.bg-icon-8 {
    /* Left Center - Database */
    top: 60%;
    left: 3%;
    width: 65px;
    height: 65px;
    opacity: 0.025;
    animation: float-icon 12s infinite ease-in-out 1.5s;
}

@keyframes float-icon {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-15px) rotate(2deg);
    }

    50% {
        transform: translateY(-5px) rotate(-1deg);
    }

    75% {
        transform: translateY(-20px) rotate(1deg);
    }
}

@keyframes pulse-icon {

    0%,
    100% {
        opacity: 0.03;
    }

    50% {
        opacity: 0.06;
    }
}

@keyframes rotate-slow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 4. Geometric Shapes (几何图形) */
.bg-shape {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

/* Circles */
.bg-circle {
    border-radius: 50%;
    border: 1px solid rgba(26, 43, 60, 0.06);
}

.bg-circle-1 {
    width: 300px;
    height: 300px;
    top: 5%;
    left: -100px;
    animation: circle-expand 15s infinite ease-in-out, float-shape 20s infinite ease-in-out;
}

.bg-circle-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    right: -50px;
    border-width: 2px;
    border-color: rgba(16, 185, 129, 0.08);
    animation: circle-expand 12s infinite ease-in-out 3s, float-shape 18s infinite ease-in-out reverse;
}

.bg-circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 5%;
    border-style: dashed;
    animation: rotate-slow 30s infinite linear, circle-expand 10s infinite ease-in-out 1s;
}

@keyframes circle-expand {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.4;
    }
}

@keyframes float-shape {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(10px, -15px);
    }

    50% {
        transform: translate(20px, 5px);
    }

    75% {
        transform: translate(-5px, 10px);
    }
}

/* Hexagons */
.bg-hexagon {
    color: rgba(26, 43, 60, 0.05);
}

.bg-hexagon svg {
    width: 100%;
    height: 100%;
}

.bg-hexagon-1 {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 3%;
    animation: rotate-slow 45s infinite linear, float-shape 25s infinite ease-in-out;
}

.bg-hexagon-2 {
    width: 80px;
    height: 80px;
    bottom: 35%;
    left: 8%;
    color: rgba(16, 185, 129, 0.04);
    animation: rotate-slow 60s infinite linear reverse, float-shape 22s infinite ease-in-out 5s;
}

/* 5. Decorative Lines (装饰线条) */
.bg-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(26, 43, 60, 0.04), transparent);
    z-index: 0;
}

.bg-line-1 {
    width: 200px;
    height: 1px;
    top: 20%;
    left: 10%;
    transform: rotate(-30deg);
    animation: line-pulse 8s infinite ease-in-out;
}

.bg-line-2 {
    width: 150px;
    height: 1px;
    bottom: 30%;
    right: 15%;
    transform: rotate(45deg);
    animation: line-pulse 10s infinite ease-in-out 2s;
}

.bg-line-3 {
    width: 100px;
    height: 1px;
    top: 60%;
    left: 20%;
    transform: rotate(15deg);
    animation: line-pulse 6s infinite ease-in-out 4s;
}

@keyframes line-pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scaleX(1) rotate(var(--rotate, 0deg));
    }

    50% {
        opacity: 0.8;
        transform: scaleX(1.2) rotate(var(--rotate, 0deg));
    }
}

/* 6. Dots Pattern (点阵图案) */
.bg-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(26, 43, 60, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: 15px 15px;
    mask-image: radial-gradient(ellipse 60% 60% at 70% 30%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 70% 30%, black 20%, transparent 70%);
    animation: dots-drift 30s infinite linear;
}

@keyframes dots-drift {
    0% {
        background-position: 15px 15px;
    }

    100% {
        background-position: 45px 45px;
    }
}

/* =========================================
   Responsive Design for Background Elements
   ========================================= */

@media (max-width: 1024px) {
    .bg-orb-1 {
        width: 400px;
        height: 400px;
        top: -150px;
        left: -150px;
    }

    .bg-orb-2 {
        width: 350px;
        height: 350px;
    }

    .bg-orb-3 {
        width: 300px;
        height: 300px;
        opacity: 0.06;
    }

    .bg-icon {
        opacity: 0.03;
    }

    .bg-icon-1,
    .bg-icon-2 {
        width: 80px;
        height: 80px;
    }

    .bg-icon-3,
    .bg-icon-4,
    .bg-icon-5,
    .bg-icon-6,
    .bg-icon-7,
    .bg-icon-8 {
        width: 50px;
        height: 50px;
    }

    .bg-circle-1 {
        width: 200px;
        height: 200px;
    }

    .bg-circle-2 {
        width: 150px;
        height: 150px;
    }

    .bg-circle-3 {
        width: 100px;
        height: 100px;
    }

    .bg-hexagon-1 {
        width: 80px;
        height: 80px;
    }

    .bg-hexagon-2 {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    .bg-orb {
        filter: blur(60px);
        opacity: 0.1;
    }

    .bg-grid {
        background-size: 40px 40px;
        opacity: 0.5;
    }

    .bg-orb-1 {
        width: 300px;
        height: 300px;
        top: -100px;
        left: -100px;
        opacity: 0.08;
    }

    .bg-orb-2 {
        width: 250px;
        height: 250px;
        opacity: 0.08;
    }

    .bg-orb-3 {
        display: none;
    }

    /* Hide most icons on mobile */
    .bg-icon-3,
    .bg-icon-4,
    .bg-icon-5,
    .bg-icon-6,
    .bg-icon-7,
    .bg-icon-8 {
        display: none;
    }

    .bg-icon-1,
    .bg-icon-2 {
        width: 60px;
        height: 60px;
        opacity: 0.02;
    }

    /* Hide some shapes on mobile */
    .bg-circle-1,
    .bg-circle-3 {
        display: none;
    }

    .bg-circle-2 {
        width: 100px;
        height: 100px;
        opacity: 0.5;
    }

    .bg-hexagon-1,
    .bg-hexagon-2 {
        display: none;
    }

    .bg-line-1,
    .bg-line-2,
    .bg-line-3 {
        display: none;
    }

    .bg-dots {
        opacity: 0.5;
    }
}

@media (max-width: 480px) {

    .bg-orb-1,
    .bg-orb-2 {
        opacity: 0.05;
    }

    .bg-icon-1,
    .bg-icon-2 {
        display: none;
    }

    .bg-circle-2 {
        display: none;
    }

    .bg-dots {
        display: none;
    }
}

/* =========================================
   Custom Modal Dialog (User Login Page)
   ========================================= */

.custom-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-modal.show {
    opacity: 1;
    visibility: visible;
}

.custom-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.custom-modal-container {
    position: relative;
    background: var(--card-bg, #ffffff);
    border-radius: 24px;
    padding: 40px 32px 32px;
    max-width: 400px;
    width: calc(100% - 40px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.custom-modal.show .custom-modal-container {
    transform: scale(1) translateY(0);
}

.custom-modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 50%;
    color: var(--primary-color, #1a2b3c);
}

.custom-modal-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #10b981;
}

.custom-modal-icon svg {
    width: 32px;
    height: 32px;
}

.custom-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color, #1a2b3c);
    margin: 0 0 16px;
}

.custom-modal-content {
    color: var(--text-secondary, #6b7280);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.modal-email-display {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color, #1a2b3c);
    margin-bottom: 16px;
    word-break: break-all;
}

.modal-warning {
    color: #f59e0b;
    font-weight: 500;
    margin: 0 0 8px;
    font-size: 14px;
}

.modal-hint {
    color: var(--text-secondary, #6b7280);
    font-size: 13px;
    margin: 0;
}

.modal-success-text {
    font-size: 16px;
    color: var(--primary-color, #1a2b3c);
    margin: 0 0 8px;
}

.custom-modal-actions {
    display: flex;
    gap: 12px;
}

.custom-modal-btn {
    flex: 1;
    height: 48px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.custom-modal-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.4);
}

.custom-modal-btn-secondary {
    background: #f3f4f6;
    color: var(--text-secondary, #6b7280);
}

.custom-modal-btn-secondary:hover {
    background: #e5e7eb;
    color: var(--primary-color, #1a2b3c);
}

.custom-modal-btn-primary {
    background: var(--primary-color, #1a2b3c);
    color: white;
}

.custom-modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 43, 60, 0.3);
}

.custom-modal-btn-primary:active {
    transform: translateY(0);
}

/* Success state for primary button */
.custom-modal-icon.success+.custom-modal-title+.custom-modal-content+.custom-modal-actions .custom-modal-btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.custom-modal-icon.success+.custom-modal-title+.custom-modal-content+.custom-modal-actions .custom-modal-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .custom-modal-container {
        padding: 32px 24px 24px;
        border-radius: 20px;
        max-height: calc(100vh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .custom-modal-icon {
        width: 64px;
        height: 64px;
    }

    .custom-modal-icon svg {
        width: 28px;
        height: 28px;
    }

    .custom-modal-title {
        font-size: 18px;
    }

    .custom-modal-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .custom-modal-btn {
        height: 44px;
    }
}

@media (max-width: 480px) {
    .custom-modal {
        padding-top: calc(12px + env(safe-area-inset-top));
        padding-right: calc(12px + env(safe-area-inset-right));
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        padding-left: calc(12px + env(safe-area-inset-left));
        box-sizing: border-box;
    }

    .custom-modal-backdrop {
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }
}

@media (prefers-reduced-motion: reduce) {

    .background-decoration,
    .background-decoration * {
        animation: none !important;
    }

    .user-login-page .toast-notification {
        animation: none;
    }

    .custom-modal,
    .custom-modal-container {
        transition: none;
    }
}
