/* TailAdmin visual layer adapted for the Persian RTL ERP. All styles and assets are served locally. */
:root {
  --brand: #465fff;
  --brand-dark: #3641f5;
  --brand-soft: #ecf3ff;
  --ink: #1d2939;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4e7ec;
  --line-soft: #f2f4f7;
  --surface: #fff;
  --surface-2: #f9fafb;
  --canvas: #f9fafb;
  --sidebar: #fff;
  --sidebar-2: #f9fafb;
  --success: #12b76a;
  --success-soft: #ecfdf3;
  --warning: #f79009;
  --warning-soft: #fffaeb;
  --danger: #f04438;
  --danger-soft: #fef3f2;
  --info: #2e90fa;
  --info-soft: #eff8ff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .08);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 290px;
}

html { background: var(--canvas); }
body { background: var(--canvas); color: #1d2939; font-family: Tahoma, "Segoe UI", Arial, sans-serif; }
.sidebar {
  background: #fff;
  color: #344054;
  border-left: 1px solid #e4e7ec;
  box-shadow: 0 0 24px rgba(16, 24, 40, .035);
}
.brand { height: 80px; padding: 0 24px; border-bottom-color: #f2f4f7; gap: 12px; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: transparent; box-shadow: none; overflow: hidden; }
.brand-mark img { width: 34px; height: 34px; display: block; }
.brand-copy strong { color: #101828; font-size: 15px; }
.brand-copy small { color: #667085; font-size: 11px; }
.sidebar-scroll { padding: 21px 16px 24px; }
.nav-section-title { padding: 5px 12px 10px; color: #98a2b3; font-size: 11px; font-weight: 700; }
.nav-list { gap: 5px; margin-bottom: 23px; }
.nav-link { min-height: 44px; padding: 10px 12px; border-radius: 8px; color: #344054; gap: 12px; }
.nav-link:hover { color: #465fff; background: #f2f4f7; }
.nav-link.active { color: #465fff; background: #ecf3ff; font-weight: 700; }
.nav-link.active:after { display: none; }
.nav-icon { color: #667085; }
.nav-link.active .nav-icon, .nav-link:hover .nav-icon { color: #465fff; }
.nav-badge { background: #465fff; }
.sidebar-user { margin: 0 16px 16px; padding: 12px; background: #f9fafb; border: 1px solid #f2f4f7; border-radius: 12px; }
.avatar { background: linear-gradient(135deg, #465fff, #7592ff); }
.sidebar-user-meta strong { color: #344054; }
.sidebar-user-meta small { color: #667085; }
.logout-link { color: #667085; }
.logout-link:hover { color: #465fff; background: #ecf3ff; }
.main-wrap { margin-right: var(--sidebar-w); }
.topbar { height: 80px; padding: 0 32px; background: #fff; border-bottom-color: #e4e7ec; box-shadow: 0 1px 2px rgba(16,24,40,.025); }
.breadcrumb-home { color: #667085; }
.topbar-chip { background: #fff; border-color: #e4e7ec; color: #475467; border-radius: 8px; }
.topbar-chip:hover { color: #465fff; border-color: #c2d6ff; background: #f2f7ff; }
.content { max-width: 1600px; padding: 26px 32px 48px; }
.page-header { margin-bottom: 24px; }
.page-title { color: #101828; font-size: 24px; letter-spacing: -.25px; }
.page-subtitle { color: #667085; }
.section-title { color: #101828; font-weight: 700; }
.panel, .card { border-color: #e4e7ec; border-radius: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.035); }
.panel { padding: 22px; }
.panel-header { border-bottom-color: #f2f4f7; }
.grid { gap: 20px; }
.stat-card { min-height: 140px; padding: 20px; }
.stat-card:before { display: none; }
.stat-card:hover { border-color: #c2d6ff; box-shadow: 0 8px 20px rgba(16,24,40,.07); }
.stat-top { margin-bottom: 18px; }
.stat-icon { border-radius: 12px; background: #ecf3ff; color: #465fff; }
.stat-value { color: #101828; }
.info-item { background: #f9fafb; border-color: #f2f4f7; }
.btn, button[type="submit"], .button { background: #465fff; border-radius: 8px; font-weight: 600; }
.btn:hover, button[type="submit"]:hover, .button:hover { background: #3641f5; }
.btn-secondary { background: #fff; color: #344054; border-color: #d0d5dd; }
.btn-secondary:hover { background: #f9fafb; color: #1d2939; border-color: #98a2b3; }
.btn-soft { background: #ecf3ff; color: #465fff; border-color: #dde9ff; }
.btn-soft:hover { background: #dde9ff; color: #3641f5; }
.badge-info { background: #eff8ff; color: #1570ef; }
.form-label { color: #344054; }
.form-field input:not([type="checkbox"]):not([type="radio"]), .form-field select, .form-field textarea, .search-input,
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="tel"], input[type="date"], input[type="datetime-local"], select, textarea {
  border-color: #d0d5dd; border-radius: 8px; background: #fff; color: #101828;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .search-input:focus, input:focus, select:focus, textarea:focus {
  border-color: #7592ff; box-shadow: 0 0 0 3px rgba(70,95,255,.12); outline: 0;
}
.form-field ul label { background: #f9fafb; border-color: #e4e7ec; }
.table-wrap { border-color: #e4e7ec; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.035); }
table { background: #fff; }
th { background: #f9fafb; color: #667085; border-bottom-color: #e4e7ec; }
td { color: #344054; }
tbody tr:hover td { background: #f9fafb; }
.table-link:hover { color: #465fff; }
.timeline-item:before { border-color: #465fff; }
.timeline-card { border-color: #e4e7ec; border-radius: 12px; }
.messages .msg { border-radius: 10px; }
.error-page .error-code { color: #465fff; }
.auth-page { background: #fff; }
.auth-visual { background: linear-gradient(145deg, #101828 0%, #182230 68%, #263d89 100%); }
.auth-visual:before { background: rgba(70,95,255,.22); }
.login-card .panel { border-radius: 16px; }
.jalali-picker { border-radius: 16px; }
.jp-nav:hover { border-color: #c2d6ff; color: #465fff; background: #f2f7ff; }
.jp-day.today { box-shadow: inset 0 0 0 1px #7592ff; color: #465fff; }
.jp-day.selected { background: #465fff; box-shadow: 0 5px 14px rgba(70,95,255,.22); }
@media (max-width: 960px) {
  .sidebar { box-shadow: -20px 0 50px rgba(16,24,40,.14); }
  .topbar { height: 72px; }
  .content { padding: 24px 20px 40px; }
}
@media (max-width: 700px) {
  .content { padding: 19px 14px 34px; }
  .topbar { height: 64px; padding: 0 14px; }
}

.chat-dashboard-alert { display:flex; align-items:center; justify-content:space-between; gap:18px; border-color:#fedf89; background:#fffaeb; color:#93370d; }
.chat-dashboard-alert p { margin:4px 0 0; color:#b54708; font-size:12px; }
.message-read-state { margin-top:10px; color:#667085; font-size:11px; text-align:left; }
.message-read-state.read { color:#465fff; }
.message-read-state.unread { color:#98a2b3; }
.report-note { margin-bottom:18px; background:#f9fafb; }
.report-note p { margin:6px 0 0; color:#475467; font-size:12px; }
@media (max-width: 700px) {
  .chat-dashboard-alert { align-items:stretch; flex-direction:column; }
}
