:root {
    --bg-dark: #0d0d0d;
    --card-bg: rgba(20, 20, 20, 0.95);
    --primary: #f6821f;
    /* CF Orange */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border: rgba(255, 255, 255, 0.1);
    --success: #00c853;
    --error: #ff3d00;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 10% 20%, rgba(246, 130, 31, 0.1) 0%, transparent 40%);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.brand {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.account-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.account-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.account-item.active {
    background: rgba(246, 130, 31, 0.15);
    color: var(--primary);
    border: 1px solid rgba(246, 130, 31, 0.3);
}

.btn-add-account {
    margin-top: 20px;
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-muted);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-add-account:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.selected-account-info h2 {
    margin: 0;
    font-size: 1.5rem;
}

.badge {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-muted);
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Automation Section */
.automation-section h3 {
    margin-top: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: white;
    font-family: inherit;
    box-sizing: border-box;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Toggles Grid */
.toggles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    padding: 10px;
    border-radius: 6px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Button */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #ff5100 100%);
    border: none;
    color: white;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Logs */
.log-window {
    margin-top: 20px;
    height: 150px;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    overflow-y: auto;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
}

.log-entry {
    margin-bottom: 4px;
    border-left: 2px solid transparent;
    padding-left: 5px;
}

.log-entry.system {
    color: #888;
    border-color: #888;
}

.log-entry.success {
    color: var(--success);
    border-color: var(--success);
}

.log-entry.error {
    color: var(--error);
    border-color: var(--error);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    position: relative;
    border: 1px solid var(--border);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Data Table */
.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
}

/* API Status Styles */
.api-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.api-status.connected {
    color: #00c853;
}

.btn-settings {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 5px;
}

.btn-settings:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Domain Checker Styles */
.domain-checker-section {
    margin-bottom: 30px;
}

.domain-checker-section h3 {
    margin-bottom: 15px;
    color: var(--text);
}

.checker-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.input-row {
    display: flex;
    gap: 10px;
}

.input-row input {
    flex: 1;
}

.input-row select {
    width: 100px;
}

.search-options,
.range-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-options label,
.range-options label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.domain-results {
    max-height: 300px;
    overflow-y: auto;
}

.domain-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    margin-bottom: 8px;
}

.domain-result-item.available {
    background: rgba(0, 200, 83, 0.1);
    border-left: 3px solid #00c853;
}

.domain-result-item.unavailable {
    background: rgba(255, 61, 0, 0.1);
    border-left: 3px solid #ff3d00;
}

.domain-result-item .domain-name {
    font-weight: 600;
}

.domain-result-item .status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-use {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-use:hover {
    background: #ff9800;
}

/* Domain Wizard */
.domain-wizard {
    margin-bottom: 30px;
}

.domain-wizard h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.wizard-step h4 {
    margin-bottom: 15px;
    color: var(--text);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 10px;
}

.btn-secondary:hover {
    border-color: var(--text);
    color: var(--text);
}

.automation-log {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.85rem;
}

.automation-log .log-line {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.automation-log .log-line.success {
    color: #00c853;
}

.automation-log .log-line.error {
    color: #ff3d00;
}

.automation-log .log-line.pending {
    color: #ffc107;
}

/* NiceNIC Domain List */
.nicenic-domain-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 5px;
}

.nicenic-domain-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.15s;
    gap: 8px;
}

.nicenic-domain-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nicenic-domain-item input[type="checkbox"] {
    accent-color: var(--primary);
}

.nicenic-domain-item .domain-name {
    flex: 1;
    font-size: 0.85rem;
}

.nicenic-domain-item .domain-status {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(0, 200, 83, 0.2);
    color: #00c853;
}

.btn-redirect {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #ff9800 100%);
    color: #000;
    border: none;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 8px;
}

.btn-redirect:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(246, 130, 31, 0.3);
}

.btn-redirect:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Improved Domain Checker */
.domain-checker-card {
    padding: 25px;
}

.checker-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.checker-icon {
    font-size: 1.5rem;
}

.checker-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-with-icon {
    flex: 1;
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-with-icon input {
    width: 100%;
    padding-left: 40px;
    padding-right: 15px;
    padding-top: 12px;
    padding-bottom: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1rem;
}

.input-with-icon input:focus {
    border-color: var(--primary);
    outline: none;
}

.tld-select {
    padding: 12px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1rem;
    min-width: 100px;
    cursor: pointer;
}

.tld-select:focus {
    border-color: var(--primary);
    outline: none;
}

.mode-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.mode-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mode-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 10px 16px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

.mode-btn.active {
    background: rgba(246, 130, 31, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}

.range-options {
    display: none;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    flex-wrap: wrap;
}

.range-options.show {
    display: flex;
}

.range-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.range-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.range-group input {
    width: 80px;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    text-align: center;
}

.btn-search {
    padding: 14px 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, #ff9800 100%);
    border: none;
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(246, 130, 31, 0.4);
}

.btn-search:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Wizard Styles */
.wizard-card {
    padding: 25px;
}

.wizard-step {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wizard-step:last-of-type {
    border-bottom: none;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.selected-domain-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    background: linear-gradient(135deg, rgba(246, 130, 31, 0.15) 0%, rgba(255, 152, 0, 0.1) 100%);
    border: 1px solid rgba(246, 130, 31, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

.selected-domain-box i {
    font-size: 1.4rem;
}

/* File Upload */
.file-upload-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    text-align: center;
}

.file-upload-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.file-upload-item .subdomain-label {
    min-width: 150px;
    font-weight: 500;
}

.file-upload-item input[type="file"] {
    flex: 1;
}

.file-upload-item .upload-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-upload-item .upload-status.done {
    color: #00c853;
}

/* Wizard Actions */
.wizard-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-wizard-start {
    flex: 1;
    padding: 14px 24px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, #ff9800 100%);
    border: none;
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-wizard-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(246, 130, 31, 0.4);
}

.btn-wizard-cancel {
    padding: 14px 24px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-wizard-cancel:hover {
    border-color: #ff3d00;
    color: #ff3d00;
}

/* Fix input-with-icon layout */
.form-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.input-with-icon {
    flex: 1;
    position: relative;
    min-width: 0;
}

.tld-select {
    flex-shrink: 0;
    width: auto;
    min-width: 90px;
}