/**
 * DMAGH.AI Workspace Admin Modal Styles
 * Comprehensive styling for workspace management interface
 */

/* ═══════════════════════════════════════════════════════════════════════════════
   Modal Overlay & Container
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: env(safe-area-inset-top, 10px) env(safe-area-inset-right, 10px) env(safe-area-inset-bottom, 10px) env(safe-area-inset-left, 10px);
    overflow: hidden;
}

/* PWA Standalone mode adjustments */
@media all and (display-mode: standalone) {
    .ws-admin-modal-overlay {
        padding-top: env(safe-area-inset-top, 0px);
    }
}

.ws-admin-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ws-admin-modal-loading {
    text-align: center;
    color: var(--text);
}

.ws-admin-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ws-admin-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Header
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
}

.ws-admin-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ws-admin-icon {
    font-size: 2rem;
}

.ws-admin-title h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}

.ws-admin-subtitle {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.ws-admin-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.ws-admin-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Body & Tabs
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-admin-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.ws-admin-tabs {
    display: flex;
    flex-direction: column;
    width: 220px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--border);
    padding: 1rem 0;
    overflow-y: auto;
    flex-shrink: 0;
}

.ws-admin-tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.ws-admin-tab:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.ws-admin-tab.active {
    background: rgba(249, 115, 22, 0.15);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.ws-admin-tab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tab-icon {
    font-size: 1.1rem;
}

.tab-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
}

.ws-admin-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-admin-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.ws-admin-footer-info {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.ws-admin-footer-actions {
    display: flex;
    gap: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ws-btn-primary {
    background: linear-gradient(135deg, var(--primary), #ea580c);
    color: white;
}

.ws-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.ws-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 1px solid var(--border);
}

.ws-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.ws-btn-danger {
    background: var(--danger);
    color: white;
}

.ws-btn-danger:hover {
    background: #dc2626;
}

.ws-btn-danger-outline {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.ws-btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.1);
}

.ws-btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.ws-btn-icon {
    background: none;
    border: none;
    padding: 0.4rem;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.ws-btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ws-btn-icon.danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Form Elements
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-form-group {
    margin-bottom: 1rem;
}

.ws-form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.ws-form-row {
    display: flex;
    gap: 1rem;
}

.ws-form-row .ws-form-group {
    flex: 1;
}

.ws-input, .ws-select, .ws-textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.ws-input:focus, .ws-select:focus, .ws-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.ws-input::placeholder {
    color: var(--text-dim);
}

.ws-input-group {
    display: flex;
    align-items: center;
}

.ws-input-group .input-prefix {
    padding: 0.6rem 0.8rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--text-dim);
}

.ws-input-group .ws-input {
    border-radius: 0 8px 8px 0;
}

.ws-input-hint {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

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

.ws-textarea.ws-code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
}

/* Toggle Switch */
.ws-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.ws-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

.ws-toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.ws-toggle input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.ws-toggle-sm {
    width: 36px;
    height: 20px;
}

.ws-toggle-sm .toggle-slider:before {
    height: 14px;
    width: 14px;
}

.ws-toggle-sm input:checked + .toggle-slider:before {
    transform: translateX(16px);
}

.ws-toggle-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-info {
    flex: 1;
}

.toggle-title {
    display: block;
    font-weight: 500;
    color: var(--text);
}

.toggle-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

/* Checkbox */
.ws-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.ws-checkbox input {
    display: none;
}

.checkbox-mark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ws-checkbox input:checked + .checkbox-mark {
    background: var(--primary);
    border-color: var(--primary);
}

.ws-checkbox input:checked + .checkbox-mark::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Sections
   ═══════════════════════════════════════════════════════════════════════════════ */

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

.ws-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ws-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ws-section-header h3 {
    margin-bottom: 0;
}

.ws-section-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.ws-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 2rem;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Tables
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ws-table th, .ws-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.ws-table th {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.ws-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.ws-table code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Overview Tab
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.ws-overview-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 20px;
    color: var(--success);
}

.ws-overview-status.inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.plan-badge {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--secondary), #7c3aed);
    color: white;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
}

.ws-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.ws-stat-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.ws-stat-card .stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.ws-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
}

.ws-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.ws-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.ws-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.ws-action-btn:hover {
    background: rgba(249, 115, 22, 0.1);
    border-color: var(--primary);
}

.ws-activity-list {
    max-height: 200px;
    overflow-y: auto;
}

.ws-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-icon {
    font-size: 1.1rem;
}

.activity-content {
    flex: 1;
}

.activity-text {
    display: block;
    color: var(--text);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Usage Bars
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-usage-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ws-usage-bar {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
}

.ws-usage-bar .usage-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ws-usage-bar .usage-label {
    font-weight: 500;
}

.ws-usage-bar .usage-value {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.ws-usage-bar .usage-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.ws-usage-bar .usage-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.ws-usage-bar .usage-fill.ok {
    background: linear-gradient(90deg, var(--success), #16a34a);
}

.ws-usage-bar .usage-fill.warning {
    background: linear-gradient(90deg, var(--warning), #d97706);
}

.ws-usage-bar .usage-fill.critical {
    background: linear-gradient(90deg, var(--danger), #dc2626);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Billing Tab
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-billing-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(139, 92, 246, 0.2));
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.balance-amount {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.balance-amount .currency {
    font-size: 1.5rem;
    color: var(--text-dim);
}

.balance-amount .value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text);
}

.ws-allowances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.ws-allowance-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.allowance-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.allowance-icon {
    font-size: 1.25rem;
}

.allowance-title {
    font-weight: 600;
}

.allowance-usage {
    margin-bottom: 0.5rem;
}

.allowance-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.allowance-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #ea580c);
    border-radius: 3px;
}

.allowance-text {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.allowance-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.tx-type {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.tx-type.usage {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.tx-type.credit {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.tx-amount.positive {
    color: var(--success);
}

.tx-amount.negative {
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Access Control Tab
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-members-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ws-member-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.member-info {
    flex: 1;
}

.member-name {
    display: block;
    font-weight: 500;
}

.member-email {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.member-role .ws-select {
    width: auto;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
}

.ws-permissions-table td:not(:first-child),
.ws-permissions-table th:not(:first-child) {
    text-align: center;
}

.perm-icon {
    margin-right: 0.5rem;
}

.ws-invite-card, .ws-token-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.invite-info, .token-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.invite-role, .token-scopes {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.invite-expires, .token-created {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Domains Tab
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-domains-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ws-domain-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.ws-domain-card.default {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(139, 92, 246, 0.1));
    border-color: var(--primary);
}

.domain-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.domain-name {
    font-weight: 500;
    font-family: monospace;
}

.domain-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.domain-status.verified {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.domain-status.pending {
    background: rgba(234, 179, 8, 0.2);
    color: var(--warning);
}

.domain-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ssl-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border-radius: 4px;
}

.ssl-badge.pending {
    background: rgba(234, 179, 8, 0.15);
    color: var(--warning);
}

.ws-dns-records {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ws-dns-record {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
}

.dns-type {
    color: var(--primary);
    font-weight: 600;
    width: 60px;
}

.dns-name {
    color: var(--secondary);
    width: 120px;
}

.dns-value {
    flex: 1;
    color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Publishing Tab
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-environments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.ws-env-card {
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.ws-env-card.production {
    border-color: var(--success);
}

.ws-env-card.staging {
    border-color: var(--warning);
}

.ws-env-card.development {
    border-color: var(--secondary);
}

.env-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.env-icon {
    font-size: 1.25rem;
}

.env-name {
    font-weight: 600;
    flex: 1;
}

.env-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.env-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.env-status.inactive {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
}

.env-url {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-family: monospace;
    margin-bottom: 1rem;
}

.env-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.env-badge.production {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.env-badge.staging {
    background: rgba(234, 179, 8, 0.2);
    color: var(--warning);
}

.env-badge.sandbox, .env-badge.development {
    background: rgba(139, 92, 246, 0.2);
    color: var(--secondary);
}

.status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.status-badge.running {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.status-badge.stopped, .status-badge.failed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.status-badge.building, .status-badge.deploying {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Notifications Tab
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-notification-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.ws-channel-card {
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.channel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.channel-icon {
    font-size: 1.25rem;
}

.channel-name {
    flex: 1;
    font-weight: 500;
}

.channel-config {
    margin-top: 0.5rem;
}

.ws-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.ws-event-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.event-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Analytics Tab
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-analytics-period {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.ws-period-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
}

.ws-period-btn.active, .ws-period-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.ws-analytics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ws-analytics-stat {
    text-align: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.ws-analytics-stat .stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
}

.ws-analytics-stat .stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

.stat-change {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

.ws-analytics-chart {
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.chart-placeholder {
    text-align: center;
    color: var(--text-dim);
    padding: 3rem;
}

.ws-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.ws-top-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ws-top-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.top-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
}

.top-name {
    flex: 1;
    font-size: 0.9rem;
}

.top-value {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   AI Tab
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-ai-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.ws-ai-feature {
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.ai-feature-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.ai-icon {
    font-size: 1.25rem;
}

.ai-name {
    flex: 1;
    font-weight: 500;
}

.ai-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.ai-model-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-model-select label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.ai-model-select .ws-select {
    flex: 1;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

.ws-ai-usage {
    display: flex;
    gap: 2rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.usage-stat {
    text-align: center;
}

.usage-stat .usage-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.usage-stat .usage-value {
    font-size: 1.5rem;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Infrastructure Tab
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.ws-infra-card {
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.infra-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.infra-icon {
    font-size: 1.25rem;
}

.infra-name {
    flex: 1;
    font-weight: 500;
}

.infra-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.infra-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.infra-status.inactive {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
}

.infra-details {
    margin-bottom: 1rem;
}

.infra-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 0.25rem 0;
}

.infra-detail span:first-child {
    color: var(--text-dim);
}

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

.ws-tier-card {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s;
}

.ws-tier-card.selected {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.1);
}

.tier-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tier-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.tier-features {
    list-style: none;
    margin-bottom: 1rem;
    text-align: left;
    font-size: 0.9rem;
}

.tier-features li {
    padding: 0.25rem 0;
    color: var(--text-dim);
}

.tier-features li::before {
    content: '✓ ';
    color: var(--success);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Developer Tab
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-integration-card {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.ws-integration-card.connected {
    border-color: var(--success);
}

.integration-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.integration-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.integration-info {
    flex: 1;
}

.integration-name {
    display: block;
    font-weight: 600;
}

.integration-status {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.integration-repos {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.integration-repos h4 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.repos-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.repo-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
}

.repo-branch {
    color: var(--text-dim);
}

.ws-figma-import {
    margin-top: 1rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.ws-integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.ws-mini-integration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.ws-mini-integration.enabled {
    border-color: var(--success);
}

.ws-mini-integration .integration-icon {
    font-size: 1.25rem;
}

.ws-mini-integration .integration-name {
    flex: 1;
    font-size: 0.85rem;
}

.ws-env-vars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ws-env-var {
    display: flex;
    gap: 0.5rem;
}

.ws-env-var .ws-input {
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SEO Tab
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-image-upload {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.og-preview {
    max-width: 300px;
    border-radius: 8px;
}

.og-placeholder {
    width: 300px;
    height: 157px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed var(--border);
    border-radius: 8px;
    color: var(--text-dim);
}

.ws-seo-preview {
    margin-top: 1.5rem;
}

.seo-preview-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    max-width: 500px;
}

.preview-image {
    width: 120px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.preview-content {
    flex: 1;
}

.preview-title {
    color: #1a0dab;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.preview-desc {
    color: #545454;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.preview-url {
    color: #006621;
    font-size: 0.8rem;
}

.ws-seo-score {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary) calc(var(--score) * 3.6deg),
        rgba(255, 255, 255, 0.1) 0
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 90px;
    height: 90px;
    background: var(--bg-card);
    border-radius: 50%;
}

.score-value {
    position: relative;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.score-label {
    position: relative;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.score-breakdown {
    flex: 1;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.score-item.passed {
    color: var(--success);
}

.score-item.failed {
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Danger Zone Tab
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-tab-danger {
    max-width: 600px;
}

.ws-danger-warning {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
    border-radius: 10px;
    margin-bottom: 2rem;
    color: var(--danger);
}

.danger-icon {
    font-size: 1.5rem;
}

.ws-danger-section {
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.ws-danger-section h3 {
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Workspace Card Admin Button
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-admin-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1rem;
    opacity: 0;
}

.workspace-card {
    position: relative;
}

.workspace-card:hover .ws-admin-btn {
    opacity: 1;
}

.ws-admin-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Responsive Design
   ═══════════════════════════════════════════════════════════════════════════════ */

@media screen and (max-width: 900px) {
    .ws-admin-modal-overlay {
        padding: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
    }
    
    .ws-admin-modal {
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding-top: env(safe-area-inset-top, 0px);
        display: flex !important;
        flex-direction: column !important;
    }

    .ws-admin-body {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .ws-admin-tabs {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        height: auto !important;
        max-height: 60px !important;
        min-height: 50px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 0.4rem 0.5rem !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border) !important;
        gap: 0.3rem !important;
        justify-content: flex-start !important;
        align-items: center !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }
    
    .ws-admin-tabs::-webkit-scrollbar {
        display: none;
    }

    .ws-admin-tab {
        display: flex !important;
        flex-direction: row !important;
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
        min-width: fit-content !important;
        width: auto !important;
        height: auto !important;
        border-radius: 6px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        gap: 0.3rem !important;
        flex-shrink: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        border-left: none !important;
    }

    .ws-admin-tab.active {
        border-left: none !important;
        background: rgba(249, 115, 22, 0.25) !important;
        border: 1px solid var(--primary) !important;
    }

    .ws-admin-tab:hover:not(:disabled) {
        background: rgba(255, 255, 255, 0.1) !important;
    }

    .tab-icon {
        font-size: 0.9rem !important;
    }

    .tab-label {
        display: inline !important;
        font-size: 0.7rem !important;
        white-space: nowrap !important;
    }

    .tab-badge {
        font-size: 0.55rem !important;
        padding: 0.1rem 0.25rem !important;
    }

    .ws-admin-content {
        display: block !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 1rem !important;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 100px) !important;
        -webkit-overflow-scrolling: touch;
    }

    .ws-admin-footer {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 0.75rem 1rem !important;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.75rem) !important;
        background: rgba(0,0,0,0.4) !important;
        border-top: 1px solid var(--border) !important;
        flex-shrink: 0 !important;
    }

    .ws-admin-footer-info {
        order: 2;
        font-size: 0.7rem !important;
    }

    .ws-admin-footer-actions {
        width: 100% !important;
        display: flex !important;
        gap: 0.5rem !important;
    }

    .ws-admin-footer-actions .ws-btn {
        flex: 1 !important;
        padding: 0.6rem !important;
        font-size: 0.8rem !important;
    }
    
    .ws-admin-header {
        display: flex !important;
        padding: 0.75rem 1rem !important;
        flex-shrink: 0 !important;
    }
    
    .ws-admin-title h2 {
        font-size: 1rem !important;
    }
    
    .ws-admin-icon {
        font-size: 1.25rem !important;
    }
    
    .ws-admin-close {
        padding: 0.4rem !important;
        font-size: 1.25rem !important;
    }
}

/* Extra small screens - iPhone and similar */
@media screen and (max-width: 480px) {
    .ws-admin-modal-overlay {
        padding: 0 !important;
    }
    
    .ws-admin-modal {
        border-radius: 0 !important;
    }
    
    .ws-admin-header {
        padding: 0.6rem 0.75rem !important;
        gap: 0.5rem !important;
    }
    
    .ws-admin-title {
        gap: 0.5rem !important;
    }
    
    .ws-admin-title h2 {
        font-size: 0.95rem !important;
    }
    
    .ws-admin-subtitle {
        display: none !important;
    }
    
    .ws-admin-icon {
        font-size: 1.1rem !important;
    }
    
    .ws-admin-close {
        width: 32px !important;
        height: 32px !important;
        font-size: 1.1rem !important;
    }
    
    .ws-admin-tabs {
        min-height: 44px !important;
        max-height: 48px !important;
        gap: 0.2rem !important;
        padding: 0.3rem !important;
    }

    .ws-admin-tab {
        flex-direction: column !important;
        padding: 0.3rem 0.4rem !important;
        min-width: 48px !important;
        gap: 0.1rem !important;
        border-radius: 6px !important;
    }

    .tab-label {
        display: block !important;
        font-size: 0.5rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 46px !important;
        line-height: 1.1 !important;
        text-align: center !important;
    }

    .tab-icon {
        font-size: 0.9rem !important;
    }

    .tab-badge {
        display: none !important;
    }

    .ws-admin-tab.active .tab-label {
        font-weight: 600 !important;
        color: var(--primary) !important;
    }

    .ws-admin-content {
        padding: 0.75rem !important;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 80px) !important;
    }

    .ws-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    .ws-stat-card {
        padding: 0.75rem !important;
    }
    
    .stat-value {
        font-size: 1.25rem !important;
    }

    .ws-billing-balance {
        flex-direction: column !important;
        text-align: center !important;
        gap: 0.75rem !important;
    }

    .ws-member-card {
        flex-wrap: wrap !important;
        padding: 0.75rem !important;
    }

    .member-role {
        width: 100% !important;
        margin-top: 0.5rem !important;
    }
    
    .ws-admin-btn {
        opacity: 1 !important;
        padding: 0.35rem 0.5rem !important;
        font-size: 0.7rem !important;
    }
    
    .ws-admin-footer {
        padding: 0.6rem 0.75rem !important;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.6rem) !important;
    }
    
    .ws-btn {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Cards and sections */
    .ws-section-card {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .ws-section-header h3 {
        font-size: 0.9rem !important;
    }
    
    .ws-integration-card {
        padding: 0.75rem !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Gitea Integration Styles
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-integration-card.primary {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(139, 92, 246, 0.05));
}

.ws-integration-card.primary .integration-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.gitea-logo {
    font-size: 2rem !important;
    background: linear-gradient(135deg, #609926, #4a7f1f);
    padding: 0.5rem;
    border-radius: 8px;
}

.figma-logo {
    font-size: 2rem !important;
}

.integration-status.connected {
    color: var(--success);
    font-weight: 500;
}

.integration-sync-status {
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.sync-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sync-icon {
    font-size: 1.1rem;
}

.sync-icon.synced {
    color: var(--success);
}

.sync-icon.syncing {
    animation: spin 1s linear infinite;
}

.sync-icon.error {
    color: var(--danger);
}

.sync-text {
    font-weight: 500;
}

.sync-time {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.repo-item.primary {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid var(--primary);
}

.repo-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.repo-icon {
    font-size: 1.2rem;
}

.repo-actions {
    display: flex;
    gap: 0.5rem;
}

.gitea-capabilities {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.gitea-capabilities h5 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--text-dim);
}

.capabilities-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.capabilities-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.cap-icon {
    font-size: 1rem;
}

.integration-setup {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    margin-top: 1rem;
}

.setup-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setup-step {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-text {
    color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Webhooks Styles
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-webhooks-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ws-webhook-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.webhook-info {
    flex: 1;
}

.webhook-url {
    display: block;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text);
    word-break: break-all;
}

.webhook-events {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.webhook-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.webhook-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.webhook-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.webhook-status.inactive {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Enhanced Developer Tab Styles
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-tab-developer .ws-section {
    margin-bottom: 2.5rem;
}

.ws-tab-developer .ws-section:last-child {
    margin-bottom: 0;
}

.ws-integration-card .integration-header {
    flex-wrap: wrap;
    gap: 1rem;
}

.ws-integration-card .integration-header > .ws-btn {
    margin-left: 0;
}

@media (min-width: 600px) {
    .ws-integration-card .integration-header > .ws-btn:last-of-type {
        margin-left: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Domain Verification Styles
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-tab-domains .ws-section {
    margin-bottom: 2rem;
}

.ws-domain-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.ws-domain-card:hover {
    border-color: var(--primary);
}

.ws-domain-card.default {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(139, 92, 246, 0.05));
    border-color: var(--primary);
}

.ws-domain-card.verified {
    border-left: 4px solid var(--success);
}

.ws-domain-card.pending {
    border-left: 4px solid var(--warning);
}

.ws-domain-card.checking {
    border-left: 4px solid var(--accent);
}

.domain-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.domain-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.domain-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    font-family: 'Fira Code', monospace;
}

.domain-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.domain-status.verified {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.domain-status.pending {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
}

.domain-status.checking {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.domain-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.domain-token {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.domain-verification-steps {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.verification-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.check-item.done {
    color: var(--success);
}

.check-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.7rem;
}

.check-item.done .check-icon {
    background: var(--success);
    color: white;
}

.domain-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Add Domain Form */
.ws-add-domain-form {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(249, 115, 22, 0.05));
    border: 1px solid var(--secondary);
    border-radius: 12px;
    padding: 1.5rem;
}

.ws-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.ws-input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* DNS Steps */
.ws-dns-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dns-step {
    display: flex;
    gap: 1rem;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
    font-size: 1rem;
}

.step-content p {
    margin: 0 0 0.75rem 0;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.dns-note {
    background: rgba(251, 191, 36, 0.1);
    border-left: 3px solid var(--warning);
    padding: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    border-radius: 0 8px 8px 0;
}

.dns-note code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
}

/* DNS Records */
.ws-dns-record {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.dns-type {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.dns-name {
    color: var(--secondary);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    min-width: 100px;
}

.dns-value {
    flex: 1;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text);
    word-break: break-all;
}

/* DNS Check */
.ws-dns-check {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
}

.ws-form-inline {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ws-form-inline .ws-input {
    flex: 1;
}

.ws-dns-result {
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.dns-result-header {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.dns-result-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dns-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.dns-result-item.found {
    border-left: 3px solid var(--success);
}

.dns-result-item.missing {
    border-left: 3px solid var(--danger);
}

.result-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
}

.dns-result-item.found .result-icon {
    background: var(--success);
    color: white;
}

.dns-result-item.missing .result-icon {
    background: var(--danger);
    color: white;
}

.result-label {
    flex: 1;
    font-size: 0.9rem;
}

.result-value {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.dns-result-success {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    border-radius: 8px;
    color: var(--success);
    text-align: center;
}

.dns-result-warning {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid var(--warning);
    border-radius: 8px;
    color: var(--warning);
    text-align: center;
}

.dns-checking {
    text-align: center;
    padding: 2rem;
    color: var(--accent);
}

.dns-error {
    text-align: center;
    padding: 1rem;
    color: var(--danger);
}

/* Empty State */
.ws-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 2px dashed var(--border);
}

.ws-empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.ws-empty-state p {
    margin: 0;
    color: var(--text);
}

.ws-empty-state .empty-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* SSL Badge */
.ssl-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.ssl-badge.pending {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
}

.ssl-badge.active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

/* DNS Resolver badges */
.dns-resolvers-badge {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: normal;
    margin-left: 1rem;
}

.result-resolver {
    font-size: 0.7rem;
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.result-warning {
    font-size: 0.7rem;
    color: var(--warning);
    margin-left: 0.5rem;
}

.dns-propagation-note {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.dns-propagation-note strong {
    color: var(--accent);
}

/* Auto-polling indicator */
.domain-polling {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--accent);
    margin-left: 1rem;
}

.domain-polling::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

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

/* ═══════════════════════════════════════════════════════════════════════════════
   Developer Tab - Enhanced Styles
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Quick Actions Bar */
.ws-dev-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 12px;
    margin-bottom: 2rem;
}

.ws-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text);
}

.ws-quick-action:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.qa-icon {
    font-size: 1.5rem;
}

.qa-label {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Git Repository Card */
.ws-git-status {
    margin-top: 1rem;
}

.git-repo-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.git-repo-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.git-repo-icon {
    font-size: 2rem;
}

.git-repo-info {
    flex: 1;
}

.git-repo-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.git-repo-url {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: 'Fira Code', monospace;
}

.git-repo-stats {
    display: flex;
    gap: 1rem;
}

.git-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.stat-icon {
    font-size: 0.9rem;
}

.git-sync-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.git-sync-status .sync-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
}

.git-sync-status.syncing .sync-indicator {
    background: var(--warning);
    animation: pulse 1s infinite;
}

.git-sync-status.error .sync-indicator {
    background: var(--danger);
}

.git-sync-status .sync-text {
    flex: 1;
    font-size: 0.9rem;
}

.git-sync-status .sync-time {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.git-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.git-setup-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed var(--border);
    border-radius: 12px;
}

.git-setup-icon {
    font-size: 3rem;
}

.git-setup-info {
    flex: 1;
}

.git-setup-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
}

.git-setup-info p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* API Tokens */
.ws-tokens-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ws-token-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.token-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.token-name {
    font-weight: 600;
    color: var(--text);
}

.token-scopes {
    font-size: 0.75rem;
    color: var(--secondary);
}

.token-created {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.token-value {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.token-value code {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.token-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.token-last-used {
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* Environment Variables */
.ws-env-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ws-env-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.env-key {
    min-width: 150px;
}

.env-key code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--primary);
}

.env-badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.env-badge.secret {
    background: rgba(139, 92, 246, 0.2);
    color: var(--secondary);
}

.env-value {
    flex: 1;
}

.env-value .ws-input {
    font-family: 'Fira Code', monospace;
}

.env-actions {
    display: flex;
    gap: 0.25rem;
}

/* Build & Deploy */
.ws-build-config {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.ws-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ws-form-row .ws-form-group {
    flex: 1;
}

.ws-deploy-toggles {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.ws-toggle-setting.compact {
    padding: 0.75rem 0;
}

.ws-toggle-setting.compact .toggle-info {
    min-width: auto;
}

/* Code Quality Grid */
.ws-code-quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

/* Webhooks */
.ws-webhook-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.ws-webhook-item.active {
    border-left: 3px solid var(--success);
}

.ws-webhook-item.inactive {
    opacity: 0.7;
}

.webhook-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.webhook-method {
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.webhook-url {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text);
    word-break: break-all;
}

.webhook-events {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.webhook-event {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: rgba(139, 92, 246, 0.2);
    color: var(--secondary);
    border-radius: 4px;
}

.webhook-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.webhook-status.active {
    color: var(--success);
}

.webhook-actions {
    display: flex;
    gap: 0.25rem;
}

/* Mini Integrations Grid */
.ws-integration-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ws-integration-mini:hover {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.1);
}

.ws-integration-mini.enabled {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.int-icon {
    font-size: 1.5rem;
}

.int-name {
    flex: 1;
    font-size: 0.9rem;
}

.int-status {
    color: var(--success);
    font-weight: 600;
}

/* Mini Modal */
.ws-mini-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.mini-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
}

.mini-modal-content h4 {
    margin: 0 0 1rem 0;
    color: var(--text);
}

.mini-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   API Token Modal
   ═══════════════════════════════════════════════════════════════════════════════ */

.ws-token-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 1rem;
}

.token-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.token-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.token-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
}

.token-modal-header.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    border-bottom-color: rgba(34, 197, 94, 0.3);
}

.token-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.token-scopes-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 45vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.scope-category {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    border-left: 3px solid var(--cat-color, var(--primary));
}

.scope-category-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: background 0.15s;
}

.scope-category-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.scope-category-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text);
}

.scope-category-toggle {
    font-size: 0.7rem;
    color: var(--text-dim);
    transition: transform 0.2s;
}

.scope-category.open .scope-category-toggle {
    transform: rotate(90deg);
}

.scope-category-count {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-left: auto;
    margin-right: 0.5rem;
    background: rgba(255,255,255,0.08);
    padding: 1px 6px;
    border-radius: 8px;
}

.scope-items {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
}

.scope-category.open .scope-items {
    padding: 0.35rem 0.5rem;
    max-height: 500px;
}

.scope-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.scope-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.scope-item input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.scope-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.scope-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

.scope-desc {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-left: auto;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scope-item:has(input:checked) {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.token-quick-presets {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.preset-label {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.preset-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.token-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.token-warning {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #fbbf24;
}

.warning-icon {
    font-size: 1.25rem;
}

.token-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Token Result Modal */
.token-result .token-result-warning {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.token-result-warning .warning-icon {
    font-size: 2rem;
}

.token-result-warning strong {
    color: #f87171;
    display: block;
    margin-bottom: 0.25rem;
}

.token-result-warning p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.token-result-info {
    margin-bottom: 1rem;
}

.token-result-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.token-result-scopes {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-top: 0.25rem;
}

.token-result-value {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.token-result-value code {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #a5f3fc;
    word-break: break-all;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    user-select: all;
}

.token-result-value .ws-btn {
    align-self: flex-end;
}

.ws-hint {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

.required {
    color: var(--danger);
}

@media (max-width: 600px) {
    .token-modal-content {
        max-height: 95vh;
    }
    
    .scope-desc {
        display: none;
    }
}

/* Checkbox styling */
.ws-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.ws-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.ws-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Section Header with actions */
.ws-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ws-section-header h3 {
    margin: 0;
}

.ws-section-actions {
    display: flex;
    gap: 0.5rem;
}

/* Badge */
.ws-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
}

.ws-badge.success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

/* Small empty state */
.ws-empty-state.small {
    padding: 1.5rem;
    font-size: 0.9rem;
}

.ws-empty-state.small p {
    margin: 0;
    color: var(--text-dim);
}

/* Input small variant */
.ws-input-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .ws-dev-quick-actions {
        justify-content: center;
    }
    
    .ws-form-row {
        flex-direction: column;
    }
    
    .git-repo-main {
        flex-direction: column;
        text-align: center;
    }
    
    .git-repo-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .ws-deploy-toggles {
        flex-direction: column;
        gap: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Domain Wizard Styles
   ═══════════════════════════════════════════════════════════════════════════════ */

.domain-wizard-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.domain-wizard {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
}

.wizard-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wizard-icon {
    font-size: 2rem;
}

.wizard-title h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--primary);
}

.wizard-subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 0;
}

.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    opacity: 0.4;
    transition: all 0.3s;
}

.progress-step.active,
.progress-step.completed {
    opacity: 1;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s;
}

.progress-step.active .step-num {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.progress-step.completed .step-num {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.progress-step.completed .step-num::after {
    content: '✓';
}

.step-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    max-width: 40px;
}

.wizard-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

.wizard-step h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text);
}

.step-desc {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.ws-input-lg {
    padding: 0.875rem 1rem;
    font-size: 1rem;
}

.domain-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
}

.preview-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.preview-url {
    font-family: monospace;
    color: var(--success);
    font-size: 1rem;
}

/* Provider Selection */
.provider-selection {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.provider-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.provider-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.provider-option.selected {
    background: rgba(249, 115, 22, 0.15);
    border-color: var(--primary);
}

.provider-option .provider-icon {
    font-size: 1.75rem;
}

.provider-option .provider-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.provider-option .provider-rec {
    font-size: 0.65rem;
    color: var(--success);
    background: rgba(34, 197, 94, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

/* DNS Instructions */
.dns-record-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.record-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.record-step {
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.record-title {
    font-weight: 500;
    font-size: 0.9rem;
}

.record-content {
    padding: 1rem;
}

.record-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.record-row:last-child {
    margin-bottom: 0;
}

.record-label {
    width: 100px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.record-value {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text);
}

.record-value.copyable {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.record-value.copyable:hover {
    background: rgba(255, 255, 255, 0.1);
}

.copy-icon {
    font-size: 0.75rem;
    opacity: 0.6;
}

.record-note {
    padding: 0.75rem 1rem;
    background: rgba(234, 179, 8, 0.1);
    border-top: 1px solid rgba(234, 179, 8, 0.3);
    font-size: 0.8rem;
    color: var(--warning);
}

.record-note code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

.provider-doc-link {
    text-align: center;
    margin-top: 1rem;
}

.provider-doc-link a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.provider-doc-link a:hover {
    text-decoration: underline;
}

.dns-timing-note {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    margin-top: 1rem;
}

.timing-icon {
    font-size: 1.5rem;
}

.dns-timing-note strong {
    display: block;
    margin-bottom: 0.25rem;
}

.dns-timing-note p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Verification Panel */
.verification-panel {
    text-align: center;
}

.verify-domain-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.verify-icon {
    font-size: 1.5rem;
}

.verify-domain {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--primary);
}

.verify-checks {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.verify-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.check-status {
    font-size: 1.1rem;
}

.check-label {
    font-size: 0.9rem;
}

.verify-result {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.verify-result.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.verify-result.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.result-icon {
    font-size: 1.5rem;
}

.result-message strong {
    display: block;
    margin-bottom: 0.25rem;
}

.result-message p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.ws-btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.ws-btn.success {
    background: var(--success);
    border-color: var(--success);
}

.verify-later-note {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.verify-later-note p {
    margin: 0 0 0.75rem 0;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.wizard-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.wizard-footer-spacer {
    flex: 1;
}

/* Provider Grid */
.ws-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.ws-provider-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.ws-provider-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.ws-provider-card.recommended {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.ws-provider-card .provider-icon {
    font-size: 1.5rem;
}

.ws-provider-card .provider-name {
    font-size: 0.8rem;
    text-align: center;
}

.ws-provider-card .provider-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.6rem;
    background: var(--success);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
}

/* Domain Config Modal */
.domain-config-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.domain-config-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.config-domain-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.domain-icon {
    font-size: 2rem;
}

.domain-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.config-section {
    margin-bottom: 1.5rem;
}

.config-section h3 {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: var(--text-dim);
}

.config-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.option-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.option-label {
    font-weight: 500;
    font-size: 0.9rem;
}

.option-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.option-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.option-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.option-status.pending {
    background: rgba(234, 179, 8, 0.2);
    color: var(--warning);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-switch .slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .slider {
    background: var(--success);
}

.toggle-switch input:checked + .slider::before {
    transform: translateX(22px);
}

.ws-select {
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
}

.dns-status-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.dns-check-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.danger-zone {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 1rem;
}

.danger-zone h3 {
    color: var(--danger);
}

.danger-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.danger-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.danger-label {
    font-weight: 500;
    color: var(--danger);
}

.danger-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.ws-btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.ws-btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Responsive for Domain Wizard */
@media (max-width: 600px) {
    .domain-wizard {
        max-height: 100%;
        border-radius: 0;
    }
    
    .wizard-progress {
        padding: 1rem;
        gap: 0.25rem;
    }
    
    .step-label {
        display: none;
    }
    
    .progress-line {
        max-width: 20px;
    }
    
    .provider-selection {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ws-provider-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .config-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .danger-action {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
