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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5fb;
    min-height: 100vh;
    margin: 0;
    color: #1f2933;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

.top-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 700;
    font-size: 18px;
    color: #111827;
}

.brand-tagline {
    font-size: 12px;
    color: #6b7280;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-env-pill {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    font-size: 12px;
    color: #4b5563;
    background: rgba(248, 250, 252, 0.9);
}

.hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 32px;
}

@media (max-width: 968px) {
    .hero {
        grid-template-columns: 1fr;
    }
}

.hero-left h1 {
    font-size: 28px;
    line-height: 1.2;
    color: #111827;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 16px;
}

.overview-strip {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.overview-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    min-width: 130px;
}

.ov-label {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ov-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.hero-highlights {
    list-style: none;
    margin-top: 4px;
}

.hero-highlights li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 4px;
}

.hero-highlights .dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #4f46e5;
}

.hero-right {
    display: flex;
    justify-content: flex-end;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.signup-card h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #111827;
}

.signup-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 18px;
}

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

.card h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8em;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.9em;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.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;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    margin-right: 10px;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.loading {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.progress-container {
    margin-top: 20px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.progress-header {
    margin-bottom: 20px;
}

.progress-header h3 {
    font-size: 20px;
    color: #1f2933;
    margin-bottom: 8px;
}

.progress-header p {
    color: #666;
    font-size: 14px;
}

.progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-percentage {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 24px;
}

.progress-stages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.progress-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s;
}

.progress-stage.pending {
    opacity: 0.4;
    color: #999;
}

.progress-stage.active {
    background: #f0f4ff;
    color: #667eea;
    font-weight: 600;
}

.progress-stage.completed {
    color: #10b981;
}

.stage-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.stage-text {
    font-size: 12px;
    text-align: center;
}

.hidden {
    display: none;
}

.result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
}

.result.success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.result.error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.result h3 {
    margin-bottom: 15px;
}

.result .access-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.result .access-url {
    font-size: 1.2em;
    font-weight: bold;
    color: #667eea;
    word-break: break-all;
    margin: 10px 0;
}

/* Enhanced Access Information Display */
.access-details-box {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border: 2px solid #667eea30;
}

.access-details-box h4 {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 1.1em;
}

.access-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.access-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.access-item .label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.access-item .value {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    font-family: 'Courier New', monospace;
}

.ip-value {
    color: #667eea;
}

.port-value {
    color: #764ba2;
}

.access-url-box {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #28a745;
}

.access-url-box.pending {
    border-left-color: #ffc107;
}

.access-url-large {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.url-link {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
    flex: 1;
    min-width: 200px;
}

.url-link:hover {
    text-decoration: underline;
}

.btn-copy {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #5568d3;
}

.btn-copy-small {
    padding: 5px 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
}

.btn-copy-small:hover {
    background: #5568d3;
}

.pending-text {
    color: #856404;
    font-style: italic;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #ffc107;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.tenant-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-size: 0.9em;
    color: #666;
}

.info-box {
    margin-top: 15px;
    padding: 12px;
    background: #e7f3ff;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
    font-size: 0.9em;
}

/* Tenant List Enhancements */
.tenant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tenant-access-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #667eea;
}

.access-details-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.access-detail {
    background: white;
    padding: 10px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.1em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.ip-display {
    color: #667eea;
}

.port-display {
    color: #764ba2;
}

.tenant-access-url-box {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
}

.tenant-url-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.tenant-url-link {
    font-size: 1.1em;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
    flex: 1;
    min-width: 150px;
}

.tenant-url-link:hover {
    text-decoration: underline;
}

.tenant-meta {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9em;
    color: #666;
}

.tenant-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* Preferred Web Address input group */
.domain-row {
    display: flex;
    align-items: stretch;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #ffffff;
}

.domain-row input {
    border: none;
    padding: 10px 14px;
    font-size: 14px;
    flex: 1;
}

.domain-row input:focus {
    outline: none;
    box-shadow: none;
}

.domain-hint {
    padding: 10px 16px;
    font-size: 14px;
    background: #f3f4ff;
    color: #4f46e5;
    border-left: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-weight: 600;
}

.result .credentials {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ccc;
}

.result .credential-item {
    margin: 8px 0;
    font-family: monospace;
    font-size: 0.9em;
}

.tenants-list {
    max-height: 500px;
    overflow-y: auto;
}

.tenant-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.tenant-item h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.tenant-item .status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 10px;
}

.status.active {
    background: #d4edda;
    color: #155724;
}

.status.pending {
    background: #fff3cd;
    color: #856404;
}

.status.deploying {
    background: #cce5ff;
    color: #004085;
}

.tenant-item .info {
    margin: 8px 0;
    color: #666;
}

.tenant-item .access-url {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 5px;
    font-family: monospace;
    word-break: break-all;
}

.loading-text {
    text-align: center;
    color: #888;
    padding: 20px;
}

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

.empty-state svg {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    opacity: 0.5;
}

