:root {
    --nx-primary: #3b82f6;
    --nx-success: #10b981;
    --nx-bg: #f8fafc;
    --nx-border: #e2e8f0;
    --nx-text: #1e293b;
    --nx-muted: #64748b;
}

.nexon-panel {
    direction: rtl;
    font-family: Tahoma, sans-serif;
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    max-width: 1200px;
    margin: 20px auto;
}

.nexon-panel-shell {
    display: grid;
    grid-template-columns: 260px 1fr; /* ستون راست ثابت، چپ متغیر */
    min-height: 500px;
}

/* ستون راست (منو) */
.nexon-panel-sidebar {
    background: #f1f5f9;
    padding: 20px;
    border-left: 1px solid var(--nx-border);
}

.nexon-sidebar-title {
    font-size: 0.8rem;
    color: var(--nx-muted);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.nexon-nav-item {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 8px;
    border: none;
    background: transparent;
    border-radius: 10px;
    text-align: right;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--nx-text);
    transition: 0.2s;
}

.nexon-nav-item:hover { background: #e2e8f0; }
.nexon-nav-item.nexon-nav-active {
    background: var(--nx-primary);
    color: #fff;
    font-weight: bold;
}

/* ستون چپ (محتوا) */
.nexon-panel-main { padding: 25px; background: #fff; }

/* کارت‌ها و المان‌های افزونه قبلی شما */
.editor-card {
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.editor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--nx-bg);
    padding-bottom: 10px;
}

.editor-card-title { font-size: 1.2rem; margin:0; color: var(--nx-text); }
.editor-badge {
    background: #dcfce7; color: #166534;
    padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: bold;
}

.editor-btn {
    padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer;
    font-weight: bold; width: 100%; transition: 0.2s;
}
.editor-btn-primary { background: var(--nx-primary); color: #fff; }
.editor-btn-success { background: var(--nx-success); color: #fff; }

.editor-input-control {
    width: 100%; padding: 10px; border: 1px solid var(--nx-border);
    border-radius: 8px; margin-top: 5px; background: var(--nx-bg);
}

.nexon-day-pill {
    padding: 6px 14px; border: 1px solid var(--nx-border);
    border-radius: 20px; background: #fff; cursor: pointer;
}
.nexon-day-pill.nexon-day-selected {
    background: var(--nx-primary); color: #fff; border-color: var(--nx-primary);
}

/* Modal System */
.nexon-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.nexon-modal[aria-hidden="false"] { display: flex; }
.nexon-modal-backdrop {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
}
.nexon-modal-dialog {
    position: relative; background: #fff; border-radius: 20px;
    width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; padding: 25px;
}
.nexon-modal-lg { max-width: 900px; }

/* Responsive */
@media (max-width: 768px) {
    .nexon-panel-shell { grid-template-columns: 1fr; }
    .nexon-panel-sidebar { border-left: none; border-bottom: 1px solid var(--nx-border);
    /* =========================
   Roadmap Feature
========================= */

.nexon-roadmap-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.nexon-btn-secondary {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}

.nexon-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.nexon-modal.is-open {
    display: flex;
}

.nexon-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 12, 0.72);
    backdrop-filter: blur(10px);
}

.nexon-modal-dialog {
    position: relative;
    z-index: 2;
    width: min(100%, 860px);
    max-height: 90vh;
    overflow: auto;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(13,18,42,.98), rgba(8,12,26,.98));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.nexon-modal-lg {
    width: min(100%, 1180px);
}

.nexon-modal-header,
.nexon-modal-footer {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nexon-modal-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.nexon-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nexon-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 20px;
}

.nexon-modal-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 24px;
}

.nexon-modal-body {
    padding: 22px;
}

.nexon-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 16px;
}

.nexon-form-group {
    margin-bottom: 18px;
}

.nexon-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #d7def7;
    font-size: 14px;
    font-weight: 700;
}

.nexon-form-group input,
.nexon-form-group textarea,
.nexon-form-group select {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #fff;
    padding: 14px 16px;
    outline: none;
}

.nexon-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.nexon-select-wrapper {
    position: relative;
}

.nexon-roadmap-weeks-wrapper {
    margin-top: 10px;
}

.nexon-week-block {
    margin-bottom: 22px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.nexon-week-header {
    margin-bottom: 14px;
}

.nexon-week-label {
    display: inline-flex;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(0,229,255,0.12);
    color: #8decff;
    font-weight: 800;
    font-size: 13px;
}

.nexon-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(140px,1fr));
    gap: 14px;
    overflow-x: auto;
}

.nexon-day-cell {
    min-width: 140px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.nexon-day-header {
    margin-bottom: 8px;
}

.nexon-day-name {
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}

.nexon-day-cell textarea {
    min-height: 110px;
    border-radius: 14px;
}

.nexon-roadmap-metrics {
    margin-top: 24px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.nexon-roadmap-metrics h4,
.nexon-roadmap-weeks-wrapper h4 {
    margin: 0 0 8px;
    color: #fff;
}

.nexon-muted {
    color: rgba(231,238,255,0.7);
    font-size: 13px;
}

.nexon-inline-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nexon-inline-inputs input {
    max-width: 120px;
}

.nexon-inline-sep {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.nexon-activities-placeholder {
    margin-top: 20px;
}

.nexon-activities-sample {
    margin-top: 16px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.nexon-days-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 18px;
}

.nexon-day-pill {
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all .2s ease;
}

.nexon-day-pill:hover,
.nexon-day-pill.nexon-day-selected {
    background: linear-gradient(135deg, #7c3cff, #00e5ff);
    color: #08101f;
    border-color: transparent;
}

.nexon-client-roadmap-view {
    margin-top: 10px;
}

.nexon-roadmap-card {
    padding: 22px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(0,229,255,0.14), transparent 45%),
        radial-gradient(circle at bottom left, rgba(124,60,255,0.18), transparent 45%),
        rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
}

.nexon-roadmap-card h4 {
    margin: 0 0 10px;
    color: #fff;
}

.nexon-roadmap-card p {
    margin: 0 0 10px;
    color: rgba(235,240,255,0.82);
    line-height: 1.8;
}

@media (max-width: 992px) {
    .nexon-form-row {
        grid-template-columns: 1fr;
    }

    .nexon-week-grid {
        grid-template-columns: repeat(7, minmax(180px,1fr));
    }
}

@media (max-width: 768px) {
    .nexon-modal {
        padding: 14px;
    }

    .nexon-modal-header,
    .nexon-modal-body,
    .nexon-modal-footer {
        padding: 16px;
    }

    .nexon-inline-inputs {
        flex-wrap: wrap;
    }
}

    }
}
