@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
  /* ==============================================================
     Serene Editorial Minimal Theme (پیوست کارفرما)
     ============================================================== */
  --bg-canvas: #f6fbf1;
  --surface-card: #ffffff;
  --surface-container-low: #f8fbf5;
  --surface-container: #f1f5ec;
  --surface-container-high: #ebefe6;
  --surface-container-highest: #e3e8de;

  /* Primary: Elegant Matte Sage Green */
  --primary: #55624d;
  --primary-deep: #3d4a36;
  --primary-light: #707e67;
  --primary-container: #d9e7cd;
  --on-primary: #ffffff;
  --on-primary-container: #131f0e;

  /* Secondary: Soft Earthy Bronze */
  --secondary: #6a5b57;
  --secondary-container: #f0dbd6;
  --on-secondary-container: #241916;

  /* Text & Typography */
  --text-primary: #181d17;
  --text-secondary: #444841;
  --text-muted: #74796e;

  /* Borders & Outlines */
  --border-default: #e3e6df;
  --border-subtle: #ecefe8;
  --outline: #74796e;

  /* Semantic Alerts */
  --success: #2e6b38;
  --success-bg: #eaf5eb;
  --success-border: #c3e6c8;
  --on-success: #0b3915;

  --warning: #855a17;
  --warning-bg: #fdf6e7;
  --warning-border: #f8e4ba;

  --danger: #9c2a2a;
  --danger-bg: #fde8e8;
  --danger-border: #f8c8c8;

  --font-vazir: 'Vazirmatn', sans-serif;

  /* Soft, serene organic shadows */
  --shadow-sm: 0 1px 3px rgba(35, 45, 30, 0.04), 0 1px 2px rgba(35, 45, 30, 0.02);
  --shadow-md: 0 4px 12px rgba(35, 45, 30, 0.06), 0 2px 4px rgba(35, 45, 30, 0.03);
  --shadow-lg: 0 12px 24px -4px rgba(35, 45, 30, 0.08), 0 6px 12px -2px rgba(35, 45, 30, 0.04);
  --shadow-xl: 0 20px 32px -6px rgba(35, 45, 30, 0.10), 0 10px 16px -4px rgba(35, 45, 30, 0.05);

  /* Generous Rounded Curves (Client instruction: 16px to 24px) */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

/* فونت یکپارچه وزیرمتن برای کلیه اجزا، حروف و اعداد */
html, body, *, input, select, textarea, button, table, th, td, span, p, h1, h2, h3, h4, h5, h6 {
  font-family: 'Vazirmatn', sans-serif !important;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Material Symbols alignment */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  vertical-align: middle;
}

/* Rounded Curves Helpers */
.rounded-soft-md { border-radius: 16px !important; }
.rounded-soft-lg { border-radius: 20px !important; }
.rounded-soft-xl { border-radius: 24px !important; }

/* Custom Soft Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--surface-container);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb {
  background: #cbd3c5;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Modal Backdrop */
.modal-backdrop {
  background-color: rgba(24, 29, 23, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Zoom & Rotate Document Canvas */
.doc-canvas-wrapper {
  background-color: #f1f5ec;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.doc-canvas-content {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
}

/* Visual Feedback on Copy */
.copy-badge-success {
  background-color: var(--success-bg) !important;
  color: var(--success) !important;
  border-color: var(--success-border) !important;
  animation: pulseScale 0.35s ease-in-out;
}

@keyframes pulseScale {
  0% { transform: scale(0.96); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Navigation active states */
.nav-item-active {
  background-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(85, 98, 77, 0.25);
}

.nav-item-active span {
  color: #ffffff !important;
}

/* Quick switcher pills in header */
.role-switch-btn {
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: all 0.2s ease;
  border: 1px solid var(--border-default);
  background-color: #ffffff;
  color: var(--text-secondary);
}

.role-switch-btn:hover {
  background-color: var(--surface-container);
  color: var(--text-primary);
}

.role-switch-btn.active {
  background-color: var(--primary-container) !important;
  color: var(--on-primary-container) !important;
  border-color: #b7ccaa !important;
  box-shadow: 0 2px 6px rgba(85, 98, 77, 0.15);
}

/* Table Card styling */
.editorial-card {
  background-color: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

/* Form input styling */
input, select, textarea {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-default);
  transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(85, 98, 77, 0.12) !important;
}

/* Direction Utilities */
.dir-ltr { direction: ltr !important; text-align: left !important; }
.dir-rtl { direction: rtl !important; text-align: right !important; }

/* Toman Display Wrapper: always numbers first, then unit */
.toman-display {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  direction: rtl;
}

.toman-display .toman-num {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.toman-display .toman-unit {
  font-size: 0.8em;
  color: var(--text-muted);
  font-weight: 500;
}
