/**
 * استایل فرانت‌اند سامانه اتوماسیون اداری نادین سلامت سورین
 * پالت آبی اداری: #1e3a5f + #c9a961
 */

/* متغیرهای CSS */
:root {
    --noa-primary: #1e3a5f;
    --noa-primary-light: #2c5282;
    --noa-primary-dark: #14283f;
    --noa-accent: #c9a961;
    --noa-accent-light: #d4b876;
    --noa-success: #28a745;
    --noa-danger: #dc3545;
    --noa-warning: #ffc107;
    --noa-info: #17a2b8;
    --noa-bg: #f5f7fa;
    --noa-card-bg: #ffffff;
    --noa-text: #2d3748;
    --noa-text-muted: #718096;
    --noa-border: #e2e8f0;
    --noa-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --noa-shadow-lg: 0 10px 30px rgba(30, 58, 95, 0.1);
    --noa-radius: 8px;
    --noa-radius-sm: 4px;
    --noa-sidebar-width: 260px;
    --noa-transition: all 0.25s ease;
}

/* Reset */
.noa-app,
.noa-app *,
.noa-login-wrapper,
.noa-login-wrapper *,
.noa-verify-page,
.noa-verify-page * {
    box-sizing: border-box;
}

body.page-template-default .noa-app,
body:not(.logged-in) .noa-login-wrapper {
    background: var(--noa-bg);
    font-family: 'Vazirmatn', 'Tahoma', 'Iranian Sans', sans-serif;
    color: var(--noa-text);
    margin: 0;
    padding: 0;
    direction: rtl;
}

/* مخفی کردن عنوان پیش‌فرض وردپرس در صفحه اتوماسیون */
.noa-app ~ .entry-footer,
.noa-app ~ .comments-area,
.noa-app ~ .navigation {
    display: none;
}

/* ==================== صفحه لاگین ==================== */
.noa-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.noa-login-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 50%, #1e3a5f 100%);
    z-index: 0;
}

.noa-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.noa-bg-shapes .shape-1 {
    width: 400px;
    height: 400px;
    background: #c9a961;
    top: -100px;
    right: -100px;
}

.noa-bg-shapes .shape-2 {
    width: 300px;
    height: 300px;
    background: #ffffff;
    bottom: -50px;
    left: -50px;
    animation-delay: 5s;
}

.noa-bg-shapes .shape-3 {
    width: 200px;
    height: 200px;
    background: #c9a961;
    top: 50%;
    left: 60%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.noa-login-card {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.noa-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.noa-login-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f, #c9a961);
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.3);
}

.noa-login-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.noa-login-logo.noa-default-logo .dashicons {
    font-size: 50px;
    width: 50px;
    height: 50px;
    color: white;
}

.noa-login-title {
    color: var(--noa-primary);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 5px;
}

.noa-login-subtitle {
    color: var(--noa-accent);
    font-size: 14px;
    margin: 0;
    letter-spacing: 1px;
}

.noa-login-form .noa-form-group {
    margin-bottom: 20px;
}

.noa-login-form label {
    display: block;
    color: var(--noa-text);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.noa-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.noa-input-wrapper .dashicons {
    position: absolute;
    right: 12px;
    color: var(--noa-text-muted);
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.noa-input-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--noa-border);
    border-radius: var(--noa-radius);
    font-size: 14px;
    font-family: inherit;
    transition: var(--noa-transition);
    background: #fafbfc;
}

.noa-input-wrapper input:focus {
    outline: none;
    border-color: var(--noa-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.noa-toggle-password {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--noa-text-muted);
    padding: 4px;
}

.noa-toggle-password:hover {
    color: var(--noa-primary);
}

.noa-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.noa-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--noa-text-muted);
}

.noa-checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--noa-primary);
}

.noa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--noa-radius);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--noa-transition);
    text-decoration: none;
    line-height: 1.4;
}

.noa-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.noa-btn-primary {
    background: var(--noa-primary);
    color: white;
}

.noa-btn-primary:hover {
    background: var(--noa-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
    color: white;
}

.noa-btn-secondary {
    background: var(--noa-accent);
    color: var(--noa-primary-dark);
}

.noa-btn-secondary:hover {
    background: var(--noa-accent-light);
    color: var(--noa-primary-dark);
}

.noa-btn-success {
    background: var(--noa-success);
    color: white;
}

.noa-btn-danger {
    background: var(--noa-danger);
    color: white;
}

.noa-btn-outline {
    background: transparent;
    border: 2px solid var(--noa-border);
    color: var(--noa-text);
}

.noa-btn-outline:hover {
    border-color: var(--noa-primary);
    color: var(--noa-primary);
}

.noa-btn-block {
    width: 100%;
}

.noa-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.noa-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.noa-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.noa-login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--noa-border);
    font-size: 12px;
    color: var(--noa-text-muted);
}

.noa-green-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    color: var(--noa-success);
    font-size: 11px;
}

.noa-green-message .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.noa-alert {
    padding: 12px 16px;
    border-radius: var(--noa-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.noa-alert .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.noa-alert-error {
    background: #fee;
    color: var(--noa-danger);
    border-right: 4px solid var(--noa-danger);
}

.noa-alert-warning {
    background: #fff8e1;
    color: #b8860b;
    border-right: 4px solid var(--noa-warning);
}

.noa-alert-success {
    background: #e8f5e9;
    color: var(--noa-success);
    border-right: 4px solid var(--noa-success);
}

/* ==================== لایه اصلی برنامه ==================== */
.noa-app {
    display: flex;
    min-height: 100vh;
    background: var(--noa-bg);
}

/* ==================== سایدبار ==================== */
.noa-sidebar {
    width: var(--noa-sidebar-width);
    background: var(--noa-primary);
    color: #cbd5e0;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--noa-transition);
    overflow-y: auto;
}

.noa-sidebar-header {
    padding: 20px;
    background: var(--noa-primary-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.noa-sidebar-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    padding: 4px;
    background: white;
}

.noa-sidebar-logo.noa-default-logo {
    background: var(--noa-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.noa-sidebar-logo.noa-default-logo .dashicons {
    font-size: 28px;
    color: var(--noa-primary);
}

.noa-sidebar-company .noa-company-name {
    font-size: 15px;
    font-weight: 700;
    color: white;
}

.noa-sidebar-company .noa-company-sub {
    font-size: 11px;
    color: var(--noa-accent);
}

.noa-sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.noa-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #cbd5e0;
    text-decoration: none;
    border-radius: var(--noa-radius);
    margin-bottom: 4px;
    font-size: 14px;
    transition: var(--noa-transition);
    position: relative;
}

.noa-nav-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.noa-nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.noa-nav-item.active {
    background: var(--noa-accent);
    color: var(--noa-primary-dark);
    font-weight: 600;
}

.noa-nav-item .noa-badge {
    margin-right: auto;
    margin-left: 0;
}

.noa-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}

.noa-nav-section {
    padding: 8px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--noa-accent);
    margin-bottom: 8px;
}

.noa-sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.noa-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--noa-radius);
    color: #cbd5e0;
    text-decoration: none;
    transition: var(--noa-transition);
    margin-bottom: 8px;
}

.noa-user-card:hover, .noa-user-card.active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.noa-user-card img {
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.noa-user-info .noa-user-name {
    font-size: 13px;
    font-weight: 600;
}

.noa-user-info .noa-user-position {
    font-size: 11px;
    color: var(--noa-accent);
}

.noa-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    color: #fc8181;
    text-decoration: none;
    border-radius: var(--noa-radius);
    font-size: 13px;
    transition: var(--noa-transition);
    background: rgba(220, 53, 45, 0.1);
}

.noa-logout-btn:hover {
    background: var(--noa-danger);
    color: white;
}

/* ==================== محتوای اصلی ==================== */
.noa-main {
    flex: 1;
    margin-right: var(--noa-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.noa-topbar {
    background: white;
    padding: 12px 24px;
    box-shadow: var(--noa-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.noa-sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--noa-text);
    padding: 6px;
    border-radius: var(--noa-radius-sm);
    display: none;
}

.noa-sidebar-toggle .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.noa-search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
    display: flex;
    align-items: center;
}

.noa-search-box .dashicons {
    position: absolute;
    right: 12px;
    color: var(--noa-text-muted);
    font-size: 18px;
}

.noa-search-box input {
    width: 100%;
    padding: 8px 40px 8px 16px;
    border: 1px solid var(--noa-border);
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    background: var(--noa-bg);
    transition: var(--noa-transition);
}

.noa-search-box input:focus {
    outline: none;
    border-color: var(--noa-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.noa-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
}

.noa-icon-btn {
    background: var(--noa-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--noa-text);
    position: relative;
    transition: var(--noa-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.noa-icon-btn:hover {
    background: var(--noa-primary);
    color: white;
}

.noa-icon-btn .dashicons {
    font-size: 20px;
}

.noa-icon-badge {
    position: absolute;
    top: -2px;
    left: -2px;
    background: var(--noa-danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.noa-content {
    padding: 24px;
    flex: 1;
}

.noa-page-header {
    margin-bottom: 24px;
}

.noa-page-header h1 {
    font-size: 24px;
    color: var(--noa-primary);
    margin: 0 0 8px;
    font-weight: 700;
}

.noa-page-header p {
    color: var(--noa-text-muted);
    margin: 0;
    font-size: 14px;
}

.noa-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.noa-page-actions {
    display: flex;
    gap: 8px;
}

/* ==================== کارت‌ها ==================== */
.noa-card {
    background: var(--noa-card-bg);
    border-radius: var(--noa-radius);
    box-shadow: var(--noa-shadow);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--noa-border);
}

.noa-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--noa-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.noa-card-header h2 {
    margin: 0;
    font-size: 16px;
    color: var(--noa-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.noa-card-header h2 .dashicons {
    color: var(--noa-accent);
}

.noa-card-body {
    padding: 20px;
}

.noa-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--noa-border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    background: var(--noa-bg);
}

.noa-p-0 {
    padding: 0 !important;
}

.noa-card-large {
    grid-column: span 2;
}

/* ==================== آمار ==================== */
.noa-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.noa-stat-card {
    background: white;
    border-radius: var(--noa-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--noa-shadow);
    border: 1px solid var(--noa-border);
    position: relative;
    overflow: hidden;
}

.noa-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
}

.noa-stat-blue::before { background: var(--noa-primary); }
.noa-stat-green::before { background: var(--noa-success); }
.noa-stat-orange::before { background: var(--noa-warning); }
.noa-stat-purple::before { background: #8b5cf6; }

.noa-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--noa-bg);
}

.noa-stat-blue .noa-stat-icon { background: #ebf4ff; color: var(--noa-primary); }
.noa-stat-green .noa-stat-icon { background: #e8f5e9; color: var(--noa-success); }
.noa-stat-orange .noa-stat-icon { background: #fff8e1; color: #b8860b; }
.noa-stat-purple .noa-stat-icon { background: #f3e8ff; color: #8b5cf6; }

.noa-stat-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.noa-stat-info {
    display: flex;
    flex-direction: column;
}

.noa-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--noa-primary);
    line-height: 1;
}

.noa-stat-label {
    font-size: 13px;
    color: var(--noa-text-muted);
    margin-top: 4px;
}

/* ==================== اکشن‌های داشبورد ==================== */
.noa-dashboard-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.noa-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* ==================== لیست نامه‌ها ==================== */
.noa-letter-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.noa-letter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--noa-radius);
    text-decoration: none;
    color: var(--noa-text);
    transition: var(--noa-transition);
    border: 1px solid transparent;
}

.noa-letter-item:hover {
    background: var(--noa-bg);
    border-color: var(--noa-border);
}

.noa-letter-item.noa-letter-pending {
    background: #fff8e1;
    border-color: #ffe082;
}

.noa-letter-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--noa-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.noa-letter-icon .dashicons {
    font-size: 18px;
}

.noa-letter-content {
    flex: 1;
    min-width: 0;
}

.noa-letter-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--noa-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.noa-bullet {
    color: var(--noa-border);
}

/* ==================== جدول ==================== */
.noa-table-wrapper {
    overflow-x: auto;
}

.noa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.noa-table th {
    background: var(--noa-primary);
    color: white;
    padding: 12px 16px;
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

.noa-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--noa-border);
}

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

.noa-table-simple th {
    background: var(--noa-bg);
    color: var(--noa-text);
}

.noa-td-num {
    font-family: 'Vazirmatn', monospace;
    color: var(--noa-primary);
    font-weight: 600;
}

.noa-letter-link {
    color: var(--noa-primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.noa-letter-link:hover {
    color: var(--noa-primary-light);
}

.noa-relation-tag {
    background: var(--noa-bg);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: var(--noa-text-muted);
}

/* ==================== بج‌ها ==================== */
.noa-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.noa-badge-sm {
    padding: 1px 6px;
    font-size: 10px;
}

.noa-badge-default { background: #e2e8f0; color: #4a5568; }
.noa-badge-info { background: #ebf8ff; color: #2c5282; }
.noa-badge-success { background: #c6f6d5; color: #22543d; }
.noa-badge-warning { background: #feebc8; color: #7b341e; }
.noa-badge-danger { background: #fed7d7; color: #742a2a; }

.noa-badge-danger.noa-icon-badge {
    background: var(--noa-danger);
    color: white;
}

/* ==================== تب‌ها ==================== */
.noa-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: white;
    padding: 6px;
    border-radius: var(--noa-radius);
    box-shadow: var(--noa-shadow);
    overflow-x: auto;
}

.noa-tab {
    padding: 8px 16px;
    border-radius: var(--noa-radius-sm);
    color: var(--noa-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--noa-transition);
    white-space: nowrap;
}

.noa-tab:hover {
    background: var(--noa-bg);
    color: var(--noa-text);
}

.noa-tab.active {
    background: var(--noa-primary);
    color: white;
}

/* ==================== فرم‌ها ==================== */
.noa-form-group {
    margin-bottom: 16px;
}

.noa-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--noa-text);
    margin-bottom: 6px;
}

.noa-required {
    color: var(--noa-danger);
}

.noa-form-group input[type="text"],
.noa-form-group input[type="email"],
.noa-form-group input[type="password"],
.noa-form-group input[type="number"],
.noa-form-group select,
.noa-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--noa-border);
    border-radius: var(--noa-radius);
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: var(--noa-transition);
}

.noa-form-group input:focus,
.noa-form-group select:focus,
.noa-form-group textarea:focus {
    outline: none;
    border-color: var(--noa-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.noa-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.noa-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.noa-col-1 { flex: 1; }
.noa-col-2 { flex: 2; }

.noa-form-help {
    font-size: 12px;
    color: var(--noa-text-muted);
    margin-top: 6px;
}

.noa-file-input {
    padding: 8px !important;
    border: 2px dashed var(--noa-border) !important;
    background: var(--noa-bg) !important;
    cursor: pointer;
}

/* ==================== ادیتور نامه ==================== */
.noa-editor-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.noa-language-switcher {
    display: flex;
    gap: 4px;
    background: var(--noa-bg);
    padding: 4px;
    border-radius: var(--noa-radius-sm);
}

.noa-lang-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--noa-radius-sm);
    font-size: 13px;
    font-family: inherit;
    color: var(--noa-text-muted);
    transition: var(--noa-transition);
}

.noa-lang-btn.active {
    background: var(--noa-primary);
    color: white;
}

.noa-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    background: var(--noa-bg);
    border: 1px solid var(--noa-border);
    border-radius: var(--noa-radius) var(--noa-radius) 0 0;
    border-bottom: none;
    flex-wrap: wrap;
}

.noa-tb-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    color: var(--noa-text);
    transition: var(--noa-transition);
}

.noa-tb-btn:hover {
    background: white;
    color: var(--noa-primary);
}

.noa-tb-divider {
    width: 1px;
    height: 20px;
    background: var(--noa-border);
    margin: 0 4px;
}

.noa-editor {
    min-height: 300px !important;
    border-radius: 0 0 var(--noa-radius) var(--noa-radius) !important;
    border: 1px solid var(--noa-border) !important;
    border-top: 1px dashed var(--noa-border) !important;
    padding: 16px !important;
    line-height: 1.8;
    background: white;
    outline: none;
    overflow-y: auto;
}

.noa-editor:focus {
    border-color: var(--noa-primary) !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.noa-editor p {
    margin: 0 0 12px;
}

.noa-editor ul, .noa-editor ol {
    padding-right: 20px;
    margin: 8px 0;
}

.noa-editor:empty:before {
    content: 'متن نامه را اینجا بنویسید...';
    color: var(--noa-text-muted);
    font-style: italic;
}

/* ==================== پیشنمایش نامه ==================== */
.noa-editor-preview {
    position: sticky;
    top: 80px;
    align-self: start;
}

.noa-preview-header {
    background: white;
    padding: 12px 16px;
    border-radius: var(--noa-radius) var(--noa-radius) 0 0;
    border: 1px solid var(--noa-border);
    border-bottom: none;
}

.noa-preview-header h3 {
    margin: 0 0 2px;
    font-size: 14px;
    color: var(--noa-primary);
}

.noa-preview-header small {
    color: var(--noa-text-muted);
    font-size: 11px;
}

.noa-preview-content {
    background: var(--noa-bg);
    padding: 20px;
    border-radius: 0 0 var(--noa-radius) var(--noa-radius);
    border: 1px solid var(--noa-border);
}

.noa-a4-preview {
    background: white;
    width: 100%;
    aspect-ratio: 210/297;
    padding: 15px 20px;
    box-shadow: var(--noa-shadow-lg);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.noa-letterhead-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.9;
}

.noa-a4-preview > *:not(.noa-letterhead-bg) {
    position: relative;
    z-index: 1;
}

.noa-letter-meta-box {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 10px;
    color: var(--noa-primary);
    text-align: right;
    z-index: 2;
}

.noa-letter-qr-placeholder {
    position: absolute;
    top: 50px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--noa-bg);
    border: 1px dashed var(--noa-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: var(--noa-text-muted);
    z-index: 2;
}

.noa-letter-title-preview {
    margin-top: 113px;
    text-align: center;
    font-size: 13px;
    color: var(--noa-primary);
    margin-bottom: 12px;
    font-weight: bold;
}

.noa-letter-addressed-preview {
    font-size: 10px;
    color: var(--noa-text);
    margin-bottom: 8px;
}

.noa-letter-greeting {
    font-size: 10px;
    color: var(--noa-text);
    margin-bottom: 12px;
}

.noa-letter-body-preview {
    font-size: 10px;
    line-height: 1.6;
    color: var(--noa-text);
    margin-bottom: 40px;
    min-height: 60px;
}

.noa-letter-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding: 0 20px;
}

.noa-sig-right, .noa-sig-left {
    text-align: center;
    font-size: 9px;
    width: 40%;
}

.noa-letter-signatures .noa-sig-img {
    width: 60px;
    height: 30px;
    object-fit: contain;
    margin-bottom: 4px;
}

.noa-letter-environmental {
    position: absolute;
    bottom: 10px;
    left: 20px;
    right: 20px;
    font-size: 8px;
    color: var(--noa-text-muted);
    text-align: center;
    border-top: 1px dashed var(--noa-border);
    padding-top: 8px;
}

/* ==================== مشاهده نامه ==================== */
.noa-letter-view-wrapper {
    margin-bottom: 24px;
}

.noa-letter-paper {
    background: white;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 50px;
    box-shadow: var(--noa-shadow-lg);
    position: relative;
    min-height: 1000px;
    border-radius: 4px;
    overflow: hidden;
}

.noa-paper-meta {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 12px;
    color: var(--noa-primary);
    text-align: right;
    z-index: 2;
}

.noa-paper-qr {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 70px;
    text-align: center;
    z-index: 2;
}

.noa-paper-qr img {
    width: 70px;
    height: 70px;
}

.noa-paper-qr small {
    display: block;
    font-size: 10px;
    color: var(--noa-text-muted);
    margin-top: 4px;
}

.noa-paper-title {
    text-align: center;
    color: var(--noa-primary);
    font-size: 18px;
    margin: 113px 0 20px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.noa-paper-addressed {
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.noa-paper-addressed p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--noa-text);
}

.noa-paper-greeting {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--noa-text);
    position: relative;
    z-index: 1;
}

.noa-paper-body {
    font-size: 14px;
    line-height: 2;
    color: var(--noa-text);
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.noa-paper-body p {
    margin: 0 0 12px;
}

.noa-paper-signatures {
    display: flex;
    justify-content: space-between;
    margin: 50px 20px 30px;
    position: relative;
    z-index: 1;
    gap: 40px;
}

.noa-sig-block {
    text-align: center;
    min-width: 200px;
}

.noa-sig-single {
    margin: 0 auto;
}

.noa-sig-img {
    max-width: 360px;
    max-height: 216px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.noa-sig-name {
    font-weight: 600;
    color: var(--noa-primary);
    font-size: 13px;
    border-top: 1px solid var(--noa-primary);
    padding-top: 6px;
    margin-top: 6px;
}

.noa-sig-position {
    font-size: 12px;
    color: var(--noa-text-muted);
    margin-top: 2px;
}

.noa-sig-date {
    font-size: 11px;
    color: var(--noa-text-muted);
    margin-top: 4px;
}

.noa-paper-environmental {
    position: absolute;
    bottom: 10px;
    left: 50px;
    right: 50px;
    font-size: 10px;
    color: var(--noa-text-muted);
    text-align: center;
    border-top: 1px dashed var(--noa-border);
    padding-top: 12px;
    z-index: 1;
}

.noa-sign-actions {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--noa-radius);
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.noa-sign-actions h3 {
    color: #b8860b;
    margin: 0 0 8px;
    font-size: 16px;
}

.noa-sign-actions p {
    color: var(--noa-text);
    margin: 0 0 16px;
    font-size: 13px;
}

.noa-actions-row {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.noa-letter-download {
    background: white;
    border-radius: var(--noa-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: var(--noa-shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.noa-letter-download h3 {
    margin: 0;
    font-size: 14px;
    color: var(--noa-primary);
    margin-left: 8px;
}

/* ==================== مودال ==================== */
.noa-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.noa-modal.noa-modal-open {
    display: flex;
}

.noa-modal-content {
    background: white;
    border-radius: var(--noa-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.noa-modal-large {
    max-width: 700px;
}

.noa-modal-small {
    max-width: 400px;
}

.noa-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--noa-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.noa-modal-header h3 {
    margin: 0;
    color: var(--noa-primary);
    font-size: 16px;
}

.noa-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--noa-text-muted);
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    transition: var(--noa-transition);
}

.noa-modal-close:hover {
    background: var(--noa-bg);
    color: var(--noa-text);
}

.noa-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.noa-modal-body textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--noa-border);
    border-radius: var(--noa-radius);
    font-family: inherit;
    font-size: 14px;
}

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

/* ==================== پروفایل ==================== */
.noa-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.noa-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--noa-border);
    margin-bottom: 16px;
}

.noa-profile-header img {
    border-radius: 50%;
    border: 3px solid var(--noa-accent);
}

.noa-profile-header h3 {
    margin: 0;
    color: var(--noa-primary);
    font-size: 18px;
}

.noa-profile-header p {
    margin: 2px 0;
    color: var(--noa-text-muted);
    font-size: 13px;
}

.noa-username {
    color: var(--noa-accent) !important;
    font-family: monospace;
}

.noa-profile-info .noa-info-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px dashed var(--noa-border);
    font-size: 13px;
}

.noa-profile-info .noa-info-row:last-child {
    border-bottom: none;
}

.noa-info-label {
    width: 130px;
    color: var(--noa-text-muted);
    font-weight: 600;
}

.noa-info-value {
    flex: 1;
    color: var(--noa-text);
}

.noa-signature-preview {
    background: var(--noa-bg);
    border: 1px dashed var(--noa-border);
    border-radius: var(--noa-radius);
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.noa-signature-img {
    max-width: 200px;
    max-height: 80px;
}

.noa-no-signature {
    color: var(--noa-text-muted);
}

.noa-no-signature .dashicons {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.noa-company-card {
    background: linear-gradient(135deg, var(--noa-primary), var(--noa-primary-light));
    color: white;
}

.noa-company-card .noa-card-header h2 {
    color: white;
}

.noa-company-info {
    text-align: center;
    padding: 16px 0;
}

.noa-company-logo {
    max-width: 120px;
    max-height: 120px;
    margin: 0 auto 16px;
    border-radius: 12px;
    background: white;
    padding: 8px;
    display: block;
}

.noa-company-info h3 {
    margin: 0;
    font-size: 18px;
    color: white;
}

.noa-company-en {
    color: var(--noa-accent);
    font-size: 14px;
    margin-top: 4px !important;
}

/* ==================== کارت سبز ==================== */
.noa-green-card {
    background: linear-gradient(135deg, #1b5e4f 0%, #28a745 100%);
    color: white;
    border-radius: var(--noa-radius);
    padding: 20px;
    margin-top: 24px;
    box-shadow: var(--noa-shadow);
}

.noa-green-card-body {
    display: flex;
    align-items: center;
    gap: 16px;
}

.noa-green-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.noa-green-icon .dashicons {
    font-size: 32px;
    color: white;
}

.noa-green-text h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: white;
}

.noa-green-text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}

/* ==================== صفحه اصالت نامه ==================== */
.noa-verify-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--noa-primary) 0%, var(--noa-primary-light) 100%);
    padding: 20px;
}

.noa-verify-card {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.noa-verify-header {
    padding: 30px;
    text-align: center;
    color: white;
    background: var(--noa-primary);
}

.noa-verify-header.noa-verify-success {
    background: linear-gradient(135deg, #1b5e4f, #28a745);
}

.noa-verify-header.noa-verify-error {
    background: linear-gradient(135deg, #742a2a, #dc3545);
}

.noa-verify-logo {
    max-height: 80px;
    margin-bottom: 12px;
}

.noa-verify-header h1 {
    margin: 0;
    font-size: 24px;
}

.noa-verify-header p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.9);
}

.noa-verify-body {
    padding: 30px;
}

.noa-verify-status {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px;
    border-radius: var(--noa-radius);
    background: var(--noa-bg);
}

.noa-verify-status .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: var(--noa-success);
    margin-bottom: 12px;
}

.noa-verify-status h2 {
    color: var(--noa-text);
    margin: 0 0 8px;
    font-size: 20px;
}

.noa-verify-status p {
    color: var(--noa-text-muted);
    margin: 0;
}

.noa-verify-info {
    background: var(--noa-bg);
    border-radius: var(--noa-radius);
    padding: 16px 20px;
}

.noa-verify-info .noa-info-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px dashed var(--noa-border);
    font-size: 14px;
}

.noa-verify-info .noa-info-row:last-child {
    border-bottom: none;
}

.noa-verify-info .noa-info-label {
    width: 140px;
    color: var(--noa-text-muted);
    font-weight: 600;
}

.noa-verify-info .noa-info-value {
    flex: 1;
    color: var(--noa-text);
}

.noa-verify-footer {
    padding: 16px;
    text-align: center;
    background: var(--noa-bg);
    font-size: 12px;
    color: var(--noa-text-muted);
}

/* ==================== حالت خالی ==================== */
.noa-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--noa-text-muted);
}

.noa-empty-state .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: var(--noa-border);
    margin-bottom: 16px;
}

.noa-empty-state h3 {
    color: var(--noa-text);
    margin: 0 0 8px;
    font-size: 18px;
}

.noa-empty-state p {
    margin: 0 0 20px;
}

.noa-empty-small {
    padding: 20px;
}

.noa-empty-small .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.noa-empty-small .dashicons {
    color: var(--noa-success);
}

/* ==================== دکمه آیکون ==================== */
.noa-btn-icon {
    background: transparent;
    border: 1px solid var(--noa-border);
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--noa-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--noa-transition);
    text-decoration: none;
}

.noa-btn-icon:hover {
    background: var(--noa-primary);
    color: white;
    border-color: var(--noa-primary);
}

.noa-btn-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.noa-btn-delete:hover {
    background: var(--noa-danger);
    border-color: var(--noa-danger);
}

/* ==================== ریسپانسیو ==================== */
@media (max-width: 992px) {
    .noa-dashboard-grid {
        grid-template-columns: 1fr;
    }
    .noa-card-large {
        grid-column: span 1;
    }
    .noa-editor-layout {
        grid-template-columns: 1fr;
    }
    .noa-editor-preview {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --noa-sidebar-width: 240px;
    }
    
    .noa-sidebar {
        transform: translateX(100%);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    }
    
    .noa-sidebar.noa-sidebar-open {
        transform: translateX(0);
    }
    
    .noa-main {
        margin-right: 0;
    }
    
    .noa-sidebar-toggle {
        display: flex;
    }
    
    .noa-content {
        padding: 16px;
    }
    
    .noa-form-row {
        flex-direction: column;
    }
    
    .noa-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .noa-stat-card {
        padding: 12px;
    }
    
    .noa-stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .noa-stat-value {
        font-size: 20px;
    }
    
    .noa-login-card {
        padding: 24px 20px;
    }
    
    .noa-topbar {
        padding: 10px 16px;
    }
    
    .noa-search-box {
        max-width: none;
    }
    
    .noa-tabs {
        flex-wrap: wrap;
    }
    
    .noa-paper-signatures {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .noa-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .noa-page-header h1 {
        font-size: 20px;
    }
    
    .noa-dashboard-actions {
        flex-direction: column;
    }
    
    .noa-dashboard-actions .noa-btn {
        width: 100%;
    }
}

/* Overlay برای سایدبار موبایل */
.noa-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.noa-sidebar-overlay.noa-overlay-open {
    display: block;
}

/* انیمیشن‌ها */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.noa-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--noa-border);
    border-top-color: var(--noa-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* پیام موفقیت شناور */
.noa-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--noa-primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--noa-radius);
    box-shadow: var(--noa-shadow-lg);
    z-index: 9999;
    animation: slideUp 0.3s ease;
    font-size: 14px;
}

.noa-toast.noa-toast-success {
    background: var(--noa-success);
}

.noa-toast.noa-toast-error {
    background: var(--noa-danger);
}

/* آپلود فایل */
.noa-uploaded-file {
    text-align: center;
    margin: 20px 0;
}

/* خطای عمومی */
.noa-error {
    background: #fed7d7;
    color: #742a2a;
    padding: 12px 16px;
    border-radius: var(--noa-radius);
    border-right: 4px solid var(--noa-danger);
    margin: 16px 0;
}

.noa-link {
    color: var(--noa-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.noa-link:hover {
    color: var(--noa-primary-light);
}

.noa-ml-1 {
    margin-left: 8px;
}

.noa-muted {
    color: var(--noa-text-muted);
}

/* ==================== برچسب‌ها (Tags) ==================== */
.noa-letter-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.noa-letter-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.noa-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: var(--noa-transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.noa-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.noa-tag-remove {
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: var(--noa-transition);
}

.noa-tag-remove:hover {
    background: rgba(255,255,255,0.5);
}

.noa-no-tags {
    color: var(--noa-text-muted);
    font-size: 13px;
    font-style: italic;
}

.noa-tag-selector {
    flex-shrink: 0;
}

.noa-tag-selector select {
    padding: 6px 12px;
    border: 1px solid var(--noa-border);
    border-radius: var(--noa-radius);
    font-size: 12px;
    background: var(--noa-bg);
    cursor: pointer;
    font-family: inherit;
}

.noa-tag-selector select:focus {
    outline: none;
    border-color: var(--noa-primary);
}

/* نمایش تگ در لیست نامه‌ها */
.noa-letter-tags-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}

.noa-tag-mini {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 8px;
    font-size: 10px;
    color: white;
    font-weight: 600;
}

/* ==================== تیکت‌ها (پاسخ‌ها) ==================== */
.noa-tickets-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    max-height: 600px;
    overflow-y: auto;
    padding: 8px 4px;
}

.noa-ticket {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--noa-bg);
    border-radius: var(--noa-radius);
    border-right: 3px solid var(--noa-border);
    transition: var(--noa-transition);
}

.noa-ticket:hover {
    background: #eef2f7;
}

.noa-ticket-own {
    background: #ebf4ff;
    border-right-color: var(--noa-primary);
}

.noa-ticket-internal {
    background: #fff8e1;
    border-right-color: var(--noa-warning);
}

.noa-ticket-avatar img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.noa-ticket-content {
    flex: 1;
    min-width: 0;
}

.noa-ticket-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.noa-ticket-author {
    font-weight: 700;
    color: var(--noa-primary);
    font-size: 13px;
}

.noa-ticket-position {
    color: var(--noa-text-muted);
    font-size: 12px;
}

.noa-ticket-date {
    color: var(--noa-text-muted);
    font-size: 11px;
    margin-right: auto;
}

.noa-ticket-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--noa-text);
    background: white;
    padding: 10px 12px;
    border-radius: var(--noa-radius-sm);
    border: 1px solid var(--noa-border);
}

.noa-ticket-text[contenteditable="true"] {
    outline: 2px solid var(--noa-primary);
    border-color: var(--noa-primary);
}

.noa-ticket-text p {
    margin: 0 0 8px;
}

.noa-ticket-text p:last-child {
    margin-bottom: 0;
}

.noa-ticket-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.noa-attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: white;
    border: 1px solid var(--noa-border);
    border-radius: 12px;
    font-size: 11px;
    color: var(--noa-primary);
    text-decoration: none;
    transition: var(--noa-transition);
}

.noa-attachment-chip:hover {
    background: var(--noa-primary);
    color: white;
}

.noa-attachment-chip .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.noa-ticket-actions {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.noa-ticket:hover .noa-ticket-actions {
    opacity: 1;
}

.noa-ticket-edit-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

/* فرم پاسخ */
.noa-ticket-form {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--noa-bg);
    border-radius: var(--noa-radius);
    border: 1px solid var(--noa-border);
    margin-top: 12px;
}

.noa-ticket-form-avatar img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.noa-ticket-form-body {
    flex: 1;
}

.noa-ticket-form-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: white;
    border: 1px solid var(--noa-border);
    border-radius: var(--noa-radius) var(--noa-radius) 0 0;
    border-bottom: none;
}

.noa-ticket-editor {
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px 12px;
    background: white;
    border: 1px solid var(--noa-border);
    border-radius: 0 0 var(--noa-radius) var(--noa-radius);
    outline: none;
    font-size: 13px;
    line-height: 1.6;
    color: var(--noa-text);
}

.noa-ticket-editor:focus {
    border-color: var(--noa-primary);
    box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}

.noa-ticket-editor:empty:before {
    content: attr(data-placeholder);
    color: var(--noa-text-muted);
    font-style: italic;
}

.noa-ticket-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    gap: 12px;
    flex-wrap: wrap;
}

.noa-ticket-form-actions .noa-checkbox-wrapper {
    font-size: 12px;
    color: var(--noa-text-muted);
}

/* اسکرول‌بار سفارشی برای تیکت‌ها */
.noa-tickets-list::-webkit-scrollbar {
    width: 6px;
}

.noa-tickets-list::-webkit-scrollbar-track {
    background: var(--noa-bg);
    border-radius: 3px;
}

.noa-tickets-list::-webkit-scrollbar-thumb {
    background: var(--noa-border);
    border-radius: 3px;
}

.noa-tickets-list::-webkit-scrollbar-thumb:hover {
    background: var(--noa-text-muted);
}

/* ==================== فیلتر برچسب در لیست نامه‌ها ==================== */
.noa-tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px;
    background: white;
    border-radius: var(--noa-radius);
    box-shadow: var(--noa-shadow);
    margin-bottom: 16px;
    border: 1px solid var(--noa-border);
}

.noa-tag-filter-label {
    font-size: 12px;
    color: var(--noa-text-muted);
    margin-left: 4px;
    align-self: center;
}

.noa-tag-filter-item {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    color: white;
    cursor: pointer;
    text-decoration: none;
    transition: var(--noa-transition);
    opacity: 0.6;
}

.noa-tag-filter-item:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.noa-tag-filter-item.active {
    opacity: 1;
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

/* ==================== انتخاب برچسب در ویرایشگر ==================== */
.noa-tags-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: var(--noa-bg);
    border: 1px solid var(--noa-border);
    border-radius: var(--noa-radius);
    margin-top: 6px;
}

.noa-tag-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    border: 2px solid var(--noa-border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--noa-transition);
    background: white;
    position: relative;
}

.noa-tag-checkbox:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.noa-tag-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.noa-tag-checkbox-label {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--noa-bg) !important;
    color: var(--noa-text-muted) !important;
    transition: var(--noa-transition);
}

.noa-tag-checkbox input[type="checkbox"]:checked + .noa-tag-checkbox-label {
    /* رنگ اصلی برچسب از inline style استفاده می‌شود */
    opacity: 1;
}

.noa-tag-checkbox input[type="checkbox"]:not(:checked) + .noa-tag-checkbox-label {
    background: var(--noa-bg) !important;
    color: var(--noa-text-muted) !important;
}

/* ریسپانسیو تیکت‌ها */
@media (max-width: 768px) {
    .noa-ticket,
    .noa-ticket-form {
        flex-direction: column;
        gap: 8px;
    }
    
    .noa-ticket-avatar,
    .noa-ticket-form-avatar {
        display: none;
    }
    
    .noa-ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .noa-ticket-date {
        margin-right: 0;
    }
    
    .noa-ticket-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .noa-letter-tags-container {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===================================
 * مستندات (Documents)
 * =================================== */

.noa-documents-filters {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.noa-filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.noa-filter-search {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.noa-filter-search .dashicons {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}

.noa-filter-search input {
    width: 100%;
    padding-right: 36px;
}

.noa-filter-select {
    min-width: 160px;
}

.noa-documents-info {
    margin-bottom: 16px;
    color: #666;
    font-size: 14px;
}

.noa-documents-info .noa-doc-count strong {
    color: #1e3a5f;
    font-size: 16px;
}

.noa-documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.noa-doc-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
    border: 1px solid #eef0f3;
}

.noa-doc-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.noa-doc-card-icon {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: #fff;
    padding: 24px 16px;
    text-align: center;
}

.noa-doc-card-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto;
}

.noa-doc-card-body {
    padding: 16px;
    flex: 1;
}

.noa-doc-card-title {
    margin: 0 0 8px;
    font-size: 15px;
    color: #1e3a5f;
    line-height: 1.4;
}

.noa-doc-card-desc {
    color: #666;
    font-size: 13px;
    margin: 0 0 12px;
    line-height: 1.5;
}

.noa-doc-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #888;
}

.noa-doc-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.noa-doc-meta-item .dashicons {
    font-size: 14px;
    color: #1e3a5f;
}

.noa-doc-card-uploader {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #555;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.noa-doc-date {
    margin-right: auto;
    color: #999;
}

.noa-doc-card-actions {
    padding: 10px 12px;
    background: #f8f9fa;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    border-top: 1px solid #eef0f3;
}

.noa-doc-card-actions .noa-btn {
    flex: 1;
    min-width: 60px;
    justify-content: center;
}

.noa-doc-card-actions .noa-btn-sm {
    padding: 6px 8px;
    font-size: 12px;
}

.noa-doc-card-actions .noa-btn-danger {
    flex: 0 0 auto;
    min-width: auto;
}

/* Drop zone */
.noa-file-drop {
    position: relative;
    border: 2px dashed #c9a961;
    border-radius: 8px;
    padding: 32px 16px;
    text-align: center;
    background: #fffbf2;
    cursor: pointer;
    transition: all .2s;
}

.noa-file-drop:hover,
.noa-file-drop.dragover {
    border-color: #1e3a5f;
    background: #f5f7fa;
}

.noa-file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.noa-file-drop-content .dashicons {
    font-size: 36px;
    color: #c9a961;
    width: 36px;
    height: 36px;
    display: block;
    margin: 0 auto 8px;
}

.noa-file-drop-content p {
    margin: 0 0 4px;
    font-weight: 500;
    color: #1e3a5f;
}

.noa-file-drop-content small {
    color: #999;
}

.noa-file-info {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f5f7fa;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
}

/* ===== Document View (Public) ===== */
.noa-standalone-body {
    background: #f5f7fa;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    font-family: Tahoma, Arial, sans-serif;
}

.noa-doc-view-container {
    max-width: 800px;
    margin: 40px auto;
}

.noa-doc-view-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}

.noa-doc-view-header {
    padding: 32px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: #fff;
    display: flex;
    gap: 24px;
    align-items: center;
}

.noa-doc-view-icon {
    text-align: center;
    background: rgba(255,255,255,0.15);
    padding: 16px 20px;
    border-radius: 10px;
}

.noa-doc-view-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 4px;
}

.noa-doc-view-icon small {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.noa-doc-view-title-block {
    flex: 1;
}

.noa-doc-view-title-block h1 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.3;
}

.noa-doc-view-desc {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
    line-height: 1.5;
}

.noa-doc-view-meta {
    padding: 24px 32px;
    border-bottom: 1px solid #f0f0f0;
}

.noa-doc-meta-row {
    display: flex;
    padding: 6px 0;
    font-size: 14px;
}

.noa-doc-meta-label {
    flex: 0 0 130px;
    color: #888;
}

.noa-doc-meta-value {
    flex: 1;
    color: #1e3a5f;
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.noa-doc-tag {
    background: #f0f4f8;
    color: #1e3a5f;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: normal;
}

.noa-doc-view-actions {
    padding: 24px 32px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid #f0f0f0;
}

.noa-doc-view-footer {
    padding: 20px 32px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.noa-doc-org {
    display: flex;
    align-items: center;
    gap: 12px;
}

.noa-doc-org-logo {
    max-height: 40px;
    max-width: 40px;
    border-radius: 4px;
}

.noa-doc-org strong {
    display: block;
    color: #1e3a5f;
    font-size: 14px;
}

.noa-doc-org span {
    font-size: 11px;
    color: #888;
}

.noa-doc-login-link {
    color: #1e3a5f;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 16px;
    border: 1px solid #1e3a5f;
    border-radius: 6px;
}

.noa-doc-login-link:hover {
    background: #1e3a5f;
    color: #fff;
}

.noa-doc-view-error {
    background: #fff;
    border-radius: 12px;
    padding: 60px 32px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.noa-doc-view-error .dashicons {
    font-size: 64px;
    color: #dc3545;
    width: 64px;
    height: 64px;
    display: block;
    margin: 0 auto 16px;
}

.noa-doc-view-error h1 {
    color: #1e3a5f;
    margin: 0 0 8px;
}

.noa-doc-view-error p {
    color: #666;
    margin: 0 0 20px;
}

.noa-doc-preview {
    padding: 20px 32px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #f0f0f0;
}

.noa-doc-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

/* Empty state */
.noa-empty-state {
    background: #fff;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.noa-empty-state .dashicons {
    font-size: 64px;
    color: #c9a961;
    width: 64px;
    height: 64px;
    display: block;
    margin: 0 auto 16px;
}

.noa-empty-state h3 {
    color: #1e3a5f;
    margin: 0 0 8px;
}

.noa-empty-state p {
    margin: 0 0 20px;
}

/* Buttons */
.noa-btn-lg {
    padding: 12px 24px !important;
    font-size: 15px !important;
}

.noa-btn-success {
    background: #28a745 !important;
    color: #fff !important;
    border-color: #28a745 !important;
}

@media (max-width: 768px) {
    .noa-documents-grid {
        grid-template-columns: 1fr;
    }
    .noa-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    .noa-doc-view-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .noa-doc-view-actions {
        flex-direction: column;
    }
    .noa-doc-view-actions .noa-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Verify page body preview ===== */
.noa-verify-body-preview {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border-right: 3px solid #1e3a5f;
}

.noa-verify-body-preview h3 {
    margin: 0 0 10px;
    color: #1e3a5f;
    font-size: 14px;
}

.noa-letter-body-content {
    color: #555;
    font-size: 13px;
    line-height: 1.7;
    max-height: 300px;
    overflow-y: auto;
}

.noa-letter-body-content p {
    margin: 0 0 8px;
}
