@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@500;600;700;800;900&display=swap');

:root {
    --ink: #1B1A20;
    --ink-2: #262530;
    --paper: #F7F4EE;
    --surface: #FFFFFF;
    --line: #E7E1D4;
    --text: #211F26;
    --muted: #8B8474;
    --gold: #C1852B;
    --gold-deep: #9C6A1E;
    --teal: #1E6F5C;
    --plum: #6C5B8F;
    --coral: #BD4438;
    --sand: #F1E8D8;

    /* نگاشت نام‌های قدیمی به پالت جدید، برای سازگاری با کلاس‌های موجود */
    --bg: var(--paper);
    --card-bg: var(--surface);
    --primary: var(--gold);
    --primary-dark: var(--gold-deep);
    --success: var(--teal);
    --danger: var(--coral);
    --warning: var(--gold-deep);
    --border: var(--line);
    --sidebar-bg: var(--ink);
    --sidebar-text: #C9C4B8;
    --sidebar-active: var(--gold);
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
    font-family: 'Vazirmatn', -apple-system, 'Segoe UI', system-ui, sans-serif;
    background: var(--paper);
    color: var(--text);
    direction: rtl;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 15px;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--sand); }

.layout { display: flex; min-height: 100vh; }

/* ---------------- سایدبار ---------------- */
.sidebar {
    width: 252px;
    background: var(--ink);
    color: var(--sidebar-text);
    flex-shrink: 0;
    padding: 24px 0 20px;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 30;
}

.sidebar .brand {
    display: flex; align-items: center; gap: 10px;
    padding: 0 22px 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .brand .mark {
    width: 34px; height: 34px; border-radius: 12px;
    background: linear-gradient(155deg, var(--gold), var(--gold-deep));
    display: flex; align-items: center; justify-content: center;
    color: #1B1A20; font-weight: 800; font-size: 15px; flex-shrink: 0;
}
.sidebar .brand .name { font-weight: 800; font-size: 16.5px; color: #fff; letter-spacing: -.2px; }
.sidebar .brand .sub { font-size: 11px; color: #837c6c; margin-top: 1px; }

.sidebar nav { padding: 10px 12px; flex: 1; }
.sidebar nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: 12px;
    font-size: 14px; color: #B7B2A4; font-weight: 700;
    margin-bottom: 2px;
}
.sidebar nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .8; }
.sidebar nav a:hover { background: var(--ink-2); color: #fff; }
.sidebar nav a.active { background: var(--ink-2); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.sidebar nav a.active svg { opacity: 1; color: var(--gold); }

.sidebar .user-box {
    margin: 4px 12px 0; padding: 16px 14px 4px;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: 12.5px;
}
.sidebar .user-box .who { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.sidebar .user-box .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--sand); color: var(--gold-deep);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}
.sidebar .user-box .name { color: #fff; font-weight: 600; font-size: 13px; }
.sidebar .user-box .role { color: #837c6c; font-size: 11.5px; }
.sidebar .user-box a.signout { color: #C77A6E; font-size: 12px; }

/* ---------------- ناحیه اصلی ---------------- */
.main { flex: 1; min-width: 0; margin-right: 252px; max-width: calc(100% - 252px); }

.topbar {
    background: var(--paper);
    padding: 22px 30px 4px;
    display: flex; justify-content: space-between; align-items: flex-end;
}
.topbar h1 { font-size: 21px; margin: 0; font-weight: 800; letter-spacing: -.3px; }
.topbar .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.content { padding: 18px 30px 36px; }

/* ---------------- ردیف کارت‌های برجسته (هیرو) ---------------- */
.hero-row { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.hero-card {
    background: var(--ink); color: #fff; border-radius: 20px;
    padding: 22px 24px; position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 128px;
}
.hero-card .top-label { font-size: 12.5px; color: #B7B2A4; margin-bottom: 6px; }
.hero-card .big { font-size: 44px; font-weight: 900; letter-spacing: -1px; line-height: 1; }
.hero-card .sub { font-size: 12.5px; color: #9c9686; margin-top: 8px; }
.hero-card canvas { position: absolute; bottom: 0; left: 0; width: 100%; height: 46px; opacity: .9; }

.pill-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    padding: 18px; display: flex; flex-direction: column; justify-content: center;
}
.pill-card .num { font-size: 28px; font-weight: 900; }
.pill-card .lbl { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.pill-card.warn .num { color: var(--gold-deep); }
.pill-card.bad .num { color: var(--coral); }
.pill-card.good .num { color: var(--teal); }
.pill-card.muted .num { color: var(--muted); }

/* ---------------- کارت‌های عادی ---------------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }

.stat-card {
    background: var(--surface); border-radius: 18px; padding: 18px 20px;
    border: 1px solid var(--line);
}
.stat-card .value { font-size: 26px; font-weight: 800; }
.stat-card .label { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

.card {
    background: var(--surface); border-radius: 18px; padding: 20px 22px;
    border: 1px solid var(--line); margin-bottom: 16px;
    overflow-x: auto;
    max-width: 100%;
}

/* ستون چسبان: هنگام اسکرول افقی جدول‌های پهن، این ستون (معمولاً نام سایت) ثابت می‌ماند */
.sticky-col {
    position: sticky;
    right: 0;
    background: var(--surface);
    z-index: 2;
    box-shadow: -6px 0 6px -6px rgba(0,0,0,.08);
}
tr:hover .sticky-col { background: #FBF9F4; }

/* جدول فشرده (مثل صفحه‌ی سایت‌ها) - پدینگ کمتر تا بدون اسکرول افقی جا شود */
.compact-table th, .compact-table td { padding: 9px 8px; font-size: 13px; white-space: normal; }
.compact-table .site-name { align-items: flex-start; }

/* منوی کشویی کوچک هر ردیف (⋮) */
.row-menu { position: relative; }
.row-menu summary {
    list-style: none; cursor: pointer; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid var(--line); font-weight: 800; font-size: 16px;
    color: var(--muted); user-select: none;
}
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu[open] summary { background: #FBF9F4; }
.row-menu-panel {
    position: absolute; left: 0; top: 34px; z-index: 10;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; min-width: 140px;
    display: flex; flex-direction: column; gap: 2px;
}
.row-menu-panel a, .row-menu-panel button {
    display: block; width: 100%; text-align: right; padding: 8px 10px;
    border-radius: 7px; border: none; background: none; cursor: pointer;
    font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text);
}
.row-menu-panel a:hover, .row-menu-panel button:hover { background: #FBF9F4; }
.row-menu-panel .danger-text { color: var(--coral); }
.row-menu-panel .success-text { color: var(--teal); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-head h2, .card h2 { font-size: 15px; margin: 0; font-weight: 800; }
.card-head .hint { font-size: 12px; color: var(--muted); }

.grid-2, .cards-grid[style*="1.3fr"] { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }

/* ---------------- جدول ---------------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 11px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 700; font-size: 12.5px; background: transparent; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FBF9F4; }

.site-name { display: flex; align-items: center; gap: 10px; white-space: normal; }
.site-avatar {
    width: 32px; height: 32px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px; color: #fff;
}

/* ---------------- نشان وضعیت ---------------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-success { background: #E7F1EC; color: var(--teal); }
.badge-danger { background: #F7E9E6; color: var(--coral); }
.badge-warning { background: var(--sand); color: var(--gold-deep); }
.badge-muted { background: #EFEDE6; color: var(--muted); }

/* ---------------- دکمه‌ها ---------------- */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; border-radius: 12px; border: none;
    background: var(--gold); color: #fff; cursor: pointer;
    font-family: inherit; font-size: 13.5px; font-weight: 700;
    transition: background .15s;
}
.btn:hover { background: var(--gold-deep); }
.btn-sm { padding: 6px 13px; font-size: 12.5px; }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-outline:hover { background: #FBF9F4; }
.btn-danger { background: var(--coral); }
.btn-success { background: var(--teal); }
.btn-muted { background: var(--muted); }

/* ---------------- فرم‌ها ---------------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #3d3a33; }
.form-control {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
    font-family: inherit; font-size: 13.5px; background: #fff; font-weight: 600;
}
.form-control:focus { outline: none; border-color: var(--gold); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------------- اعلان‌ها ---------------- */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; }
.flash-success { background: #E7F1EC; color: var(--teal); }
.flash-error { background: #F7E9E6; color: var(--coral); }
.flash-info { background: var(--sand); color: var(--gold-deep); }

/* ---------------- صفحه ورود ---------------- */
.login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 30% 20%, #2c2a35, var(--ink) 60%);
}
.login-box {
    background: #fff; padding: 40px; border-radius: 18px; width: 360px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-box h1 { text-align: center; font-size: 19px; margin-bottom: 24px; font-weight: 800; }

/* ---------------- نوار پیشرفت ---------------- */
.progress-bar, .progress-track { background: #EFEBE1; border-radius: 20px; height: 7px; overflow: hidden; }
.progress-bar > div, .progress-fill { height: 100%; background: var(--gold); border-radius: 20px; }

.text-muted { color: var(--muted); }
.mb-0 { margin-bottom: 0; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.copy-box {
    background: #FBF9F4; border: 1px dashed #D9D0BC; border-radius: 14px;
    padding: 14px 16px; font-size: 13px; white-space: pre-wrap; line-height: 2;
}

@media (max-width: 980px) {
    .hero-row { grid-template-columns: 1fr 1fr; }
    .grid-2, .cards-grid[style*="1.3fr"] { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .sidebar { position: fixed; right: -252px; z-index: 50; transition: right .2s; }
    .sidebar.open { right: 0; }
    .main { margin-right: 0; max-width: 100%; }
    .form-row { grid-template-columns: 1fr; }
}

/* ---------------- صفحه لینک خبرها ---------------- */
.links-hero {
    background: var(--ink);
    color: #fff;
    border-radius: 20px;
    padding: 24px 26px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.links-hero h2 { margin: 3px 0 6px; font-size: 22px; font-weight: 900; }
.links-hero p { margin: 0; color: #B7B2A4; font-size: 12.5px; line-height: 1.9; max-width: 760px; }
.links-eyebrow { color: var(--gold); font-size: 11.5px; font-weight: 800; }
.links-hero-stat { min-width: 125px; padding: 13px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 15px; text-align: center; background: rgba(255,255,255,.04); }
.links-hero-stat span { display:block; color:#B7B2A4; font-size:11.5px; }
.links-hero-stat strong { display:block; margin-top:3px; font-size:28px; font-weight:900; }
.links-filters { padding: 15px 18px; }
.links-filter-form { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; }
.links-filter-grow { flex:1; min-width:280px; }
.links-clear-filter { height:42px; }
.links-notice { display:flex; gap:12px; align-items:flex-start; background:#FFF9ED; border:1px solid #EEDCB5; border-radius:16px; padding:13px 16px; margin-bottom:16px; color:#604716; }
.links-notice-icon { width:27px; height:27px; border-radius:50%; background:var(--gold); color:#fff; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-weight:900; }
.links-notice strong { display:block; font-size:13px; margin-bottom:3px; }
.links-notice span { display:block; font-size:12px; line-height:1.9; }
.links-table-card { padding: 0; overflow:hidden; }
.links-table-head { padding:20px 22px 15px; margin:0; }
.links-table-head h2 { font-size:16px; }
.links-head-sub { font-size:11.5px; margin-top:4px; }
.links-head-badges { display:flex; gap:7px; flex-wrap:wrap; }
.links-table-wrap { overflow-x:auto; }
.links-table { min-width:1120px; }
.links-table th { background:#FBF9F4; padding-top:12px; padding-bottom:12px; }
.links-table td { vertical-align:middle; padding-top:12px; padding-bottom:12px; }
.links-table .row-ready td:first-child { box-shadow: inset -3px 0 0 var(--teal); }
.merchant-cell { display:flex; align-items:center; gap:7px; font-weight:800; white-space:normal; min-width:145px; }
.merchant-dot { width:8px; height:8px; border-radius:50%; background:var(--gold); flex-shrink:0; }
.table-sub { color:var(--muted); font-size:10.5px; margin-top:3px; line-height:1.6; white-space:normal; }
.code-chip, .week-chip { display:inline-flex; align-items:center; padding:5px 9px; border-radius:9px; background:#F3EFE6; color:#625A4B; font-size:11.5px; font-weight:800; }
.news-title { display:block; max-width:290px; white-space:normal; line-height:1.8; font-weight:800; }
.news-title:hover { color:var(--gold-deep); }
.scheduled-time { color:var(--muted); }
.check-disabled { color:#CFC8BA; }
.empty-links { text-align:center !important; padding:40px !important; color:var(--muted); }
.ticket-builder { background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:22px; margin-bottom:16px; }
.ticket-builder-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom:14px; }
.ticket-builder-head h2 { margin:3px 0 4px; font-size:16px; }
.ticket-builder-head p { margin:0; color:var(--muted); font-size:11.5px; }
.ticket-state { padding:8px 13px; border-radius:12px; font-size:11.5px; font-weight:800; white-space:nowrap; }
.ticket-state-locked { background:#EFEDE6; color:var(--muted); }
.ticket-state-ready { background:#E7F1EC; color:var(--teal); }
.ticket-state-error { background:#F7E9E6; color:var(--coral); }
.ticket-copy-box { min-height:150px; max-height:360px; overflow:auto; }
.ticket-builder-actions { display:flex; gap:16px; align-items:flex-end; margin-top:14px; }
.ticket-note { flex:1; }
.ticket-buttons { display:flex; gap:8px; }
.ticket-buttons .btn:disabled { opacity:.45; cursor:not-allowed; }

@media (max-width: 760px) {
    .links-hero { align-items:flex-start; flex-direction:column; }
    .links-hero-stat { width:100%; }
    .ticket-builder-head, .ticket-builder-actions { flex-direction:column; align-items:stretch; }
    .ticket-buttons { width:100%; }
    .ticket-buttons .btn { flex:1; justify-content:center; }
}

/* ================================================================
   بهبود نهایی ریسپانسیو و صفحات لینک خبرها / گزارش تاجران
   ================================================================ */
html, body { overflow-x: hidden; }
.content { width: 100%; max-width: 100%; }

.mobile-menu-toggle { display:none; }

/* لینک خبرها: جدول هرگز نباید از کارت بیرون بزند */
.links-table-wrap { width:100%; overflow-x:hidden; }
.links-table { width:100%; min-width:0; table-layout:fixed; }
.links-table th, .links-table td { white-space:normal; word-break:break-word; }
.links-table th:nth-child(1) { width:42px; }
.links-table th:nth-child(2) { width:15%; }
.links-table th:nth-child(3) { width:9%; }
.links-table th:nth-child(4) { width:25%; }
.links-table th:nth-child(5) { width:8%; }
.links-table th:nth-child(6) { width:11%; }
.links-table th:nth-child(7) { width:13%; }
.links-table th:nth-child(8) { width:11%; }
.links-table th:nth-child(9) { width:8%; }
.news-title { max-width:none; }
.links-mobile-list { display:none; }

/* گزارش تاجران */
.merchant-report-hero {
    background:linear-gradient(135deg,#fff 0%,#fbf8f1 100%);
    border:1px solid var(--line); border-radius:22px; padding:24px 26px;
    margin-bottom:16px; display:flex; justify-content:space-between; align-items:center; gap:20px;
}
.merchant-report-hero h2 { margin:3px 0 5px; font-size:24px; font-weight:900; }
.merchant-report-hero p { margin:0; color:var(--muted); font-size:12.5px; }
.report-eyebrow { color:var(--gold-deep); font-size:11px; font-weight:900; margin-bottom:3px; }
.merchant-report-date { border:1px solid var(--line); background:#fff; border-radius:13px; padding:10px 14px; color:var(--muted); font-size:12px; white-space:nowrap; }
.merchant-toolbar { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; }
.merchant-search-wrap { width:min(420px,100%); }
.merchant-search-wrap label { display:block; margin-bottom:6px; font-size:12px; color:var(--muted); }
.merchant-toolbar-hint { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:11.5px; flex-wrap:wrap; }
.dot { width:9px; height:9px; border-radius:3px; display:inline-block; margin-right:2px; }
.dot-gold { background:var(--gold); }.dot-muted { background:#EFEBE1; }.dot-partial { background:#E8C98F; }
.merchant-summary-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
.merchant-summary-card { background:#fff; border:1px solid var(--line); border-radius:16px; padding:16px 18px; }
.merchant-summary-card span { color:var(--muted); font-size:11.5px; display:block; }
.merchant-summary-card strong { font-size:25px; font-weight:900; margin-top:4px; display:block; }
.merchant-table { padding:0; overflow:hidden; }
.merchant-table .card-head { padding:20px 22px 13px; margin:0; }
.merchant-table-wrap { overflow-x:auto; }
.merchant-table table { min-width:900px; }
.merchant-name-main { display:flex; align-items:center; gap:9px; font-weight:800; white-space:normal; }
.merchant-avatar { width:32px; height:32px; border-radius:11px; background:var(--sand); color:var(--gold-deep); display:inline-flex; align-items:center; justify-content:center; font-weight:900; flex:none; }
.number-strong { font-weight:900; }
.merchant-progress-cell { min-width:150px; }
.merchant-progress-cell small { color:var(--muted); display:block; margin-top:4px; font-size:10.5px; }
.week-count-badge { background:#E7F1EC; color:var(--teal); padding:5px 9px; border-radius:10px; font-size:11.5px; font-weight:800; white-space:nowrap; }
.merchant-calendar-card { padding:20px 22px; }
.merchant-calendar-head { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:18px; }
.merchant-calendar-head h2 { margin:0 0 6px; font-size:16px; }
.merchant-calendar-meta { display:flex; align-items:center; gap:12px; flex-wrap:wrap; color:var(--muted); font-size:11px; }
.merchant-calendar-score { min-width:78px; text-align:center; border:1px solid var(--line); background:#FBF9F4; border-radius:14px; padding:9px 12px; }
.merchant-calendar-score strong { display:block; font-size:23px; line-height:1; }.merchant-calendar-score span { display:block; color:var(--muted); font-size:10px; margin-top:5px; }
.week-calendar { display:grid; grid-template-columns:repeat(13,minmax(16px,1fr)); gap:6px; direction:rtl; }
.week-cell { aspect-ratio:1; min-width:0; border-radius:4px; background:#EFEBE1; display:flex; align-items:center; justify-content:center; font-size:8px; color:#A9A08F; font-weight:800; }
.week-cell.week-complete { background:var(--gold); color:#fff; }.week-cell.week-partial { background:#E8C98F; color:#68491D; }.week-cell.week-empty { background:#EFEBE1; }
.calendar-foot { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:10.5px; margin-top:10px; }

@media (max-width: 1100px) {
    .sidebar { width:230px; }
    .topbar { padding-left:20px; padding-right:20px; }
    .content { padding-left:20px; padding-right:20px; }
    .links-table { table-layout:auto; }
    .links-table th:nth-child(6), .links-table td:nth-child(6) { display:none; }
    .links-table th:nth-child(4) { width:30%; }
    .merchant-summary-grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 900px) {
    .sidebar { right:-252px; width:252px; }
    .sidebar.open { right:0; }
    .main { width:100%; margin-right: 0; max-width: 100%; }
    .mobile-menu-toggle { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border:1px solid var(--line); border-radius:12px; background:#fff; font-size:20px; cursor:pointer; }
    .topbar { align-items:center; gap:12px; }
    .topbar > div:first-child { flex:1; }
    .merchant-report-hero { align-items:flex-start; flex-direction:column; }
    .merchant-toolbar { align-items:stretch; flex-direction:column; }
    .merchant-search-wrap { width:100%; }
}

@media (max-width: 700px) {
    .content { padding:14px 12px 28px; }
    .topbar { padding:14px 12px 4px; }
    .topbar h1 { font-size:18px; }
    .topbar .meta { font-size:10.5px; }
    .links-hero { padding:18px; border-radius:16px; }
    .links-hero h2 { font-size:20px; }
    .links-filters { padding:14px; }
    .links-filter-grow, .links-filter-form .form-group { min-width:100% !important; width:100%; }
    .links-clear-filter { width:100%; justify-content:center; }
    .links-table-card { display:none; }
    .links-mobile-list { display:block; }
    .link-mobile-card { background:#fff; border:1px solid var(--line); border-radius:16px; padding:14px; margin-bottom:10px; box-shadow:0 4px 16px rgba(27,26,32,.04); }
    .link-mobile-card.is-ready { box-shadow:inset -3px 0 0 var(--teal),0 4px 16px rgba(27,26,32,.04); }
    .link-mobile-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
    .mobile-news-title { margin-top:12px; font-size:13px; line-height:1.9; }
    .mobile-meta-row, .mobile-status-row { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-top:10px; color:var(--muted); font-size:10.5px; }
    .mobile-status-row { justify-content:flex-start; }
    .mobile-restore { margin-top:10px; }
    .ticket-builder { padding:16px; border-radius:16px; }
    .ticket-buttons { flex-direction:column; }
    .ticket-buttons .btn { width:100%; }
    .merchant-summary-grid { grid-template-columns:repeat(2,1fr); gap:8px; }
    .merchant-summary-card { padding:13px; }
    .merchant-summary-card strong { font-size:21px; }
    .merchant-table { display:none; }
    .merchant-report-hero { padding:18px; }
    .merchant-report-hero h2 { font-size:21px; }
    .merchant-calendar-card { padding:16px 13px; }
    .merchant-calendar-head { align-items:flex-start; }
    .merchant-calendar-score { min-width:66px; }
    .week-calendar { grid-template-columns:repeat(13,minmax(14px,1fr)); gap:4px; }
    .week-cell { font-size:7px; border-radius:3px; }
    .calendar-foot { font-size:9.5px; }
}

@media (max-width: 430px) {
    .week-calendar { grid-template-columns:repeat(13,minmax(12px,1fr)); gap:3px; }
    .week-cell { font-size:6px; }
    .merchant-calendar-meta { gap:7px; }
}
