@font-face {
  font-family: "IRANSansX";
  src: url("files/fonts/IRANSansX-Thin.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansX";
  src: url("files/fonts/IRANSansX-Light.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansX";
  src: url("files/fonts/IRANSansX-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Base animations and custom scrollbars */
.slide-left {
  animation: slideLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-up {
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-in-right {
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles & Theme Variables */
:root {
  --bg-main: #fcfcfc;
  --bg-card: rgba(255, 255, 255, 0.5);
  --bg-glass: rgba(255, 255, 255, 0.7);
  --text-main: #000000;
  --text-muted: #1e293b;
  --border: rgba(0, 0, 0, 0.15);
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(0, 0, 0, 0.2);
  --pattern-opacity: 0.35;
  --glass-blur: 0px;
}

.dark {
  --bg-main: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.25);
  --bg-glass: rgba(15, 23, 42, 0.4);
  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --border: rgba(51, 65, 85, 0.4);
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --glass-bg: rgba(30, 41, 59, 0.25);
  --glass-border: rgba(255, 255, 255, 0.1);
  --pattern-opacity: 0.25;
  --glass-blur: 0px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

* {
  -webkit-text-stroke: 0.15px rgba(0, 0, 0, 0.5) !important;
  text-shadow: none !important;
}

svg {
  filter: drop-shadow(0px 0px 0.5px rgba(0, 0, 0, 0.8)) !important;
}

/* Force standard elements to inherit the theme text color */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
label {
  color: inherit;
}

.text-textMuted,
.text-muted,
.text-gray-500,
.text-slate-500 {
  color: var(--text-muted) !important;
}

.text-textMain {
  color: var(--text-main) !important;
}

.bg-glass {
  background-color: var(--bg-glass) !important;
}

#app-header {
  background: var(--bg-card) !important;
  border-bottom: 2px solid var(--border) !important;
  z-index: 50 !important;
  backdrop-filter: blur(var(--header-blur, var(--glass-blur)));
}

/* Base View Styling */
.view-content-card,
.card,
.admin-panel {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.12),
    0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.3s ease;
  backdrop-filter: blur(var(--glass-blur));
}

/* Colored Glass Boxes and Buttons (40% Matte) */
.glass-card,
.bg-blue-50,
.dark\:bg-blue-900\/20,
.bg-amber-50,
.dark\:bg-amber-900\/20,
.bg-indigo-50,
.dark\:bg-indigo-900\/20,
.bg-emerald-50,
.dark\:bg-emerald-900\/20,
.bg-purple-50,
.dark\:bg-purple-900\/20,
.bg-gray-50,
.dark\:bg-gray-700\/50,
.bg-primary\/5,
.dark\:bg-primary\/10,
.bg-gray-100,
.dark\:bg-gray-700,
.bg-rose-50,
.dark\:bg-rose-900\/20,
.bg-amber-100,
.bg-emerald-100,
.bg-rose-100,
.bg-\[\#dcfce7\],
.dark\:bg-green-900\/30,
.bg-solid,
button,
input,
select,
textarea {
  background-color: var(--bg-glass) !important;
  border: 1.5px solid var(--border) !important;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.3s ease;
}

.view {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Input Styles */
input,
select,
textarea {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  transition: all 0.3s ease;
}

/* Bank Background Pattern - Fixed & Animated */
/* --- LOCKED PRODUCTION SETTINGS: BANK BACKGROUND PATTERN --- */
#bank-bg-pattern {
  background-image: url("/files/favicon/android-chrome-192x192.png");
  background-size: 130px;
  background-repeat: repeat;
  opacity: var(--pattern-opacity);
  transform: rotate(-15deg) scale(2);
  transform-origin: center;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s ease;
}
/* ----------------------------------------------------------- */

@keyframes slideLeft {
  from {
    transform: translateX(20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes sheetUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
.animate-sheet-up {
  animation: sheetUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes zoomInCenter {
  from {
    transform: translate(-50%, -40%) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}
.animate-zoom-in {
  animation: zoomInCenter 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.toast-enter {
  animation: toastSlideUp 0.3s ease forwards;
}
.toast-exit {
  animation: toastFadeOut 0.3s ease forwards;
}

@keyframes toastSlideUp {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes toastFadeOut {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* Standard Table Styles */
table {
  width: 100%;
}

thead th {
  background: var(--bg-main) !important;
  color: var(--text-muted);
  font-weight: 700;
  text-align: right;
  padding: 1rem;
  border-bottom: 1px solid var(--border) !important;
}

tbody tr {
  transition: background 0.2s;
}

tbody tr:hover {
  background-color: var(--bg-main) !important;
}

tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--border) !important;
}

/* Admin Tab Styles */
.admin-tab {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.admin-tab:not(.active) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.admin-tab:not(.active):hover {
  background: rgba(37, 99, 235, 0.05) !important;
  transform: translateX(-4px);
  color: var(--primary) !important;
}

.admin-tab.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow:
    0 10px 25px -5px rgba(37, 99, 235, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
  opacity: 1 !important;
}

.dark .admin-tab:not(.active):hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.dir-ltr {
  direction: ltr;
}

@keyframes scrollPattern {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 1000px;
  }
}

.animate-bg-scroll {
  animation: scrollPattern 100s linear infinite;
}

/* Profile button hover animation */
#btn-profile .group > div,
#btn-profile div.rounded-full {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

#btn-profile:hover .group > div,
#btn-profile:hover div.rounded-full {
  transform: scale(1.1) rotate(5deg);
  border-color: rgba(37, 99, 235, 0.4) !important;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.15) !important;
}
