:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --sidebar-width: 250px;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --dropdown-bg: #0f172a;
    --dropdown-hover: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Vazir", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-feature-settings: "ss01" !important;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    font-family: "Vazir" !important;
    font-feature-settings: "ss01" !important;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #152158 0%, #1f043a 100%);
    direction: rtl;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== استایل‌های پایه ===== */
.dir-ltr {
    direction: ltr !important;
}
.idir-rtl {
    direction: rtl !important;
}
.imr-10 {
    margin-right: 10px !important;
}
.iheight-auto {
    height: auto !important;
}
.text-purple {
    color: #8b5cf6 !important;
}
.modal-backdrop {
    z-index: -1 !important;
}
pre {
    direction: rtl !important;
}

/* ===== Glassmorphism ===== */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

.glass-effect-log {
    background: #212529cf;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

/* ===== Form Controls ===== */
.form-control {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    color: white;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-control-lg {
    padding: 15px;
    font-size: 1.1rem;
}

.form-control.is-invalid {
    border-color: rgba(239, 68, 68, 0.5) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* ===== Select استایل‌ها ===== */
.form-select,
.custom-select {
    background-color: var(--dropdown-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    padding: 12px 15px !important;
    border-radius: 10px !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: left 0.75rem center !important;
    background-size: 16px 12px !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.form-select option,
.custom-select option {
    background-color: var(--dropdown-bg) !important;
    color: #ffffff !important;
    padding: 10px !important;
}

.form-select option:hover,
.form-select option:checked,
.custom-select option:hover,
.custom-select option:checked {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.form-select:focus,
.custom-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

/* ===== Input Group ===== */
.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    margin-bottom: 0;
}

.input-group-lg .form-control,
.input-group-lg .input-group-text {
    padding: 15px;
    font-size: 1.1rem;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: all 0.3s;
}

.input-group:focus-within .input-group-text {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* ===== Form Check ===== */
.form-check {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    cursor: pointer;
    user-select: none;
}

.form-check-input {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.form-check-input:checked {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.form-check-input:checked::after {
    /* content: "✓"; */
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.form-check-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 500;
}

.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}

/* ===== اعتبارسنجی ===== */
.is-invalid {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.is-invalid:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.invalid-feedback {
    color: #f87171;
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== Label ===== */
.form-label {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Buttons ===== */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(-1px);
}

.btn i {
    font-size: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}
.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
}
.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}
.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}
.btn-info {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.btn-outline-primary:hover {
    background: rgba(59, 130, 246, 0.1);
}

.btn-group > .btn {
    border-radius: 10px !important;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.btn-close-white:hover {
    opacity: 1;
}

.btn-clear-date {
    border-radius: 0 10px 10px 0;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.badge i {
    font-size: 12px;
}

.badge-primary {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}
.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}
.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}
.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}
.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}

/* ===== Status Badges ===== */
.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    min-width: 80px;
}

.status-processing {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.status-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-canceled {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== Alerts ===== */
.alert {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease;
}

.alert i {
    font-size: 20px;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 16px;
}

.alert-message {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
}
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}
.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

/* Alert با border-right */
.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.alerts-container .alert {
    padding: 12px 15px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    border-right: 4px solid #ef4444;
}

.alerts-container .alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-right-color: #f59e0b;
}

.alerts-container .alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-right-color: #3b82f6;
}

.alert-icon {
    margin-left: 10px;
    font-size: 20px;
}
.alert-danger .alert-icon {
    color: #ef4444;
}
.alert-warning .alert-icon {
    color: #f59e0b;
}
.alert-info .alert-icon {
    color: #3b82f6;
}

.alert-content p {
    margin: 0;
    font-size: 14px;
}
.alert-content small {
    color: #aaa;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* ===== Cards ===== */
.card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.card-header h3 {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    border: none;
    padding: 0;
}

.card-body {
    padding: 25px;
}

.card-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

/* ===== Tables ===== */
.table-responsive {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table {
    width: 100%;
    color: whitesmoke;
    border-collapse: collapse;
    min-width: 600px;
    text-wrap: nowrap !important;
}

.table th {
    padding: 15px;
    text-align: right;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    word-break: break-word;
}

.table tr:last-child td {
    border-bottom: none;
}
.table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ===== Header Section ===== */
.header-section {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.icon-wrapper:hover {
    transform: translateY(-5px);
}

/* ===== Form Sections ===== */
.form-section {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.section-header i {
    font-size: 1.5rem;
    margin-left: 10px;
}
.section-header h5 {
    margin: 0;
    font-weight: 600;
}

.form-content {
    padding: 0 5px;
}

.form-actions {
    background: rgba(30, 41, 59, 0.5);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.specifications-grid .form-control {
    text-align: center;
    font-weight: 600;
}

.weight-calculator .card {
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.1),
        rgba(59, 130, 246, 0.05)
    );
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ===== Modal ===== */
.glass-modal {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.preview-section {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.preview-value {
    font-weight: 500;
    color: white;
    text-align: left;
    max-width: 60%;
}

/* ===== Login Page ===== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(
            circle at 20% 80%,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 20%,
            rgba(255, 255, 255, 0.05) 0%,
            transparent 50%
        );
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    z-index: 1;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

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

.login-header .logo {
    font-size: 60px;
    margin-bottom: 20px;
    display: block;
    color: white;
}

.login-header h1 {
    color: white;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
}

.company-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    letter-spacing: 0.5px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 25px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.login-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.login-info h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.info-value {
    color: white;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 14px;
}

.system-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-top: 10px;
}

.system-status i {
    color: #10b981;
}

/* ===== Dashboard Sidebar ===== */
.dashboard-container {
    min-height: 100vh;
    position: relative;
    width: 100%;
    overflow-x: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.sidebar-header h2 {
    color: white;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
}
.sidebar-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.sidebar-menu {
    list-style: none;
    margin-top: 20px;
    padding: initial !important;
}

.sidebar-menu li {
    margin-bottom: 8px;
}
.sidebar-menu ul,
.sidebar-menu ol {
    padding-right: 0px !important;
    padding-left: 0px !important;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(-5px);
}

.sidebar-menu i {
    margin-left: 10px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-menu .active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 500;
}

.sidebar-menu .active:hover {
    background: rgba(255, 255, 255, 0.25);
}

.imgactive {
    background: rgba(255, 255, 255, 0.25);
    padding: 10px;
    border-radius: 10px;
}

.sidebar form button {
    width: 100%;
    text-align: right;
    padding: 12px 15px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.sidebar form button:hover {
    background: rgba(239, 68, 68, 0.3);
    color: white;
    transform: translateX(-5px);
}

.sidebar-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.sidebar-footer p {
    margin-bottom: 5px;
}

/* ===== Main Content ===== */
.main-content {
    margin-right: var(--sidebar-width);
    padding: 20px;
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    box-sizing: border-box;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-section h1 {
    color: white;
    font-size: 26px;
    margin-bottom: 8px;
    font-weight: 600;
}
.welcome-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}
.user-info {
    text-align: left;
}
.user-info h4 {
    color: white;
    margin-bottom: 5px;
    font-size: 16px;
    font-weight: 600;
}
.user-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 25px;
    color: white;
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
}
.stat-card p {
    opacity: 0.9;
    margin-bottom: 15px;
    font-size: 15px;
    font-weight: 500;
}
.stat-card i {
    font-size: 45px;
    margin-bottom: 20px;
    opacity: 0.9;
}
.stat-card span {
    font-size: 14px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.today-orders {
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.9),
        rgba(58, 24, 93, 0.9)
    );
}
.today-orders i {
    color: #667eea;
}

.total-sales {
    background: linear-gradient(
        135deg,
        rgba(240, 147, 251, 0.9),
        rgba(163, 52, 67, 0.9)
    );
}
.total-sales i {
    color: #f093fb;
}

.customers {
    background: linear-gradient(
        135deg,
        rgba(79, 172, 254, 0.9),
        rgba(33, 113, 117, 0.9)
    );
}
.customers i {
    color: #4facfe;
}

.products {
    background: linear-gradient(
        135deg,
        rgba(67, 233, 123, 0.9),
        rgba(40, 137, 120, 0.9)
    );
}
.products i {
    color: #43e97b;
}

.positive-change {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}
.negative-change {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* ===== Content & Charts ===== */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.content-card {
    padding: 30px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-card h3 {
    color: white;
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-controls {
    display: flex;
    gap: 8px;
}
.chart-container {
    height: 300px;
    position: relative;
}
.mini-chart-container {
    position: absolute;
    bottom: 10px;
    right: 10px;
    left: 10px;
    height: 60px;
}
.mini-chart-container canvas {
    width: 100% !important;
    height: 60px !important;
}

.btn-action {
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}
.btn-action.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}
.btn-action.active:hover {
    background: #2563eb;
}

/* ===== System Status ===== */
.system-status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.system-square {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.system-square:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.system-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.php-version .system-icon {
    background: linear-gradient(
        135deg,
        rgba(23, 162, 184, 0.2),
        rgba(19, 132, 150, 0.2)
    );
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.3);
}
.laravel-version .system-icon {
    background: linear-gradient(
        135deg,
        rgba(255, 45, 32, 0.2),
        rgba(227, 36, 30, 0.2)
    );
    color: #ff2d20;
    border: 1px solid rgba(255, 45, 32, 0.3);
}
.disk-space .system-icon {
    background: linear-gradient(
        135deg,
        rgba(253, 126, 20, 0.2),
        rgba(231, 106, 0, 0.2)
    );
    color: #fd7e14;
    border: 1px solid rgba(253, 126, 20, 0.3);
}
.system-time {
    background: linear-gradient(
        135deg,
        rgba(251, 255, 32, 0.2),
        rgba(227, 224, 30, 0.2)
    ) !important;
    color: #fbff20 !important;
    border: 1px solid rgba(255, 240, 32, 0.3) !important;
}
.uptime .system-icon {
    background: linear-gradient(
        135deg,
        rgba(220, 53, 69, 0.2),
        rgba(200, 35, 51, 0.2)
    );
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.system-info h4 {
    margin: 0 0 5px 0;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}
.system-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* ===== Smart Analysis ===== */
.smart-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.analysis-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.analysis-item:hover {
    transform: translateY(-5px);
}

.analysis-icon {
    background: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    color: white;
    font-size: 20px;
}

.analysis-content h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #ccc;
}
.analysis-content p {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: white;
}
.analysis-content small {
    color: #aaa;
    font-size: 12px;
}

/* ===== Recommendations ===== */
.recommendations-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.recommendation {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.recommendation:hover {
    background: rgba(255, 255, 255, 0.1);
}

.rec-icon {
    background: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    color: white;
    font-size: 18px;
}

.rec-content h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: white;
}
.rec-content p {
    margin: 0;
    font-size: 12px;
    color: #ccc;
}

/* ===== Predictions ===== */
.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.prediction-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.prediction-card:hover {
    transform: translateY(-5px);
}

.prediction-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 24px;
}

.prediction-content h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #ccc;
}
.prediction-value {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin: 10px 0;
}
.prediction-content small {
    color: #aaa;
    font-size: 12px;
}

/* ===== Menu Toggle (Mobile) ===== */
.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 20px;
    cursor: pointer;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(3px);
}

/* ===== Search Dropdown ===== */
.search-container {
    position: relative;
    width: 100%;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dropdown-bg) !important;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 12px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    width: 100%;
}

.customer-search-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--dropdown-bg) !important;
}

.customer-search-item:last-child {
    border-bottom: none;
}
.customer-search-item:hover {
    background: var(--dropdown-hover) !important;
}

.customer-search-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.customer-search-info {
    flex: 1;
    min-width: 0;
}

.customer-search-name {
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.3;
}

.customer-search-contact {
    font-size: 12px;
    color: #cbd5e1 !important;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.customer-search-contact span {
    color: #cbd5e1 !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.customer-search-contact i {
    margin-left: 3px;
}

.customer-search-address {
    font-size: 11px;
    color: #94a3b8 !important;
    margin-top: 5px;
    line-height: 1.4;
}

.customer-search-badge {
    background: #f59e0b !important;
    color: #000000 !important;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 10px;
    margin-right: 6px;
    font-weight: 700;
    display: inline-block;
}

.search-loading {
    padding: 25px;
    text-align: center;
    color: #e2e8f0 !important;
    background: var(--dropdown-bg) !important;
    font-size: 14px;
}

.search-loading i {
    color: #3b82f6 !important;
    margin-left: 8px;
}

.search-no-result {
    padding: 25px;
    text-align: center;
    color: #94a3b8 !important;
    background: var(--dropdown-bg) !important;
    font-size: 14px;
}

/* ===== Customer Search Input ===== */
#customer_search {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 2px solid rgba(59, 130, 246, 0.3) !important;
    border-radius: 12px;
    color: #ffffff !important;
    height: 50px;
    font-size: 15px;
    padding: 0 20px;
    transition: all 0.3s ease;
    width: 100%;
}

#customer_search:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important;
    outline: none;
    background: rgba(15, 23, 42, 0.95) !important;
}

#customer_search::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 14px;
}

#customer_search:disabled {
    background: rgba(15, 23, 42, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    cursor: not-allowed;
}

#ajaxSearch:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    border-color: #3b82f6;
}

#searchInfo {
    transition: all 0.3s ease;
}

/* ===== Search Terms Highlight ===== */
.highlight {
    background-color: rgba(59, 130, 246, 0.2);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.search-term {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 2px;
    font-size: 0.9em;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.search-term.not-term {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* ===== Persian Datepicker ===== */
.pdp-default {
    font-family:
        "Vazir", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
}
.persian-datepicker-container {
    z-index: 99999 !important;
}
.pdp-days > .pdp-day {
    font-family: "Vazir" !important;
}
.date-display {
    font-family: "Vazir" !important;
}
.jalali-datetime-picker {
    direction: ltr;
    text-align: right;
    font-family: Vazir, sans-serif;
}

/* ===== Toast ===== */
.toast-message {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}
.search-results-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}
.search-results-dropdown::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.4);
    border-radius: 3px;
}
.search-results-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.6);
}

/* ===== Animations ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .main-grid,
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        right: 15px;
        top: 15px;
    }
    .sidebar {
        transform: translateX(100%);
        width: 280px;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-right: 0 !important;
        width: 100% !important;
        padding: 15px;
        padding-top: 70px;
    }

    .header-section .d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }

    .header-section .d-flex > div {
        width: 100%;
        margin-bottom: 15px;
    }

    .top-header {
        flex-direction: column;
        align-items: flex-end;
        gap: 20px;
        padding: 20px;
        margin: 0 0 20px 0;
        width: 100%;
        box-sizing: border-box;
    }

    .user-profile {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .form-actions .d-flex {
        flex-direction: column;
        gap: 15px;
    }
    .form-actions .d-flex > div {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .table {
        min-width: 600px;
    }

    .table-responsive {
        margin: 0 -15px;
        padding: 0 15px;
        width: calc(100% + 30px);
    }

    .table th,
    .table td {
        padding: 10px;
        font-size: 13px;
        white-space: nowrap !important;
    }

    .content-card {
        padding: 20px;
        margin: 0 0 20px 0 !important;
        width: 100%;
        box-sizing: border-box;
    }

    .welcome-section h1 {
        font-size: 22px;
    }
    .welcome-section p {
        font-size: 14px;
    }
    .avatar {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    .user-info h4 {
        font-size: 15px;
    }
    .user-info p {
        font-size: 13px;
    }

    .stat-card,
    .content-card,
    .top-header {
        max-width: 100%;
        overflow: hidden;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }

    .stat-card {
        padding: 20px 15px;
        min-height: 140px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        text-align: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .stat-card i {
        font-size: 35px;
        margin-bottom: 15px;
        align-self: flex-start;
    }
    .stat-card h3 {
        font-size: 28px;
        margin-bottom: 5px;
        line-height: 1.2;
        font-weight: 700;
    }
    .stat-card p {
        font-size: 14px;
        margin-bottom: 10px;
        opacity: 0.9;
        font-weight: 500;
    }
    .stat-card span {
        font-size: 13px;
        opacity: 0.8;
        margin-top: 5px;
    }

    .system-status-grid {
        grid-template-columns: 1fr;
    }
    .system-square {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .auth-card {
        padding: 25px 15px;
        max-width: 95%;
    }
    .login-header .logo {
        font-size: 50px;
    }
    .login-header h1 {
        font-size: 24px;
    }
    .form-control {
        padding: 12px 14px;
        font-size: 15px;
    }
    .btn-login {
        padding: 13px;
        font-size: 15px;
    }
    .info-label,
    .info-value {
        font-size: 12px;
    }

    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 576px) {
    .table {
        min-width: 500px;
    }
    .main-content {
        padding: 10px;
        padding-top: 60px;
    }
    .stat-card {
        padding: 15px;
    }
    .stat-card h3 {
        font-size: 24px;
    }

    .table th,
    .table td {
        padding: 8px 6px;
        font-size: 12px;
        white-space: nowrap !important;
    }

    .top-header {
        padding: 12px;
        margin-bottom: 15px;
    }
    .content-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 18px 12px;
        min-height: 130px;
        border-radius: 10px;
    }
    .stat-card i {
        font-size: 32px;
        margin-bottom: 12px;
    }
    .stat-card h3 {
        font-size: 24px;
        font-weight: 600;
    }
    .stat-card p {
        font-size: 13px;
        margin-bottom: 8px;
    }
    .stat-card span {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .table {
        min-width: 400px;
    }
    .table th,
    .table td {
        padding: 6px 4px;
        font-size: 11px;
        white-space: nowrap !important;
    }

    .main-content {
        padding: 8px;
        padding-top: 55px;
    }
    .top-header {
        padding: 10px;
    }

    .welcome-section h1 {
        font-size: 18px;
        line-height: 1.3;
    }
    .welcome-section p {
        font-size: 12px;
        line-height: 1.4;
    }

    .avatar {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
    .user-info h4 {
        font-size: 14px;
    }
    .user-info p {
        font-size: 12px;
    }

    .content-card {
        padding: 12px;
    }
    .btn {
        padding: 8px 15px;
        font-size: 13px;
    }

    .stats-grid {
        gap: 12px;
    }
    .stat-card {
        padding: 16px 10px;
        min-height: 120px;
        border-radius: 8px;
    }
    .stat-card i {
        font-size: 30px;
        margin-bottom: 10px;
    }
    .stat-card h3 {
        font-size: 22px;
    }
    .stat-card p {
        font-size: 12px;
        margin-bottom: 6px;
    }
    .stat-card span {
        font-size: 11px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .stat-card {
        min-height: 120px;
        padding: 15px 10px;
    }
}

@supports (-webkit-touch-callout: none) {
    .main-content {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

@media (hover: none) {
    .stat-card:hover,
    .system-square:hover,
    .btn:hover {
        transform: none;
    }
    .stat-card:active,
    .system-square:active,
    .btn:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
}
/* برای اطمینان از اعمال روی همه select ها */
select option {
    background-color: #1e3a8a !important;
    color: #ffffff !important;
}

select option:hover,
select option:checked {
    background-color: #1e3a8a !important;
    color: #ffffff !important;
}
/* حذف فلش‌های input number و غیرفعال کردن اسکرول */
input[type="number"] {
    -moz-appearance: textfield !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0;
}

/* حذف فلش‌ها در مرورگرهای Webkit (Chrome, Safari, Edge) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
    display: none !important;
}

/* غیرفعال کردن تغییر مقدار با اسکرول ماوس */
input[type="number"] {
    -moz-appearance: textfield;
}

/* غیرفعال کردن اسکرول برای همه input های عددی */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* ===== Fix Switch Checkbox ===== */
.form-switch {
    padding-right: 3.5em !important;
    min-height: 1.5em;
}

.form-switch .form-check-input {
    width: 3em !important;
    height: 1.6em !important;
    margin-right: -3.5em !important;
    background-position: right center !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    border-radius: 2em !important;
    background-color: rgba(255, 255, 255, 0.25) !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-switch .form-check-input:checked {
    background-position: left center !important;
    background-color: #10b981 !important;
}

.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

.form-switch .form-check-label {
    cursor: pointer;
    user-select: none;
    padding-top: 2px;
}

/* حذف کامل علامت چک (تیک) */
.form-switch .form-check-input::after,
.form-switch .form-check-input::before {
    display: none !important;
}
/* حذف تیک ✓ برای همه چک‌باکس‌ها و سوئیچ‌ها */
.form-check-input::after,
.form-check-input::before,
.form-check-input:checked::after,
.form-check-input:checked::before,
.form-switch .form-check-input::after,
.form-switch .form-check-input::before,
.form-switch .form-check-input:checked::after,
.form-switch .form-check-input:checked::before {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}
/* تاریخچه تغییرات */
.changes-detail {
    font-size: 0.9rem;
    line-height: 1.8;
}

.change-line {
    color: rgba(255, 255, 255, 0.85);
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.change-line:last-child {
    border-bottom: none;
}

.change-line i {
    font-size: 0.7rem;
}
.multiline-text {
    /* white-space: pre-wrap !important; */
    word-wrap: break-word !important;
    word-break: break-word !important;
    line-height: 1.6 !important;
    /* حذف فضای خالی ابتدای خطوط */
    text-indent: 0 !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    direction: rtl !important;
    text-wrap: auto !important;
}
.ifrom {
    color: orange;
}
.ito {
    color: #059669;
}

/* PWA */
/* ==========================================
   PWA Install Prompt Styles
   ========================================== */

/* انیمیشن‌های عمومی */
@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Modal اصلی نصب */
.pwa-install-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.pwa-install-modal.hidden {
    display: none;
}

.pwa-install-card {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Header کارت */
.pwa-install-header {
    margin-bottom: 1.5rem;
}

.pwa-install-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

.pwa-install-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.pwa-install-subtitle {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Features */
.pwa-install-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 16px;
}

.pwa-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #555;
}

.pwa-feature-icon {
    font-size: 1.5rem;
}

/* Buttons */
.pwa-install-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.pwa-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pwa-btn-install {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pwa-btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.pwa-btn-install::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    animation: shimmer 3s infinite;
    background-size: 200% 100%;
}

.pwa-btn-later {
    background: #f1f3f5;
    color: #555;
}

.pwa-btn-later:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* دکمه شناور کوچک */
.pwa-float-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    cursor: pointer;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}

.pwa-float-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.7);
}

.pwa-float-button.hidden {
    display: none;
}

/* Tooltip برای دکمه شناور */
.pwa-float-tooltip {
    position: fixed;
    bottom: 85px;
    right: 10px;
    background: #333;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 99997;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.pwa-float-tooltip.show {
    opacity: 1;
}

.pwa-float-tooltip::after {
    content: "";
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: #333;
    transform: rotate(45deg);
}

/* Media Query برای موبایل */
@media (max-width: 480px) {
    .pwa-install-card {
        padding: 1.5rem;
        width: 95%;
    }

    .pwa-install-features {
        gap: 1rem;
    }

    .pwa-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .pwa-float-button {
        bottom: 80px; /* برای اینکه با منوی پایین گوشی تداخل نداشته باشه */
    }
}

/* RTL Support */
[dir="rtl"] .pwa-float-button {
    right: auto;
    left: 20px;
}

[dir="rtl"] .pwa-float-tooltip {
    right: auto;
    left: 10px;
}

[dir="rtl"] .pwa-float-tooltip::after {
    right: auto;
    left: 20px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .pwa-install-card {
        background: #1a1a2e;
        color: white;
    }

    .pwa-install-title {
        color: white;
    }

    .pwa-install-subtitle {
        color: #aaa;
    }

    .pwa-install-features {
        background: #16213e;
    }

    .pwa-feature {
        color: #ccc;
    }

    .pwa-btn-later {
        background: #16213e;
        color: #aaa;
    }

    .pwa-btn-later:hover {
        background: #0f3460;
    }
}

/* End PWA */
