@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSans.ttf") format("truetype");
}

:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --secondary: #00cec9;
  --bg-color: #f8f9fa;
  --sidebar-bg: #eef2f6;
  --card-bg: #ffffff;
  --text-main: #2d3436;
  --text-muted: #636e72;
  --border-color: #dfe6e9;
  --success: #00b894;
  --danger: #d63031;
  --warning: #fdcb6e;
  --info: #fca5a5;
  --doit: #22c55e;
  --vision: #f97316;
  --show: #0ea5e9;
  --eye: #64748b;
  --mode: #232a31;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --font-size: 16px;
}

input,
select,
button {
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  font-size: 14px;
}
button {
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover {
  background: var(--primary-light);
}
.btn-danger {
  background: var(--danger);
}
.btn-success {
  background: var(--success);
}
.btn-warning {
  background: var(--warning);
  color: var(--text-main);
}
.btn-secondary {
  background: var(--secondary);
}
.btn-info {
  background: var(--info);
}
.btn-doit {
  background: var(--doit);
}
.btn-vision {
  background: var(--vision);
}
.btn-show {
  background: var(--show);
}
.btn-eye {
  background: var(--eye);
}
.btn-mode {
  background: var(--mode);
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.top-navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 57px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 30px;
  z-index: 999;
  border-bottom: 1px solid var(--border-color);
}

body.has-sidebar .top-navbar {
  right: 260px;
}

.navbar-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.navbar-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: none;
  background: var(--text-muted);
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-btn:hover {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
}

.top-navbar .btn-danger {
  padding: 8px 20px;
  border-radius: 10px;
  border: none;
  background: #dc3545;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.top-navbar .btn-danger:hover {
  background: #c82333;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
  transform: translateY(-2px);
}

body {
  padding-top: 57px;
}

body.has-sidebar {
  padding-top: 0;
}

body.has-sidebar .main-content {
  margin-top: 60px;
}

body.dark-mode {
  --bg-color: #1a1a1a;
  --card-bg: #2d2d2d;
  --text-main: #e0e0e0;
  --text-muted: #a0a0a0;
  --sidebar-bg: #242424;
  --border-color: #404040;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body {
  font-size: 14px;
}
body.font-small {
  font-size: 14px;
}
body.font-medium {
  font-size: 16px;
}
body.font-large {
  font-size: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "IRANSans", Tahoma, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  direction: rtl;
  font-size: var(--font-size);
  transition:
    background-color 0.3s,
    color 0.3s,
    font-size 0.3s;
}

.wrapper {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

.controls-panel {
  position: fixed;
  top: 30px;
  left: 30px;
  display: flex;
  gap: 10px;
  z-index: 9999;
}

.theme-toggle,
.font-size-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--text-muted);
  color: white;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s;
}

.theme-toggle:hover,
.font-size-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.theme-toggle:active,
.font-size-btn:active {
  transform: scale(0.95);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.flex-row {
  display: flex;
  gap: 10px;
}
.flex-1 {
  flex: 1;
}
.flex-2 {
  flex: 2;
}
.mt-15 {
  margin-top: 15px;
}
.mb-20 {
  margin-bottom: 20px;
}
.form-section {
  background: var(--bg-color);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.text-right {
  text-align: right;
}

.badge {
  display: none;
  background: #f44336;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  margin-right: 5px;
}

.badge-new {
  display: none;
  background: #4caf50;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  margin-right: 5px;
}

.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  direction: rtl;
}

.navbar-left,
.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-date {
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 1024px) {
  .top-navbar {
    padding-right: 60px;
  }

  .navbar-date {
    white-space: nowrap;
  }
}
