/* Persian Dashboard System - Main Stylesheet */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Shabnam', 'IranSans', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    text-align: right;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-logo {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: var(--bg-color);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li {
    margin: 0.25rem 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    gap: 0.75rem;
}

.sidebar-menu a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.sidebar-menu a.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.sidebar-menu-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-menu-text {
    display: none;
}

/* Main Content */
.main-content {
    margin-right: var(--sidebar-width);
    transition: margin-right 0.3s ease;
    min-height: 100vh;
    /* MOBILE RESPONSIVENESS FIX: Ensure content respects viewport width */
    width: calc(100% - var(--sidebar-width));
    overflow-x: hidden;
}

.sidebar.collapsed ~ .main-content {
    margin-right: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

/* Top Bar */
.top-bar {
    background: var(--card-bg);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    /* MOBILE RESPONSIVENESS FIX: Allow card header to wrap on mobile */
    flex-wrap: wrap;
    gap: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.5rem;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: #dc2626;
}

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

.btn-warning:hover {
    background: #d97706;
}

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

.btn-secondary:hover {
    background: #475569;
}

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

.btn-outline:hover {
    background: var(--bg-color);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--card-bg);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control:disabled {
    background: var(--bg-color);
    cursor: not-allowed;
}

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

select.form-control {
    cursor: pointer;
}

/* Tables */
/* MOBILE RESPONSIVENESS FIX: Ensure table container scrolls properly on mobile without overflow */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    display: block;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
    /* MOBILE RESPONSIVENESS FIX: Prevent table from forcing width overflow */
    table-layout: auto;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-primary);
}

.table tbody tr:hover {
    background: var(--bg-color);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

.badge-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: var(--secondary-color);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(37, 99, 235, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-color) 25%, rgba(255,255,255,0.5) 50%, var(--bg-color) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
    height: 1rem;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Footer */
.footer {
    background: var(--card-bg);
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* MOBILE RESPONSIVENESS FIX: Remove sidebar margin and set full width on mobile */
    .main-content {
        margin-right: 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    .top-bar {
        padding: 1rem;
    }
    
    /* MOBILE RESPONSIVENESS FIX: Reduce padding and ensure card fits viewport */
    .card {
        padding: 1rem;
        margin: 0 -1rem;
        border-radius: 0;
        box-shadow: none;
    }
    
    /* MOBILE RESPONSIVENESS FIX: Adjust card header layout for mobile */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .card-title {
        width: 100%;
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    /* MOBILE RESPONSIVENESS FIX: Stack button groups vertically on mobile */
    .card-header .d-flex {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .card-header .d-flex .btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 80px;
        font-size: 0.7rem;
        padding: 0.375rem 0.375rem;
        white-space: nowrap;
    }
    
    /* MOBILE RESPONSIVENESS FIX: Enable horizontal scrolling for tables on mobile */
    .table-container {
        font-size: 0.875rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
        max-width: 100vw;
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
    
    /* MOBILE RESPONSIVENESS FIX: Set minimum width for proper scrolling */
    .table {
        min-width: 500px;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Mobile sidebar toggle */
    .mobile-menu-toggle {
        display: inline-flex !important;
        margin-right: 1rem;
    }
    
    /* Mobile sidebar overlay */
    .sidebar {
        transform: translateX(100%);
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: var(--sidebar-width);
        z-index: 1000;
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
        width: 100%;
    }
    
    .sidebar.collapsed {
        width: var(--sidebar-width);
    }
    
    /* Sidebar overlay backdrop */
    .sidebar.active::after {
        content: '';
        position: fixed;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* INVENTORY SECTION MOBILE RESPONSIVENESS FIX */
/* Card-style rows for inventory list */
.inventory-item {
    border: 1px solid #ddd;
    display: block;
    padding: 12px;
    margin: 8px 0;
    background: #f9f9f9;
    border-radius: 4px;
}

.inventory-item-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

.inventory-item-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 10px;
}

.inventory-stat-box {
    padding: 8px;
    border-radius: 3px;
    text-align: center;
}

.inventory-stat-label {
    font-size: 0.85rem;
    color: #666;
}

.inventory-stat-value {
    font-size: 1.2rem;
    font-weight: bold;
}

.inventory-code-badge {
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 3px;
}

.inventory-stat-total {
    background: #fff3e0;
}

.inventory-stat-available {
    background: #e8f5e9;
    color: #2e7d32;
}

.inventory-stat-assigned {
    background: #e3f2fd;
    color: #1565c0;
}

.inventory-stat-sold {
    background: #f3e5f5;
    color: #6a1b9a;
}

/* Assigned items row styles */
.inventory-assigned-item {
    border: 1px solid #ddd;
    margin: 5px 0;
    display: block;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.inventory-assigned-row {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

/* MOBILE RESPONSIVENESS FIX: Stack inventory items on small screens */
@media (max-width: 768px) {
    .inventory-item-header {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .inventory-item-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .inventory-stat-box {
        padding: 6px;
        font-size: 0.9rem;
    }
    
    .inventory-stat-label {
        font-size: 0.75rem;
    }
    
    .inventory-stat-value {
        font-size: 1rem;
    }
    
    .inventory-assigned-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .inventory-assigned-item {
        padding: 8px;
        margin: 4px 0;
    }
}

@media (max-width: 480px) {
    .inventory-item {
        padding: 8px;
        margin: 4px 0;
    }
    
    .inventory-item-header {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .inventory-item-stats {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .inventory-stat-box {
        padding: 4px;
        font-size: 0.8rem;
    }
    
    .inventory-stat-label {
        font-size: 0.65rem;
    }
    
    .inventory-stat-value {
        font-size: 0.9rem;
    }
}

/* JALALI DATE HANDLING: Shamsi (Persian) Date Picker Styles */

.shamsi-date-picker-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* JALALI DATE HANDLING: Date input field - shows selected Jalali date */
.shamsi-date-input {
    direction: ltr;
    text-align: left;
    padding-right: 2.8rem !important;
    cursor: pointer !important;
    font-family: 'Vazirmatn', 'Tahoma', monospace;
    letter-spacing: 0.08em;
    font-weight: 500;
    transition: all 0.2s ease;
    background: var(--card-bg) !important;
}

.shamsi-date-input:hover {
    background-color: rgba(37, 99, 235, 0.05) !important;
    border-color: var(--primary-color) !important;
}

.shamsi-date-input:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

/* JALALI DATE HANDLING: Calendar button - opens date picker */
.shamsi-date-picker-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0.4rem 0.6rem;
    transition: all 0.2s ease;
    z-index: 10;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.shamsi-date-picker-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.15);
}

.shamsi-date-picker-btn:active {
    transform: translateY(-50%) scale(0.9);
}

.shamsi-date-picker-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* JALALI DATE HANDLING: Calendar popup - Jalali calendar modal */
.shamsi-calendar {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: auto;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 1.25rem;
    z-index: 1001;
    min-width: 340px;
    max-width: 400px;
    animation: slideDownCalendar 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideDownCalendar {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* JALALI DATE HANDLING: Calendar header with navigation */
.shamsi-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

/* JALALI DATE HANDLING: Month/Year navigation buttons */
.shamsi-calendar-nav {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.35rem 0.65rem;
    color: var(--primary-color);
    transition: all 0.2s ease;
    font-weight: 700;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shamsi-calendar-nav:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.shamsi-calendar-nav:active {
    transform: scale(0.95);
}

/* JALALI DATE HANDLING: Month and year selectors */
.shamsi-calendar-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex: 1;
    direction: rtl;
}

.shamsi-month-select,
.shamsi-year-input {
    padding: 0.5rem 0.85rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.4rem;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    direction: rtl;
    text-align: right;
    background: var(--bg-color);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.shamsi-month-select:hover,
.shamsi-year-input:hover {
    border-color: var(--primary-color);
    background: white;
}

.shamsi-month-select:focus,
.shamsi-year-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

.shamsi-month-select {
    flex: 1;
    min-width: 0;
}

.shamsi-year-input {
    width: 85px;
}

/* JALALI DATE HANDLING: Calendar grid table */
.shamsi-calendar-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    direction: rtl;
    table-layout: fixed;
}

/* JALALI DATE HANDLING: Day names (ش ی د س چ پ ج) */
.shamsi-calendar-table thead th {
    padding: 0.75rem 0.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.85rem;
    border-bottom: 2px solid var(--primary-color);
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* JALALI DATE HANDLING: Calendar day cells */
.shamsi-calendar-table tbody td {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0.4rem;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    min-width: 0;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* JALALI DATE HANDLING: Clickable days (not empty) */
.shamsi-calendar-table tbody td:not(.shamsi-empty) {
    background: white;
    color: var(--text-primary);
}

.shamsi-calendar-table tbody td:not(.shamsi-empty):hover {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    transform: scale(1.08);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

.shamsi-calendar-table tbody td:not(.shamsi-empty):active {
    transform: scale(0.92);
}

/* JALALI DATE HANDLING: Empty cells (other months' days) */
.shamsi-calendar-table tbody td.shamsi-empty {
    cursor: default;
    background: transparent;
    color: transparent;
}

/* JALALI DATE HANDLING: Selected day styling */
.shamsi-calendar-table tbody td.selected {
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
    border-radius: 0.5rem;
}

.shamsi-calendar-table tbody td.selected:hover {
    background: var(--primary-dark);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.4);
}

/* JALALI DATE HANDLING: Today's date styling */
.shamsi-calendar-table tbody td.today {
    border: 2px solid var(--success-color);
    font-weight: 600;
}

.shamsi-calendar-table tbody td.today:not(.selected):hover {
    background: rgba(16, 185, 129, 0.1);
}

/* JALALI DATE HANDLING: Responsive design for smaller screens */
@media (max-width: 480px) {
    .shamsi-calendar {
        min-width: 300px;
        max-width: 320px;
        padding: 1rem;
    }
    
    .shamsi-calendar-table tbody td {
        height: 38px;
        font-size: 0.85rem;
    }
    
    .shamsi-calendar-table thead th {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .shamsi-month-select,
    .shamsi-year-input {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
}

