/* ========================================================================
   NemoNet - iOS/macOS Style Design System
   Premium, Minimal, Modern
   ======================================================================== */

/* ========================================================================
   1. Design Tokens (iOS Style)
   ======================================================================== */
:root {
    /* iOS Colors */
    --nm-blue: #007AFF;
    --nm-indigo: #5856D6;
    --nm-purple: #AF52DE;
    --nm-pink: #FF2D55;
    --nm-red: #FF3B30;
    --nm-orange: #FF9500;
    --nm-yellow: #FFCC00;
    --nm-green: #34C759;
    --nm-teal: #5AC8FA;
    --nm-cyan: #32ADE6;
    
    /* iOS Grays */
    --nm-gray-1: #8E8E93;
    --nm-gray-2: #AEAEB2;
    --nm-gray-3: #C7C7CC;
    --nm-gray-4: #D1D1D6;
    --nm-gray-5: #E5E5EA;
    --nm-gray-6: #F2F2F7;
    
    /* Semantic */
    --nm-bg: #F2F2F7;
    --nm-card: rgba(255, 255, 255, 0.72);
    --nm-card-solid: #FFFFFF;
    --nm-border: rgba(60, 60, 67, 0.08);
    --nm-separator: rgba(60, 60, 67, 0.12);
    
    --nm-text: #000000;
    --nm-text-secondary: #3C3C43;
    --nm-text-tertiary: #8E8E93;
    
    /* iOS Blur */
    --nm-blur: saturate(180%) blur(20px);
    
    /* iOS Spacing */
    --nm-space-xs: 4px;
    --nm-space-sm: 8px;
    --nm-space-md: 16px;
    --nm-space-lg: 20px;
    --nm-space-xl: 24px;
    
    /* iOS Radius */
    --nm-radius-sm: 10px;
    --nm-radius: 14px;
    --nm-radius-lg: 20px;
    --nm-radius-xl: 28px;
    
    /* iOS Shadows */
    --nm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --nm-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --nm-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* iOS Typography */
   --nm-font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'IranYekanWeb', sans-serif; 
    
    /* iOS Transitions (Spring) */
    --nm-spring: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --nm-spring-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========================================================================
   2. Reset
   ======================================================================== */

.nm-dashboard,
.nm-dashboard *,
.nm-dashboard *::before,
.nm-dashboard *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.nm-dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--nm-bg);
    color: var(--nm-text);
    line-height: 1.47;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

/* ========================================================================
   3. Sidebar (iOS Style)
   ======================================================================== */
.nm-sidebar {
    width: 260px;
    background: var(--nm-card) !important;
    backdrop-filter: var(--nm-blur) !important;
    -webkit-backdrop-filter: var(--nm-blur);
    border-left: 0.5px solid var(--nm-separator);
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--nm-spring);
}

.nm-sidebar-header {
    padding: var(--nm-space-lg);
    border-bottom: 0.5px solid var(--nm-separator);
}

.nm-logo {
    display: flex;
    align-items: center;
    gap: var(--nm-space-md);
    font-size: 17px;
    font-weight: 600;
    color: var(--nm-blue);
    letter-spacing: -0.02em;
}

.nm-sidebar-nav {
    flex: 1;
    padding: var(--nm-space-sm);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nm-nav-item {
    display: flex;
    align-items: center;
    gap: var(--nm-space-md);
    padding: 10px var(--nm-space-md);
    border-radius: var(--nm-radius-sm);
    color: var(--nm-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: all var(--nm-spring-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: right;
    letter-spacing: -0.01em;
}

.nm-nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.nm-nav-item.active {
    background: var(--nm-blue);
    color: white;
    font-weight: 500;
}

.nm-nav-item svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.nm-nav-item.active svg {
    opacity: 1;
}

.nm-nav-item span {
    flex: 1;
}

.nm-nav-cta {
    background: var(--nm-blue);
    color: white;
    margin-top: var(--nm-space-sm);
    font-weight: 500;
}

.nm-nav-cta:hover {
    background: #0066CC;
    color: white;
}

.nm-nav-divider {
    height: 0.5px;
    background: var(--nm-separator);
    margin: var(--nm-space-sm) var(--nm-space-md);
}

.nm-sidebar-footer {
    padding: var(--nm-space-md);
    border-top: 0.5px solid var(--nm-separator);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nm-user-card {
    display: flex;
    align-items: center;
    gap: var(--nm-space-md);
    flex: 1;
}

.nm-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.nm-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nm-user-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.nm-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--nm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nm-user-mobile {
    font-size: 12px;
    color: var(--nm-text-tertiary);
    direction: ltr;
    text-align: right;
}

.nm-logout-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    color: var(--nm-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--nm-spring-fast);
    flex-shrink: 0;
}

.nm-logout-btn:hover {
    background: rgba(255, 59, 48, 0.12);
    color: var(--nm-red);
}

/* ========================================================================
   4. Main Content
   ======================================================================== */
.nm-main {
    flex: 1;
    /*margin-right: 260px !important; */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.nm-header {
    background: var(--nm-card);
    backdrop-filter: var(--nm-blur);
    -webkit-backdrop-filter: var(--nm-blur);
    border-bottom: 0.5px solid var(--nm-separator);
    padding: var(--nm-space-md) var(--nm-space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nm-menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    color: var(--nm-text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.nm-page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--nm-text);
    margin: 0;
    letter-spacing: -0.02em;
}

.nm-header-actions {
    display: flex;
    align-items: center;
    gap: var(--nm-space-md);
}

.nm-date {
    font-size: 13px;
    color: var(--nm-text-tertiary);
    font-weight: 500;
}

.nm-content {
    flex: 1;
    padding: var(--nm-space-xl) !important;
    max-width: 1400px;
    width: 100%;
}

/* ========================================================================
   5. iOS Components
   ======================================================================== */

/* Buttons (iOS Style) */
.nm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--nm-space-sm);
    padding: 10px 20px;
    border-radius: var(--nm-radius-sm);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--nm-spring-fast);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.nm-btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.nm-btn-block {
    width: 100%;
}

.nm-btn-primary {
    background: var(--nm-blue);
    color: white;
}

.nm-btn-primary:hover {
    background: #0066CC;
    transform: scale(0.98);
}

.nm-btn-primary:active {
    transform: scale(0.96);
}

.nm-btn-success {
    background: var(--nm-green);
    color: white;
}

.nm-btn-success:hover {
    background: #30B150;
}

.nm-btn-danger {
    background: var(--nm-red);
    color: white;
}

.nm-btn-danger:hover {
    background: #E6352B;
}

.nm-btn-outline {
    background: transparent;
    color: var(--nm-blue);
    border: 1px solid var(--nm-blue);
    font-family: 'IRANYekanWeb';
}

.nm-btn-outline:hover {
    background: rgba(0, 122, 255, 0.08);
}

.nm-btn-ghost {
    background: transparent;
    color: var(--nm-blue);
}

.nm-btn-ghost:hover {
    background: rgba(0, 122, 255, 0.08);
}

/* Badges (iOS Style) */
.nm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
}

.nm-badge-sm {
    min-width: 16px;
    height: 16px;
    font-size: 11px;
}

.nm-badge-primary {
    background: var(--nm-blue);
    color: white;
}

.nm-badge-success {
    background: var(--nm-green);
    color: white;
}

.nm-badge-warning {
    background: var(--nm-orange);
    color: white;
}

.nm-badge-danger {
    background: var(--nm-red);
    color: white;
}

.nm-badge-info {
    background: var(--nm-teal);
    color: white;
}

/* Alerts (iOS Style) */
.nm-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--nm-space-md);
    padding: var(--nm-space-md);
    border-radius: var(--nm-radius);
    font-size: 14px;
    margin-bottom: var(--nm-space-lg);
    background: var(--nm-card);
    backdrop-filter: var(--nm-blur);
    border: 0.5px solid var(--nm-separator);
}

.nm-alert svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.nm-alert-info {
    color: var(--nm-blue);
}

.nm-alert-success {
    color: var(--nm-green);
}

.nm-alert-warning {
    color: var(--nm-orange);
}

.nm-alert-danger {
    color: var(--nm-red);
}

/* ========================================================================
   6. Welcome Card (iOS Style)
   ======================================================================== */
.nm-welcome {
    background: linear-gradient(135deg, var(--nm-blue) 0%, var(--nm-indigo) 100%);
    border-radius: var(--nm-radius-xl);
    padding: 32px;
    color: white;
    margin-bottom: var(--nm-space-xl);
    box-shadow: 0 12px 32px rgba(0, 122, 255, 0.24);
}

.nm-welcome h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: var(--nm-space-sm);
    letter-spacing: -0.02em;
}

.nm-welcome p {
    font-size: 15px;
    opacity: 0.9;
    margin-bottom: var(--nm-space-lg);
    font-weight: 400;
}

.nm-welcome .nm-btn {
    background: white;
    color: var(--nm-blue);
    font-weight: 600;
}

.nm-welcome .nm-btn:hover {
    background: rgba(255, 255, 255, 0.92);
    transform: scale(0.98);
}

/* ========================================================================
   7. KPI Cards (iOS Style)
   ======================================================================== */
.nm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--nm-space-md);
    margin-bottom: var(--nm-space-xl);
}

.nm-kpi-card {
    background: var(--nm-card);
    backdrop-filter: var(--nm-blur);
    -webkit-backdrop-filter: var(--nm-blur);
    border: 0.5px solid var(--nm-separator);
    border-radius: var(--nm-radius-lg);
    padding: var(--nm-space-lg);
    display: flex;
    align-items: center;
    gap: var(--nm-space-lg);
    transition: all var(--nm-spring);
}

.nm-kpi-card:hover {
    box-shadow: var(--nm-shadow);
    transform: translateY(-2px);
}

.nm-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--nm-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nm-kpi-success {
    background: rgba(52, 199, 89, 0.12);
    color: var(--nm-green);
}

.nm-kpi-warning {
    background: rgba(255, 149, 0, 0.12);
    color: var(--nm-orange);
}

.nm-kpi-info {
    /*background: rgba(0, 122, 255, 0.12);*/
    color: var(--nm-blue);
}

.nm-kpi-info {
    /*flex: 1;*/
}

.nm-kpi-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--nm-text);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.nm-kpi-label {
    display: block;
    font-size: 13px;
    color: var(--nm-text-tertiary);
    margin-top: var(--nm-space-xs);
    font-weight: 500;
}

/* ========================================================================
   8. Sections (iOS Style)
   ======================================================================== */
.nm-section {
    background: var(--nm-card);
    backdrop-filter: var(--nm-blur);
    -webkit-backdrop-filter: var(--nm-blur);
    border: 0.5px solid var(--nm-separator);
    border-radius: var(--nm-radius-lg);
    padding: var(--nm-space-lg);
    margin-bottom: var(--nm-space-lg);
}

.nm-section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--nm-text);
    margin-bottom: var(--nm-space-lg);
    letter-spacing: -0.02em;
}

/* Quick Actions */
.nm-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--nm-space-md);
}

.nm-quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--nm-space-md);
    padding: var(--nm-space-lg);
   /* background: rgba(0, 0, 0, 0.02); */
    border-radius: var(--nm-radius);
    text-decoration: none;
    color: var(--nm-text-secondary);
    transition: all var(--nm-spring);
}

.nm-quick-card:hover {
    background: rgba(0, 122, 255, 0.08);
    color: var(--nm-blue);
    transform: scale(1.02);
}

.nm-quick-card svg {
    width: 28px;
    height: 28px;
}

.nm-quick-card span {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}
a#result {
    background: lab(56.9303% 76.8162 -8.07021);
    color: aliceblue;
}

a#interpret {
    background: lab(70.5521% -66.5147 45.8073);
    color: aliceblue;
}

a#payment {
    background: lab(72.7183% 31.8672 97.9407); 
    color: aliceblue;
    
}

a#request {
    background: lab(52.0183% 66.11 -78.2316);
    color: aliceblue;
    
}


/* ========================================================================
   9. Cards Grid (iOS Style)
   ======================================================================== */
.nm-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--nm-space-md);
}

.nm-card {
    background: var(--nm-card);
    backdrop-filter: var(--nm-blur);
    -webkit-backdrop-filter: var(--nm-blur);
    border: 0.5px solid var(--nm-separator);
    border-radius: var(--nm-radius-lg);
    padding: var(--nm-space-lg);
    transition: all var(--nm-spring);
}

.nm-card:hover {
    box-shadow: var(--nm-shadow);
}

.nm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--nm-space-md);
    color: var(--nm-blue);
}

.nm-card-date {
    font-size: 12px;
    color: var(--nm-text-tertiary);
    font-weight: 500;
}

.nm-card h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--nm-text);
    margin-bottom: var(--nm-space-sm);
    letter-spacing: -0.01em;
}

.nm-card p {
    font-size: 14px;
    color: var(--nm-text-secondary);
    margin-bottom: var(--nm-space-md);
    line-height: 1.5;
}

.nm-amount {
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--nm-radius);
    padding: var(--nm-space-md);
    text-align: center;
    margin-bottom: var(--nm-space-md);
}

.nm-amount-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--nm-blue);
    letter-spacing: -0.02em;
}

.nm-amount-unit {
    display: block;
    font-size: 13px;
    color: var(--nm-text-tertiary);
    margin-top: var(--nm-space-xs);
    font-weight: 500;
}

/* ========================================================================
   10. Articles (iOS Style)
   ======================================================================== */
.nm-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--nm-space-md);
}

.nm-articles-full {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.nm-article-card {
    background: var(--nm-card);
    backdrop-filter: var(--nm-blur);
    border: 0.5px solid var(--nm-separator);
    border-radius: var(--nm-radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all var(--nm-spring);
    display: flex;
    flex-direction: column;
}

.nm-article-card:hover {
    box-shadow: var(--nm-shadow);
    transform: translateY(-2px);
}

.nm-article-thumb {
    width: 100%;
    height: 160px;
    background: rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.nm-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--nm-spring);
}

.nm-article-card:hover .nm-article-thumb img {
    transform: scale(1.05);
}

.nm-article-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nm-text-tertiary);
}

.nm-article-body {
    padding: var(--nm-space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nm-article-date {
    font-size: 12px;
    color: var(--nm-text-tertiary);
    margin-bottom: var(--nm-space-sm);
    font-weight: 500;
}

.nm-article-body h3,
.nm-article-body h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--nm-text);
    margin-bottom: var(--nm-space-sm);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.nm-article-body p {
    font-size: 14px;
    color: var(--nm-text-secondary);
    line-height: 1.5;
    margin-bottom: var(--nm-space-md);
    flex: 1;
}

.nm-read-more {
    display: inline-flex;
    align-items: center;
    gap: var(--nm-space-xs);
    font-size: 14px;
    font-weight: 500;
    color: var(--nm-blue);
    margin-top: auto;
}

/* ========================================================================
   11. Empty State (iOS Style)
   ======================================================================== */
.nm-empty {
    text-align: center;
    padding: 48px var(--nm-space-xl);
    color: var(--nm-text-tertiary);
}

.nm-empty svg {
    margin-bottom: var(--nm-space-lg);
    opacity: 0.4;
}

.nm-empty h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--nm-text);
    margin-bottom: var(--nm-space-sm);
    letter-spacing: -0.02em;
}

.nm-empty p {
    font-size: 15px;
}

/* ========================================================================
   12. AI Chat (iOS Style)
   ======================================================================== */
.nm-ai-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--nm-space-md);
}

.nm-ai-chat {
    background: var(--nm-card);
    backdrop-filter: var(--nm-blur);
    border: 0.5px solid var(--nm-separator);
    border-radius: var(--nm-radius-lg);
    display: flex;
    flex-direction: column;
    height: 600px;
    overflow: hidden;
}

.nm-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--nm-space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--nm-space-md);
}

.nm-ai-msg {
    display: flex;
    gap: var(--nm-space-md);
    max-width: 80%;
}

.nm-ai-msg-assistant {
    align-self: flex-start;
}

.nm-ai-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.nm-ai-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--nm-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nm-ai-msg-user .nm-ai-avatar {
    background: rgba(0, 0, 0, 0.08);
    color: var(--nm-text-secondary);
}

.nm-ai-bubble {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 18px;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.47;
}

.nm-ai-msg-user .nm-ai-bubble {
    background: var(--nm-blue);
    color: white;
}

.nm-ai-bubble p {
    margin: 0;
}

.nm-ai-form {
    border-top: 0.5px solid var(--nm-separator);
    padding: var(--nm-space-md);
    background: rgba(0, 0, 0, 0.02);
}

.nm-ai-form textarea {
    width: 100%;
    border: 0.5px solid var(--nm-separator);
    border-radius: var(--nm-radius);
    padding: var(--nm-space-md);
    font-size: 15px;
    resize: none;
    background: var(--nm-card-solid);
    color: var(--nm-text);
}

.nm-ai-form textarea:focus {
    outline: none;
    border-color: var(--nm-blue);
}

.nm-ai-actions {
    display: flex;
    gap: var(--nm-space-sm);
    margin-top: var(--nm-space-md);
}

.nm-ai-upload {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    color: var(--nm-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--nm-spring-fast);
}

.nm-ai-upload:hover {
    background: rgba(0, 122, 255, 0.12);
    color: var(--nm-blue);
}

.nm-ai-file-preview {
    display: flex;
    align-items: center;
    gap: var(--nm-space-sm);
    margin-top: var(--nm-space-sm);
    padding: var(--nm-space-sm) var(--nm-space-md);
    background: var(--nm-card-solid);
    border-radius: var(--nm-radius-sm);
    font-size: 13px;
}

.nm-ai-file-preview button {
    background: none;
    border: none;
    color: var(--nm-red);
    cursor: pointer;
    padding: 4px;
}

/* ========================================================================
   13. Tickets (iOS Style)
   ======================================================================== */
.nm-tickets-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--nm-space-lg);
}

.nm-ticket-form {
    background: var(--nm-card);
    backdrop-filter: var(--nm-blur);
    border: 0.5px solid var(--nm-separator);
    border-radius: var(--nm-radius-lg);
    padding: var(--nm-space-lg);
    margin-bottom: var(--nm-space-lg);
}

.nm-tickets-list {
    display: flex;
    flex-direction: column;
    gap: var(--nm-space-md);
}

.nm-ticket {
    background: var(--nm-card);
    backdrop-filter: var(--nm-blur);
    border: 0.5px solid var(--nm-separator);
    border-radius: var(--nm-radius-lg);
    overflow: hidden;
}

.nm-ticket-header {
    padding: var(--nm-space-md) var(--nm-space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background var(--nm-spring-fast);
}

.nm-ticket-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.nm-ticket-info {
    display: flex;
    align-items: center;
    gap: var(--nm-space-md);
    flex: 1;
}

.nm-ticket-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.nm-status-open { background: var(--nm-green); }
.nm-status-answered { background: var(--nm-blue); }
.nm-status-closed { background: var(--nm-gray-3); }

.nm-ticket-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--nm-text);
    margin: 0;
}

.nm-ticket-meta {
    display: flex;
    align-items: center;
    gap: var(--nm-space-md);
    font-size: 13px;
    color: var(--nm-text-tertiary);
}

.nm-ticket-priority {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.nm-priority-low { background: rgba(52, 199, 89, 0.12); color: var(--nm-green); }
.nm-priority-normal { background: rgba(0, 122, 255, 0.12); color: var(--nm-blue); }
.nm-priority-high { background: rgba(255, 149, 0, 0.12); color: var(--nm-orange); }
.nm-priority-urgent { background: rgba(255, 59, 48, 0.12); color: var(--nm-red); }

.nm-ticket-body {
    display: none;
    padding: 0 var(--nm-space-lg) var(--nm-space-lg);
    border-top: 0.5px solid var(--nm-separator);
}

.nm-ticket.expanded .nm-ticket-body {
    display: block;
}

.nm-ticket.expanded .nm-ticket-header svg {
    transform: rotate(180deg);
}

.nm-ticket-thread {
    margin: var(--nm-space-lg) 0;
    display: flex;
    flex-direction: column;
    gap: var(--nm-space-md);
}

.nm-ticket-reply {
    padding: var(--nm-space-md);
    border-radius: var(--nm-radius);
    font-size: 14px;
}

.nm-reply-user {
    background: rgba(0, 0, 0, 0.02);
}

.nm-reply-admin {
    background: rgba(0, 122, 255, 0.08);
}

.nm-reply-header {
    display: flex;
    align-items: center;
    gap: var(--nm-space-sm);
    margin-bottom: var(--nm-space-sm);
    font-size: 13px;
}

.nm-reply-date {
    color: var(--nm-text-tertiary);
    margin-right: auto;
}

.nm-reply-body {
    line-height: 1.5;
    color: var(--nm-text-secondary);
}

.nm-ticket-reply-form textarea {
    width: 100%;
    border: 0.5px solid var(--nm-separator);
    border-radius: var(--nm-radius);
    padding: var(--nm-space-md);
    font-size: 14px;
    resize: vertical;
    margin-bottom: var(--nm-space-md);
    background: var(--nm-card-solid);
    font-family:'IRANYekanWeb';
}

.nm-ticket-reply-form textarea:focus {
    outline: none;
    border-color: var(--nm-blue);
}

.nm-reply-actions {
    display: flex;
    gap: var(--nm-space-sm);
}

.nm-ticket-closed {
    display: flex;
    align-items: center;
    gap: var(--nm-space-sm);
    padding: var(--nm-space-md);
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--nm-radius);
    color: var(--nm-text-tertiary);
    font-size: 14px;
    margin-top: var(--nm-space-md);
}

/* ========================================================================
   14. Forms (iOS Style)
   ======================================================================== */
.nm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--nm-space-md);
    margin-bottom: var(--nm-space-md);
}

.nm-form-field {
    margin-bottom: var(--nm-space-md);
}

.nm-form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--nm-text);
    margin-bottom: var(--nm-space-sm);
}

.nm-form-field input,
.nm-form-field select,
.nm-form-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 0.5px solid var(--nm-separator);
    border-radius: var(--nm-radius-sm);
    font-size: 15px;
    background: var(--nm-card-solid);
    color: var(--nm-text);
    transition: all var(--nm-spring-fast);
    font-family: 'IRANYekanWeb';
}

.nm-form-field input:focus,
.nm-form-field select:focus,
.nm-form-field textarea:focus {
    outline: none;
    border-color: var(--nm-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.nm-form-field textarea {
    resize: vertical;
}

.nm-form-field input:disabled {
    background: rgba(0, 0, 0, 0.02);
    color: var(--nm-text-tertiary);
    cursor: not-allowed;
}

.nm-form-hint {
    font-size: 13px;
    color: var(--nm-text-tertiary);
    margin-top: var(--nm-space-xs);
}

.nm-form-actions {
    display: flex;
    gap: var(--nm-space-md);
    margin-top: var(--nm-space-lg);
}

/* ========================================================================
   15. Profile (iOS Style)
   ======================================================================== */
.nm-profile-form {
    max-width: 800px;
}

.nm-profile-avatar-section {
    background: var(--nm-card);
    backdrop-filter: var(--nm-blur);
    border: 0.5px solid var(--nm-separator);
    border-radius: var(--nm-radius-lg);
    padding: var(--nm-space-xl);
    margin-bottom: var(--nm-space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--nm-space-md);
}

.nm-avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.nm-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nm-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity var(--nm-spring-fast);
}

.nm-avatar-wrapper:hover .nm-avatar-overlay {
    opacity: 1;
}

.nm-profile-section {
    background: var(--nm-card);
    backdrop-filter: var(--nm-blur);
    border: 0.5px solid var(--nm-separator);
    border-radius: var(--nm-radius-lg);
    padding: var(--nm-space-lg);
    margin-bottom: var(--nm-space-lg);
}

.nm-profile-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--nm-text);
    margin-bottom: var(--nm-space-lg);
    padding-bottom: var(--nm-space-md);
    border-bottom: 0.5px solid var(--nm-separator);
    letter-spacing: -0.02em;
}

/* ========================================================================
   16. Overlay & Toast (iOS Style)
   ======================================================================== */
.nm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 99;
}

.nm-toast-container {
    position: fixed;
    bottom: var(--nm-space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--nm-space-sm);
    pointer-events: none;
}

.nm-toast {
    background: var(--nm-card);
    backdrop-filter: var(--nm-blur);
    -webkit-backdrop-filter: var(--nm-blur);
    border: 0.5px solid var(--nm-separator);
    border-radius: 14px;
    padding: 12px 20px;
    box-shadow: var(--nm-shadow-lg);
    font-size: 15px;
    font-weight: 500;
    color: var(--nm-text);
    display: flex;
    align-items: center;
    gap: var(--nm-space-md);
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    animation: nmSlideUp 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition: opacity 0.3s ease-out;
}

.nm-toast::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.nm-toast-success::before {
    background: var(--nm-green);
}

.nm-toast-error::before {
    background: var(--nm-red);
}

.nm-toast-info::before {
    background: var(--nm-blue);
}

@keyframes nmSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================================================
   17. Responsive (iOS Adaptive)
   ======================================================================== */
@media (max-width: 1024px) {
    .nm-sidebar {
        transform: translateX(100%);
    }

    .nm-sidebar.open {
        transform: translateX(0);
    }

    .nm-main {
        margin-right: 0;
    }

    .nm-menu-toggle {
        display: flex;
    }

    .nm-overlay.active {
        display: block;
    }

    .nm-content {
        padding: var(--nm-space-lg);
    }
}

@media (max-width: 768px) {
    .nm-header {
        padding: var(--nm-space-md);
    }

    .nm-page-title {
        font-size: 22px;
    }

    .nm-content {
        padding: var(--nm-space-md);
    }

    .nm-welcome {
        padding: var(--nm-space-lg);
    }

    .nm-welcome h2 {
        font-size: 22px;
    }

    .nm-kpi-grid {
        grid-template-columns: 1fr;
    }

    .nm-quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nm-cards-grid,
    .nm-articles-grid {
        grid-template-columns: 1fr;
    }

    .nm-form-grid {
        grid-template-columns: 1fr;
    }

    .nm-ai-chat {
        height: 500px;
    }

    .nm-ai-msg {
        max-width: 90%;
    }

    .nm-form-actions {
        flex-direction: column;
    }

    .nm-form-actions .nm-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nm-quick-grid {
        grid-template-columns: 1fr;
    }

    .nm-ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--nm-space-sm);
    }

    .nm-ticket-meta {
        width: 100%;
        justify-content: space-between;
    }
}
/* ========================================================================
   MOBILE FIX PACK — NemoNet Dashboard
   Safe responsive overrides
   ======================================================================== */

/* جلوگیری از اسکرول افقی کل داشبورد */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.nm-dashboard {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
.nm-dashboard *, .nm-dashboard *::before, .nm-dashboard *::after{
    font-family:'IRANYekanWeb';
}

/* تمام فرزندان نباید از عرض والد خارج شوند */
.nm-dashboard *,
.nm-dashboard *::before,
.nm-dashboard *::after {
    max-width: 100%;
}

/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 1024px) {

    .nm-main {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-right: 0 !important;
    }

    .nm-header {
        width: 100%;
        min-width: 0;
    }

    .nm-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .nm-sidebar {
        width: min(86vw, 320px);
        max-width: 320px;
    }

    .nm-overlay {
        width: 100vw;
        height: 100vh;
    }
}


/* =========================================================
   MOBILE — 768px
   ========================================================= */

@media (max-width: 768px) {

    /* ---------- Base ---------- */

    .nm-dashboard {
        display: block;
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .nm-main {
        width: 100%;
        min-width: 0;
    }

    /* ---------- Header ---------- */

    .nm-header {
        min-height: 64px;
        padding: 10px 14px;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .nm-menu-toggle {
        flex: 0 0 36px;
    }

    .nm-page-title {
        min-width: 0;
        flex: 1;
        font-size: 20px;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nm-header-actions {
        flex: 0 0 auto;
        gap: 6px;
        min-width: 0;
    }

    .nm-date {
        display: none;
    }

    /* ---------- Content ---------- */

    .nm-content {
        padding: 14px !important;
        width: 100%;
        min-width: 0;
    }

    /* ---------- Welcome ---------- */

    .nm-welcome {
        width: 100%;
        padding: 20px;
        border-radius: 20px;
        overflow: hidden;
    }

    .nm-welcome h2 {
        font-size: 21px;
        line-height: 1.5;
        word-break: break-word;
    }

    .nm-welcome p {
        font-size: 14px;
        line-height: 1.8;
        word-break: break-word;
    }

    .nm-welcome .nm-btn {
        width: 100%;
        max-width: 100%;
    }

    /* ---------- KPI ---------- */

    .nm-kpi-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
    }

    .nm-kpi-card {
        min-width: 0;
        padding: 14px;
        gap: 10px;
        border-radius: 16px;
    }

    .nm-kpi-icon {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .nm-kpi-value {
        font-size: 24px;
        word-break: break-word;
    }

    .nm-kpi-label {
        font-size: 12px;
        line-height: 1.5;
        word-break: break-word;
    }

    /* ---------- Sections ---------- */

    .nm-section {
        width: 100%;
        min-width: 0;
        padding: 16px;
        border-radius: 18px;
        overflow: hidden;
    }

    .nm-section-title {
        font-size: 18px;
        line-height: 1.5;
        word-break: break-word;
    }

    /* ---------- Quick Actions ---------- */

    .nm-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .nm-quick-card {
        min-width: 0;
        padding: 14px 8px;
    }

    .nm-quick-card span {
        font-size: 13px;
        line-height: 1.5;
        word-break: break-word;
    }

    /* ---------- Cards ---------- */

    .nm-cards-grid,
    .nm-articles-grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .nm-card,
    .nm-article-card {
        min-width: 0;
        width: 100%;
    }

    .nm-card h4,
    .nm-card p,
    .nm-article-body h3,
    .nm-article-body h4,
    .nm-article-body p {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* ---------- Buttons ---------- */

    .nm-btn {
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    /* ---------- Forms ---------- */

    .nm-form-grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .nm-form-field {
        width: 100%;
        min-width: 0;
    }

    .nm-form-field input,
    .nm-form-field select,
    .nm-form-field textarea {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .nm-form-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .nm-form-actions .nm-btn {
        width: 100%;
    }

    /* ---------- AI Chat ---------- */

    .nm-ai-chat {
        width: 100%;
        max-width: 100%;
        height: min(70vh, 560px);
        min-height: 420px;
    }

    .nm-ai-messages {
        padding: 14px;
    }

    .nm-ai-msg {
        width: 100%;
        max-width: 94%;
        min-width: 0;
    }

    .nm-ai-bubble {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .nm-ai-form {
        padding: 10px;
    }

    .nm-ai-actions {
        flex-wrap: wrap;
    }

    /* ---------- Tickets ---------- */

    .nm-ticket {
        width: 100%;
        min-width: 0;
    }

    .nm-ticket-header {
        padding: 14px;
        gap: 10px;
    }

    .nm-ticket-info {
        width: 100%;
        min-width: 0;
    }

    .nm-ticket-info h4 {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .nm-ticket-meta {
        flex-wrap: wrap;
        gap: 8px;
        min-width: 0;
    }

    .nm-ticket-body {
        padding: 0 14px 14px;
    }

    .nm-reply-body {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .nm-reply-actions {
        flex-direction: column;
    }

    .nm-reply-actions .nm-btn {
        width: 100%;
    }

    /* ---------- Profile ---------- */

    .nm-profile-form {
        width: 100%;
        max-width: 100%;
    }

    .nm-profile-section,
    .nm-profile-avatar-section {
        width: 100%;
        padding: 16px;
    }

    /* ---------- Toast ---------- */

    .nm-toast-container {
        left: 14px;
        right: 14px;
        bottom: 14px;
        transform: none;
        width: auto;
    }

    .nm-toast {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}


/* =========================================================
   SMALL MOBILE — 480px
   ========================================================= */

@media (max-width: 480px) {

    .nm-content {
        padding: 10px !important;
    }

    .nm-header {
        padding: 9px 10px;
    }

    .nm-page-title {
        font-size: 18px;
    }

    .nm-kpi-grid {
        gap: 8px;
    }

    .nm-kpi-card {
        padding: 12px 10px;
        gap: 8px;
        flex-direction: column;
        align-items: flex-start;
    }

    .nm-kpi-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .nm-kpi-value {
        font-size: 22px;
    }

    .nm-section {
        padding: 14px;
        border-radius: 16px;
    }

    .nm-welcome {
        padding: 18px;
        border-radius: 18px;
    }

    .nm-welcome h2 {
        font-size: 19px;
    }

    .nm-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nm-quick-card {
        padding: 12px 6px;
    }

    .nm-quick-card svg {
        width: 24px;
        height: 24px;
    }

    .nm-ai-chat {
        height: 65vh;
        min-height: 400px;
    }

    .nm-ai-msg {
        max-width: 96%;
    }

    .nm-ticket-header {
        align-items: stretch;
    }

    .nm-ticket-info {
        align-items: flex-start;
    }

    .nm-ticket-meta {
        width: 100%;
        justify-content: flex-start;
    }
}


/* =========================================================
   EXTRA SMALL DEVICES — 360px
   ========================================================= */

@media (max-width: 360px) {

    .nm-content {
        padding: 8px !important;
    }

    .nm-kpi-grid {
        grid-template-columns: 1fr;
    }

    .nm-quick-grid {
        grid-template-columns: 1fr;
    }

    .nm-page-title {
        font-size: 17px;
    }

    .nm-welcome h2 {
        font-size: 18px;
    }

    .nm-btn {
        font-size: 14px;
        padding: 9px 14px;
    }
}
.nm-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}
