/* === Sidebar === */
.sidebar-logo {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
}

.sidebar-logo .logo-text {
    font-size: 16px;
    font-weight: 700;
}

.sidebar-logo .logo-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-nav {
    padding: 12px;
    flex: 1;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 13px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-bg);
    color: var(--accent);
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* === Header === */
.header-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left h2 {
    font-size: 16px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.header-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

/* === Toast === */
#toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-success { background: #166534; color: #bbf7d0; }
.toast-error { background: #991b1b; color: #fecaca; }
.toast-warning { background: #92400e; color: #fde68a; }
.toast-info { background: #1e3a5f; color: #bfdbfe; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.toast.removing {
    animation: slideOut 0.3s ease forwards;
}

/* === Modal === */
#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
}

#modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 480px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* === Table === */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.data-table tr:hover td {
    background: var(--bg-hover);
}

.data-table .actions {
    display: flex;
    gap: 4px;
}

/* === Progress bar === */
.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

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

.progress-bar .fill.green { background: var(--success); }
.progress-bar .fill.yellow { background: var(--warning); }
.progress-bar .fill.red { background: var(--danger); }
.progress-bar .fill.blue { background: var(--accent); }

/* === DNS result === */
.dns-result {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 16px;
}

.dns-record {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.dns-record:last-child { border-bottom: none; }

.dns-record .type {
    font-weight: 600;
    font-size: 12px;
    min-width: 60px;
    color: var(--accent);
}

/* === Deployment form === */
.deploy-form {
    max-width: 600px;
}

.env-vars-editor {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.env-var-row {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.env-var-row:last-child { border-bottom: none; }

.env-var-row input {
    flex: 1;
    padding: 6px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: monospace;
}

.env-var-row input:focus {
    outline: none;
    border-color: var(--accent);
}
