:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #161616;
    --bg-hover: #1f1f1f;
    --border-color: #2a2a2a;
    --border-subtle: #222222;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent-green: #00ff88;
    --accent-green-dim: #00cc6a;
    --accent-green-glow: rgba(0, 255, 136, 0.15);
    --accent-red: #ff4444;
    --accent-yellow: #ffcc00;
    --accent-blue: #4488ff;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: var(--radius-sm);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dim) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--bg-primary);
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-text span { color: var(--accent-green); }

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover { color: var(--accent-green); }

/* Environment Badge */
.env-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.env-badge.sandbox { color: var(--accent-yellow); border-color: rgba(255, 204, 0, 0.3); }
.env-badge.production { color: var(--accent-green); border-color: rgba(0, 255, 136, 0.3); }

.env-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.sandbox .env-dot { background: var(--accent-yellow); }
.production .env-dot { background: var(--accent-green); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu:hover {
    background: var(--bg-hover);
}

.user-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-green);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Layout */
.main-container {
    display: flex;
    min-height: calc(100vh - 64px);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.sidebar-section { margin-bottom: 1.5rem; }

.sidebar-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
}

.sidebar-nav { list-style: none; }

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav li a.active {
    background: var(--accent-green-glow);
    color: var(--accent-green);
    border-left-color: var(--accent-green);
}

.sidebar-nav li a svg { width: 18px; height: 18px; opacity: 0.7; }
.sidebar-nav li a.active svg { opacity: 1; }

/* Content */
.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.page-header { margin-bottom: 2rem; }

.page-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.page-description { color: var(--text-secondary); font-size: 15px; }

/* Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title svg { width: 20px; height: 20px; color: var(--accent-green); }

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width { grid-column: 1 / -1; }

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-label .required { color: var(--accent-red); }

.form-input, .form-select, .form-textarea {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px var(--accent-green-glow);
}

.form-input::placeholder { color: var(--text-muted); }

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-select option { background: var(--bg-secondary); color: var(--text-primary); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn svg { width: 16px; height: 16px; }

.btn-primary { background: var(--accent-green); color: var(--bg-primary); }
.btn-primary:hover { background: var(--accent-green-dim); box-shadow: 0 0 30px var(--accent-green-glow); }

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--text-muted); }

.btn-danger {
    background: rgba(255, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(255, 68, 68, 0.3);
}
.btn-danger:hover { background: rgba(255, 68, 68, 0.25); }

.btn-group { display: flex; gap: 0.75rem; margin-top: 1.5rem; }

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
}

.status-issued { background: rgba(0, 255, 136, 0.15); color: var(--accent-green); }
.status-pending { background: rgba(255, 204, 0, 0.15); color: var(--accent-yellow); }
.status-revoked { background: rgba(255, 68, 68, 0.15); color: var(--accent-red); }
.status-validating { background: rgba(68, 136, 255, 0.15); color: var(--accent-blue); }

/* Tables */
.table-container { overflow-x: auto; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.data-table tr:hover td { background: var(--bg-hover); }

.data-table .mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--accent-green);
}

/* Response Panel */
.response-panel {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.response-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.response-title { font-size: 13px; font-weight: 500; }
.response-status { font-size: 12px; font-weight: 500; }
.response-status.success { color: var(--accent-green); }
.response-status.error { color: var(--accent-red); }

.response-body { padding: 16px; max-height: 400px; overflow-y: auto; }

.response-body pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-secondary);
}

.response-body pre .key { color: var(--accent-blue); }
.response-body pre .string { color: var(--accent-green); }
.response-body pre .number { color: var(--accent-yellow); }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-value { font-size: 28px; font-weight: 600; color: var(--text-primary); }
.stat-value.green { color: var(--accent-green); }

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 1rem;
}

.alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }

.alert-success { background: rgba(0, 255, 136, 0.1); border: 1px solid rgba(0, 255, 136, 0.3); color: var(--accent-green); }
.alert-error { background: rgba(255, 68, 68, 0.1); border: 1px solid rgba(255, 68, 68, 0.3); color: var(--accent-red); }
.alert-warning { background: rgba(255, 204, 0, 0.1); border: 1px solid rgba(255, 204, 0, 0.3); color: var(--accent-yellow); }
.alert-info { background: rgba(68, 136, 255, 0.1); border: 1px solid rgba(68, 136, 255, 0.3); color: var(--accent-blue); }

/* Utility Classes */
.hidden { display: none !important; }
.text-mono { font-family: 'JetBrains Mono', monospace; }
.text-green { color: var(--accent-green); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 2rem;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo-img {
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dim) 100%);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--bg-primary);
    margin-bottom: 1rem;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-form .form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.login-form .form-input,
.login-form .form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.login-form .form-input:focus,
.login-form .form-select:focus {
    outline: none;
    border-color: var(--accent-green);
    background: var(--bg-secondary);
}

.login-form .btn-primary {
    margin-top: 0.75rem;
}

/* =========================================
   WIZARD STYLES
   ========================================= */

/* Progress Steps */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
    transition: color 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--accent-green-glow);
}

.progress-step.active .step-label {
    color: var(--accent-green);
}

.progress-step.completed .step-number {
    background: var(--accent-green-dim);
    border-color: var(--accent-green-dim);
    color: var(--bg-primary);
}

.progress-step.completed .step-label {
    color: var(--text-secondary);
}

.progress-connector {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin: 0 1rem;
    margin-bottom: 1.5rem;
}

/* Wizard Steps Content */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Wizard Navigation */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.wizard-navigation .btn {
    min-width: 120px;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1;
}

.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }

/* Required Field Indicator */
.required {
    color: var(--accent-red);
    margin-left: 2px;
}

/* Form Hints */
.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Invalid Field */
.form-control.is-invalid,
.form-input.is-invalid,
textarea.is-invalid {
    border-color: var(--accent-red) !important;
}

/* Alert Boxes */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-info {
    background: rgba(68, 136, 255, 0.1);
    border: 1px solid rgba(68, 136, 255, 0.3);
    color: var(--accent-blue);
}

.alert-danger {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: var(--accent-red);
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--accent-green);
}

.alert .icon {
    font-size: 18px;
    line-height: 1;
}

/* EV Fields Section */
.ev-fields-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.ev-fields-section h4 {
    color: var(--accent-yellow);
    margin-bottom: 0.5rem;
}

/* Domain DCV Table */
.domain-dcv-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.domain-dcv-table th,
.domain-dcv-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.domain-dcv-table th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
}

.domain-dcv-table td {
    color: var(--text-primary);
}

.domain-dcv-select {
    width: 100%;
}

/* DCV Info Box */
.dcv-info-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.dcv-info-box h5 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 14px;
}

.dcv-info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dcv-info-box li {
    padding: 0.5rem 0;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.dcv-info-box li:last-child {
    border-bottom: none;
}

.dcv-info-box li strong {
    color: var(--accent-green);
}

/* Review Section */
.review-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.review-section:last-of-type {
    border-bottom: none;
}

.review-section h4 {
    color: var(--accent-green);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-table {
    width: 100%;
    border-collapse: collapse;
}

.review-table th,
.review-table td {
    padding: 0.5rem 0;
    text-align: left;
    vertical-align: top;
}

.review-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13px;
    width: 180px;
}

.review-table td {
    color: var(--text-primary);
    font-size: 14px;
}

/* CSR Preview */
.csr-preview {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 150px;
    overflow-y: auto;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent-green);
    cursor: pointer;
}

.checkbox-label a {
    color: var(--accent-green);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--accent-green);
    font-size: 18px;
}

.modal-body {
    padding: 2rem 1.5rem;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dim) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--bg-primary);
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 30px var(--accent-green-glow);
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.order-details {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: left;
}

.order-details p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.order-details strong {
    color: var(--text-primary);
}

.order-details span {
    color: var(--accent-green);
}

.next-steps {
    font-size: 13px;
    color: var(--text-muted);
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Step Error */
.step-error {
    margin-bottom: 1rem;
}

/* =========================================
   ENHANCED FORM STYLES
   ========================================= */

/* Form Controls */
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-green);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px var(--accent-green-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.code-input {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.5;
}

.code-output {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 11px;
    line-height: 1.4;
    background: var(--bg-primary);
    color: var(--accent-green);
}

.key-output {
    color: var(--accent-yellow);
}

/* Form Groups */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* CSR Label Row */
.csr-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.csr-label-row label {
    margin-bottom: 0;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dim) 100%);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--accent-green-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dim) 100%);
    color: var(--bg-primary);
}

.btn-outline {
    background: transparent;
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.btn-outline:hover {
    background: var(--accent-green-glow);
}

.btn-icon {
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Section Divider */
.section-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0 1.5rem;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.section-divider span {
    padding: 0 1rem;
    color: var(--accent-yellow);
    font-size: 14px;
    font-weight: 600;
}

/* Section Intro */
.section-intro {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 14px;
}

/* Info Card */
.info-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.info-card h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 14px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-item {
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.info-item strong {
    display: block;
    color: var(--accent-green);
    margin-bottom: 0.25rem;
    font-size: 13px;
}

.info-item p {
    color: var(--text-muted);
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
}

/* Domain List */
.domain-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.domain-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.domain-name {
    flex: 1;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: var(--accent-green);
}

.domain-item .form-control {
    width: 180px;
    flex-shrink: 0;
}

/* Review Grid */
.review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.review-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.review-card h4 {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.review-item:last-child {
    border-bottom: none;
}

.review-label {
    color: var(--text-muted);
    font-size: 12px;
}

.review-value {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    text-align: right;
}

.csr-review {
    grid-column: 1 / -1;
}

/* Terms Group */
.terms-group {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent-green);
    cursor: pointer;
}

.checkbox-label a {
    color: var(--accent-green);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Navigation Spacer */
.nav-spacer {
    flex: 1;
}

/* =========================================
   CSR GENERATOR MODAL STYLES
   ========================================= */

.modal-lg {
    max-width: 700px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--accent-green);
    font-size: 18px;
    margin: 0;
}

.form-actions {
    text-align: center;
    margin-top: 1.5rem;
}

.output-section {
    margin-bottom: 1.5rem;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.output-header label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.output-actions {
    display: flex;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    margin-left: 8px;
}

.badge-danger {
    background: var(--accent-red);
    color: white;
}

.key-warning {
    margin-top: 0.75rem;
}

/* Success Modal Enhancements */
.text-center {
    text-align: center;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-muted);
}

.detail-value {
    font-weight: 500;
}

.detail-value.highlight {
    color: var(--accent-green);
    font-family: 'Monaco', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .header { padding: 0 1rem; }
    .sidebar { display: none; }
    .content { padding: 1.5rem; }
    .form-grid { grid-template-columns: 1fr; }
    
    /* Wizard responsive */
    .wizard-progress {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .progress-connector {
        display: none;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .col-md-4, .col-md-6, .col-md-8 {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .review-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .domain-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .domain-item .form-control {
        width: 100%;
    }
    
    .modal-lg {
        max-width: 95%;
    }
    
    .csr-label-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

