:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--bg);
}

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

.container-admin {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Domain Dashboard Layouts */
.onboarding-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.onboarding-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.onboarding-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.onboarding-card .step-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.onboarding-description {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* DNS Copy Block */
.dns-copy-block {
    background: #f8fafc;
    border: 2px dashed var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.dns-copy-block.highlight {
    border-color: var(--primary);
    background: #eff6ff;
}

.dns-field {
    margin-bottom: 1.25rem;
}

.dns-field:last-child {
    margin-bottom: 0;
}

.dns-field-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.dns-field-value {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.dns-field-code {
    flex: 1;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--primary);
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    word-break: break-all;
    white-space: pre-wrap;
    line-height: 1.5;
}

.dns-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0 0.875rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-size: 0.875rem;
    min-width: 80px;
}

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

.dns-copy-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* Next Step Preview */
.next-step-preview {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
}

.next-step-preview h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #059669;
    margin-bottom: 0.25rem;
}

.next-step-preview p {
    color: #166534;
    font-size: 0.875rem;
    margin: 0;
}

/* Waiting State */
.waiting-card {
    text-align: center;
    padding: 3rem 2rem;
}

.waiting-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

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

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

.waiting-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.waiting-description {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto 1rem;
    line-height: 1.6;
}

.waiting-eta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fef3c7;
    color: #92400e;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Analytics Dashboard Improvements */
.analytics-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
}

.analytics-main {
    min-width: 0;
}

.analytics-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .analytics-layout {
        grid-template-columns: 1fr;
    }
}

/* Config Expandable */
.config-expandable {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    margin-top: 1.5rem;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.config-header:hover {
    background-color: var(--bg);
}

.config-header h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

.config-content {
    padding: 0 1.25rem 1.25rem;
    display: none;
}

.config-content.open {
    display: block;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

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

/* Navbar */
.navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
}

.nav-link:hover {
    color: var(--primary);
    background-color: #eff6ff;
}

.nav-link.active {
    color: var(--primary);
    background-color: #eff6ff;
}

.nav-link-admin {
    color: #dc2626;
    font-weight: 600;
}

.nav-link-admin:hover {
    background-color: #fef2f2;
    color: #991b1b;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    background: none;
    border: 1px solid var(--border);
    padding: 0.5rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.dropdown-trigger:hover {
    background-color: var(--bg);
    border-color: var(--text-secondary);
}

/* Organization Selector Specific Styles */
.org-selector {
    margin-right: 1rem;
}

.org-trigger {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
    padding: 0.4rem 1rem;
    font-weight: 600;
}

.org-trigger:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
}

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

.org-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.check-icon {
    margin-left: auto;
    color: var(--success);
    font-weight: bold;
}

.dropdown-item.active {
    background-color: #f0f9ff;
    color: var(--primary);
    font-weight: 600;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background-color: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    min-width: 200px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1001;
    overflow: hidden;
    padding: 0.5rem;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: var(--bg);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border);
    margin: 0.5rem 0;
}

.dropdown-item-admin {
    color: #dc2626;
    font-weight: 600;
}

.dropdown-item-admin:hover {
    background-color: #fef2f2;
}

.dropdown-item-danger {
    color: var(--error);
}

.dropdown-item-danger:hover {
    background-color: #fef2f2;
}

.user-avatar {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.dropdown-header {
    padding: 0.5rem 0.875rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.25rem;
}

.dropdown-header-label {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dropdown-header-value {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-logo-icon {
    font-size: 1.5rem;
}

.dropdown-arrow {
    font-size: 0.75rem;
    opacity: 0.5;
}

.input-readonly {
    background-color: #f3f4f6 !important;
    cursor: not-allowed !important;
}

.danger-zone {
    margin-top: 1.5rem;
    border: 1px solid #dc2626 !important;
}

.text-danger {
    color: #dc2626 !important;
}

.btn-danger {
    background-color: #dc2626 !important;
    color: white !important;
}

.btn-warning {
    background-color: #f59e0b !important;
    color: white !important;
}

.btn-disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
}

.border-top {
    border-top: 1px solid var(--border);
}

.mt-2 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

/* Page Content */
.main-content {
    padding: 3rem 0;
    min-height: calc(100vh - 160px);
}

/* Cards & Sections */
.card {
    background-color: var(--card-bg);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Status Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-verified {
    background-color: #d1fae5;
    color: #065f46;
}

/* Monitoring Modes */
.badge-full {
    background-color: #dcfce7;
    color: #166534;
}

.badge-limited {
    background-color: #fef9c3;
    color: #854d0e;
}

.badge-passive {
    background-color: #f1f5f9;
    color: #475569;
}

/* Billing Statuses */
.badge-paid {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-free_perpetual {
    background-color: #f3e8ff;
    color: #6b21a8;
}

.badge-agency_managed {
    background-color: #fae8ff;
    color: #86198f;
}

.badge-past_due {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-failed {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

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

.modern-table th {
    background: var(--bg);
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.modern-table tbody tr:hover {
    background-color: #f8fafc;
}

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

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

th {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Footer */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-family: inherit;
}

input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Custom Badge States */
.badge-enforcing {
    background-color: var(--success);
    color: white;
}

.badge-monitoring {
    background-color: var(--primary);
    color: white;
}

.badge-none {
    background-color: var(--error);
    color: white;
}

.badge-reasonable {
    background-color: var(--success);
    color: white;
}

.badge-weak {
    background-color: var(--warning);
    color: #78350f;
}

/* Darker text for legible contrast on warning */
.badge-missing {
    background-color: var(--text-secondary);
    color: white;
}

/* Alert Boxes */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

.alert-error {
    background-color: #fff1f2;
    border-color: #fecdd3;
}

.alert-error h4 {
    color: var(--error);
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.alert-error ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #9f1239;
}

.alert-success {
    background-color: #ecfdf5;
    color: var(--success);
    font-size: 0.8125rem;
}

/* Card States */
.card-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
}

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

.text-sm {
    font-size: 0.875rem;
}

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

.w-100 {
    width: 100%;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.link-primary {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.grid {
    display: grid;
}

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

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.col-span-1 {
    grid-column: span 1 / span 1;
}

.col-span-2 {
    grid-column: span 2 / span 2;
}

.col-span-3 {
    grid-column: span 3 / span 3;
}

.gap-2 {
    gap: 2rem;
}

.bg-light {
    background-color: var(--bg);
}

.padding-2 {
    padding: 1.5rem;
}

.rounded {
    border-radius: 0.5rem;
}

.border-dashed {
    border: 1px dashed var(--border);
}

.text-xs {
    font-size: 0.75rem;
}

.uppercase {
    text-transform: uppercase;
}

.font-semibold {
    font-weight: 600;
}

.block {
    display: block;
}

.break-all {
    word-break: break-all;
}

.flex {
    display: flex;
}

.flex-col, .flex-direction-column {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.gap-1 {
    gap: 1rem;
}

.justify-center {
    justify-content: center;
}

.italic {
    font-style: italic;
}

.text-lg {
    font-size: 1.1rem;
}

.font-medium {
    font-weight: 500;
}

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

.bg-blue-light {
    background-color: #eff6ff;
}

.border-left-primary {
    border-left: 4px solid var(--primary);
}

.border-blue-light {
    border-color: #dbeafe;
}

.p-1 {
    padding: 0.25rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mb-0 {
    margin-bottom: 0;
}

.list-disc {
    list-style-type: disc;
}

.pl-2 {
    padding-left: 1.5rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* Admin Styles */
.admin-header {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 1rem;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: 0.5rem 0.5rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.admin-header p {
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
    font-size: 0.875rem;
}

.admin-badge {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.admin-nav a {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.admin-nav a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.admin-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.admin-warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.admin-warning strong {
    display: block;
    margin-bottom: 0.25rem;
}

.btn-exit-admin {
    background: white !important;
    color: #dc2626 !important;
}

.pointer {
    cursor: pointer;
}

/* Modern Admin Layout */
.admin-content {
    width: 100%;
    max-width: 100%;
}

.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-page-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-page-header p {
    margin: 0.25rem 0 0 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar .filter-input {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-bar .filter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-bar .filter-input::placeholder {
    color: var(--text-secondary);
}

/* Modern Card - Wider */
.admin-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.admin-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

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

/* Form Layout */
.admin-form {
    display: grid;
    gap: 1.25rem;
    max-width: 600px;
}

.admin-form-wide {
    max-width: 100%;
}

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

/* Table Improvements */
.admin-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: white;
}

.admin-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.admin-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table .actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Wide Edit Form */
.admin-edit-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.admin-edit-layout .admin-edit-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-edit-layout .admin-edit-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .admin-edit-layout {
        grid-template-columns: 1fr;
    }
}

/* Upgrade Layout Improvements */
.upgrade-explainer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.step-item.highlight {
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.step-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 50%;
}

.highlight .step-icon {
    background: #eff6ff;
    color: var(--primary);
}

.step-arrow {
    color: var(--text-secondary);
    font-size: 1.25rem;
}

/* Terminal Window Style */
.terminal-window {
    background: #1e293b;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    font-family: 'Fira Code', monospace;
    text-align: left;
}

.terminal-header {
    background: #334155;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.terminal-title {
    margin-left: auto;
    margin-right: auto;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ef4444;
}

.dot.yellow {
    background: #f59e0b;
}

.dot.green {
    background: #10b981;
}

.terminal-body {
    padding: 1rem;
    color: #e2e8f0;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.terminal-code {
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    flex: 1;
    margin-right: 1rem;
    display: block;
}

.terminal-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.terminal-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.terminal-copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* Upgrade Dialog Refinements */
.upgrade-section.context {
    background: white;
}

.upgrade-section.action {
    background: #f8fafc;
    border-top: 1px solid var(--border);
}

.action-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #e0f2fe;
    color: #0284c7;
    border-radius: 50%;
}

/* Utilities needed for the dialog if not already present */
.p-0 {
    padding: 0 !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.bg-gray-50 {
    background-color: #f9fafb !important;
}

.border-top {
    border-top: 1px solid var(--border) !important;
}

.flex {
    display: flex !important;
}

.items-center {
    align-items: center !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.m-0 {
    margin: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

.text-sm {
    font-size: 0.875rem !important;
}