@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/Material_Icons.woff2) format("woff2");
}

@font-face {
  font-family: 'Material Icons Round';
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/Material_Icons_round.woff2) format("woff2");
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
}

.material-icons.material-icons-round {
  font-family: 'Material Icons Round';
}

@font-face {
  font-family: IRANSans;
  src: url(../fonts/woff2/IRANSansWebFaNum.woff2) format("woff2");
}

@font-face {
  font-family: IRANSansLight;
  src: url(../fonts/woff2/IRANSansWebFaNum_Light.woff2) format("woff2");
}

:root {
  --primary: #1e88e5;
  --primary-light: #e3f2fd;
  --primary-hover: #1976d2;
  --primary-dark: #1565c0;
  --bg-body: #f3f6f9;
  --bg-surface: #ffffff;
  --bg-hover: #f8fafc;
  --text-main: #2d3748;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-primary: 0 8px 16px rgba(68, 158, 247, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  outline: none;
  box-sizing: border-box;
}

body {
  direction: rtl;
  text-align: right;
  font-family: 'IRANSans', sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  font-size: 14px;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-main);
  font-weight: 600;
  margin-top: 0;
}

/* Fixed Links Hover */
a {
  text-decoration: none !important;
  color: var(--primary);
  transition: var(--transition);
}

a:hover,
a:focus,
a:active {
  color: var(--primary-hover);
  text-decoration: none !important;
}

span {
  display: inline-block;
  margin-bottom: 10px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Utilities */
.padding-0 {
  padding: 0 !important;
}

.align-center {
  text-align: center;
}

.align-right {
  text-align: right;
}

.align-left {
  text-align: left;
}

.small-text {
  font-size: 13px;
}

.medium-text {
  font-size: 16px;
}

.large-text {
  font-size: 22px;
  font-weight: bold;
}

.red-text {
  color: #ef4444 !important;
}

.primary-text {
  color: var(--primary) !important;
}

/* Color Backgrounds */
.blue {
  background-color: var(--primary) !important;
  color: white !important;
}

.red {
  background-color: #ef4444 !important;
  color: white !important;
}

.green {
  background-color: #10b981 !important;
  color: white !important;
}

.yellow {
  background-color: #f59e0b !important;
  color: white !important;
}

.blue-light {
  background: #e0f2fe !important;
  color: #0284c7 !important;
}

.yellow-light {
  background: #fef3c7 !important;
  color: #d97706 !important;
}

.red-light {
  background: #fee2e2 !important;
  color: #dc2626 !important;
}

.green-light {
  background: #d1fae5 !important;
  color: #059669 !important;
}

.gray-light {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

.primary-light {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
}

/* Badges for items like '30 items' */
span[class*="-light"] {
  padding: 4px 12px !important;
  border-radius: var(--radius-full) !important;
  font-size: 12px;
  font-weight: normal;
  margin-bottom: 0 !important;
  vertical-align: middle;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--bg-surface);
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  overflow-y: auto;
  border-left: 1px solid var(--border-color);
  padding: 30px 0;
  transition: var(--transition);
}

.sidebar-fixed {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
}

.sidebar .logo {
  max-width: 150px;
  display: block;
  margin: 0 auto 40px;
}

.sidebar .avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  position: relative;
}

.sidebar .avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-light);
  padding: 2px;
}

.sidebar .edit {
  color: var(--primary);
  display: block;
  text-align: center;
  margin-bottom: 30px;
  font-weight: 600;
  font-size: 13px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  margin: 5px 20px;
  padding: 0;
}

.sidebar ul li a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
  border-left: none;
}

.sidebar ul li a i {
  margin-left: 15px;
  font-size: 22px;
  color: var(--text-muted);
  transition: var(--transition);
  float: none;
}

.sidebar ul li a p {
  margin: 0;
}

.sidebar ul li a:hover,
.sidebar ul .active>a {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
}

.sidebar ul li a:hover i,
.sidebar ul .active>a i {
  color: var(--primary);
}

.sidebar ul li ul {
  display: none;
  padding-right: 20px;
}

.sidebar ul .active ul {
  display: block;
  background: transparent;
  padding-top: 5px;
}

.sidebar ul .active ul li {
  margin-right: 0;
}

.sidebar ul .active ul li a {
  color: var(--text-muted);
  padding: 8px 15px;
}

.sidebar ul .active ul li a:hover {
  color: var(--primary);
  background: transparent;
}

/* Topbar */
.topbar {
  height: 80px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  margin-right: 280px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  box-shadow: none;
}

.topbar-fixed {
  position: fixed;
  width: calc(100% - 280px);
}

.topbar .actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.topbar .actions i,
.topbar .actions img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  margin: 0;
  padding: 0;
  float: none;
}

.topbar .actions a:hover i,
.topbar .actions a:hover img {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Page Content */
.page-content {
  margin-right: 280px;
  padding: 40px;
  min-height: calc(100vh - 80px);
  width: calc(100% - 280px);
  float: none;
}

.main {
  margin-top: 0;
}

/* Wizard for login */
.wizard {
  margin-top: 150px;
  margin-bottom: 150px;
}

/* Panels */
.panel {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 30px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.panel>.title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px dashed var(--border-color);
}

.mini-panel {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 25px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 25px;
  transition: var(--transition);
  border: 1px solid transparent;
  height: auto;
}

.mini-panel:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.mini-panel .icon {
  width: 65px;
  height: 65px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-left: 20px;
  float: none;
  margin-top: 0;
  padding: 0;
}

.mini-panel .icon i {
  font-size: 32px;
}

.mini-panel .content {
  display: flex;
  flex-direction: column;
  float: none;
  padding: 0;
  margin-top: 0;
}

.mini-panel .content span {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Square Panel */
.square-panel {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  margin: 10px auto;
  padding: 20px;
  transition: var(--transition);
  text-align: center;
  border: 1px solid var(--border-color);
  cursor: pointer;
  overflow: hidden;
  display: block;
}

.square-panel:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary-light);
}

.square-panel .icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.square-panel .icon i {
  font-size: 32px;
}

.square-panel:hover .icon {
  filter: brightness(95%);
  transform: scale(1.1);
}

.square-panel .content {
  color: var(--text-main);
  font-weight: 500;
}

/* Buttons Fix: Width, Height */
.button {
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: var(--radius-sm);
  padding: 0 30px;
  font-weight: 600;
  text-align: center;
  border: none !important;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-primary) !important;
  height: 50px;
  min-height: 50px;
  outline: none;
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
}

.button:hover,
.button:focus,
.button:active {
  background: var(--primary-hover) !important;
  transform: translateY(-2px);
  color: #fff !important;
  filter: none;
  outline: none;
}

.button input[type="file"] {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 100%;
  min-height: 100%;
  font-size: 100px;
  text-align: right;
  opacity: 0;
  cursor: pointer;
  outline: none;
}

.button.green {
  background: #10b981 !important;
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.25) !important;
}

.button.green:hover {
  background: #059669 !important;
}

.button-small {
  padding: 0 20px;
  font-size: 13px;
  height: 40px;
  min-height: 40px;
  line-height: 40px;
}

/* Red Button Utilities */
.red-border {
  border: 1px solid #ef4444 !important;
  color: #ef4444 !important;
  background: #fee2e2 !important;
  box-shadow: none !important;
}

.red-light-hover:hover {
  background: #fca5a5 !important;
  color: #b91c1c !important;
}

/* Inputs Fix: Height, styling */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select,
textarea {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-hover);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
  margin-bottom: 15px;
  height: 50px;
  min-height: 50px;
}

input[type="submit"] {
  width: 100%;
}

.full-width {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

textarea {
  height: auto;
  min-height: 100px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  cursor: pointer;
  margin-bottom: 15px;
  padding: 0;
  background: #fff;
  margin-top: -2px;
}

label {
  display: inline-block;
  vertical-align: middle;
  color: var(--text-main);
  cursor: pointer;
  margin-bottom: 15px;
}

.blue-border-focus:focus {
  border-color: var(--primary) !important;
}

/* Tables */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

table th {
  color: var(--text-muted);
  font-weight: 500;
  padding: 12px 15px;
  text-align: right;
}

table td {
  background: var(--bg-surface);
  padding: 15px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-align: right;
}

table tr td:first-child {
  border-right: 1px solid var(--border-color);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

table tr td:last-child {
  border-left: 1px solid var(--border-color);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

table tr:hover td {
  background: var(--bg-hover);
}

table td img {
  width: 40px;
  border-radius: var(--radius-sm);
}

/* Missing Components Restored */

/* Alerts */
.alert {
  min-height: 70px;
  padding: 20px;
  display: block;
  border-radius: var(--radius-md);
  margin-bottom: 15px;
}

.alert .action {
  float: left;
  cursor: pointer;
  margin-top: 2px;
}

/* Actions */
.actions .action {
  height: 30px;
  width: 30px;
  text-align: center;
  margin: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

.actions .action:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Pagination */
.pagination {
  width: 100%;
  text-align: center;
  margin-top: 25px;
  margin-bottom: 25px;
  display: block;
}

.pagination li {
  height: 35px;
  min-width: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  margin: 0 3px;
  cursor: pointer;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.pagination li a {
  color: var(--text-main);
  font-weight: 500;
  display: block;
  width: 100%;
  padding: 5px;
}

.pagination li:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.pagination li:hover a {
  color: var(--primary);
}

.pagination .active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

.pagination .active a {
  color: #fff !important;
}

/* Select2 Overrides */
.select2-container {
  width: 100% !important;
  margin-bottom: 15px;
  display: block;
}

.select2-container--default .select2-selection--single {
  height: 50px !important;
  min-height: 50px !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-color) !important;
  background: var(--bg-hover) !important;
  display: block !important;
  width: 100% !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
  background: var(--bg-surface) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-light) !important;
}

.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
  color: var(--text-main) !important;
  padding-right: 15px !important;
  line-height: 48px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 48px !important;
  top: 0 !important;
  left: 10px !important;
}

.select2-dropdown {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-md) !important;
}

.select2-results__option {
  padding: 10px 15px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--primary) !important;
  color: white !important;
}

/* Steps */
.steps {
  margin-bottom: 25px;
  display: flex;
  justify-content: space-around;
  position: relative;
}

.steps .line {
  height: 2px;
  background: var(--border-color);
  position: absolute;
  top: 35px;
  left: 0;
  right: 0;
  z-index: 1;
}

.steps .item {
  z-index: 2;
  position: relative;
  text-align: center;
  background: var(--bg-surface);
  padding: 0 15px;
}

.steps .item .icon {
  height: 70px;
  width: 70px;
  background: var(--bg-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: var(--text-muted);
  border: 2px solid var(--border-color);
  transition: var(--transition);
}

.steps .item i {
  font-size: 30px;
}

.steps .item p {
  margin-top: 10px;
  font-weight: 500;
}

.steps .active .icon {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.steps .active p {
  color: var(--primary);
}

/* Navigator */
.navigator {
  margin-top: 25px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navigator a,
.navigator p,
.navigator span {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

.navigator a:hover {
  color: var(--primary);
}

/* Loading & Thumbnail */
.thumbnail-img {
  width: 100%;
  max-width: 250px;
  display: block;
  margin: 15px auto;
  border-radius: var(--radius-md);
}

.loading {
  width: 50px;
  height: 50px;
  margin: 0 auto;
  display: none;
}

/* Sweet Alert */
.swal-button {
  background-color: var(--primary);
  box-shadow: none !important;
  border-radius: var(--radius-sm);
}

.swal-button:not([disabled]):hover {
  background-color: var(--primary-hover);
}

.swal-button--cancel {
  background-color: var(--text-muted);
}

.swal-button--cancel:not([disabled]):hover {
  background-color: var(--text-main);
}

/* Helpers */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

/* Hide mobile sidebar toggle */
.sidebar-displayer {
  display: none !important;
}