
:root {
    color-scheme: dark;
    --page-bg: #050b19;
    --bg-color: rgba(255, 255, 255, 0.15);
    --highlight: rgba(255, 255, 255, 0.6);
    --text: #ffffff;
    --text-muted: rgba(248, 250, 252, 0.72);
    --input-bg: rgba(255, 255, 255, 0.1);
    --input-border: rgba(255, 255, 255, 0.2);
    --input-focus: rgba(255, 255, 255, 0.25);
    --option-bg: rgba(18, 18, 18, 0.95);
    --option-hover-bg: rgba(63, 63, 70, 0.95);
    --option-text: #ffffff;
    --goal-ahead: rgba(52, 211, 153, 0.85);
    --goal-ontrack: rgba(56, 189, 248, 0.9);
    --goal-risk: rgba(249, 115, 22, 0.9);
}

html[data-theme="light"] {
    color-scheme: light;
    --page-bg: #f4f7fb;
    --bg-color: rgba(255, 255, 255, 0.15);
    --highlight: rgba(255, 255, 255, 0.6);
    --text: #0f172a;
    --text-muted: rgba(15, 23, 42, 0.62);
    --input-bg: rgba(255, 255, 255, 0.1);
    --input-border: rgba(255, 255, 255, 0.2);
    --input-focus: rgba(255, 255, 255, 0.25);
    --option-bg: #ffffff;
    --option-hover-bg: #e2e8f0;
    --option-text: #0f172a;
    --goal-ahead: rgba(5, 150, 105, 0.85);
    --goal-ontrack: rgba(14, 165, 233, 0.88);
    --goal-risk: rgba(234, 88, 12, 0.88);
}

select option,
select optgroup {
    background-color: var(--option-bg);
    color: var(--option-text);
}

select option:checked,
select option:focus,
select option:hover {
    background-color: var(--option-hover-bg);
    color: var(--option-text);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* body {
    font-family: 'Vazirmatn', sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--text);
    background-image: url('https://cdn.nody.ir/files/2021/09/10/nody-%D8%B9%DA%A9%D8%B3-%D9%85%D8%A7%D9%87-%D8%AF%D8%B1-%D8%B4%D8%A8-%D8%A8%D8%B1%D8%A7%DB%8C-%D9%BE%D8%B1%D9%88%D9%81%D8%A7%DB%8C%D9%84-1631253745.jpg'); */
    /* background-image: url('https://img2.taw-bio.ir/2025/310618/1l2f3n7i.jpeg'); */
    /* background-image: url('https://img2.taw-bio.ir/2025/333550/1l6g371o.jpeg'); */
    /* background-image: url('https://cdn.nody.ir/files/2021/09/10/nody-%D8%B9%DA%A9%D8%B3-%D9%85%D8%A7%D9%87-%D9%88-%D8%AF%D8%AE%D8%AA%D8%B1-%D8%AA%D9%86%D9%87%D8%A7-1631253734.jpg'); */
    /* background-image: url('https://cdn.nody.ir/files/2021/09/14/nody-%D8%AF%D8%A7%D9%86%D9%84%D9%88%D8%AF-%D8%B9%DA%A9%D8%B3-%D8%AF%D8%B1%DB%8C%D8%A7-%D8%A8%D8%A7-%DA%A9%DB%8C%D9%81%DB%8C%D8%AA-full-hd-1631604980.jpg'); */
    /* background-image: url('https://cdn.nody.ir/files/2021/09/14/nody-%D8%B9%DA%A9%D8%B3-%D8%AF%D8%B1%DB%8C%D8%A7-%D8%AA%D8%A7%D8%B1%DB%8C%DA%A9-1631604978.jpg'); */
    /* background-image: url('https://cdn.nody.ir/files/2021/09/07/nody-%D8%B9%DA%A9%D8%B3-%D8%A7%D9%82%DB%8C%D8%A7%D9%86%D9%88%D8%B3-%D8%AF%D8%B1-%D8%B4%D8%A8-1630992039.png'); */
    /* background-image: url('https://media.ettelaat.com/d/2025/04/05/4/282441.jpg'); */
    /* background-image: url('https://photo.nagsh.ir/wp-content/uploads/2021/08/25a0e48840d20d475dd4c8f472d20e77.jpg'); */

/* background-size: 100% auto;
background-repeat: no-repeat;
background-position: center;
    background-position: center 0%;
    animation: pan-image 40s linear infinite;
} */


/* ==== Landing-like Animated, Sharper Multi-Bubble Background ==== */
/* ===== Desktop = photo + dark overlay | Mobile = animated bubbles ===== */

:root{
  /* برای موبایل */
  --bubble-shift: 60px;
  --bubble-duration: 28s;
}

/* --- Desktop/Laptop default: keep photo --- */
body{
  font-family: 'Vazirmatn', sans-serif;
  margin: 0; padding: 0;
  color: var(--text, #fff);
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--page-bg);
  position: relative;
}

html[data-theme="dark"] body{
  background-image: url('https://cdn.nody.ir/files/2021/09/10/nody-%D8%B9%DA%A9%D8%B3-%D9%85%D8%A7%D9%87-%D8%AF%D8%B1-%D8%B4%D8%A8-%D8%A8%D8%B1%D8%A7%DB%8C-%D9%BE%D8%B1%D9%88%D9%81%D8%A7%DB%8C%D9%84-1631253745.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

/* روکش مشکی ملایم روی عکس (فقط دسکتاپ) */
html[data-theme="dark"] body::after{
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(120% 120% at 50% 30%, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.72) 70%);
  pointer-events: none;
}

html[data-theme="light"] body{
  background-image: url('https://www.jowhareh.com/images/Jowhareh/galleries_3/large_933afe1e-386b-4d57-9669-d0de21dc0174.webp');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  background-color: var(--page-bg);
}

html[data-theme="light"] body::after{
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(120% 120% at 50% 30%, rgba(255,255,255,0.72) 0%, rgba(244,247,251,0.65) 55%, rgba(255,255,255,0.4) 100%);
  pointer-events: none;
}

/* --- Mobile override: no photo, animated colorful bubbles --- */
/* @media (max-width: 768px){
  body{
    background: linear-gradient(180deg, #0b1220 0%, #0a1b2e 50%, #0a223a 100%);
  }
  body::after{ display: none; }

  body::before{
    content: "";
    position: fixed; inset: 0; z-index: -1;
    background-image:
      radial-gradient(1200px 600px at 80% -100%, rgba(42,138,246,0.85) 0, rgba(42,138,246,0) 60%),
      radial-gradient(720px 420px at -10% -10%, rgba(24,204,171,0.78) 0, rgba(24,204,171,0) 58%),
      radial-gradient(740px 420px at 110% 110%, rgba(99,68,245,0.70) 0, rgba(99,68,245,0) 58%),
      radial-gradient(460px 260px at 92% 35%, rgba(76,201,240,0.48) 0, rgba(76,201,240,0) 62%),
      radial-gradient(460px 260px at 15% 45%, rgba(255,99,156,0.42) 0, rgba(255,99,156,0) 64%),
      radial-gradient(420px 240px at 8% 82%, rgba(165,214,82,0.40) 0, rgba(165,214,82,0) 62%),
      radial-gradient(400px 240px at 88% 78%, rgba(255,193,7,0.38) 0, rgba(255,193,7,0) 62%),
      radial-gradient(380px 220px at 55% 18%, rgba(156,39,176,0.38) 0, rgba(156,39,176,0) 62%),
      radial-gradient(340px 200px at 50% 55%, rgba(29,233,182,0.34) 0, rgba(29,233,182,0) 66%);
    background-repeat: no-repeat;
    background-position:
      80% -100%, -10% -10%, 110% 110%, 92% 35%, 15% 45%, 8% 82%, 88% 78%, 55% 18%, 50% 55%;
    animation: floatBubbles var(--bubble-duration) ease-in-out infinite alternate;
    will-change: background-position;
  }

  :root{
    --bubble-shift: 36px;    
    --bubble-duration: 22s;
  }
} */

/* انیمیشن شناوری حباب‌ها (برای موبایل) */
@keyframes floatBubbles{
  0%{
    background-position:
      calc(80% - var(--bubble-shift)) calc(-100% + var(--bubble-shift)),
      calc(-10% + var(--bubble-shift)/2) calc(-10% + var(--bubble-shift)/3),
      calc(110% - var(--bubble-shift)/2) calc(110% - var(--bubble-shift)/3),
      calc(92% - var(--bubble-shift)/3)  calc(35% + var(--bubble-shift)/2),
      calc(15% + var(--bubble-shift)/4)  calc(45% - var(--bubble-shift)/4),
      calc(8%  + var(--bubble-shift)/5)  calc(82% - var(--bubble-shift)/3),
      calc(88% - var(--bubble-shift)/3)  calc(78% + var(--bubble-shift)/4),
      calc(55% + var(--bubble-shift)/6)  calc(18% - var(--bubble-shift)/6),
      calc(50% - var(--bubble-shift)/8)  calc(55% + var(--bubble-shift)/8);
  }
  100%{
    background-position:
      calc(80% + var(--bubble-shift)) calc(-100% - var(--bubble-shift)),
      calc(-10% - var(--bubble-shift)/2) calc(-10% - var(--bubble-shift)/3),
      calc(110% + var(--bubble-shift)/2) calc(110% + var(--bubble-shift)/3),
      calc(92% + var(--bubble-shift)/3)  calc(35% - var(--bubble-shift)/2),
      calc(15% - var(--bubble-shift)/4)  calc(45% + var(--bubble-shift)/4),
      calc(8%  - var(--bubble-shift)/5)  calc(82% + var(--bubble-shift)/3),
      calc(88% + var(--bubble-shift)/3)  calc(78% - var(--bubble-shift)/4),
      calc(55% - var(--bubble-shift)/6)  calc(18% + var(--bubble-shift)/6),
      calc(50% + var(--bubble-shift)/8)  calc(55% - var(--bubble-shift)/8);
  }
}

/* احترام به کاهش موشن سیستم */
@media (prefers-reduced-motion: reduce){
  body::before{ animation: none !important; }
}



@keyframes pan-image {
    0% { background-position: center 0%; }
    50% { background-position: center 100%; }
    100% { background-position: center 0%; }
}

.glass-form-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.glass-form {
    width: min(100%, 420px);
}

.glass-filter,
.glass-overlay,
.glass-specular {
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.glass-filter {
    z-index: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    filter: url(#glass-distortion) saturate(120%) brightness(1.15);
}

.glass-overlay {
    z-index: 2;
    background: var(--bg-color);
}

.glass-specular {
    z-index: 3;
    box-shadow: inset 1px 1px 1px var(--highlight);
    background: none;
    transition: background 0.5s ease;
}

.glass-content {
    position: relative;
    z-index: 4;
    padding: 40px;
    color: var(--text);
}

.form-container h3 {
    margin: 0 0 25px 0;
    font-size: 26px;
    font-weight: 600;
    text-align: center;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text);
    opacity: 0.8;
}

.form-group input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    font-family: 'Vazirmatn', sans-serif;
    transition: border-color 0.3s ease, background 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    background: var(--input-focus);
    border-color: var(--highlight);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px; /* فاصله بیشتر */
}

button[type="submit"]:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.error-display {
    color: #ffb8b8;
    background-color: rgba(255, 50, 50, 0.2);
    border: 1px solid rgba(255, 82, 82, 0.5);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    text-align: center;
}












/* --- استایل‌های جدید برای داشبورد --- */

/* --- استایل‌های جدید برای داشبورد و افکت شیشه‌ای عمومی --- */

.main-layout {
    display: flex;
    height: 100vh;
}

/* کلاس عمومی برای تمام کارت‌های شیشه‌ای */
.glass-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.glass-card > .glass-filter,
.glass-card > .glass-overlay,
.glass-card > .glass-specular {
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.glass-card > .glass-filter {
    z-index: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    filter: url(#glass-distortion) saturate(120%) brightness(1.1);
}

.glass-card > .glass-overlay {
    z-index: 2;
    background: rgba(255, 255, 255, 0.08);
}

.glass-card > .glass-specular {
    z-index: 3;
    box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.4);
    background: none;
    transition: background 0.5s ease;
}

.glass-card > .glass-content {
    position: relative;
    z-index: 4;
    height: 100%;
    box-sizing: border-box;
}

/* استایل سایدبار */
.sidebar {
    width: 260px;
    flex-shrink: 0;
}
/* .sidebar.glass-card {
    background: rgba(19, 28, 56, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.sidebar.glass-card > .glass-overlay {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.05) 55%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%);
}
.sidebar.glass-card > .glass-specular {
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0) 70%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.25),
        inset 0 12px 22px rgba(255, 255, 255, 0.12);
} */
.sidebar .glass-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
}


.theme-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    padding: 10px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(12, 20, 40, 0.3);
    backdrop-filter: blur(8px);
}

.theme-toggle {
    position: relative;
    width: 54px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}


.theme-toggle-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 8px;
    transition: background 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    inset-inline-start: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(10, 17, 35, 0.92);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle-thumb i {
    position: absolute;
    font-size: 12px;
    color: #f8fafc;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle-thumb .fa-sun {
    color: #facc15;
    opacity: 0;
    transform: scale(0.6);
}

.theme-toggle-thumb .fa-moon {
    color: #e0f2fe;
}

.theme-toggle-glyph {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    opacity: 0.45;
    color: #f8fafc;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.theme-toggle-glyph--moon {
    margin-inline-end: auto;
}

.theme-toggle-glyph--sun {
    margin-inline-start: auto;
}

.theme-toggle input:checked + .theme-toggle-track {
    background: rgba(99, 102, 241, 0.75);
    border-color: rgba(129, 140, 248, 0.9);
}

/* کمپین - ابزارها */
.campaign-tools-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.campaign-tools-page .hero {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(14, 165, 233, 0.18));
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.campaign-tools-page .hero .eyebrow {
    font-size: 12px;
    letter-spacing: 0.6px;
    color: var(--muted, #9ca3af);
    margin: 0 0 4px;
}

.campaign-tools-page .hero h1 {
    margin: 0 0 6px;
}

.campaign-tools-page .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.campaign-tools-page .btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: inherit;
    background: transparent;
    border-radius: 14px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.campaign-tools-page .hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    min-width: 220px;
}

.campaign-tools-page .stat-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.campaign-tools-page .stat-chip span {
    color: var(--muted, #9ca3af);
    font-size: 12px;
}

.campaign-tools-page .stat-chip strong {
    font-size: 20px;
}

.tool-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 18px;
    align-items: start;
}

.tool-library-header,
.tool-list-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.tool-library-grid,
.tools-grid {
    display: grid;
    gap: 14px;
}

.tool-library-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tool-card .glass-content,
.library-card {
    position: relative;
    border-radius: 18px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 16px;
    min-height: 150px;
}

.library-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    cursor: default;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.library-card.is-actionable {
    cursor: pointer;
}

.library-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.library-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    color: #fcd34d;
}

.library-body h4 {
    margin: 0 0 6px;
}

.library-body p {
    margin: 0;
    color: var(--muted, #9ca3af);
}

.tool-card .tool-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tool-card .status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.16);
    color: #10b981;
    font-size: 12px;
}

.tool-card .status-inactive {
    background: rgba(248, 180, 0, 0.12);
    color: #fbbf24;
}

.tool-card-meta {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    display: grid;
    gap: 6px;
}

.tool-card-meta li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted, #9ca3af);
}

.tool-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.tools-grid.has-items {
    margin-top: 4px;
}

.theme-toggle input:checked + .theme-toggle-track .theme-toggle-thumb {
    transform: translateX(24px);
    background: #f8fafc;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.theme-toggle input:checked + .theme-toggle-track .theme-toggle-thumb .fa-sun {
    opacity: 1;
    transform: scale(1);
}

.theme-toggle input:checked + .theme-toggle-track .theme-toggle-thumb .fa-moon {
    opacity: 0;
    transform: scale(0.6);
}

.theme-toggle input:checked + .theme-toggle-track .theme-toggle-glyph--moon {
    opacity: 0.25;
}

.theme-toggle input:checked + .theme-toggle-track .theme-toggle-glyph--sun {
    opacity: 0.85;
}

html[data-theme="light"] .theme-switcher {
    border-color: rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .theme-toggle-track {
    background: rgba(15, 23, 42, 0.12);
    border-color: rgba(15, 23, 42, 0.22);
}

html[data-theme="light"] .theme-toggle-glyph {
    color: rgba(15, 23, 42, 0.75);
}

html[data-theme="light"] .theme-toggle input:checked + .theme-toggle-track {
    background: rgba(79, 70, 229, 0.75);
    border-color: rgba(79, 70, 229, 0.85);
}

html[data-theme="light"] .theme-toggle-thumb {
    background: rgba(15, 23, 42, 0.92);
}

html[data-theme="light"] .theme-toggle input:checked + .theme-toggle-track .theme-toggle-thumb {
    background: #f8fafc;
}

html[data-theme="light"] .theme-toggle-thumb .fa-moon {
    color: #f1f5f9;
}

html[data-theme="light"] .theme-toggle-thumb .fa-sun {
    color: #f59e0b;
}

/* ... بقیه استایل‌های سایدبار (بدون تغییر) ... */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.sidebar-header h2 {
    margin: 0;
    font-size: 24px;
    color: #fff;
    flex: 1;
    text-align: center;
}
.sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-header-actions > * {
    flex-shrink: 0;
}

.sidebar-utilities {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.sidebar-utilities .theme-switcher {
    margin: 0;
}

.sidebar-utilities .theme-toggle {
    justify-content: center;
}

.sidebar-alert {
    position: relative;
}
.sidebar-alert[hidden] {
    display: none !important;
}
.sidebar-alert-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.26);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}
.sidebar-alert-button:hover,
.sidebar-alert-button:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(148, 163, 184, 0.2);
    outline: none;
}
.sidebar-alert-button .bell-icon {
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4em;
    height: 1.4em;
    transform-origin: center top;
}

@keyframes sidebar-bell-wiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-10deg); }
    40% { transform: rotate(8deg); }
    60% { transform: rotate(-6deg); }
    80% { transform: rotate(4deg); }
}

.sidebar-alert-button.has-alert .bell-icon {
    animation: sidebar-bell-wiggle 2.4s ease-in-out infinite;
}

.sidebar-alert-count {
    min-width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.9), rgba(79, 70, 229, 0.9));
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
    padding: 0 0.5rem;
}

.sidebar-alert-panel {
    position: absolute;
    right: 0;
    left: auto;
    top: calc(100% + 12px);
    /* width: min(280px, 75vw); */
    z-index: 40;
}
.sidebar-alert-panel .glass-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
}
.sidebar-alert-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.sidebar-alert-panel-title {
    font-weight: 600;
    font-size: 1rem;
    color: inherit;
}
.sidebar-alert-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted, rgba(226, 232, 240, 0.82));
}
.sidebar-alert-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.15);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}
.sidebar-alert-entry:hover,
.sidebar-alert-entry:focus-visible {
    transform: translateY(-1px);
    background: rgba(148, 163, 184, 0.22);
    outline: none;
}
.sidebar-alert-entry-main {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
}
.sidebar-alert-entry-main i {
    font-size: 1rem;
}
.sidebar-alert-entry-count {
    min-width: 2.5rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.28);
    padding: 4px 12px;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.18);
}

.sidebar-alert-entry[hidden] {
    display: none !important;
}
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li a { display: flex; align-items: center; padding: 15px; color: #e0e0e0; text-decoration: none; border-radius: 10px; margin-bottom: 10px; transition: all 0.3s ease; }
.sidebar-nav li a:hover, .sidebar-nav li.active a { background: rgba(255, 255, 255, 0.2); color: #fff; }
.sidebar-nav li a.with-badge { justify-content: space-between; gap: 12px; }
.sidebar-nav li a .nav-counter { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; background: rgba(255, 255, 255, 0.2); color: #fff; }
[data-theme="light"] .sidebar-nav li a .nav-counter { background: rgba(15, 23, 42, 0.12); color: #0f172a; }
.sidebar-nav li a i { font-size: 18px; width: 30px; text-align: center; margin-left: 15px; }
.sidebar-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.user-profile { display: flex; align-items: center; }
.user-profile i { font-size: 24px; margin-left: 10px; }

html[data-theme="light"] .sidebar-header h2 {
    color: #0f172a;
}

html[data-theme="light"] .sidebar-nav li a {
    color: rgba(30, 41, 59, 0.92);
}

.topbar-alert {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.26);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.topbar-alert .bell-icon {
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4em;
    height: 1.4em;
    transform-origin: center top;
}

.topbar-alert-count {
    min-width: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0 0.45rem;
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.9), rgba(79, 70, 229, 0.9));
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
}

.topbar-alert.has-alert .bell-icon {
    animation: sidebar-bell-wiggle 2.4s ease-in-out infinite;
}

.topbar-alert:focus-visible {
    outline: 2px solid rgba(79, 70, 229, 0.9);
    outline-offset: 2px;
}

.mobile-alert-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    z-index: 90;
}

.mobile-alert-panel {
    position: fixed;
    inset-inline: 16px;
    top: 76px;
    z-index: 91;
    max-height: calc(100vh - 120px);
    overflow: hidden;
}

.mobile-alert-panel .glass-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.mobile-alert-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mobile-alert-panel-title {
    font-weight: 600;
    font-size: 1rem;
}

.mobile-alert-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mobile-alert-close:hover,
.mobile-alert-close:focus-visible {
    transform: scale(1.1);
    outline: none;
}

.mobile-alert-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted, rgba(226, 232, 240, 0.82));
}

.mobile-alert-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.15);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.mobile-alert-entry:hover,
.mobile-alert-entry:focus-visible {
    transform: translateY(-1px);
    background: rgba(148, 163, 184, 0.22);
    outline: none;
}

.mobile-alert-entry-main {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.mobile-alert-entry-count {
    min-width: 2.5rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.28);
    padding: 4px 12px;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.18);
}

.mobile-alert-entry[hidden] {
    display: none !important;
}

html[data-theme="light"] .topbar-alert {
    background: rgba(255, 255, 255, 0.85);
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .topbar-alert-count {
    color: #fff;
}

html[data-theme="light"] .mobile-alert-entry {
    background: rgba(148, 163, 184, 0.22);
}

html[data-theme="light"] .mobile-alert-entry:hover,
html[data-theme="light"] .mobile-alert-entry:focus-visible {
    background: rgba(148, 163, 184, 0.3);
}

@media (max-width: 1024px) {
    .sidebar-utilities {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 12px;
    }

    .sidebar-alert {
        display: none !important;
    }

    .topbar-alert[hidden] {
        display: none !important;
    }

    .topbar-alert {
        display: inline-flex;
    }

    .mobile-alert-panel[hidden],
    .mobile-alert-backdrop[hidden] {
        display: none;
    }
}

@media (min-width: 1025px) {
    .topbar-alert {
        display: none !important;
    }

    .mobile-alert-panel,
    .mobile-alert-backdrop {
        display: none !important;
    }
}

html[data-theme="light"] .sidebar-nav li a:hover,
html[data-theme="light"] .sidebar-nav li.active a {
    color: #1e1b4b;
}

html[data-theme="light"] .sidebar-nav li a i {
    color: inherit;
}

html[data-theme="light"] .user-profile span,
html[data-theme="light"] .user-profile i {
    color: #0f172a;
}

html[data-theme="light"] .logout-btn {
    color: #0f172a;
}

html[data-theme="light"] .sidebar-alert-button {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(15, 23, 42, 0.18);
    color: #0f172a;
    box-shadow: 0 10px 20px rgba(148, 163, 184, 0.32);
}
html[data-theme="light"] .sidebar-alert-button:hover,
html[data-theme="light"] .sidebar-alert-button:focus-visible {
    background: rgba(226, 232, 240, 0.95);
    border-color: rgba(15, 23, 42, 0.28);
}
html[data-theme="light"] .sidebar-alert-count {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.88), rgba(79, 70, 229, 0.88));
    color: #fff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}
html[data-theme="light"] .sidebar-alert-entry {
    background: rgba(226, 232, 240, 0.78);
}
html[data-theme="light"] .sidebar-alert-entry:hover,
html[data-theme="light"] .sidebar-alert-entry:focus-visible {
    background: rgba(203, 213, 225, 0.9);
}
html[data-theme="light"] .sidebar-alert-entry-count {
    background: rgba(15, 23, 42, 0.12);
    color: #0f172a;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .logout-btn:hover {
    color: #e11d48;
}

html[data-theme="light"] .glass-card .glass-content a {
    color: #1d4ed8;
}

html[data-theme="light"] .topbar-title {
    color: #0f172a;
}

html[data-theme="light"] .hamburger .ham-bar {
    background: #0f172a;
}

html[data-theme="light"] .top-logout {
    color: #0f172a;
}

html[data-theme="light"] .top-logout:hover {
    color: #e11d48;
}

html[data-theme="light"] .close-sidebar {
    color: #0f172a;
}

html[data-theme="light"] .main-content {
    color: #0f172a;
}

html[data-theme="light"] .main-content :where(h1, h2, h3, h4, h5, h6) {
    color: #0f172a;
}

html[data-theme="light"] .main-content :where(p, span, label, li, dt, dd, th, td, strong, small) {
    color: rgba(30, 41, 59, 0.88);
}

html[data-theme="light"] .content-header p {
    color: rgba(30, 41, 59, 0.7);
}
.logout-btn { color: #e0e0e0; font-size: 20px; transition: color 0.3s ease; }
.logout-btn:hover { color: #ff8a8a; }

/* استایل محتوای اصلی */
.main-content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
}
.content-header h1 { font-size: 32px; color: #fff; margin: 0 0 5px 0; }
.content-header p { font-size: 16px; color: #ccc; margin: 0 0 30px 0; }

/* استایل کارت‌های آمار */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card .glass-content {
    padding: 25px;
    display: flex;
    align-items: center;
}
.card-icon { width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-left: 20px; }
.card-icon i { font-size: 24px; }
.card-content-inner h3 { margin: 0; font-size: 28px; font-weight: 700; color: #fff; }
.card-content-inner p { margin: 5px 0 0 0; color: #ccc; font-size: 14px; }

/* استایل کانتینر نمودارها */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.chart-container {
    display: flex;
    flex-direction: column;
    min-height: 320px;
}
.chart-container .glass-content {
    flex: 1;
    padding: 20px;
}














/* app/static/css/style.css (ادامه) */

/* --- استایل‌های صفحه دپارتمان --- */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 30px;
}

.action-btn {
    background-color: var(--ocean-green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.action-btn:hover {
    background-color: #02c3d5;
    box-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
}

.table-container {
    width: 100%;
}
.table-container .glass-content {
    padding: 0 0 12px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.table-container .glass-content > table {
    min-width: 720px;
}
.table-container .glass-content::-webkit-scrollbar {
    height: 8px;
}
.table-container .glass-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
}
.data-table th, .data-table td {
    padding: 15px 20px;
    text-align: right;
}
.data-table thead {
    background: rgba(255, 255, 255, 0.15);
}
.data-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.data-table tbody tr:last-child {
    border-bottom: none;
}
.data-table .actions a {
    color: #e0e0e0;
    margin: 0 8px;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s ease;
}
.data-table .actions a.edit-btn:hover { color: #fdcb6e; }
.data-table .actions a.delete-btn:hover { color: #ff7675; }

/* Spinner */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    width: 100%;
    max-width: 450px;
}
.compact-modal {
    max-width: 640px;
    max-height: calc(100vh - 120px);
}
.compact-modal .glass-content {
    padding: 20px 24px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}
.modal-content .glass-content {
    padding: 30px;
}
.modal-content h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--text);
}
.modal-content p {
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
}

.sms-mode-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.radio-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.radio-chip input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.radio-chip input:focus + span,
.radio-chip input:focus-visible + span {
    outline: none;
    box-shadow: 0 0 0 3px rgba(2, 195, 213, 0.35);
    border-radius: inherit;
}

.radio-chip span {
    pointer-events: none;
    font-size: 0.95rem;
}

.radio-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.24);
}

.radio-chip input:checked + span {
    color: var(--text);
    font-weight: 600;
}

.radio-chip.is-active {
    background: rgba(2, 195, 213, 0.18);
    border-color: rgba(2, 195, 213, 0.45);
}

.sms-panel[hidden] {
    display: none !important;
}

.sms-panel .form-group {
    margin-bottom: 16px;
}

.placeholder-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.placeholder-chip {
    border: 1px dashed rgba(255, 255, 255, 0.35);
    background: rgba(15, 23, 42, 0.35);
    color: var(--text);
    border-radius: 12px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.placeholder-chip:hover,
.placeholder-chip:focus {
    background: rgba(2, 195, 213, 0.18);
    border-color: rgba(2, 195, 213, 0.6);
    transform: translateY(-1px);
}

.placeholder-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(2, 195, 213, 0.35);
}

@media (max-width: 768px) {
    .sms-mode-toggle {
        flex-direction: column;
        align-items: stretch;
    }

    .radio-chip {
        width: 100%;
        justify-content: center;
    }
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}
.modal-actions button {
    padding: 10px 25px;
    border-radius: 8px;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    cursor: pointer;
}
.btn-primary { background-color: var(--ocean-green); color: white; }
.btn-secondary { background-color: rgba(255, 255, 255, 0.2); color: white; }
.btn-danger { background-color: #d63031; color: white; }

.modal-overlay.modal-scroll {
    align-items: flex-start;
    overflow-y: auto;
    padding: 40px 16px;
}

.modal-overlay.modal-scroll .modal-content {
    margin: 40px auto;
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

.modal-overlay.modal-scroll .modal-content .glass-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

@media (max-width: 768px) {
    .modal-overlay.modal-scroll {
        padding: 24px 12px;
    }
    .modal-overlay.modal-scroll .modal-content {
        margin: 24px auto;
        max-height: calc(100vh - 48px);
    }
    .modal-overlay.modal-scroll .modal-content .glass-content {
        max-height: calc(100vh - 96px);
    }
}

.master-modal {
    max-width: 900px;
    width: 100%;
}

.master-modal .glass-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.master-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.master-modal-header p {
    margin: 8px 0 0;
    font-size: 0.92rem;
    color: rgba(226, 232, 240, 0.78);
}

.master-modal-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
}

.master-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding: 4px 0;
}

.master-modal-form .modal-actions {
    margin-top: 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    justify-content: flex-end;
}

.master-section {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.master-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.master-section-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.master-section-header p {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.65);
}

.master-section-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.master-section-disabled {
    opacity: 0.65;
}

.master-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.master-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.master-toggle input {
    display: none;
}

.master-toggle-track {
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.38);
    position: relative;
    transition: all 0.25s ease;
}

.master-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s ease;
}

.master-toggle input:checked + .master-toggle-track {
    background: var(--ocean-green);
    border-color: var(--ocean-green);
}

.master-toggle input:checked + .master-toggle-track::after {
    transform: translateX(-20px);
}

.tab-actions .action-btn i {
    font-size: 1rem;
}

html[data-theme="light"] .master-modal-header p {
    color: rgba(71, 85, 105, 0.75);
}

html[data-theme="light"] .master-section {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme="light"] .master-section-header p {
    color: rgba(71, 85, 105, 0.7);
}

html[data-theme="light"] .master-modal-form .modal-actions {
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

html[data-theme="light"] .master-toggle-track {
    background: rgba(148, 163, 184, 0.25);
    border-color: rgba(148, 163, 184, 0.45);
}

.tab-actions {
    display: flex;
    justify-content: flex-end;
    padding: 20px 20px 0 20px;
}

.tab-actions .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.tab-actions .action-btn i {
    font-size: 1rem;
}

@media (max-width: 640px) {
    .tab-actions {
        justify-content: stretch;
    }
    .tab-actions .action-btn {
        width: 100%;
    }
}
/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    border-radius: 14px;
    color: #f8fafc;
    font-size: 15px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px) saturate(180%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.45);
}
.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-6px);
}
.toast.success {
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.95) 0%, rgba(30, 130, 76, 0.95) 100%);
    color: #0b3d2e;
    border-color: rgba(32, 201, 151, 0.35);
}
.toast.error {
    background: linear-gradient(135deg, rgba(255, 94, 98, 0.95) 0%, rgba(199, 0, 57, 0.95) 100%);
    color: #fff5f5;
    border-color: rgba(255, 94, 98, 0.35);
}
.toast.info {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.95) 0%, rgba(14, 165, 233, 0.95) 100%);
    color: #03131f;
    border-color: rgba(56, 189, 248, 0.35);
}









/* app/static/css/style.css (کدهای جدید را به انتها اضافه کنید) */

/* استایل برای تگ‌های دپارتمان در جدول */
.tag {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    margin: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* استایل‌های جدید برای لیست چک‌باکس سفارشی */
.checkbox-list {
    max-height: 150px;
    overflow-y: auto;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 5px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.checkbox-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.checkbox-item input[type="checkbox"] {
    display: none; /* مخفی کردن چک‌باکس پیش‌فرض */
}

.checkbox-item .custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--input-border);
    border-radius: 5px;
    margin-left: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.checkbox-item .custom-checkbox i {
    color: #fff;
    font-size: 12px;
    opacity: 0; /* آیکون تیک در حالت عادی مخفی است */
    transform: scale(0.5);
    transition: opacity 0.2s, transform 0.2s;
}

.checkbox-item input[type="checkbox"]:checked + .custom-checkbox {
    background-color: var(--ocean-green);
    border-color: var(--ocean-green);
}

.checkbox-item input[type="checkbox"]:checked + .custom-checkbox i {
    opacity: 1;
    transform: scale(1);
}

.checkbox-item label {
    font-size: 16px;
    color: var(--text);
    cursor: pointer;
}














/* app/static/css/style.css (کدهای جدید را به انتها اضافه کنید) */

/* --- استایل‌های صفحه مشتریان --- */

/* Filter Bar */
.filter-bar .glass-content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
    padding: 15px 20px;
}
.filter-group {
    position: relative;
    flex: 1 1 220px;
    min-width: 200px;
}
.filters-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.filter-group i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
}
.filter-group input, .filter-group select {
    width: 100%;
    padding: 10px 40px 10px 15px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: 'Vazirmatn', sans-serif;
}
.filter-group input::placeholder { color: rgba(255, 255, 255, 0.5); }
.filter-group select { appearance: none; -webkit-appearance: none; }

/* Modal Styles */
.modal-content.large {
    max-width: 800px;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.required {
    color: #ff9a9a;
    margin-right: 4px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 400;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    font-family: 'Vazirmatn', sans-serif;
    box-sizing: border-box;
}
.form-group textarea { resize: vertical; }

/* Custom Rating/Grade Group */
.rating-group {
    display: flex;
    justify-content: space-between;
    background: var(--input-bg);
    border-radius: 10px;
    padding: 5px;
    border: 1px solid var(--input-border);
}
.rating-group label {
    flex-grow: 1;
    text-align: center;
    padding: 8px 0;
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.2s ease-in-out;
}
.rating-group input[type="radio"] {
    display: none;
}
.rating-group input[type="radio"]:checked + label {
    background-color: var(--ocean-green);
    color: white;
    font-weight: 600;
}

/* Custom Tag Input */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
}
.tags-container .tag-item {
    display: flex;
    align-items: center;
    background-color: var(--ocean-blue);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
}
.tags-container .tag-item .remove-tag {
    margin-right: 8px;
    cursor: pointer;
    font-weight: bold;
}
#tags-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    color: white;
    outline: none;
    padding: 5px;
    font-size: 16px;
}

/* Pagination */
.pagination-container {
    padding: 20px;
    text-align: center;
}
.pagination-container button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 6px;
    cursor: pointer;
}
.pagination-container button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.pagination-container button.active {
    background-color: var(--ocean-green);
}



















/* app/static/css/style.css (کدهای جدید را به انتها اضافه کنید) */

/* --- استایل‌های صفحه پیامک --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.sms-card {
    position: relative;
}

.sms-card .glass-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
}

/* ======================== */
/* Floating filter controls */
/* ======================== */

.floating-filter-btn {
    position: fixed;
    inset-inline-start: 24px;
    bottom: 24px;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    font-weight: 600;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(14px);
    z-index: 1200;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-filter-btn i {
    font-size: 1.1rem;
}

.floating-filter-btn span {
    font-size: 0.95rem;
}

.floating-filter-btn:active {
    transform: translateY(2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.35);
}

.floating-filter-btn:focus-visible {
    outline: 2px solid var(--ocean-green);
    outline-offset: 3px;
}

html[data-theme="light"] .floating-filter-btn {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
    box-shadow: 0 16px 28px rgba(148, 163, 184, 0.35);
}

@media (max-width: 480px) {
    .floating-filter-btn {
        padding-inline: 14px;
    }

    .floating-filter-btn span {
        display: none;
    }
}

@media (max-width: 768px) {
    .floating-filter-btn {
        display: inline-flex;
    }
}

@media (min-width: 769px) {
    .floating-filter-btn {
        display: none !important;
    }
}

body.filter-drawer-open {
    overflow: hidden;
}

.mobile-filter-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0 18px 18px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    z-index: 1300;
}

.mobile-filter-overlay.open {
    display: flex;
}

.mobile-filter-sheet {
    width: 100%;
    max-width: 540px;
    max-height: 88vh;
    border-radius: 28px 28px 18px 18px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
}

.mobile-filter-sheet.glass-card {
    background: transparent;
}

.mobile-filter-sheet.glass-card .glass-content {
    padding: 24px;
}

.mobile-filter-sheet:not(.glass-card) {
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    padding: 22px 22px 26px;
}

html[data-theme="light"] .mobile-filter-sheet:not(.glass-card) {
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
}

.mobile-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-filter-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.mobile-filter-close {
    background: none;
    border: 0;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mobile-filter-close:hover {
    transform: scale(1.05);
}

.mobile-filter-body {
    max-height: calc(80vh - 88px);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 6px;
}

.mobile-filter-body::-webkit-scrollbar {
    width: 6px;
}

.mobile-filter-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

html[data-theme="light"] .mobile-filter-body::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.6);
}

@media (min-width: 769px) {
    .mobile-filter-overlay {
        position: static;
        display: contents;
        background: none;
        backdrop-filter: none;
        padding: 0;
    }

    .mobile-filter-header,
    .mobile-filter-close {
        display: none;
    }

    .mobile-filter-body {
        max-height: none;
        overflow: visible;
        padding: 0;
    }
}

/* Customers filters layout */
#customer-advanced-filters {
    display: contents;
}

.customers-page #customer-filter-toolbar .search-group {
    position: relative;
}

@media (max-width: 768px) {
    .mobile-filter-body #customer-filter-toolbar {
        width: 100%;
        max-width: 100%;
    }

    .mobile-filter-body #customer-filter-toolbar .filter-group {
        width: 100%;
        min-width: 0;
    }

    .mobile-filter-body #customer-filter-toolbar .filter-group.select-wrap > i,
    .mobile-filter-body #customer-filter-toolbar .filter-group.search-group > i {
        inset-inline-start: 12px;
    }

    .mobile-filter-body #customer-filter-toolbar .filter-row,
    .mobile-filter-body #customer-filter-toolbar .filter-row-inner {
        width: 100%;
        min-width: 0;
    }

    .mobile-filter-body #customer-filter-toolbar .range-inputs {
        flex-wrap: wrap;
    }

    .mobile-filter-body #customer-filter-toolbar .range-inputs input {
        flex: 1 1 160px;
        min-width: 0;
    }
}

.customers-layout {
    display: grid;
    grid-template-columns: minmax(280px, 320px) 1fr;
    gap: 24px;
    align-items: start;
    width: 100%;
}

#customer-filter-card {
    position: sticky;
    top: 96px;
    align-self: start;
}

@media (max-width: 1100px) {
    .customers-layout {
        grid-template-columns: minmax(240px, 280px) 1fr;
        gap: 20px;
    }
}

@media (max-width: 900px) {
    #customer-filter-card {
        top: 84px;
    }
}

@media (max-width: 768px) {
    .customers-layout {
        display: block;
    }

    #customer-filter-card {
        position: static;
    }
}

/* Reports filter responsiveness */
#reports-filter-desktop-slot {
    width: 100%;
}

@media (max-width: 768px) {
    #reports-filter-desktop-slot {
        display: none;
    }

    .mobile-filter-body > .filter-bar {
        width: 100%;
    }

    .mobile-filter-body > .filter-bar.glass-card {
        border-radius: 20px;
    }
}

.sms-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.sms-card-header h4 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}
.status-badge.pending { background-color: #fdcb6e; color: #333; }
.status-badge.approved { background-color: #00b894; color: #fff; }
.status-badge.rejected { background-color: #d63031; color: #fff; }
.status-badge.completed { background-color: #10b981; color: #f8fafc; }
.status-badge.cancelled { background-color: #ef4444; color: #f8fafc; }
.status-badge.active { background-color: #16a34a; color: #f8fafc; }
.status-badge.inactive { background-color: #64748b; color: #f8fafc; }
.status-badge.finished { background-color: #0ea5e9; color: #f8fafc; }
.status-badge.not-sent { background-color: #e2e8f0; color: #1e293b; }
.status-badge.sent { background-color: #3b82f6; color: #f8fafc; }
.status-badge.failed { background-color: #ef4444; color: #f8fafc; }
.status-badge.delivered { background-color: #10b981; color: #f8fafc; }
.status-badge.unknown { background-color: #94a3b8; color: #0f172a; }

.sms-card-body p {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #e0e0e0;
    flex-grow: 1;
    margin: 0 0 20px 0;
}

.sms-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #ccc;
}

.sms-card-actions a {
    color: #ccc;
    font-size: 16px;
    margin: 0 8px;
    cursor: pointer;
    transition: color 0.2s;
}
.sms-card-actions a.edit-btn:hover { color: #fdcb6e; }
.sms-card-actions a.delete-btn:hover { color: #ff7675; }














/* app/static/css/style.css (کدهای جدید را به انتها اضافه کنید) */

/* --- استایل‌های صفحه محصولات --- */

/* Card Grid Layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.product-card .glass-content {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.product-card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.product-card-body {
    padding: 20px;
    flex-grow: 1;
}

.product-card-body h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #fff;
}

.product-card-body .price {
    font-size: 20px;
    font-weight: 700;
    color: var(--ocean-green);
    margin-bottom: 15px;
}
.product-card-body .price span {
    font-size: 14px;
    font-weight: 400;
    color: #ccc;
}

.product-card-tags {
    padding: 0 20px;
    margin-bottom: 20px;
}

.product-card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--input-border);
    text-align: left;
}

/* Image Uploader in Modal */
.upload-btn {
    display: inline-block;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    margin-top: 10px;
}
.upload-btn:hover { background: rgba(255, 255, 255, 0.3); }

.image-preview-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    min-height: 100px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 10px;
}

.img-preview {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    border-radius: 8px;
    overflow: hidden;
}
.img-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.remove-img-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
}











/* app/static/css/style.css (کدهای جدید را به انتها اضافه کنید) */

/* --- استایل‌های صفحه تک مشتری --- */

.profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr; /* ستون کناری باریک‌تر، ستون اصلی بزرگتر */
    gap: 20px;
    align-items: flex-start;
}

.profile-sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card .glass-content {
    padding: 25px;
}

.profile-header {
    text-align: center;
    border-bottom: 1px solid var(--input-border);
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.profile-header h2 {
    margin: 0;
    font-size: 24px;
    color: #fff;
}
.profile-header .company-name {
    color: #ccc;
    font-size: 14px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}
.contact-info li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #e0e0e0;
}
.contact-info li i {
    width: 25px;
    text-align: center;
    margin-left: 10px;
    color: #ccc;
}

.profile-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.full-width {
    width: 100%;
}
.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.financial-summary div {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--input-border);
    font-size: 14px;
}
.financial-summary div:last-child {
    border-bottom: none;
}
.financial-summary strong {
    font-weight: 600;
    color: #fff;
}
.financial-summary .balance strong {
    font-size: 16px;
    color: var(--ocean-green);
}
.financial-summary .balance.negative strong {
    color: #ff7675;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.action-btn-icon {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
}
.action-btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.action-btn-icon i {
    margin-left: 8px;
}

/* Tabs */
.tabs-container .glass-content {
    padding: 0;
}
.tabs {
    display: flex;
    border-bottom: 1px solid var(--input-border);
    padding: 10px 20px 0 20px;
}
.tab-link {
    padding: 10px 20px;
    cursor: pointer;
    color: #ccc;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}
.tab-link:hover {
    color: #fff;
}
.tab-link.active {
    color: #fff;
    font-weight: 600;
    border-bottom-color: var(--ocean-green);
}

.tab-content {
    padding: 25px;
}
.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
}

/* Timeline Style for activities */
.timeline {
    margin-top: 20px;
}
.timeline-item {
    position: relative;
    padding: 15px;
    padding-right: 35px; /* Space for icon and line */
    margin-bottom: 15px;
    background: rgba(17, 25, 40, 0.55);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 18px 36px rgba(5, 10, 25, 0.35);
}
.timeline-item::before {
    content: '';
    position: absolute;
    right: 15px;
    top: 20px;
    height: 100%;
    border-right: 2px dashed rgba(226, 232, 240, 0.26);
}
.timeline-item:last-child::before {
    display: none;
}

.timeline-icon {
    position: absolute;
    right: 6px;
    top: 15px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.95) 0%, rgba(59, 130, 246, 0.65) 100%);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
}

html[data-theme="light"] .reminder-page-container .timeline-item {
    background: transparent;
    border: none;
    box-shadow: none;
}

html[data-theme="light"] .reminder-page-container .timeline-item::before {
    display: none;
}

.reminder-page-container .timeline {
    display: grid;
    gap: 16px;
}

.reminder-page-container .timeline-item {
    padding: 0;
    margin-bottom: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.reminder-page-container .timeline-item::before {
    display: none;
}

.reminder-page-container .timeline-item .glass-content {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 24px;
}

.reminder-page-container .timeline-item .card-icon {
    flex: 0 0 auto;
}

.reminder-page-container .timeline-item .card-content-inner {
    flex: 1 1 auto;
}
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.timeline-header .date {
    font-size: 13px;
    color: #ccc;
}
.timeline-header .actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.timeline-header .actions .timeline-action {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.timeline-header .actions .timeline-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}
.timeline-header .actions .timeline-action--cancel {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fecaca;
}
.timeline-header .actions .timeline-action--cancel:hover {
    background: rgba(239, 68, 68, 0.28);
}
.timeline-header .actions .timeline-action--complete {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.45);
    color: #bbf7d0;
}
.timeline-header .actions .timeline-action--complete:hover {
    background: rgba(16, 185, 129, 0.28);
}
.timeline-header .actions .timeline-action:focus-visible {
    outline: 2px solid rgba(148, 163, 184, 0.7);
    outline-offset: 2px;
}
html[data-theme="light"] .timeline-header .actions .timeline-action {
    border-color: rgba(15, 23, 42, 0.18);
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    box-shadow: none;
}
html[data-theme="light"] .timeline-header .actions .timeline-action--cancel {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #b91c1c;
}
html[data-theme="light"] .timeline-header .actions .timeline-action--complete {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #047857;
}
.timeline-content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #e0e0e0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Inline Form */
.inline-form {
    display: flex;
    gap: 10px;
}
.inline-form input {
    flex-grow: 1;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
}
.inline-form button {
    background: var(--ocean-green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 992px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .profile-sidebar {
        position: static;
    }
}



/* app/static/css/style.css (کد زیر را به انتها اضافه کنید) */

.customer-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease-in-out;
}

.customer-link:hover {
    color: var(--ocean-green);
    text-decoration: underline;
}














/* app/static/css/style.css (کدهای جدید را به انتها اضافه کنید) */

/* --- استایل‌های مودال فروش --- */

.form-divider {
    border: none;
    border-top: 1px solid var(--input-border);
    margin: 25px 0;
}

/* Product Search Results */
.search-results {
    position: absolute;
    background: #2d3436; /* یک رنگ تیره برای پس‌زمینه */
    border: 1px solid var(--input-border);
    border-radius: 8px;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1010;
    display: none; /* در حالت عادی مخفی است */
}
.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--input-border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background-color: rgba(255, 255, 255, 0.1); }
.search-result-item span {
    color: #ccc;
    font-size: 12px;
    margin-right: 10px;
}

/* Sale Items Table */
.sale-items-container {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 15px;
}
.sale-items-table {
    width: 100%;
    border-collapse: collapse;
}
.sale-items-table th {
    text-align: right;
    padding-bottom: 10px;
    color: #ccc;
    font-weight: 400;
}
.sale-items-table td {
    padding: 8px 0;
    vertical-align: middle;
}
.sale-items-table input {
    width: 100%;
    padding: 8px;
    font-size: 14px;
}
.sale-items-table .remove-item-btn {
    color: #ff7675;
    cursor: pointer;
    font-size: 18px;
}

.sale-summary {
    text-align: left;
    margin-top: 20px;
    font-size: 18px;
    color: #fff;
}











/* app/static/css/style.css (کدهای جدید را به انتها اضافه کنید) */

.timeline-content .customer-link-sm {
    font-size: 13px;
    color: #a29bfe;
    text-decoration: none;
    margin-top: 10px;
    display: inline-block;
}
.timeline-content .customer-link-sm:hover {
    text-decoration: underline;
}















/* app/static/css/style.css (کدهای جدید را به انتها اضافه کنید) */

/* --- استایل‌های صفحه تک کمپین --- */
.campaign-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.campaign-info h1 { margin: 0; color: #fff; }
.header-meta { display: flex; align-items: center; gap: 15px; margin-top: 10px; color: #ccc; }
.campaign-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.campaign-action-message {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    color: var(--text);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

html[data-theme="light"] .campaign-action-message {
    background: rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14);
    text-shadow: none;
}

.campaign-action-message i {
    font-size: 1rem;
    opacity: 0.9;
}

.campaign-action-message[data-state="active"] {
    background: rgba(16, 185, 129, 0.2);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.38);
}

html[data-theme="light"] .campaign-action-message[data-state="active"] {
    background: rgba(16, 185, 129, 0.12);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.26);
}

.campaign-action-message[data-state="finished"] {
    background: rgba(59, 130, 246, 0.2);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.34);
}

html[data-theme="light"] .campaign-action-message[data-state="finished"] {
    background: rgba(59, 130, 246, 0.14);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.26);
}

.campaign-action-message[data-state="inactive"] {
    background: rgba(71, 85, 105, 0.22);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.36);
}

html[data-theme="light"] .campaign-action-message[data-state="inactive"] {
    background: rgba(71, 85, 105, 0.12);
    box-shadow: inset 0 0 0 1px rgba(71, 85, 105, 0.24);
}
.btn-success { background-color: #00b894; }
.btn-success:hover { background-color: #00a383; }

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: flex-start;
}
.sms-preview {
    font-size: 15px;
    line-height: 1.8;
    color: #e0e0e0;
    white-space: pre-wrap; /* To respect new lines in the message */
}

/* Filter Modal */
.modal-content.extra-large { max-width: 900px; }

.filter-modal-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 25px;
}
.filter-sidebar h4, .filter-results h4 {
    margin-top: 0;
    color: #fff;
}
.results-header {
    display: flex;
    justify-content: flex-end;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--input-border);
    margin-bottom: 10px;
}
.results-list {
    max-height: 350px;
    overflow-y: auto;
}
.customer-filter-item {
    display: flex;
    align-items: center;
    padding: 10px 5px;
    border-bottom: 1px solid var(--input-border);
}
.customer-filter-item:last-child { border-bottom: none; }
.customer-filter-item label {
    margin-right: 10px;
    flex-grow: 1;
    cursor: pointer;
}
.customer-filter-item .mobile {
    font-size: 13px;
    color: #ccc;
}












/* app/static/css/style.css (کدهای جدید را به انتها اضافه کنید) */

.filter-sidebar .form-group {
    margin-bottom: 15px;
}
.filter-sidebar label {
    font-size: 13px;
    margin-bottom: 6px;
}
.filter-sidebar input, .filter-sidebar select {
    padding: 8px 10px;
    font-size: 14px;
}
.input-pair {
    display: flex;
    gap: 10px;
}











/* app/static/css/style.css (کدهای جدید را به انتها اضافه کنید) */

/* --- استایل‌های صفحه اهداف --- */
.target-card .glass-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.target-header {
    margin-bottom: 15px;
}
.target-header h4 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}
.target-header .assignee {
    font-size: 14px;
    color: #ccc;
}

.target-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 10px;
}
.current-progress { color: #fff; font-weight: 600; }
.goal-value { color: #ccc; }

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}
.progress-bar-inner {
    height: 100%;
    width: 0%; /* Will be set by JS */
    background: linear-gradient(90deg, var(--ocean-blue), var(--ocean-green));
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.target-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #ccc;
    border-top: 1px solid var(--input-border);
    padding-top: 15px;
}
.target-footer .actions a {
    color: #ff7675;
    cursor: pointer;
}
.radio-group {
    display: flex;
    gap: 20px;
}














/* app/static/css/style.css (کدهای جدید را به انتها اضافه کنید) */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: flex-start;
}
.settings-forms, .settings-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--input-border); color: #ccc; }
.info-list li:last-child { border-bottom: none; }
.info-list li strong { color: #fff; font-weight: 600; }
.data-table td.positive { color: #55efc4; }
.data-table td.negative { color: #ff7675; }

@media (max-width: 1024px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .settings-grid {
    overflow-x: hidden;
  }

  .settings-forms,
  .settings-info {
    width: 100%;
  }

  .settings-grid .glass-card,
  .settings-grid .table-container {
    width: 100%;
  }

  .settings-grid .glass-content {
    padding-inline: 18px;
  }

  .table-container .glass-content > table {
    min-width: 100%;
  }
}

/* -------- Light theme readability adjustments -------- */
html[data-theme="light"] .content-header .action-btn,
html[data-theme="light"] .content-header a.action-btn {
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .content-header .action-btn:hover,
html[data-theme="light"] .content-header a.action-btn:hover {
  background: #111827;
}

html[data-theme="light"] .filter-bar .glass-content {
  color: #0f172a;
}

html[data-theme="light"] .filter-bar .glass-content label,
html[data-theme="light"] .filter-bar .glass-content i,
html[data-theme="light"] .filter-bar .glass-content span,
html[data-theme="light"] .filter-bar .glass-content input,
html[data-theme="light"] .filter-bar .glass-content select {
  color: #0f172a;
}

html[data-theme="light"] .filter-bar .glass-content input::placeholder {
  color: rgba(15, 23, 42, 0.55);
}

html[data-theme="light"] .filter-bar .glass-content .btn-secondary {
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.16);
  color: #0f172a;
}

html[data-theme="light"] .filter-bar .glass-content .btn-secondary:hover {
  background: rgba(15, 23, 42, 0.15);
}

html[data-theme="light"] .reminder-page-container .tabs .tab-link,
html[data-theme="light"] .export-import-page .tabs .tab-link {
  color: #0f172a;
}

html[data-theme="light"] .reminder-page-container .tabs .tab-link.active,
html[data-theme="light"] .export-import-page .tabs .tab-link.active {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.08);
  border-bottom-color: rgba(15, 23, 42, 0.45);
}

html[data-theme="light"] .reminder-section h4 {
  color: #0f172a;
}

html[data-theme="light"] .target-section-title,
html[data-theme="light"] .target-summary .glass-content h3,
html[data-theme="light"] .target-chart-card .glass-content h3,
html[data-theme="light"] .breakdown-card .section-title,
html[data-theme="light"] .breakdown-card table thead th {
  color: #0f172a;
}

html[data-theme="light"] .breakdown-card table tbody td {
  color: #0f172a;
}

html[data-theme="light"] .export-import-page .glass-content {
  color: #0f172a;
}

html[data-theme="light"] .export-import-page .fields-list {
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(248, 250, 252, 0.35);
}

html[data-theme="light"] .export-import-page .fields-list li {
  color: #0f172a;
}

html[data-theme="light"] .export-import-page .fields-list .field-actions button {
  background: #0f172a;
  color: #f8fafc;
  border: none;
}

html[data-theme="light"] .export-import-page .fields-list .field-actions button:disabled {
  background: rgba(15, 23, 42, 0.35);
  color: rgba(248, 250, 252, 0.7);
}

html[data-theme="light"] .export-import-page .fields-list .field-actions button:not(:disabled):hover {
  background: #111827;
}

html[data-theme="light"] .api-key-box .btn-secondary,
html[data-theme="light"] #sites-tbody .btn-secondary {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.45);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .api-key-box .btn-secondary:hover,
html[data-theme="light"] #sites-tbody .btn-secondary:hover {
  background: #111827;
}

@media (max-width: 768px) {
  .settings-forms,
  .settings-info {
    gap: 16px;
  }
  .settings-forms .glass-card .glass-content,
  .settings-info .glass-card .glass-content {
    padding: 18px;
  }
}

@media (max-width: 600px) {
  .info-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .info-list li span,
  .info-list li strong {
    display: block;
  }
}













/* app/static/css/style.css (کدهای جدید را به انتها اضافه کنید) */

/* --- استایل‌های صفحه گزارشات --- */
.filter-bar .glass-content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 15px;
    padding: 15px 20px;
}
.filter-bar .filter-group {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.filter-bar label {
    font-size: 13px;
    margin-bottom: 6px;
    color: #ccc;
}
.filter-bar select, .filter-bar input {
    width: 100%;
    padding: 8px 10px;
}

.reports-grid {
    margin-top: 20px;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
        "kpi1 kpi2 kpi3 kpi4"
        "large-chart large-chart large-chart large-chart"
        "medium-chart1 medium-chart1 medium-chart2 medium-chart2"
        "leaderboard1 leaderboard1 leaderboard2 leaderboard2";
}

.report-widget.kpi { grid-area: auto; }
#kpi-revenue { grid-area: kpi1; }
#kpi-sales-count { grid-area: kpi2; }
#kpi-new-customers { grid-area: kpi3; }
#kpi-avg-sale { grid-area: kpi4; }

#chart-sales-over-time-container { grid-area: large-chart; min-height: 350px; }
#chart-sales-by-dept-container { grid-area: medium-chart1; min-height: 300px; }
#chart-customer-sources-container { grid-area: medium-chart2; min-height: 300px; }

.report-widget.leaderboard:nth-of-type(1) { grid-area: leaderboard1; }
.report-widget.leaderboard:nth-of-type(2) { grid-area: leaderboard2; }

.report-widget .glass-content {
    padding: 25px;
}
.report-widget.kpi p { margin: 0; font-size: 14px; color: #ccc; }
.report-widget.kpi h3 { margin: 10px 0 0 0; font-size: 28px; color: #fff; }

.report-widget.leaderboard h4 { margin-top: 0; color: #fff; }
.report-widget.leaderboard ol { padding-right: 20px; color: #e0e0e0; }
.report-widget.leaderboard ol li { padding: 8px 0; border-bottom: 1px solid var(--input-border); }
.report-widget.leaderboard ol li:last-child { border-bottom: none; }
.report-widget.leaderboard ol li strong { color: #fff; float: left; }















/* اندازه‌پذیری مناسب بوم نمودارها */
#chart-sales-over-time-container .glass-content,
#chart-sales-by-dept-container .glass-content,
#chart-customer-sources-container .glass-content {
  position: relative;
  min-height: 300px;
}
#chart-sales-over-time,
#chart-sales-by-dept,
#chart-customer-sources {
  display: block;
  width: 100%;
  height: 260px; /* Chart.js با maintainAspectRatio=false ارتفاع را لحاظ می‌کند */
}

/* شاین لودر سبک روی باکس‌ها هنگام درخواست */
.loading-sheen {
  position: relative;
  overflow: hidden;
}
.loading-sheen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.06) 30%, transparent 60%);
  animation: sheen 1.4s linear infinite;
}
@keyframes sheen {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ریسپانسیو گرید گزارشات */
@media (max-width: 1200px) {
  .reports-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "kpi1 kpi2"
      "kpi3 kpi4"
      "large-chart large-chart"
      "medium-chart1 medium-chart2"
      "leaderboard1 leaderboard2";
  }
}
@media (max-width: 768px) {
  .reports-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "kpi1" "kpi2" "kpi3" "kpi4"
      "large-chart"
      "medium-chart1"
      "medium-chart2"
      "leaderboard1"
      "leaderboard2";
  }
}









/* ===== Customers Page Fixes (scoped) ===== */
.customers-page { direction: rtl; }

/* فیلتر بالا: از گراید استفاده می‌کنیم تا توهم‌رفتن حل شه */
.customers-page .filter-bar .glass-content{
  display: grid;
  grid-template-columns: repeat(4, minmax(180px,1fr));
  gap: 12px;
  align-items: end;
}

/* سلکت و اینپوت فیلترها: خوانایی و آیکن پیکان */
.customers-page .filter-bar .filter-group{
  display: flex; flex-direction: column; min-width: 0;
}
.customers-page .filter-bar .filter-group label{
  font-size: 13px; margin-bottom: 6px; color:#ccc;
}
.customers-page .filter-bar .filter-group select,
.customers-page .filter-bar .filter-group input{
  width: 100%;
  padding: 10px 12px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
}

/* فلش سلکت؛ چون RTL هست، سمت چپ قرار می‌دیم */
.customers-page .filter-bar .filter-group.select-wrap{ position: relative; }
.customers-page .filter-bar .filter-group.select-wrap select{
  padding-left: 38px; /* جا برای فلش */
}
.customers-page .filter-bar .filter-group.select-wrap::after{
  content: "";
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23cccccc' d='M5.5 7.5l4.5 4.5 4.5-4.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 12px 12px;
}

/* خوانایی گزینه‌های منو (بعضی مرورگرها پس‌زمینه روشن می‌زنن) */
.customers-page select option{
  background-color: #1f1f1f;  /* تیره */
  color: #ffffff;             /* نوشته سفید */
}
/* فایرفاکس مک/ویندوز */
@-moz-document url-prefix(){
  .customers-page select { color: #fff; }
}

/* چینش دکمه‌های اعمال/بازنشانی زیر فیلترها */
.customers-page .filters-actions{
  grid-column: 1 / -1;
  display: flex; gap: 10px; justify-content: flex-start; margin-top: 4px;
}

/* ریسپانسیو فیلترها */
@media (max-width: 1100px){
  .customers-page .filter-bar .glass-content{ grid-template-columns: repeat(2, minmax(180px,1fr)); }
}
@media (max-width: 560px){
  .customers-page .filter-bar .glass-content{ grid-template-columns: 1fr; }
}

/* ===== امتیاز/سطح (رادیو) — قابل کلیک و خوانا ===== */
.customers-page .rating-group{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 6px;
}
.customers-page .rating-group input[type="radio"]{
  position: absolute; opacity: 0; pointer-events: none;
}
.customers-page .rating-group label{
  display: block; text-align: center; padding: 8px 0;
  cursor: pointer; border-radius: 7px; color: var(--text);
  user-select: none; transition: all .2s ease;
  border: 1px solid transparent;
}
/* الگوی صحیح: input بلافاصله قبل از label باشد */
.customers-page .rating-group input[type="radio"]:checked + label{
  background-color: var(--ocean-green);
  border-color: var(--ocean-green);
  color: #fff; font-weight: 600;
}

/* فضای داخلی فرم مشتری */
.customers-page .form-grid{
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 780px){
  .customers-page .form-grid{ grid-template-columns: 1fr; }
}

/* رفع هم‌پوشانی آیکن‌های داخل فیلتر (اگر جایی آیکن مطلق داری) */
.customers-page .filter-group i{ position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #ccc; pointer-events: none; }
.customers-page .filter-group input.has-icon,
.customers-page .filter-group select.has-icon{ padding-right: 38px; }

.customers-page .table-container .glass-content > table {
  min-width: 640px;
}

.customers-page .data-table th,
.customers-page .data-table td {
  padding: 12px 16px;
  font-size: 0.92rem;
}

.customers-page .data-table th {
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.85);
}

.customers-page .data-table td {
  color: rgba(255, 255, 255, 0.9);
}

.customers-page .data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.customers-page .customers-table-header {
  display: none;
}

.customers-page .table-search-anchor {
  width: 100%;
}

.customers-page .table-search-anchor .filter-group {
  width: 100%;
  min-width: 0;
}

.customers-page .table-search-anchor .filter-group input {
  font-size: 15px;
}

@media (max-width: 1024px) {
  .customers-page .data-table th,
  .customers-page .data-table td {
    padding: 11px 14px;
    font-size: 0.88rem;
  }
}

@media (max-width: 768px) {
  .customers-page .table-container .glass-content > table {
    min-width: unset;
  }

  .customers-page .customers-table-header {
    display: block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
    box-shadow: 0 18px 35px rgba(10, 13, 25, 0.25);
    backdrop-filter: blur(16px);
  }

  .customers-page .customers-table-header .table-header-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .customers-page .table-search-anchor .filter-group {
    flex: 1 1 100%;
  }

  .customers-page .table-search-anchor .filter-group label {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
  }

  .customers-page .table-search-anchor .filter-group input {
    padding: 12px 44px 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
  }

  .customers-page .data-table th,
  .customers-page .data-table td {
    font-size: 0.85rem;
    padding: 10px 12px;
  }
}













/* ===== Targets Page (scoped) ===== */
.targets-page .filter-bar .glass-content{
  display:grid; grid-template-columns: repeat(3, minmax(180px,1fr)); gap:12px; align-items:end;
}
.targets-page .filter-bar .filter-group{ display:flex; flex-direction:column; min-width:0; }
.targets-page .filters-actions{ display:flex; gap:10px; align-items:center; }

.targets-page .targets-advanced-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap:20px;
  margin:20px 0 28px;
}

.targets-page .targets-advanced-grid .glass-content{
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.targets-page .card-header{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.targets-page .card-header h3{
  margin:0;
  font-size:18px;
  color:var(--text);
}

.targets-page .card-subtitle{
  font-size:13px;
  color:rgba(255,255,255,0.65);
}

html[data-theme="light"] .targets-page .card-subtitle{
  color:rgba(15,23,42,0.6);
}

.targets-page .goal-kpi-wrap{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap:14px;
}

.targets-page .goal-kpi{
  display:flex;
  gap:10px;
  align-items:center;
  padding:14px;
  border-radius:16px;
  background: rgba(255,255,255,0.08);
  border:1px solid var(--input-border);
}

html[data-theme="light"] .targets-page .goal-kpi{
  background: rgba(255,255,255,0.7);
}

.targets-page .goal-kpi-icon{
  width:40px;
  height:40px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, rgba(59,130,246,0.65), rgba(14,165,233,0.6));
  color:#fff;
  font-size:18px;
}

.targets-page .goal-kpi-meta{
  display:flex;
  flex-direction:column;
  gap:4px;
  flex:1;
}

.targets-page .goal-kpi-meta span{
  color:rgba(255,255,255,0.72);
  font-size:13px;
}

html[data-theme="light"] .targets-page .goal-kpi-meta span{
  color:rgba(15,23,42,0.65);
}

.targets-page .goal-kpi-value{
  font-size:20px;
  font-weight:700;
  color:var(--text);
}

.targets-page .goal-kpi-foot{
  font-size:12px;
  color:rgba(255,255,255,0.55);
}

html[data-theme="light"] .targets-page .goal-kpi-foot{
  color:rgba(15,23,42,0.45);
}

.targets-page .goal-spotlight-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.targets-page .goal-spotlight-item{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:14px;
  border-radius:14px;
  border:1px solid var(--input-border);
  background: rgba(255,255,255,0.06);
}

html[data-theme="light"] .targets-page .goal-spotlight-item{
  background: rgba(255,255,255,0.75);
}

.targets-page .goal-spotlight-item .icon{
  width:36px;
  height:36px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:17px;
  color:#fff;
}

.targets-page .goal-spotlight-item .text{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.targets-page .goal-spotlight-item strong{
  color:var(--text);
  font-size:15px;
}

.targets-page .goal-spotlight-item p{
  margin:0;
  font-size:13px;
  color:rgba(255,255,255,0.7);
  line-height:1.6;
}

html[data-theme="light"] .targets-page .goal-spotlight-item p{
  color:rgba(15,23,42,0.65);
}

.targets-page .goal-spotlight-item span.meta{
  font-size:12px;
  color:rgba(255,255,255,0.55);
}

html[data-theme="light"] .targets-page .goal-spotlight-item span.meta{
  color:rgba(15,23,42,0.5);
}

.targets-page .goal-spotlight-item.ahead .icon{ background: var(--goal-ahead); }
.targets-page .goal-spotlight-item.on_track .icon{ background: var(--goal-ontrack); }
.targets-page .goal-spotlight-item.at_risk .icon{ background: var(--goal-risk); }

.targets-page .scoreboard-wrapper{
  position:relative;
  overflow-x:auto;
  padding-bottom:8px;
}

.targets-page .goal-scoreboard-table{
  width:100%;
  border-collapse:collapse;
  margin:0;
  font-size:13px;
  color:var(--text);
  min-width:620px;
}

.targets-page .scoreboard-name{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.targets-page .scoreboard-name small{
  font-size:11px;
  color:rgba(255,255,255,0.6);
}

html[data-theme="light"] .targets-page .scoreboard-name small{
  color:rgba(15,23,42,0.55);
}

.targets-page .goal-scoreboard-table th,
.targets-page .goal-scoreboard-table td{
  padding:10px 12px;
  text-align:right;
  border-bottom:1px solid rgba(255,255,255,0.08);
}

html[data-theme="light"] .targets-page .goal-scoreboard-table th,
html[data-theme="light"] .targets-page .goal-scoreboard-table td{
  border-bottom:1px solid rgba(15,23,42,0.1);
}

.targets-page .goal-scoreboard-table th{
  font-weight:600;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:0.5px;
  color:rgba(255,255,255,0.7);
}

html[data-theme="light"] .targets-page .goal-scoreboard-table th{
  color:rgba(15,23,42,0.6);
}

.targets-page .goal-scoreboard-empty{
  display:none;
  text-align:center;
  padding:18px 12px;
  font-size:13px;
  color:rgba(255,255,255,0.6);
}

html[data-theme="light"] .targets-page .goal-scoreboard-empty{
  color:rgba(15,23,42,0.5);
}

.targets-page .scoreboard-status{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.targets-page .status-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:3px 8px;
  border-radius:999px;
  font-size:11px;
  color:#0f172a;
  background:rgba(255,255,255,0.9);
}

.targets-page .status-chip.ahead{ color:#022c22; background:var(--goal-ahead); }
.targets-page .status-chip.on_track{ color:#082f49; background:var(--goal-ontrack); }
.targets-page .status-chip.at_risk{ color:#451a03; background:var(--goal-risk); }
.targets-page .status-chip.neutral{ color:rgba(15,23,42,0.7); background:rgba(255,255,255,0.55); }
.targets-page .status-chip.completed{ color:#111827; background:rgba(148,163,184,0.85); }

.targets-page .milestone-section{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.targets-page .milestone-section h4{
  margin:0;
  font-size:15px;
  color:var(--text);
}

.targets-page .goal-milestones-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.targets-page .goal-milestones-list li{
  padding:12px;
  border-radius:12px;
  border:1px solid var(--input-border);
  background:rgba(255,255,255,0.05);
  display:flex;
  flex-direction:column;
  gap:8px;
}

html[data-theme="light"] .targets-page .goal-milestones-list li{
  background:rgba(255,255,255,0.7);
}

.targets-page .milestone-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:13px;
  color:var(--text);
}

.targets-page .milestone-progress{
  width:100%;
  height:8px;
  border-radius:999px;
  background:rgba(255,255,255,0.1);
  overflow:hidden;
}

html[data-theme="light"] .targets-page .milestone-progress{
  background:rgba(15,23,42,0.12);
}

.targets-page .milestone-progress-inner{
  height:100%;
  background:linear-gradient(90deg, rgba(14,165,233,0.8), rgba(96,165,250,0.9));
}

.targets-page .goal-milestones-list li.highlight .milestone-progress-inner{
  background:linear-gradient(90deg, rgba(52,211,153,0.9), rgba(16,185,129,0.95));
}

.targets-page .goal-milestones-list li small{
  color:rgba(255,255,255,0.6);
  font-size:12px;
}

html[data-theme="light"] .targets-page .goal-milestones-list li small{
  color:rgba(15,23,42,0.55);
}

.targets-page .goal-celebrations{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.targets-page .goal-celebration-card{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px;
  border-radius:12px;
  border:1px solid var(--input-border);
  background:rgba(255,255,255,0.06);
  font-size:13px;
  color:var(--text);
}

html[data-theme="light"] .targets-page .goal-celebration-card{
  background:rgba(255,255,255,0.75);
}

.targets-page .goal-celebration-card span.label{
  font-weight:600;
}

.targets-page .goal-celebration-card span.value{
  color:rgba(255,255,255,0.75);
}

html[data-theme="light"] .targets-page .goal-celebration-card span.value{
  color:rgba(15,23,42,0.6);
}

@media (max-width: 780px){
  .targets-page .targets-advanced-grid{
    grid-template-columns:1fr;
  }
}

.targets-page .targets-grid{
  margin-top:20px;
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap:20px;
}
.targets-page .target-card .glass-content{ padding:22px; display:flex; flex-direction:column; }
.targets-page .target-header{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; cursor:grab; }
.targets-page .target-header h4{ margin:0; color:var(--text); font-size:18px; }
.targets-page .assignee{ font-size:14px; color:#ccc; }

.targets-page .target-progress-info{ display:flex; justify-content:space-between; margin:6px 0 10px; font-size:14px; }
.targets-page .current-progress{ color:#fff; font-weight:600; }
.targets-page .goal-value{ color:#ccc; }

.targets-page .progress-bar{ width:100%; height:10px; background:rgba(0,0,0,.3); border-radius:6px; overflow:hidden; margin-bottom:14px; }
.targets-page .progress-bar-inner{ height:100%; width:0; background: linear-gradient(90deg, var(--ocean-blue), var(--ocean-green)); transition: width .45s ease; }

.targets-page .target-footer{ display:flex; justify-content:space-between; align-items:center; color:#ccc; font-size:13px; border-top:1px solid var(--input-border); padding-top:10px; }
.targets-page .target-footer .actions a{ color:#ff7675; cursor:pointer; }

.targets-page .drag-ghost{ opacity:.7; }

@media (max-width: 860px){
.targets-page .filter-bar .glass-content{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px){
  .targets-page .filter-bar .glass-content{ grid-template-columns: 1fr; }
}






/* === Targets enhancements === */
.targets-page .target-progress-row{
  display:flex; align-items:center; gap:10px; margin:4px 0 8px;
}
.targets-page .progress-badge{
  min-width:42px; padding:2px 8px; border-radius:999px;
  background: rgba(255,255,255,0.15);
  border:1px solid var(--input-border);
  color:#fff; font-size:13px; text-align:center;
}

.targets-page .actions a{
  margin-right:10px;
}
.targets-page .actions a.detail-btn { color:#74b9ff; }
.targets-page .actions a.detail-btn:hover { color:#a29bfe; }

.targets-page .detail-body .detail-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:16px;
}
.targets-page .detail-body .detail-line{
  display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid var(--input-border);
  padding:8px 0; color:#e0e0e0;
}
.targets-page .detail-body .detail-line strong{ color:#fff; }
@media (max-width: 680px){
  .targets-page .detail-body .detail-grid{ grid-template-columns:1fr; }
}















/* ===================== Target Detail – Size & Progress ===================== */

/* ظرف کلی کارت نمودار مرکزی */
.target-chart-card .glass-content {
  padding: 18px;
}

/* باکس نمودار: ارتفاع قابل‌کنترل و واکنش‌گرا */
.chart-wrap {
  position: relative;
  width: 100%;
  height: 340px;           /* ارتفاع پیشفرض دسکتاپ */
  max-height: 420px;
  margin: 0 auto;          /* وسط‌چین ظرف */
}

.chart-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important; /* Chart.js با maintainAspectRatio=false به این احترام می‌ذاره */
}

/* روی نمایش‌های کوچیک‌تر ارتفاع رو کم کن */
@media (max-width: 992px) {
  .chart-wrap { height: 300px; }
}
@media (max-width: 576px) {
  .chart-wrap { height: 240px; }
}

/* کارت «خلاصه هدف» */
.target-summary .grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 992px) {
  .target-summary .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .target-summary .grid { grid-template-columns: 1fr; }
}

/* KPI کوچک */
.kpi-chip {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.target-section-title {
  margin: 0;
  color: #fff;
}
.kpi-chip .label {
  font-size: 13px;
  color: #ccc;
}
.kpi-chip .value {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

/* نوار پیشرفت با هایلایت واضح بخش طی‌شده */
.progress-outer {
  position: relative;
  width: 100%;
  height: 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid var(--input-border);
  overflow: hidden;
}

.progress-inner {
  position: relative;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(0,184,148,0.15), rgba(0,184,148,0.55));
  /* هایلایت واضح */
  box-shadow: inset 0 0 0 1px rgba(0,184,148,0.6), 
              0 0 12px rgba(0,184,148,0.35);
  transition: width .5s ease-in-out;
}

/* استایل خطوط مورب روی بخش طی‌شده برای تاکید */
.progress-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.25) 0px,
    rgba(255,255,255,0.25) 6px,
    transparent 6px,
    transparent 12px
  );
  opacity: .25;
  pointer-events: none;
}

/* مقدار/درصد داخل نوار */
.progress-label {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #ccc;
}

/* کارت‌های Breakdown */
.breakdown-card .glass-content {
  padding: 18px;
}
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  color: #fff;
  font-size: 14px;
}
.breakdown-table th, .breakdown-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: right;
}
.breakdown-table th {
  color: #ddd;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: rgba(255,255,255,0.08);
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.2;
}

.badge-soft i {
  font-size: 0.85rem;
}

/* شبکه دوبل برای Breakdown */
.breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 992px) {
  .breakdown-grid { grid-template-columns: 1fr; }
}

.breakdown-card .glass-content {
  overflow-x: auto;
  padding-bottom: 12px;
}
.breakdown-card .glass-content::-webkit-scrollbar {
  height: 6px;
}
.breakdown-card .glass-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 999px;
}
.breakdown-card table {
  min-width: 520px;
}
@media (max-width: 600px) {
  .breakdown-card table { min-width: 460px; }
}

/* کارت عنوان‌بندی */
.section-title {
  margin: 0 0 10px 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}






/* --- Sidebar: keep footer pinned, make nav scrollable --- */
.main-layout {
  height: 100vh;
  overflow: hidden; /* از پخش‌شدن محتوا خارج از نما جلوگیری می‌کند */
}

.sidebar {
  height: 100vh;
  overflow: hidden; /* اسکرول روی ناوبری انجام می‌شود، نه کل سایدبار */
  flex-shrink: 0;
}

.sidebar .glass-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.sidebar-header { 
  flex: 0 0 auto; 
  margin-bottom: 12px;
}

.sidebar-nav {
  /* بخش قابل اسکرول */
  flex: 1 1 auto;
  min-height: 0;                /* برای اینکه overflow کار کند */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 8px;           /* فضای اسکرول‌بار */
  margin-right: -8px;           /* خنثی کردن پَدینگ برای تراز شدن */
  padding-bottom: 10px;         /* فاصله از فوتر */
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-footer {
  flex: 0 0 auto;               /* فوتر همیشه پایین می‌ماند */
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
}

/* آیتم‌های منو کمی فشرده‌تر بشن تا تعداد زیاد جا بشه */
.sidebar-nav li a {
  padding: 12px 14px;
  border-radius: 10px;
}

/* اسکرول‌بار ظریف‌تر و شیشه‌ای */
.sidebar-nav::-webkit-scrollbar {
  width: 8px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 10px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.35);
}

/* در ارتفاع‌های خیلی کم، اندازه متن را کمی کم کن تا جا بیشتری بده */
@media (max-height: 720px) {
  .sidebar-nav li a {
    padding: 10px 12px;
    font-size: 14px;
  }
  .sidebar-header h2 {
    font-size: 20px;
  }
}
@media (max-height: 600px) {
  .sidebar-nav li a span { 
    font-size: 13px; 
  }
}










/* ====== Modal: responsive & scrollable body with sticky header/footer ====== */

/* لایه تار نیمه‌شفاف کل صفحه */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;                 /* تا در صفحه‌های کوچک مودال به لبه‌ها نچسبه */
  z-index: 1000;
  overflow: auto;                /* اگر از ارتفاع بیشتر شد، کل اوورلی اسکرول بخورد */
  box-sizing: border-box;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-overlay[hidden],
.modal-overlay[aria-hidden="true"] {
  display: none !important;
}

/* جعبه مودال */
.modal-content.modal-responsive {
  width: 100%;
  max-width: 860px;              /* حداکثر عرض مودال روی دسکتاپ */
  display: grid;                 /* سه ناحیه: header / body / footer */
  grid-template-rows: auto 1fr auto;
  max-height: calc(100vh - 40px);/* هرگز از ارتفاع ویوپورت بیشتر نشود */
}

/* هدر و فوتر چسبان (داخل خود باکس مودال) */
.modal-header-sticky,
.modal-footer-sticky {
  position: sticky;
  top: 0;
  bottom: 0;
  background: transparent; /* شیشه‌ای بودن را لایه‌های glass انجام می‌دهند */
  z-index: 5;
  padding: 16px 20px;
}

/* جداکننده ظریف */
.modal-header-sticky {
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.modal-footer-sticky {
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* بدنه که اسکرول می‌خورد */
.modal-body-scroll {
  padding: 20px;
  overflow: auto;                /* فقط بدنه اسکرول شود */
  min-height: 0;                 /* برای اینکه overflow کار کند */
}

/* شبکه فرم: دو ستونه روی دسکتاپ، تکی روی موبایل */
.form-grid.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 992px) {
  .modal-content.modal-responsive { max-width: 720px; }
}
@media (max-width: 768px) {
  .form-grid.two-col { grid-template-columns: 1fr; }
  .modal-content.modal-responsive { max-width: 92vw; }
}

/* گروه امتیاز/سطح: چیدمان افقی و چندسطره در صفحه باریک */
.rating-group-inline {
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  gap: 8px;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 6px;
}
.rating-group-inline input[type="radio"] {
  display: none;
}
.rating-group-inline label {
  text-align: center;
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  color: #eee;
  border: 1px solid transparent;
  transition: all .2s ease;
  user-select: none;
}
.rating-group-inline input[type="radio"]:checked + label {
  background-color: var(--ocean-green);
  color: #fff;
  font-weight: 700;
}
@media (max-width: 420px) {
  .rating-group-inline {
    grid-template-columns: repeat(5, minmax(36px, 1fr));
    gap: 6px;
  }
  .rating-group-inline label { padding: 6px 0; font-size: 14px; }
}

/* فوتر اکشن‌ها */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* اطمینان از اینکه در گوشی‌های خیلی کوتاه هم همه‌چیز قابل دسترسه */
@media (max-height: 620px) {
  .modal-content.modal-responsive {
    max-height: calc(100vh - 20px);
  }
}








/* ===== Modal responsive (اگر قبلاً اضافه شده، تکراری نگذار) ===== */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;justify-content:center;align-items:center;padding:20px;z-index:1000;overflow:auto;box-sizing:border-box;}
.modal-content.modal-responsive{width:100%;max-width:860px;display:grid;grid-template-rows:auto 1fr auto;max-height:calc(100vh - 40px);}
.modal-header-sticky,.modal-footer-sticky{position:sticky;z-index:5;background:transparent;padding:16px 20px;}
.modal-header-sticky{top:0;border-bottom:1px solid rgba(255,255,255,.15);}
.modal-footer-sticky{bottom:0;border-top:1px solid rgba(255,255,255,.15);}
.modal-body-scroll{padding:20px;overflow:auto;min-height:0;}
.form-grid.two-col{display:grid;grid-template-columns:1fr 1fr;gap:24px;}
@media (max-width:992px){.modal-content.modal-responsive{max-width:720px;}}
@media (max-width:768px){.form-grid.two-col{grid-template-columns:1fr}.modal-content.modal-responsive{max-width:92vw;}}

/* ===== Files Tab ===== */
.dropzone{
  border:2px dashed rgba(255,255,255,0.25);
  border-radius:12px;
  padding:20px;
  text-align:center;
  background:rgba(255,255,255,0.06);
  transition:all .2s ease;
}
.dropzone.dragging{
  border-color: var(--highlight);
  background: rgba(255,255,255,0.12);
}
.dropzone .dz-title{margin:0;font-size:15px;color:#e0e0e0}
.dropzone .dz-title i{margin-left:8px}
.dropzone .dz-hint{margin:8px 0 0 0;color:#bbb;font-size:12px}

.upload-queue{margin-top:12px;display:flex;flex-direction:column;gap:8px}
.upload-row{
  display:grid;
  grid-template-columns:1fr 110px minmax(160px, 260px) 90px;
  gap:10px;
  align-items:center;
  background: rgba(255,255,255,0.06);
  border:1px solid var(--input-border);
  border-radius:10px;
  padding:8px 12px;
  font-size:14px;
}
.ur-name{color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ur-size{color:#ccc}
.ur-progress .bar{height:8px;background:rgba(255,255,255,0.15);border-radius:6px;overflow:hidden}
.ur-progress .bar span{display:block;height:100%;width:0%;background:linear-gradient(90deg, var(--ocean-blue), var(--ocean-green));transition:width .2s}
.ur-progress .ur-percent{font-size:12px;color:#ddd;margin-top:6px;text-align:left}
.ur-status{color:#ccc}

.files-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:14px;
}
.file-card .glass-content{display:flex;gap:12px;align-items:flex-start;padding:14px}
.file-icon{width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.12)}
.file-icon i{font-size:18px}
.file-meta{flex:1 1 auto;min-width:0}
.file-name{color:#fff;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-sub{color:#bbb;font-size:12px;margin-top:4px}
.file-actions{display:flex;gap:6px;align-items:center}
.btn-sm{padding:6px 10px;border-radius:8px;font-size:13px;line-height:1}
.files-empty{text-align:center;color:#bbb;padding:10px}







.filter-bar.glass-card {
  margin-bottom: 15px !important;
}

/* ===== Global responsive enhancements ===== */
@media (max-width: 1200px) {
  .charts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .charts-grid .chart-container {
    min-height: 320px;
  }
}

@media (max-width: 900px) {
  .table-container .glass-content > table {
    min-width: 640px;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .chart-container .glass-content {
    padding: 18px;
  }
  .chart-container {
    min-height: 280px;
  }
  .filter-bar .glass-content {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .filter-group {
    flex: 1 1 auto;
    min-width: 0;
  }
  .filter-actions,
  .filters-actions {
    width: 100%;
    justify-content: stretch;
    gap: 10px;
  }
  .filter-actions button,
  .filters-actions button,
  .filter-actions .btn-secondary,
  .filters-actions .btn-secondary {
    flex: 1 1 auto;
  }
  .content-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .content-header .action-btn,
  .content-header .btn-primary,
  .content-header .btn-secondary,
  .content-header button,
  .content-header a.btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .table-container .glass-content > table {
    min-width: 560px;
  }
}

@media (max-width: 600px) {
  .glass-card:not(.modal-content) .glass-content {
    padding: 18px;
  }
  .stats-grid {
    gap: 14px;
  }
  .chart-container {
    min-height: 260px;
  }
  .table-container .glass-content > table {
    min-width: 520px;
  }
}

@media (max-width: 480px) {
  .filter-bar .glass-content {
    gap: 12px;
  }
  .filter-summary,
  .filter-actions {
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .table-container .glass-content > table {
    min-width: 460px;
  }
}

/* === October 2025 polishing === */
.targets-page .target-progress-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: -2px 0 6px;
}

.targets-page .target-progress-caption strong {
  color: #ffffff;
  font-weight: 700;
}

html[data-theme="light"] .targets-page .target-progress-caption {
  color: rgba(15, 23, 42, 0.75);
}

html[data-theme="light"] .targets-page .target-progress-caption strong {
  color: #0f172a;
}

html[data-theme="light"] .targets-page .progress-badge {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

.reminder-page-container {
  overflow-x: hidden;
}

@media (max-width: 640px) {
  .reminder-page-container .tabs {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px 0;
  }

  .reminder-page-container .tabs .tab-link {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
    border-radius: 10px 10px 0 0;
  }

  .reminder-page-container .timeline-item .glass-content {
    flex-direction: column;
    gap: 18px;
  }

  .reminder-page-container .timeline-item .card-icon {
    margin-left: 0;
  }
}

.profile-grid {
  overflow-x: hidden;
}

.profile-main,
.communications-wrapper,
.communications-sidebar,
.communications-main {
  min-width: 0;
}

.communications-main .glass-content,
.communications-sidebar .glass-content {
  overflow-x: hidden;
}

.profile-main .tabs {
  overflow-x: auto;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 0 20px 6px 20px;
  scrollbar-width: none;
}

.profile-main .tabs::-webkit-scrollbar {
  display: none;
}

.profile-main .tabs .tab-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .profile-main .tabs {
    padding: 0 16px 6px 16px;
  }
}

.profile-main .tab-content {
  overflow-x: hidden;
}

html[data-theme="light"] .tab-actions .action-btn {
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.18);
  color: #0f172a;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .tab-actions .action-btn:hover {
  background: rgba(15, 23, 42, 0.16);
}

.tab-actions .action-btn {
  border: 1px solid transparent;
}

/* ---------- Help Center ---------- */
.content-header__title-group{
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.content-header__title-group h1{
    margin: 0;
}

.help-trigger{
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.16);
    color: var(--text);
    padding: 0.55rem 1.1rem;
    font-size: 0.92rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(2, 12, 27, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.help-trigger i{
    font-size: 1rem;
}

.help-trigger span{
    font-weight: 600;
}

.help-trigger:focus-visible,
.help-trigger:hover{
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.24);
    box-shadow: 0 16px 36px rgba(2, 12, 27, 0.22);
}

.help-open .help-trigger{
    pointer-events: none;
    opacity: 0.75;
}

html[data-theme="light"] .help-trigger{
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.88);
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .help-trigger:focus-visible,
html[data-theme="light"] .help-trigger:hover{
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.help-trigger-standalone{
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.25rem;
}

.help-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(12, 11, 28, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1198;
}

.help-backdrop[hidden],
.help-modal[hidden]{
    display: none !important;
}

.help-modal{
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(960px, 92vw);
    max-height: min(88vh, 820px);
    display: flex;
    flex-direction: column;
    z-index: 1199;
    overflow: hidden;
}

.help-modal .glass-content{
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 1.75rem;
    gap: 1.5rem;
}

.help-modal__header{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.help-modal__label{
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 0.2rem;
    color: var(--text-muted, rgba(248, 250, 252, 0.72));
}

.help-modal__header h2{
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    color: var(--text);
}

.help-modal__close{
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.help-modal__close:hover,
.help-modal__close:focus-visible{
    background: rgba(255, 255, 255, 0.18);
}

.help-modal__video{
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.85);
    aspect-ratio: 16 / 9;
    max-height: clamp(220px, 42vh, 380px);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-modal__video-frame{
    position: relative;
    width: 100%;
    height: 100%;
}

.help-modal__video::after{
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.35);
}

.help-modal__video video{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.help-video__error{
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted, rgba(248, 250, 252, 0.72));
    line-height: 1.7;
}

.help-modal__video.has-error::after{
    box-shadow: inset 0 0 35px rgba(255, 99, 132, 0.25);
}

.help-modal__body{
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-inline-end: 0.75rem;
    padding-bottom: 1.5rem;
    margin-inline-end: -0.5rem;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.help-modal__body:focus-visible{
    outline: 2px solid rgba(2, 195, 213, 0.45);
    outline-offset: 4px;
    border-radius: 1rem;
}

.help-modal__body::-webkit-scrollbar{
    width: 0.5rem;
}

.help-modal__body::-webkit-scrollbar-track{
    background: transparent;
}

.help-modal__body::-webkit-scrollbar-thumb{
    background: linear-gradient(180deg, rgba(2, 195, 213, 0.45), rgba(37, 99, 235, 0.45));
    border-radius: 999px;
}

.help-modal__body::-webkit-scrollbar-thumb:hover{
    background: linear-gradient(180deg, rgba(2, 195, 213, 0.65), rgba(37, 99, 235, 0.65));
}

.help-modal__body img,
.help-modal__body video{
    max-width: 100%;
    border-radius: 1rem;
}

.help-modal__footer{
    display: flex;
    justify-content: flex-end;
}

.help-modal__dismiss{
    border: none;
    border-radius: 999px;
    padding: 0.6rem 1.4rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s ease;
}

.help-modal__dismiss:hover,
.help-modal__dismiss:focus-visible{
    background: rgba(255, 255, 255, 0.22);
}

.help-modal__body .help-default{
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    line-height: 1.8;
}

.help-modal__body .help-default code{
    background: rgba(2, 195, 213, 0.12);
    color: var(--text);
    padding: 0.2rem 0.45rem;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    direction: ltr;
    display: inline-block;
}

.help-loading{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 0;
    color: var(--text-muted, rgba(248, 250, 252, 0.72));
    text-align: center;
}

.help-loading .spinner{
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(2, 195, 213, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.help-error,
.help-empty{
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted, rgba(248, 250, 252, 0.72));
}

@keyframes spin{
    from{ transform: rotate(0); }
    to{ transform: rotate(360deg); }
}

@media (max-width: 768px){
    .content-header__title-group{
        width: 100%;
        justify-content: space-between;
    }

    .help-trigger{
        padding: 0.5rem 1rem;
        font-size: 0.88rem;
    }

    .help-trigger-standalone{
        justify-content: flex-start;
    }

    .help-modal{
        width: min(640px, 94vw);
        max-height: 90vh;
    }

    .help-modal .glass-content{
        padding: 1.5rem 1.25rem;
    }
}

@media (max-width: 640px){
    .help-modal__body{
        padding-inline: 0.5rem;
        margin-inline-end: 0;
    }
}

.whatsapp-grid{
    display:grid;
    gap:1.5rem;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    align-items:stretch;
}

.whatsapp-card-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:0.75rem;
    margin-bottom:1rem;
}

.status-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:96px;
    padding:0.4rem 1rem;
    border-radius:999px;
    font-size:0.85rem;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:0.04em;
    transition:background 0.3s ease,color 0.3s ease;
}

.status-pill--connected{
    background:rgba(45,194,126,0.18);
    color:var(--success-strong,#2dc27e);
    border:1px solid rgba(45,194,126,0.35);
}

.status-pill--disconnected{
    background:rgba(255,178,0,0.18);
    color:var(--warning-strong,#ffb200);
    border:1px solid rgba(255,178,0,0.35);
}

.status-list{
    display:grid;
    gap:0.8rem;
    margin:1rem 0 1.2rem;
}

.status-list div{
    display:flex;
    justify-content:space-between;
    gap:1rem;
    font-size:0.95rem;
}

.status-list dt{
    color:var(--text-muted,rgba(255,255,255,0.65));
}

.status-list dd{
    margin:0;
    font-weight:600;
}

.status-alert,
.status-success{
    display:flex;
    align-items:center;
    gap:0.75rem;
    padding:0.8rem 1rem;
    border-radius:14px;
    font-size:0.9rem;
}

.status-alert{
    background:rgba(255,178,0,0.15);
    color:var(--warning-strong,#ffb200);
    border:1px solid rgba(255,178,0,0.25);
}

.status-success{
    background:rgba(45,194,126,0.15);
    color:var(--success-strong,#2dc27e);
    border:1px solid rgba(45,194,126,0.25);
}

.status-alert i,
.status-success i{
    font-size:1.1rem;
}

.whatsapp-form-card .form-group.full-width,
.whatsapp-test-card .form-group{
    width:100%;
}

.whatsapp-test-card .form-actions{
    display:flex;
    justify-content:flex-end;
    margin-top:0.5rem;
}

.whatsapp-test-card .form-feedback{
    margin-top:1rem;
    font-size:0.9rem;
    color:var(--text-muted,rgba(255,255,255,0.65));
}

.whatsapp-test-card .form-feedback.error{
    color:#ff6b6b;
}

.whatsapp-test-card .form-feedback.success{
    color:#2dc27e;
}

.whatsapp-test-card textarea{
    min-height:100px;
    resize:vertical;
}

.whatsapp-status-card .muted,
.whatsapp-test-card .muted{
    color:var(--text-muted,rgba(255,255,255,0.65));
}

.content-actions{
    display:flex;
    gap:0.75rem;
    align-items:center;
}

.action-btn.is-loading{
    opacity:0.6;
    pointer-events:none;
}

@media (max-width:768px){
    .whatsapp-grid{
        grid-template-columns:1fr;
    }
}

body.help-open{
    overflow: hidden;
}
