* {
    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;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    margin: 20px;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.header p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.auth-section {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

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

.btn {
    background: #667eea;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.btn-danger {
    background: #e74c3c;
}

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

.btn-warning {
    background: #f39c12;
}

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

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

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

.btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.status-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.status-active {
    border-left: 4px solid #27ae60;
    background: #d5f4e6;
}

.status-inactive {
    border-left: 4px solid #95a5a6;
    background: #f8f9fa;
}

.status-creating {
    border-left: 4px solid #f39c12;
    background: #fef9e7;
}

.status-billing {
    border-left: 4px solid #3498db;
    background: #ebf3fd;
}

.usage-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.usage-summary-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.usage-summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.usage-summary-note {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 0.25rem;
}

.ssh-info {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    margin-top: 1rem;
    position: relative;
}

.ssh-section {
    margin-top: 1rem;
}

.ssh-item {
    background: #2c3e50;
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    margin-bottom: 0.5rem;
    position: relative;
    font-size: 0.9rem;
}

.ssh-label {
    color: #bdc3c7;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #34495e;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.copy-btn:hover {
    background: #4a5f7a;
}

.vscode-btn {
    background: #007acc;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
    width: 100%;
    transition: background 0.3s ease;
}

.vscode-btn:hover {
    background: #005a9e;
}

.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

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

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

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

.hidden {
    display: none !important;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.info-item {
    background: white;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.info-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 600;
    color: #2c3e50;
}

.billing-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.billing-title {
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.billing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.billing-item {
    display: flex;
    justify-content: space-between;
}

.billing-label {
    color: #424242;
}

.billing-value {
    font-weight: 600;
    color: #1565c0;
}

/* 冲突对话框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    margin: 20px;
}

.modal-header {
    margin-bottom: 1rem;
}

.modal-title {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.modal-content {
    margin-bottom: 1.5rem;
}

.conflict-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.conflict-notebook {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

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

    .info-grid {
        grid-template-columns: 1fr;
    }

    .billing-grid {
        grid-template-columns: 1fr;
    }

    .btn-group {
        grid-template-columns: 1fr;
    }
}