@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSansWeb-fa.woff2') format('woff2'),
         url('../fonts/IRANSansWeb-fa.woff') format('woff'),
         url('../fonts/IRANSansWeb-fa.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body,
input,
button,
select,
textarea,
table {
    font-family: 'IRANSans', Tahoma, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background: #f5f7fb;
    color: #1f2937;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

.mobile-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: #111827;
    color: #fff;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.menu-toggle {
    background: #374151;
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
}

.sidebar {
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #111827, #1f2937);
    position: fixed;
    right: 0;
    top: 0;
    padding: 24px 16px;
    color: white;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 800;
}

.sidebar-header p {
    font-size: 14px;
    color: #cbd5e1;
    margin-top: 6px;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu li a {
    display: block;
    padding: 14px 16px;
    border-radius: 14px;
    color: #e5e7eb;
    transition: 0.3s;
    font-size: 15px;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.logout-link {
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca !important;
}

.main-content {
    margin-right: 260px;
    padding: 30px;
    min-height: 100vh;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.topbar-right h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.topbar-right p {
    color: #6b7280;
    font-size: 14px;
}

.topbar-left {
    background: white;
    padding: 14px 18px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    font-weight: 700;
    color: #111827;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-4px);
}

.card h3 {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 14px;
}

.card .value {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
}

.welcome-box {
    margin-top: 30px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.25);
}

.welcome-box h2 {
    margin-bottom: 12px;
    font-size: 24px;
}

.welcome-box p {
    line-height: 2;
    color: rgba(255,255,255,0.92);
}

.date-widget {
    margin-top: 25px;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.date-widget label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}

.date-widget input {
    width: 100%;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    font-size: 15px;
    outline: none;
}

.date-widget input:focus {
    border-color: #2563eb;
}

@media (max-width: 1100px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-topbar {
        display: flex;
    }

    .sidebar {
        transform: translateX(100%);
        width: 280px;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0;
        padding: 20px;
    }

    .topbar {
        margin-top: 10px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .topbar-right h1 {
        font-size: 22px;
    }

    .welcome-box h2 {
        font-size: 20px;
    }
}
.btn-primary,
.btn-sm {
    display: inline-block;
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 14px;
}

.form-box,
.table-box,
.filter-box {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select,
.filter-box input,
.filter-box select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    outline: none;
}

.filter-box {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    align-items: end;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
}

.data-table th,
.data-table td {
    border: 1px solid #e5e7eb;
    padding: 12px;
    text-align: center;
    white-space: nowrap;
}

.data-table thead th {
    background: #f3f4f6;
    font-weight: 800;
}

.excel-like {
    overflow-x: auto;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
}

@media (max-width: 900px) {
    .filter-box {
        grid-template-columns: 1fr;
    }
}
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-head h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 6px;
}

.page-head p {
    color: #6b7280;
    font-size: 14px;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.full-col {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.btn-primary,
.btn-light,
.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    padding: 11px 16px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.25s ease;
    font-size: 14px;
    font-weight: 700;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-light {
    background: #eef2ff;
    color: #1e3a8a;
}

.btn-light:hover {
    background: #dbeafe;
}

.btn-sm {
    background: #f3f4f6;
    color: #111827;
    padding: 8px 12px;
    font-size: 13px;
}

.btn-sm:hover {
    background: #e5e7eb;
}

.form-box,
.table-box,
.filter-box {
    background: #fff;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 700;
    color: #111827;
}

.form-group input,
.form-group textarea,
.form-group select,
.filter-box input,
.filter-box select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    outline: none;
    background: #fff;
    transition: 0.25s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.filter-box input:focus,
.filter-box select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.req {
    color: #dc2626;
}

.filter-box {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    align-items: end;
}

.filter-actions {
    display: flex;
    align-items: end;
}

.excel-like {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    border: 1px solid #e5e7eb;
    padding: 12px 10px;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

.data-table thead th {
    background: #f8fafc;
    font-weight: 800;
    color: #111827;
}

.data-table tbody tr:nth-child(even) {
    background: #fcfcfd;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    line-height: 1.9;
}

.alert-error ul {
    margin: 0;
    padding-right: 18px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    line-height: 1.9;
}

@media (max-width: 992px) {
    .grid-form {
        grid-template-columns: 1fr;
    }

    .filter-box {
        grid-template-columns: 1fr;
    }
}

.page-actions {
    display: flex;
    justify-content: flex-start; /* دکمه‌ها را سمت راست (در حالت RTL) می‌چیند */
    gap: 12px;
    margin-bottom: 20px;
    margin-top: 10px;
}

.btn-success {
    background-color: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

.btn-success:hover {
    background-color: #218838;
}
.page-actions {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.2s ease;
    color: #fff;
}

.btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-success {
    background: #198754;
    color: #fff;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-primary {
    background: #0d6efd;
    color: #fff;
}

