:root {
  --bg: #f4f8ff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --navy: #101a2f;
  --navy2: #15233f;
  --blue: #2563eb;
  --blue2: #4f46e5;
  --soft-blue: #eff6ff;
  --red: #dc2626;
  --green: #16a34a;
  --orange: #f97316;
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 45%, #f4f7fb 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

/* Layout */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: linear-gradient(180deg, var(--navy), var(--navy2));
  color: white;
  padding: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 22px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: white;
}

.side-brand small,
.user-box small {
  display: block;
  color: #aab8d0;
  margin-top: 3px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav a {
  padding: 12px 13px;
  border-radius: 14px;
  color: #dbe7ff;
  font-weight: 800;
  transition: 0.18s ease;
}

.nav a:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

.nav a.active {
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: white;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.28);
}

.user-box {
  margin-top: 28px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
}

.main {
  padding: 24px;
  min-width: 0;
}

/* Top */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px;
  margin-bottom: 18px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

h1 {
  margin: 6px 0 8px;
  font-size: 34px;
  letter-spacing: -0.04em;
}

h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

/* Panels */
.panel,
.filter-collapse {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.panel {
  padding: 20px;
}

.filter-collapse {
  overflow: hidden;
}

.filter-collapse summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 900;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-collapse summary::-webkit-details-marker {
  display: none;
}

.filter-collapse summary::after {
  content: "Hap";
  background: var(--soft-blue);
  color: var(--blue);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.filter-collapse[open] summary::after {
  content: "Mbyll";
}

.filter-collapse-inner {
  padding: 0 18px 18px;
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn,
.link-btn,
.btn-small {
  border: 0;
  border-radius: 15px;
  padding: 11px 15px;
  min-height: 42px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.18s ease;
}

.btn:hover,
.link-btn:hover,
.btn-small:hover {
  transform: translateY(-1px);
}

.btn,
.btn-primary,
.link-btn {
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: white;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.22);
}

.btn-soft {
  background: #f3efff;
  color: #5b21b6;
  box-shadow: none;
  border: 1px solid #ddd6fe;
}

.btn-outline,
.btn-small {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(15,23,42,0.04);
}

.btn-danger {
  background: #fff1f2;
  color: #b91c1c;
  border: 1px solid #fecdd3;
  box-shadow: none;
}

.btn-success {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Forms */
label {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 11px 13px;
  outline: none;
}

textarea {
  min-height: 74px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.filter-bar > div {
  min-width: 190px;
}

/* Notices */
.notice {
  padding: 13px 15px;
  border-radius: 16px;
  margin-bottom: 15px;
  font-weight: 800;
}

.notice-ok {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.notice-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Week tabs */
.week-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 15px 0;
  padding: 7px;
  width: fit-content;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
}

.week-tabs a {
  padding: 10px 16px;
  border-radius: 999px;
  background: white;
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.03em;
  transition: 0.18s ease;
}

.week-tabs a:hover {
  transform: translateY(-1px);
}

.week-tabs a.active {
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: white;
  box-shadow: 0 10px 22px rgba(37,99,235,0.22);
}

/* Bulk */
.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid var(--line);
}

.bulk-bar select {
  max-width: 190px;
}

/* Tables */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
}

table {
  width: 100%;
  min-width: 1050px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fbff;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 900;
}

tbody tr:hover td {
  background: #fbfdff;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.video-row td {
  background: #fff8ed;
}

.video-row td:first-child {
  box-shadow: inset 4px 0 0 var(--orange);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 900;
}

.status-active {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}

.status-inactive,
.status-disabled {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.price {
  color: var(--blue);
  font-weight: 900;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 28px;
}

/* Login */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(460px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.error {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 800;
}

/* Responsive */
@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filter-bar > div {
    min-width: 100%;
  }

  .week-tabs {
    width: 100%;
    border-radius: 20px;
  }

  .week-tabs a {
    flex: 1;
    text-align: center;
  }
}

/* =========================
   HOTFIX - LAYOUT / SPACING
   ========================= */

html, body {
  min-height: 100%;
}

body {
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6,
p, ul, ol {
  margin-top: 0;
}

p {
  margin-bottom: 12px;
}

.main > * + * {
  margin-top: 18px;
}

.sidebar > * + * {
  margin-top: 18px;
}

/* Sidebar stability */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nav {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
}

.nav a {
  display: block;
  width: 100%;
}

.user-box {
  margin-top: auto;
}

/* General cards/panels */
.panel,
.topbar,
.login-card,
.filter-collapse,
.table-wrap {
  overflow: hidden;
}

.panel > * + *,
.topbar > * + *,
.login-card > * + * {
  margin-top: 12px;
}

/* Dashboard specific helpers */
.stats-grid,
.dashboard-stats,
.cards-grid,
.dashboard-grid,
.overview-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
  margin-bottom: 18px;
}

.stat-card,
.stats-card,
.dashboard-card,
.metric-card,
.info-card,
.summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.stat-card h3,
.stats-card h3,
.dashboard-card h3,
.metric-card h3,
.info-card h3,
.summary-card h3 {
  margin-bottom: 8px;
}

.stat-value,
.metric-value,
.big-number {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 6px;
  color: #0f172a;
}

.stat-label,
.metric-label {
  color: #64748b;
  font-size: 14px;
}

/* If stats are plain blocks */
.stats-list,
.quick-stats,
.kpi-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.stats-list > *,
.quick-stats > *,
.kpi-list > * {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px;
}

/* Hero/header sections */
.page-hero,
.dashboard-hero,
.hero-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: 26px;
  padding: 24px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  margin-bottom: 18px;
}

/* Better spacing for sections */
.section-block,
.dashboard-section,
.content-section {
  margin-top: 18px;
}

.section-block > * + *,
.dashboard-section > * + *,
.content-section > * + * {
  margin-top: 12px;
}

/* Tables */
.table-wrap {
  margin-top: 14px;
}

table td,
table th {
  white-space: nowrap;
}

table td small,
table td .muted {
  white-space: normal;
}

/* Forms */
form > * + * {
  margin-top: 12px;
}

.filter-bar {
  row-gap: 12px;
}

.filter-bar button,
.filter-bar .btn {
  align-self: end;
}

/* Login page fixes */
.login-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-card label {
  margin-bottom: 6px;
}

.login-card input {
  margin-bottom: 0;
}

.login-card .btn,
.login-card button {
  width: fit-content;
  min-width: 210px;
}

/* Buttons alignment */
.actions {
  align-items: center;
}

.actions .btn,
.actions .btn-soft,
.actions .btn-outline {
  white-space: nowrap;
}

/* Week tabs spacing */
.week-tabs {
  margin-top: 16px;
  margin-bottom: 16px;
}

/* Make hidden always work */
.hidden {
  display: none !important;
}

/* Responsive fixes */
@media (max-width: 980px) {
  .main > * + * {
    margin-top: 16px;
  }

  .stats-grid,
  .dashboard-stats,
  .cards-grid,
  .dashboard-grid,
  .overview-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .user-box {
    margin-top: 0;
  }
}


.row-selected td {
  background: #eff6ff !important;
}

.row-check,
#selectAll {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
}


.row-selected td {
  background: #eff6ff !important;
}

.row-check,
#selectAll {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
}


.table-input,
.compact-select {
  min-width: 120px;
  padding: 9px 11px;
  border-radius: 12px;
}

.price-input {
  min-width: 95px;
}

.table-textarea {
  min-width: 190px;
  min-height: 46px;
  padding: 9px 11px;
  border-radius: 12px;
  resize: vertical;
}

.save-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.save-state.saving {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.save-state.saved {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}

.save-state.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}


.bulk-view-controls {
  margin-left: auto;
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.bulk-view-controls label {
  margin: 0;
  min-width: 130px;
  font-size: 12px;
  color: #475569;
}

.bulk-view-controls select {
  margin-top: 6px;
  min-width: 130px;
}

@media (max-width: 900px) {
  .bulk-view-controls {
    margin-left: 0;
    width: 100%;
  }

  .bulk-view-controls label {
    flex: 1;
  }
}


.pagination-bar {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  background: #f8fbff;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.active-page {
  background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.disabled-link {
  opacity: 0.45;
  pointer-events: none;
}


.pagination-bar {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  background: #f8fbff;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.active-page {
  background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.disabled-link {
  opacity: 0.45;
  pointer-events: none;
}


.pagination-bar {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  background: #f8fbff;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.active-page {
  background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.disabled-link {
  opacity: 0.45;
  pointer-events: none;
}


/* Viber compact table fix */
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.table-input,
.compact-select {
  max-width: 150px;
}

.price-input {
  max-width: 105px;
}

.viber-autosave-field.table-textarea {
  min-width: 130px;
  max-width: 180px;
  min-height: 42px;
}

#newRow form {
  width: 100%;
}

@media (max-width: 1200px) {
  #newRow form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #newRow form button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  #newRow form {
    grid-template-columns: 1fr !important;
  }
}


/* =========================
   VIBER RESPONSIVE FIX
   ========================= */

.viber-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

@media (min-width: 901px) {
  .viber-table {
    min-width: 1180px;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .viber-table th,
  .viber-table td {
    white-space: nowrap;
  }

  .viber-table .table-input,
  .viber-table .compact-select {
    max-width: 145px;
  }

  .viber-table .price-input {
    max-width: 105px;
  }

  .viber-table .table-textarea {
    max-width: 170px;
    min-width: 140px;
  }
}

/* Bulk bar more stable on desktop/tablet */
.bulk-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.bulk-bar > strong {
  min-width: 90px;
}

.bulk-bar select {
  min-width: 150px;
}

.bulk-bar button[type="submit"] {
  min-width: 105px;
}

.bulk-view-controls {
  margin-left: auto;
}

/* Mobile/tablet card layout */
@media (max-width: 900px) {
  .main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar .actions {
    width: 100%;
    justify-content: flex-start;
  }

  .week-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .week-tabs a {
    text-align: center;
    padding: 14px 12px;
  }

  .bulk-bar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .bulk-bar > strong,
  .bulk-bar select,
  .bulk-bar button,
  .bulk-view-controls,
  .bulk-view-controls label,
  .bulk-view-controls select {
    width: 100%;
    min-width: 0;
  }

  .bulk-view-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-left: 0;
  }

  .table-wrap {
    overflow: visible;
  }

  .viber-table {
    min-width: 0;
    width: 100%;
  }

  .viber-table thead {
    display: none;
  }

  .viber-table,
  .viber-table tbody,
  .viber-table tr,
  .viber-table td {
    display: block;
    width: 100%;
  }

  .viber-table tr {
    margin: 0 0 16px 0;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  }

  .viber-table tr#newRow {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .viber-table tr#newRow td {
    display: block;
    padding: 0;
  }

  .viber-table td {
    border: 0 !important;
    padding: 10px 0 !important;
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }

  .viber-table td::before {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #64748b;
  }

  .viber-table td:nth-child(1)::before { content: "Select"; }
  .viber-table td:nth-child(2)::before { content: "Java"; }
  .viber-table td:nth-child(3)::before { content: "Shteti"; }
  .viber-table td:nth-child(4)::before { content: "Shifra"; }
  .viber-table td:nth-child(5)::before { content: "Produkti"; }
  .viber-table td:nth-child(6)::before { content: "Regular"; }
  .viber-table td:nth-child(7)::before { content: "Sale"; }
  .viber-table td:nth-child(8)::before { content: "Sale %"; }
  .viber-table td:nth-child(9)::before { content: "Data"; }
  .viber-table td:nth-child(10)::before { content: "Status"; }
  .viber-table td:nth-child(11)::before { content: "Koment"; }
  .viber-table td:nth-child(12)::before { content: "Actions"; }

  .viber-table .table-input,
  .viber-table .compact-select,
  .viber-table .price-input,
  .viber-table .table-textarea {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .viber-table .table-textarea {
    min-height: 44px;
  }

  .viber-table .row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .viber-table .save-state {
    min-width: 84px;
  }

  #newRow form {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 520px) {
  .week-tabs {
    grid-template-columns: 1fr;
  }

  .bulk-view-controls {
    grid-template-columns: 1fr;
  }

  .viber-table td {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .viber-table td::before {
    margin-bottom: 2px;
  }
}


/* =========================================================
   GLOBAL RESPONSIVE SYSTEM FIX
   Applies to dashboard, materials, viber, clients, users, months
   ========================================================= */

/* Prevent page-wide horizontal overflow */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

/* Main shell should not force content outside screen */
.app-shell {
  width: 100%;
  max-width: 100%;
}

.main {
  min-width: 0;
  max-width: 100%;
}

.panel,
.topbar,
.filter-collapse,
.notice,
.table-wrap,
.bulk-bar,
.week-tabs,
form,
input,
select,
textarea,
button {
  max-width: 100%;
}

/* Tables: desktop/laptop should scroll inside table area only */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: 100%;
}

table th,
table td {
  vertical-align: middle;
}

/* Forms and buttons should wrap cleanly */
.filter-bar,
.actions,
.row-actions,
.bulk-bar {
  flex-wrap: wrap;
}

.actions {
  display: flex;
  gap: 10px;
}

.actions .btn,
.actions button,
.bulk-bar .btn,
.bulk-bar button {
  white-space: nowrap;
}

/* Inputs should not explode layout */
input,
select,
textarea {
  min-width: 0;
}

/* Better long text handling */
td,
th,
p,
small,
.muted,
.status-pill {
  overflow-wrap: anywhere;
}

/* =========================================================
   LAPTOP / SMALL DESKTOP
   ========================================================= */

@media (max-width: 1280px) {
  .main {
    padding: 22px;
  }

  .topbar {
    gap: 18px;
  }

  .topbar h1 {
    font-size: clamp(28px, 4vw, 42px);
  }

  .panel {
    padding: 22px;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .filter-bar > div,
  .filter-bar input,
  .filter-bar select,
  .filter-bar button {
    width: 100%;
  }

  .bulk-bar {
    display: flex;
    align-items: end;
    gap: 12px;
  }

  .bulk-view-controls {
    margin-left: 0;
  }
}

/* =========================================================
   TABLET
   Sidebar becomes top/compact area and content breathes
   ========================================================= */

@media (max-width: 1024px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    width: 100%;
    min-height: auto;
    padding: 16px;
    display: block;
  }

  .side-brand {
    margin-bottom: 12px;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0;
  }

  .nav a {
    padding: 12px 10px;
    text-align: center;
    border-radius: 14px;
  }

  .user-box {
    margin-top: 14px;
    width: 100%;
  }

  .main {
    padding: 18px;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .topbar .actions {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar .actions .btn,
  .topbar .actions button,
  .topbar .actions a {
    flex: 1 1 160px;
    text-align: center;
  }

  .week-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .week-tabs a {
    text-align: center;
    padding: 14px 12px;
  }

  .bulk-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
  }

  .bulk-bar > strong,
  .bulk-bar select,
  .bulk-bar button,
  .bulk-bar .btn {
    width: 100%;
    min-width: 0;
  }

  .bulk-view-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    grid-column: 1 / -1;
  }

  .bulk-view-controls label,
  .bulk-view-controls select {
    width: 100%;
  }

  #newRow form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #newRow form button {
    width: 100%;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 720px) {
  .sidebar {
    padding: 14px;
  }

  .side-brand {
    width: 100%;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav a {
    font-size: 14px;
  }

  .main {
    padding: 12px;
  }

  .topbar,
  .panel,
  .filter-collapse {
    border-radius: 22px;
  }

  .topbar {
    padding: 22px;
  }

  .panel {
    padding: 18px;
  }

  .topbar h1 {
    font-size: 32px;
    line-height: 1.05;
  }

  .topbar p,
  .panel p,
  .muted {
    font-size: 15px;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .actions .btn,
  .actions button,
  .actions a {
    width: 100%;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .week-tabs {
    grid-template-columns: 1fr;
  }

  .week-tabs a {
    font-size: 16px;
    padding: 14px;
  }

  .bulk-bar {
    grid-template-columns: 1fr;
  }

  .bulk-view-controls {
    grid-template-columns: 1fr;
  }

  #newRow form {
    grid-template-columns: 1fr !important;
  }

  table {
    font-size: 14px;
  }

  .table-input,
  .compact-select,
  .price-input,
  .table-textarea {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .btn,
  button,
  select,
  input,
  textarea {
    font-size: 15px;
  }
}

/* =========================================================
   UNIVERSAL RESPONSIVE CARD TABLE
   Add class "responsive-card-table" to any table that should
   become cards on mobile.
   ========================================================= */

@media (max-width: 900px) {
  .responsive-card-table {
    min-width: 0 !important;
    width: 100%;
  }

  .responsive-card-table thead {
    display: none;
  }

  .responsive-card-table,
  .responsive-card-table tbody,
  .responsive-card-table tr,
  .responsive-card-table td {
    display: block;
    width: 100%;
  }

  .responsive-card-table tr {
    margin: 0 0 16px 0;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  }

  .responsive-card-table tr#newRow {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .responsive-card-table td {
    border: 0 !important;
    padding: 10px 0 !important;
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }

  .responsive-card-table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #64748b;
  }

  .responsive-card-table td:empty::after {
    content: "-";
    color: #94a3b8;
  }

  .responsive-card-table .row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .responsive-card-table td {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .responsive-card-table td::before {
    margin-bottom: 2px;
  }
}

/* =========================================================
   DASHBOARD STATS / SIMPLE CARDS
   ========================================================= */

.stats,
.dashboard-stats,
.cards-grid,
.grid,
.metrics-grid {
  max-width: 100%;
}

@media (max-width: 900px) {
  .stats,
  .dashboard-stats,
  .cards-grid,
  .grid,
  .metrics-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 560px) {
  .stats,
  .dashboard-stats,
  .cards-grid,
  .grid,
  .metrics-grid {
    grid-template-columns: 1fr !important;
  }
}


/* Materials video switch fix */
.video-switch {
  position: relative;
  display: inline-flex;
  width: 56px;
  height: 32px;
  flex: 0 0 56px;
  align-items: center;
  cursor: pointer;
  vertical-align: middle;
}

.video-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.video-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  transition: .18s ease;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08);
}

.video-slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 4px;
  top: 3px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
  transition: .18s ease;
}

.video-switch input:checked + .video-slider {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: transparent;
}

.video-switch input:checked + .video-slider::before {
  transform: translateX(23px);
}

.video-switch input:focus + .video-slider {
  outline: 3px solid rgba(37, 99, 235, .18);
}

table th:nth-child(9),
table td:nth-child(9) {
  min-width: 84px;
  text-align: center;
}

.row-selected td {
  background: #eff6ff !important;
}

.row-check,
#selectAll {
  width: 20px;
  height: 20px;
  accent-color: #2563eb;
  cursor: pointer;
}


/* Row numbers */
.row-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 5px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  line-height: 1;
}

table th:nth-child(2),
table td:nth-child(2) {
  width: 38px;
  min-width: 38px;
  text-align: center;
}

@media (max-width: 900px) {
  .responsive-card-table td[data-label="Nr"] {
    order: -1;
  }

  .row-num {
    min-width: 42px;
    height: 36px;
    font-size: 14px;
  }
}


/* Viber header buttons match Materials */
.topbar .actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-import-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.header-action-btn,
.header-import-form .header-action-btn {
  min-height: 52px;
  height: 52px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 900;
}

@media (max-width: 720px) {
  .header-import-form {
    width: 100%;
  }

  .header-action-btn,
  .header-import-form .header-action-btn {
    width: 100%;
  }
}


/* Final: keep Viber header actions same as Materials */
.topbar .actions .header-action-btn {
  all: unset;
}

.header-import-form {
  all: unset;
  display: inline !important;
}

#viberImportForm {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
}

#viberImportForm button,
.topbar .actions > .btn,
.topbar .actions > a.btn,
.topbar .actions > button.btn {
  min-height: unset !important;
  height: auto !important;
  font-size: inherit !important;
  line-height: inherit !important;
}


/* Viber Import CSV alignment fix */
#viberImportForm {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
}

#viberImportForm .btn,
#viberImportForm button {
  margin: 0 !important;
  vertical-align: middle !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.topbar .actions {
  align-items: center !important;
}


/* Stable autosave badge: no table jumping */
.save-state {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 62px !important;
  min-width: 62px !important;
  max-width: 62px !important;
  height: 26px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-align: center !important;
  flex: 0 0 62px !important;
}

.save-state.saving {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
}

.save-state.saved {
  background: #ecfdf5 !important;
  color: #166534 !important;
  border: 1px solid #bbf7d0 !important;
}

.save-state.error {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
}

/* Actions cell stable */
.row-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 128px !important;
}

/* Viber: Saved mbi Fshi */
.viber-table .row-actions {
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 74px !important;
}

.viber-table .row-actions form {
  margin: 0 !important;
}

.viber-table .row-actions .btn-small {
  min-width: 62px !important;
  text-align: center !important;
}

/* Materials: keep horizontal but stable */
.responsive-card-table:not(.viber-table) .row-actions {
  flex-direction: row !important;
  align-items: center !important;
}

/* On mobile/cards, keep actions clean */
@media (max-width: 900px) {
  .row-actions {
    min-width: 0 !important;
  }

  .viber-table .row-actions {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
  }
}


/* Viber Saved badge same compact style as Materials */
.viber-table .row-actions {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  min-width: 128px !important;
}

.viber-table .save-state {
  width: 62px !important;
  min-width: 62px !important;
  max-width: 62px !important;
  height: 26px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  flex: 0 0 62px !important;
}

.viber-table .row-actions form {
  margin: 0 !important;
  display: inline-flex !important;
}

.viber-table .row-actions .btn-small {
  min-width: auto !important;
}

@media (max-width: 900px) {
  .viber-table .row-actions {
    min-width: 0 !important;
    flex-wrap: wrap !important;
  }
}


/* Viber actions: Saved mbi Fshi, njëjtë si Materials */
.viber-table .row-actions {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  min-width: 86px !important;
}

.viber-table .row-actions form {
  margin: 0 !important;
  display: block !important;
}

.viber-table .save-state {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  height: 28px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
}

.viber-table .row-actions .btn-small {
  min-width: 72px !important;
  height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 900px) {
  .viber-table .row-actions {
    align-items: flex-start !important;
  }
}


/* Center actions column buttons */
.viber-table td[data-label="Actions"],
.responsive-card-table td[data-label="Actions"] {
  text-align: center !important;
}

.viber-table .row-actions {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 0 auto !important;
}

.viber-table .row-actions form {
  width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  justify-content: center !important;
}

.viber-table .save-state {
  margin: 0 auto !important;
}

.viber-table .row-actions .btn-small {
  margin: 0 auto !important;
}

/* Materials actions center too, without changing vertical/horizontal layout */
.responsive-card-table:not(.viber-table) td[data-label="Actions"] {
  text-align: center !important;
}

.responsive-card-table:not(.viber-table) .row-actions {
  justify-content: center !important;
}


/* Materials actions same as Viber actions */
.responsive-card-table:not(.viber-table) td[data-label="Actions"],
.responsive-card-table:not(.viber-table) td:last-child {
  text-align: center !important;
  vertical-align: middle !important;
}

.responsive-card-table:not(.viber-table) .row-actions {
  width: 100% !important;
  min-width: 86px !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 0 auto !important;
}

.responsive-card-table:not(.viber-table) .row-actions form {
  width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  justify-content: center !important;
}

.responsive-card-table:not(.viber-table) .save-state {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  height: 28px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  margin: 0 auto !important;
}

.responsive-card-table:not(.viber-table) .row-actions .btn-small {
  min-width: 72px !important;
  height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
}

@media (max-width: 900px) {
  .responsive-card-table:not(.viber-table) .row-actions {
    align-items: center !important;
  }
}


/* =========================================================
   GLOBAL SIDEBAR / BURGER MENU FIX
   Desktop: sticky sidebar
   Tablet/Mobile: burger sidebar
   ========================================================= */

@media (min-width: 1025px) {
  .app-shell {
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    align-items: start !important;
    width: 100% !important;
    min-height: 100vh !important;
  }

  .sidebar {
    position: sticky !important;
    top: 0 !important;
    align-self: start !important;
    width: 280px !important;
    min-height: 100vh !important;
    height: 100vh !important;
    overflow-y: auto !important;
    z-index: 50 !important;
  }

  .main {
    min-width: 0 !important;
    width: 100% !important;
  }

  .mobile-menu-toggle,
  .mobile-menu-overlay {
    display: none !important;
  }
}

/* Burger button */
.mobile-menu-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1001;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 21px;
  height: 2px;
  border-radius: 999px;
  background: #0f172a;
  transition: .2s ease;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(15, 23, 42, .48);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  display: none;
}

/* Tablet + mobile sidebar drawer */
@media (max-width: 1024px) {
  body {
    overflow-x: hidden !important;
  }

  .mobile-menu-toggle,
  .mobile-menu-overlay {
    display: flex;
  }

  .mobile-menu-overlay {
    display: block;
  }

  .app-shell {
    display: block !important;
    width: 100% !important;
    min-height: 100vh !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 999 !important;
    width: min(86vw, 340px) !important;
    height: 100vh !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    transform: translateX(-105%) !important;
    transition: transform .24s ease !important;
    box-shadow: 24px 0 60px rgba(15, 23, 42, .22) !important;
    padding-top: 78px !important;
  }

  body.menu-open .sidebar {
    transform: translateX(0) !important;
  }

  body.menu-open .mobile-menu-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  body.menu-open {
    overflow: hidden !important;
  }

  .main {
    width: 100% !important;
    min-width: 0 !important;
    padding-top: 74px !important;
  }

  .nav {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .nav a {
    text-align: left !important;
  }

  .side-brand {
    margin-bottom: 18px !important;
  }

  .user-box {
    margin-top: 18px !important;
  }
}

/* Small phones */
@media (max-width: 520px) {
  .mobile-menu-toggle {
    top: 10px;
    left: 10px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .sidebar {
    width: min(90vw, 320px) !important;
  }

  .main {
    padding-top: 66px !important;
  }
}


/* =========================================================
   FINAL SIDEBAR + MOBILE/TABLET BURGER MENU
   ========================================================= */

/* Desktop sidebar sticky/fixed feel */
@media (min-width: 1025px) {
  .app-shell {
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    align-items: start !important;
    width: 100% !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  .sidebar {
    position: sticky !important;
    top: 0 !important;
    width: 280px !important;
    height: 100vh !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    align-self: start !important;
    z-index: 80 !important;
  }

  .main {
    min-width: 0 !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .mobile-topbar,
  .mobile-menu-toggle,
  .mobile-menu-overlay {
    display: none !important;
  }
}

/* Hide mobile topbar by default */
.mobile-topbar,
.mobile-menu-overlay {
  display: none;
}

/* Tablet + mobile top fixed bar */
@media (max-width: 1024px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  .app-shell {
    display: block !important;
    width: 100% !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  .mobile-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 74px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 16px !important;
    z-index: 1200 !important;
    background: linear-gradient(180deg, #0f2147 0%, #132b59 100%) !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.20) !important;
  }

  .mobile-topbar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
  }

  .mobile-topbar-logo {
    width: 42px !important;
    height: 42px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #3563ff 0%, #5b4bff 100%) !important;
    color: #fff !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    box-shadow: 0 8px 24px rgba(53, 99, 255, 0.30) !important;
    flex-shrink: 0 !important;
  }

  .mobile-topbar-text {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.05 !important;
    color: #fff !important;
    min-width: 0 !important;
  }

  .mobile-topbar-text strong {
    font-size: 15px !important;
    font-weight: 900 !important;
    color: #fff !important;
    white-space: nowrap !important;
  }

  .mobile-topbar-text span {
    font-size: 12px !important;
    color: #dbe7ff !important;
    opacity: .9 !important;
    white-space: nowrap !important;
  }

  .mobile-menu-toggle {
    width: 46px !important;
    height: 46px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.13) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 5px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .mobile-menu-toggle span {
    display: block !important;
    width: 21px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: #fff !important;
    transition: .2s ease !important;
  }

  .sidebar {
    position: fixed !important;
    top: 74px !important;
    left: 0 !important;
    width: min(86vw, 340px) !important;
    height: calc(100vh - 74px) !important;
    min-height: calc(100vh - 74px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    transform: translateX(-105%) !important;
    transition: transform .25s ease !important;
    z-index: 1150 !important;
    box-shadow: 24px 0 50px rgba(15, 23, 42, .24) !important;
    padding-top: 18px !important;
  }

  .mobile-menu-overlay {
    display: block !important;
    position: fixed !important;
    top: 74px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1100 !important;
    background: rgba(15, 23, 42, .45) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: .2s ease !important;
  }

  body.menu-open .sidebar {
    transform: translateX(0) !important;
  }

  body.menu-open .mobile-menu-overlay {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.menu-open {
    overflow: hidden !important;
  }

  body.menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg) !important;
  }

  body.menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0 !important;
  }

  body.menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg) !important;
  }

  .main {
    width: 100% !important;
    min-width: 0 !important;
    padding-top: 94px !important;
  }

  .nav {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .nav a {
    text-align: left !important;
  }

  .side-brand {
    margin-bottom: 18px !important;
  }

  .user-box {
    margin-top: 18px !important;
  }
}

/* Small phones */
@media (max-width: 640px) {
  .mobile-topbar {
    height: 68px !important;
    padding: 0 12px !important;
  }

  .mobile-topbar-logo {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
  }

  .mobile-topbar-text strong {
    font-size: 14px !important;
  }

  .mobile-topbar-text span {
    font-size: 11px !important;
  }

  .mobile-menu-toggle {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
  }

  .sidebar {
    top: 68px !important;
    width: min(90vw, 320px) !important;
    height: calc(100vh - 68px) !important;
    min-height: calc(100vh - 68px) !important;
  }

  .mobile-menu-overlay {
    top: 68px !important;
  }

  .main {
    padding-top: 86px !important;
  }
}


/* =========================================================
   MOBILE TOPBAR CLEAN FIX
   Logo left, burger right, no duplicate logo inside drawer
   ========================================================= */

@media (max-width: 1024px) {
  .mobile-topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
  }

  .mobile-topbar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .mobile-topbar-text {
    min-width: 0 !important;
  }

  .mobile-topbar-text strong,
  .mobile-topbar-text span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Kill old fixed-left burger rules */
  .mobile-topbar .mobile-menu-toggle {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    margin-left: auto !important;
    flex: 0 0 46px !important;
  }

  /* Hide logo inside opened sidebar to avoid duplicate logo */
  .sidebar .side-brand {
    display: none !important;
  }

  .sidebar {
    padding-top: 22px !important;
  }
}

@media (max-width: 640px) {
  .mobile-topbar .mobile-menu-toggle {
    flex-basis: 42px !important;
  }
}


/* =========================================================
   FINAL DESKTOP SIDEBAR FIX
   Sidebar fixed, always full height, no internal weird scroll
   ========================================================= */

@media (min-width: 1025px) {
  .app-shell {
    display: block !important;
    width: 100% !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 280px !important;
    height: 100vh !important;
    min-height: 100vh !important;
    overflow: hidden !important;
    z-index: 100 !important;

    display: flex !important;
    flex-direction: column !important;
  }

  .side-brand {
    flex: 0 0 auto !important;
  }

  .nav {
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  .user-box {
    flex: 0 0 auto !important;
    margin-top: auto !important;
  }

  .main {
    margin-left: 280px !important;
    width: calc(100% - 280px) !important;
    min-width: 0 !important;
  }

  .mobile-topbar,
  .mobile-menu-overlay,
  .mobile-menu-toggle {
    display: none !important;
  }
}


/* =========================================================
   WEEK TABS RESPONSIVE FIX
   Materials + Viber week buttons on tablet/mobile
   ========================================================= */

.week-tabs {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  .week-tabs {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 8px !important;
    border-radius: 22px !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    padding: 14px 12px !important;
    text-align: center !important;
    border-radius: 18px !important;
    white-space: nowrap !important;
  }

  .week-tabs a:first-child {
    grid-column: span 1 !important;
  }
}

/* Smaller tablet / large mobile */
@media (min-width: 481px) and (max-width: 640px) {
  .week-tabs {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 8px !important;
    border-radius: 22px !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    padding: 14px 10px !important;
    text-align: center !important;
    border-radius: 18px !important;
    white-space: nowrap !important;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .week-tabs {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 20px !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    padding: 13px 10px !important;
    text-align: center !important;
    border-radius: 16px !important;
  }
}


/* =========================================================
   WEEK TABS FINAL LAYOUT
   Desktop: all in one row, "Të gjitha" first/larger
   Tablet: "Të gjitha" full row, weeks 2 columns
   Mobile: all one by one
   ========================================================= */

/* Desktop / Web */
@media (min-width: 1025px) {
  .week-tabs {
    width: fit-content !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    padding: 8px !important;
    border-radius: 999px !important;
  }

  .week-tabs a {
    width: auto !important;
    min-width: 112px !important;
    padding: 13px 22px !important;
    text-align: center !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  .week-tabs a:first-child {
    min-width: 150px !important;
    padding-left: 26px !important;
    padding-right: 26px !important;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  .week-tabs {
    width: 100% !important;
    max-width: 520px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 8px !important;
    border-radius: 24px !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    padding: 14px 12px !important;
    text-align: center !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
  }

  .week-tabs a:first-child {
    grid-column: 1 / -1 !important;
    min-height: 58px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .week-tabs {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 22px !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    padding: 13px 10px !important;
    text-align: center !important;
    border-radius: 18px !important;
    white-space: nowrap !important;
  }

  .week-tabs a:first-child {
    min-height: auto !important;
    font-size: inherit !important;
  }
}


/* =========================================================
   WEEK TABS FINAL LAYOUT
   Desktop: all in one row, "Të gjitha" first/larger
   Tablet: "Të gjitha" full row, weeks 2 columns
   Mobile: all one by one
   ========================================================= */

/* Desktop / Web */
@media (min-width: 1025px) {
  .week-tabs {
    width: fit-content !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    padding: 8px !important;
    border-radius: 999px !important;
  }

  .week-tabs a {
    width: auto !important;
    min-width: 112px !important;
    padding: 13px 22px !important;
    text-align: center !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  .week-tabs a:first-child {
    min-width: 150px !important;
    padding-left: 26px !important;
    padding-right: 26px !important;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  .week-tabs {
    width: 100% !important;
    max-width: 520px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 8px !important;
    border-radius: 24px !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    padding: 14px 12px !important;
    text-align: center !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
  }

  .week-tabs a:first-child {
    grid-column: 1 / -1 !important;
    min-height: 58px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .week-tabs {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 22px !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    padding: 13px 10px !important;
    text-align: center !important;
    border-radius: 18px !important;
    white-space: nowrap !important;
  }

  .week-tabs a:first-child {
    min-height: auto !important;
    font-size: inherit !important;
  }
}


/* =========================================================
   WEEK TABS FINAL LAYOUT
   Desktop: all in one row, "Të gjitha" first/larger
   Tablet: "Të gjitha" full row, weeks 2 columns
   Mobile: all one by one
   ========================================================= */

/* Desktop / Web */
@media (min-width: 1025px) {
  .week-tabs {
    width: fit-content !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    padding: 8px !important;
    border-radius: 999px !important;
  }

  .week-tabs a {
    width: auto !important;
    min-width: 112px !important;
    padding: 13px 22px !important;
    text-align: center !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  .week-tabs a:first-child {
    min-width: 150px !important;
    padding-left: 26px !important;
    padding-right: 26px !important;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  .week-tabs {
    width: 100% !important;
    max-width: 520px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 8px !important;
    border-radius: 24px !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    padding: 14px 12px !important;
    text-align: center !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
  }

  .week-tabs a:first-child {
    grid-column: 1 / -1 !important;
    min-height: 58px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .week-tabs {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 22px !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    padding: 13px 10px !important;
    text-align: center !important;
    border-radius: 18px !important;
    white-space: nowrap !important;
  }

  .week-tabs a:first-child {
    min-height: auto !important;
    font-size: inherit !important;
  }
}


/* =========================================================
   TABLET FIT FINAL FIX
   Materials + Viber
   ========================================================= */

@media (min-width: 641px) and (max-width: 1024px) {
  .main {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .panel {
    padding: 18px !important;
    border-radius: 24px !important;
  }

  .panel h2 {
    font-size: 26px !important;
    line-height: 1.15 !important;
  }

  .panel p {
    font-size: 16px !important;
  }

  /* Week buttons: compact tablet layout */
  .week-tabs {
    width: min(100%, 460px) !important;
    max-width: 460px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 7px !important;
    border-radius: 22px !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 17px !important;
    font-size: 16px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .week-tabs a:first-child {
    grid-column: 1 / -1 !important;
    height: 52px !important;
    min-height: 52px !important;
    font-size: 17px !important;
  }

  /* Bulk bar: compact tablet layout */
  .bulk-bar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 16px !important;
  }

  .bulk-bar > strong {
    width: auto !important;
    min-width: 0 !important;
    text-align: left !important;
    align-self: center !important;
  }

  .bulk-bar select {
    width: 100% !important;
    min-width: 0 !important;
    height: 50px !important;
  }

  .bulk-bar button[type="submit"],
  .bulk-bar .btn {
    width: auto !important;
    min-width: 120px !important;
    height: 50px !important;
    justify-self: start !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .bulk-view-controls {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-left: 0 !important;
  }

  .bulk-view-controls label {
    width: 100% !important;
  }

  .bulk-view-controls select {
    width: 100% !important;
  }

  .table-wrap {
    margin-top: 14px !important;
  }
}

/* Smaller tablet / big phone */
@media (min-width: 481px) and (max-width: 700px) {
  .week-tabs {
    width: 100% !important;
    max-width: 100% !important;
  }

  .bulk-bar {
    grid-template-columns: 1fr !important;
  }

  .bulk-bar button[type="submit"],
  .bulk-bar .btn {
    width: 100% !important;
    justify-self: stretch !important;
  }

  .bulk-view-controls {
    grid-template-columns: 1fr !important;
  }
}


/* =========================================================
   BREAKPOINT FIX
   From 901px and up, use desktop/web layout for week tabs + bulk bar
   ========================================================= */

@media (min-width: 901px) {
  .week-tabs {
    width: fit-content !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    padding: 8px !important;
    border-radius: 999px !important;
  }

  .week-tabs a {
    width: auto !important;
    min-width: 112px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 13px 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    font-size: inherit !important;
    line-height: inherit !important;
  }

  .week-tabs a:first-child {
    grid-column: auto !important;
    min-width: 150px !important;
    height: auto !important;
    min-height: 0 !important;
    padding-left: 26px !important;
    padding-right: 26px !important;
    font-size: inherit !important;
  }

  .bulk-bar {
    display: flex !important;
    align-items: end !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    padding: 16px !important;
  }

  .bulk-bar > strong {
    width: auto !important;
    min-width: 90px !important;
    text-align: left !important;
  }

  .bulk-bar select {
    width: auto !important;
    min-width: 150px !important;
    height: auto !important;
  }

  .bulk-bar button[type="submit"],
  .bulk-bar .btn {
    width: auto !important;
    min-width: auto !important;
    height: auto !important;
    justify-self: auto !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .bulk-view-controls {
    width: auto !important;
    display: flex !important;
    align-items: end !important;
    gap: 10px !important;
    margin-left: auto !important;
    grid-column: auto !important;
  }

  .bulk-view-controls label {
    width: auto !important;
  }

  .bulk-view-controls select {
    width: auto !important;
    min-width: 150px !important;
  }
}

/* True tablet only: 641px - 900px */
@media (min-width: 641px) and (max-width: 900px) {
  .week-tabs {
    width: min(100%, 460px) !important;
    max-width: 460px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 7px !important;
    border-radius: 22px !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 10px !important;
    border-radius: 17px !important;
    font-size: 16px !important;
    line-height: 1 !important;
  }

  .week-tabs a:first-child {
    grid-column: 1 / -1 !important;
    height: 52px !important;
    min-height: 52px !important;
    font-size: 17px !important;
  }

  .bulk-bar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 16px !important;
  }

  .bulk-view-controls {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-left: 0 !important;
  }
}


/* =========================================================
   FINAL WEEK TABS RESPONSIVE
   Applies to Materials + Viber:
   Desktop: one row
   Tablet: Te gjitha full row, weeks 2x2
   Mobile: one by one
   ========================================================= */

/* Desktop / web */
@media (min-width: 901px) {
  .week-tabs {
    width: fit-content !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 999px !important;
    flex-wrap: nowrap !important;
  }

  .week-tabs a {
    width: auto !important;
    min-width: 112px !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
  }

  .week-tabs a:first-child {
    min-width: 150px !important;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 900px) {
  .week-tabs {
    width: min(100%, 520px) !important;
    max-width: 520px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 8px !important;
    border-radius: 24px !important;
    flex-wrap: unset !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    height: 54px !important;
    min-height: 54px !important;
    padding: 0 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 18px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
  }

  .week-tabs a:first-child {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 58px !important;
    min-height: 58px !important;
    font-size: 18px !important;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .week-tabs {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 22px !important;
    flex-wrap: unset !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 17px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
  }

  .week-tabs a:first-child {
    grid-column: auto !important;
    font-size: inherit !important;
  }
}


/* =========================================================
   FINAL FIX: Week tabs fit full width on tablet
   Materials + Viber
   ========================================================= */

@media (min-width: 641px) and (max-width: 1024px) {
  .week-tabs {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 10px !important;
    border-radius: 24px !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .week-tabs a {
    width: 100% !important;
    min-width: 0 !important;
    height: 54px !important;
    min-height: 54px !important;
    padding: 0 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 18px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    font-size: 16px !important;
  }

  .week-tabs a:first-child {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 58px !important;
    min-height: 58px !important;
    font-size: 18px !important;
  }
}

/* Desktop stays normal */
@media (min-width: 1025px) {
  .week-tabs {
    width: fit-content !important;
    max-width: 100% !important;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
  }
}

/* Mobile stays one by one */
@media (max-width: 640px) {
  .week-tabs {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
}


/* =========================================================
   FIX DESKTOP WEEK TABS "TE GJITHA" DEFORMED
   Desktop only: keep all week buttons equal height/centered
   ========================================================= */

@media (min-width: 1025px) {
  .week-tabs {
    width: fit-content !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 999px !important;
    flex-wrap: nowrap !important;
  }

  .week-tabs a {
    height: 54px !important;
    min-height: 54px !important;
    width: auto !important;
    min-width: 120px !important;
    padding: 0 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 999px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    font-size: 16px !important;
    font-weight: 900 !important;
  }

  .week-tabs a:first-child {
    min-width: 165px !important;
    height: 54px !important;
    min-height: 54px !important;
    padding: 0 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
  }
}


/* =========================================
   MOBILE FIX - materials rows/cards
   selected line, nr, sale %, actions
   ========================================= */
@media (max-width: 768px) {

  /* 1) Hiqe vijën portokalli te selected row */
  .materials-table tr.is-selected,
  .materials-table tr.selected,
  .materials-table tbody tr.is-selected,
  .materials-table tbody tr.selected,
  .materials-grid tr.is-selected,
  .materials-grid tr.selected,
  .materials-card.is-selected,
  .materials-card.selected {
    border-left: 0 !important;
    box-shadow: none !important;
    outline: none !important;
  }

  .materials-table tr.is-selected td,
  .materials-table tr.selected td,
  .materials-table tbody tr.is-selected td,
  .materials-table tbody tr.selected td,
  .materials-grid tr.is-selected td,
  .materials-grid tr.selected td {
    border-left: 0 !important;
    box-shadow: none !important;
  }

  /* nëse e ke bërë selected me pseudo-element */
  .materials-table tr.is-selected::before,
  .materials-table tr.selected::before,
  .materials-table tbody tr.is-selected::before,
  .materials-table tbody tr.selected::before,
  .materials-card.is-selected::before,
  .materials-card.selected::before {
    display: none !important;
    content: none !important;
  }

  /* 2) NR dhe numri me nejt clean në një line */
  .materials-table td[data-label="NR"],
  .materials-table .nr-cell,
  .materials-grid .nr-cell,
  .materials-card .nr-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    min-height: auto !important;
  }

  .materials-table td[data-label="NR"] .row-number,
  .materials-table .nr-cell .row-number,
  .materials-grid .nr-cell .row-number,
  .materials-card .nr-cell .row-number,
  .materials-table .row-index,
  .materials-grid .row-index,
  .materials-card .row-index {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
  }

  /* 3) Sale % me nejt në line dhe centered */
  .materials-table td[data-label="SALE %"],
  .materials-table .sale-percent-cell,
  .materials-grid .sale-percent-cell,
  .materials-card .sale-percent-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: auto !important;
  }

  .materials-table td[data-label="SALE %"] .sale-percent,
  .materials-table .sale-percent-cell .sale-percent,
  .materials-grid .sale-percent-cell .sale-percent,
  .materials-card .sale-percent-cell .sale-percent {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    margin: 0 !important;
  }

  /* fallback nëse teksti është direkt brenda td */
  .materials-table td[data-label="SALE %"] {
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  /* 4) Actions me u rreshtu bukur në mobile */
  .materials-table td[data-label="ACTIONS"],
  .materials-table .actions-cell,
  .materials-grid .actions-cell,
  .materials-card .actions-cell {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    text-align: center !important;
    min-height: auto !important;
  }

  .materials-table td[data-label="ACTIONS"] .saved-pill,
  .materials-table td[data-label="ACTIONS"] .saved-badge,
  .materials-table .actions-cell .saved-pill,
  .materials-table .actions-cell .saved-badge,
  .materials-grid .actions-cell .saved-pill,
  .materials-grid .actions-cell .saved-badge,
  .materials-card .actions-cell .saved-pill,
  .materials-card .actions-cell .saved-badge {
    margin: 0 !important;
    align-self: center !important;
  }

  .materials-table td[data-label="ACTIONS"] .btn-delete,
  .materials-table td[data-label="ACTIONS"] .btn-danger,
  .materials-table td[data-label="ACTIONS"] .btn-remove,
  .materials-table .actions-cell .btn-delete,
  .materials-table .actions-cell .btn-danger,
  .materials-table .actions-cell .btn-remove,
  .materials-grid .actions-cell .btn-delete,
  .materials-grid .actions-cell .btn-danger,
  .materials-grid .actions-cell .btn-remove,
  .materials-card .actions-cell .btn-delete,
  .materials-card .actions-cell .btn-danger,
  .materials-card .actions-cell .btn-remove {
    margin: 0 !important;
    align-self: center !important;
  }

  /* 5) Checkbox te SELECT mos me shty layout-in */
  .materials-table td[data-label="SELECT"],
  .materials-table .select-cell,
  .materials-grid .select-cell,
  .materials-card .select-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: auto !important;
  }

  .materials-table td[data-label="SELECT"] input[type="checkbox"],
  .materials-table .select-cell input[type="checkbox"],
  .materials-grid .select-cell input[type="checkbox"],
  .materials-card .select-cell input[type="checkbox"] {
    margin: 0 !important;
    transform: scale(1.15) !important;
  }
}


/* =========================================================
   FINAL PRODUCT CARD MOBILE FIX
   Applies to Materials + Viber responsive product rows
   Fixes: orange line, NR, Sale %, Actions alignment
   ========================================================= */

@media (max-width: 900px) {
  /* Card row clean: no orange/video border on mobile */
  .responsive-card-table tr,
  .responsive-card-table tr.video-row,
  .responsive-card-table tr.row-selected,
  .responsive-card-table tr.selected,
  .responsive-card-table tr.is-selected {
    border-left: 1px solid #e2e8f0 !important;
    outline: none !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06) !important;
    background: #fff !important;
  }

  .responsive-card-table tr::before,
  .responsive-card-table tr.video-row::before,
  .responsive-card-table tr.row-selected::before,
  .responsive-card-table tr.selected::before,
  .responsive-card-table tr.is-selected::before {
    display: none !important;
    content: none !important;
  }

  .responsive-card-table tr.row-selected {
    background: #eff6ff !important;
  }

  /* Every card field: label left, value right */
  .responsive-card-table td {
    display: grid !important;
    grid-template-columns: 120px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 10px 0 !important;
    border: 0 !important;
    width: 100% !important;
    text-align: left !important;
    background: transparent !important;
  }

  .responsive-card-table td::before {
    content: attr(data-label) !important;
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    line-height: 1.1 !important;
  }

  /* SELECT checkbox clean */
  .responsive-card-table td[data-label="Select"],
  .responsive-card-table td[data-label="SELECT"] {
    min-height: 38px !important;
  }

  .responsive-card-table td[data-label="Select"] input[type="checkbox"],
  .responsive-card-table td[data-label="SELECT"] input[type="checkbox"],
  .responsive-card-table .row-check {
    margin: 0 !important;
    width: 22px !important;
    height: 22px !important;
    justify-self: start !important;
  }

  /* NR aligned normally */
  .responsive-card-table td[data-label="Nr"],
  .responsive-card-table td[data-label="NR"] {
    min-height: 38px !important;
  }

  .responsive-card-table td[data-label="Nr"] .row-num,
  .responsive-card-table td[data-label="NR"] .row-num,
  .responsive-card-table .row-num {
    justify-self: start !important;
    margin: 0 !important;
    min-width: 24px !important;
    width: auto !important;
    height: 24px !important;
    padding: 0 7px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }

  /* Sale % should not float/center weirdly */
  .responsive-card-table td[data-label="Sale %"],
  .responsive-card-table td[data-label="SALE %"],
  .responsive-card-table .sale-percent-cell,
  .responsive-card-table td.price {
    display: grid !important;
    grid-template-columns: 120px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: initial !important;
    text-align: left !important;
    color: #2563eb !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }

  .responsive-card-table td[data-label="Sale %"]::before,
  .responsive-card-table td[data-label="SALE %"]::before,
  .responsive-card-table .sale-percent-cell::before,
  .responsive-card-table td.price::before {
    color: #64748b !important;
    font-size: 12px !important;
  }

  /* Video switch aligned */
  .responsive-card-table td[data-label="Video"],
  .responsive-card-table td[data-label="VIDEO"] {
    align-items: center !important;
  }

  .responsive-card-table td[data-label="Video"] .video-switch,
  .responsive-card-table td[data-label="VIDEO"] .video-switch {
    justify-self: start !important;
    margin: 0 !important;
  }

  /* Actions: label left, Saved/Fshi centered in value area */
  .responsive-card-table td[data-label="Actions"],
  .responsive-card-table td[data-label="ACTIONS"] {
    display: grid !important;
    grid-template-columns: 120px minmax(0, 1fr) !important;
    align-items: center !important;
    text-align: left !important;
  }

  .responsive-card-table td[data-label="Actions"] .row-actions,
  .responsive-card-table td[data-label="ACTIONS"] .row-actions {
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 0 !important;
  }

  .responsive-card-table td[data-label="Actions"] .save-state,
  .responsive-card-table td[data-label="ACTIONS"] .save-state {
    margin: 0 auto !important;
  }

  .responsive-card-table td[data-label="Actions"] form,
  .responsive-card-table td[data-label="ACTIONS"] form {
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .responsive-card-table td[data-label="Actions"] .btn-small,
  .responsive-card-table td[data-label="ACTIONS"] .btn-small {
    margin: 0 auto !important;
  }

  /* Inputs full width inside value column */
  .responsive-card-table .table-input,
  .responsive-card-table .compact-select,
  .responsive-card-table .price-input,
  .responsive-card-table .table-textarea {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    justify-self: stretch !important;
  }

  .responsive-card-table .table-textarea {
    min-height: 56px !important;
  }
}

/* Very small phone: stack label above field */
@media (max-width: 520px) {
  .responsive-card-table td,
  .responsive-card-table td[data-label="Sale %"],
  .responsive-card-table td[data-label="SALE %"],
  .responsive-card-table .sale-percent-cell,
  .responsive-card-table td.price,
  .responsive-card-table td[data-label="Actions"],
  .responsive-card-table td[data-label="ACTIONS"] {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .responsive-card-table td[data-label="Actions"] .row-actions,
  .responsive-card-table td[data-label="ACTIONS"] .row-actions {
    align-items: flex-start !important;
  }
}


/* =========================================
   MOBILE FIX - video orange line more left
   Materials + Viber
   ========================================= */
@media (max-width: 900px) {
  .responsive-card-table tr.video-row,
  .responsive-card-table tr.row-selected.video-row,
  .responsive-card-table tr.video-row.selected,
  .responsive-card-table tr.video-row.is-selected {
    position: relative !important;
  }

  /* Move orange line away from labels/icons */
  .responsive-card-table tr.video-row::before,
  .responsive-card-table tr.row-selected.video-row::before,
  .responsive-card-table tr.video-row.selected::before,
  .responsive-card-table tr.video-row.is-selected::before {
    left: 6px !important;
    top: 14px !important;
    bottom: 14px !important;
    width: 4px !important;
    border-radius: 999px !important;
  }

  /* Push content a bit right so line never touches text */
  .responsive-card-table tr.video-row td,
  .responsive-card-table tr.row-selected.video-row td,
  .responsive-card-table tr.video-row.selected td,
  .responsive-card-table tr.video-row.is-selected td {
    padding-left: 22px !important;
  }

  /* Keep first labels/checkboxes extra clean */
  .responsive-card-table tr.video-row td[data-label="Select"],
  .responsive-card-table tr.video-row td[data-label="SELECT"],
  .responsive-card-table tr.video-row td[data-label="Nr"],
  .responsive-card-table tr.video-row td[data-label="NR"],
  .responsive-card-table tr.row-selected.video-row td[data-label="Select"],
  .responsive-card-table tr.row-selected.video-row td[data-label="SELECT"],
  .responsive-card-table tr.row-selected.video-row td[data-label="Nr"],
  .responsive-card-table tr.row-selected.video-row td[data-label="NR"] {
    padding-left: 26px !important;
  }
}


/* Boost module */
.boost-new-card {
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #e2e8f0;
  background: #f8fbff;
}

.boost-new-form {
  display: grid;
  grid-template-columns: 140px minmax(260px, 1.6fr) 160px 110px 140px 150px minmax(220px, 1fr) 110px;
  gap: 12px;
  align-items: end;
}

.boost-new-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
  color: #334155;
  font-size: 13px;
}

.boost-new-form input,
.boost-new-form select,
.boost-new-form textarea {
  width: 100%;
}

.boost-new-form textarea {
  min-height: 48px;
}

.boost-table .boost-url-input {
  min-width: 260px;
}

.boost-total-cell {
  font-weight: 900;
  color: #2563eb;
}

@media (max-width: 1280px) {
  .boost-new-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boost-url-field,
  .boost-comment-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .boost-new-form {
    grid-template-columns: 1fr;
  }

  .boost-url-field,
  .boost-comment-field {
    grid-column: auto;
  }
}


/* Boost summary cards */
.boost-summary-grid {
  margin: 18px 0 16px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.boost-summary-card {
  padding: 16px;
  border-radius: 20px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.boost-summary-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.boost-summary-card strong {
  display: block;
  color: #0f172a;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.boost-summary-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: transparent;
}

.boost-summary-primary span,
.boost-summary-primary strong {
  color: #fff;
}

@media (max-width: 1280px) {
  .boost-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .boost-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boost-summary-card strong {
    font-size: 21px;
  }
}

@media (max-width: 460px) {
  .boost-summary-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   BOOST REPORTS / EXPENSES
   ========================================================= */
.boost-report-panel {
  margin: 18px 0 18px;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.boost-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.boost-report-head h3 {
  margin: 8px 0 4px;
  font-size: 26px;
  line-height: 1.1;
}

.boost-report-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.boost-report-filters label {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.boost-report-filters input,
.boost-report-filters select,
.boost-report-filters button {
  width: 100%;
}

.boost-report-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.boost-report-card {
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.boost-report-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.boost-report-card strong {
  display: block;
  color: #0f172a;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  margin-bottom: 8px;
}

.boost-report-card small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.boost-report-main {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: transparent;
}

.boost-report-main span,
.boost-report-main strong,
.boost-report-main small {
  color: #fff;
}

@media (max-width: 1280px) {
  .boost-report-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .boost-report-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .boost-report-filters,
  .boost-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boost-report-head h3 {
    font-size: 23px;
  }
}

@media (max-width: 520px) {
  .boost-report-filters,
  .boost-report-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   BOOST REPORTS COLLAPSIBLE
   ========================================================= */

.boost-reports-collapse {
  margin: 18px 0 18px;
  border: 1px solid #dbe4f2;
  border-radius: 28px;
  background: #f7fbff;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.04);
}

.boost-reports-summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.boost-reports-summary::-webkit-details-marker {
  display: none;
}

.boost-reports-summary h3 {
  margin: 8px 0 6px;
  font-size: 26px;
  line-height: 1.1;
}

.boost-reports-summary .muted {
  margin: 0;
}

.boost-reports-toggle {
  min-width: 88px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  color: #2f63f5;
  font-weight: 900;
  font-size: 16px;
  flex-shrink: 0;
}

.boost-reports-toggle .label-close {
  display: none;
}

.boost-reports-collapse[open] .boost-reports-toggle .label-open {
  display: none;
}

.boost-reports-collapse[open] .boost-reports-toggle .label-close {
  display: inline;
}

.boost-reports-body {
  padding: 0 20px 20px;
}

.boost-reports-body .boost-report-panel {
  margin: 0 !important;
  box-shadow: none !important;
}

.boost-reports-collapse:not([open]) .boost-reports-body {
  display: none;
}

@media (max-width: 768px) {
  .boost-reports-summary {
    padding: 18px 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .boost-reports-toggle {
    width: 100%;
  }

  .boost-reports-body {
    padding: 0 14px 14px;
  }
}


/* =========================================================
   BOOST REPORTS MOVED INSIDE TOP FILTER
   ========================================================= */

.boost-filter-report-wrap {
  margin-top: 18px;
}

.boost-filter-report-wrap .boost-reports-collapse {
  margin: 0;
}

.boost-filter-report-wrap .boost-reports-summary {
  padding: 18px 20px;
}

.boost-filter-report-wrap .boost-reports-summary h3 {
  font-size: 24px;
  margin: 8px 0 4px;
}

.boost-filter-report-wrap .boost-reports-summary .muted {
  margin: 0;
}

.boost-filter-report-wrap .boost-reports-body {
  padding: 0 0 0;
}

.boost-filter-report-wrap .boost-report-panel {
  margin: 14px 0 0 !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  .boost-filter-report-wrap {
    margin-top: 14px;
  }

  .boost-filter-report-wrap .boost-reports-summary {
    padding: 16px;
  }
}


/* Clean Boost Reports after moving inside top filter */
.boost-filter-report-wrap .boost-report-head {
  display: none !important;
}

.boost-filter-report-wrap .boost-report-panel {
  padding-top: 0 !important;
}

.boost-reports-body .boost-report-panel > .boost-report-head:first-child {
  display: none !important;
}


/* Remove duplicate small Boost Reports toggle */
.boost-reports-summary .boost-reports-toggle + .boost-reports-toggle {
  display: none !important;
}

/* Keep only one clean Hap/Mbyll button */
.boost-reports-summary {
  position: relative !important;
}

.boost-reports-summary > .boost-reports-toggle {
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* If browser creates weird duplicate layout, hide every toggle after the first */
.boost-reports-summary > .boost-reports-toggle:nth-of-type(n+3) {
  display: none !important;
}


/* Force hide duplicate tiny Mbyll inside Boost Reports header */
.boost-reports-summary > span:not(.boost-reports-toggle),
.boost-reports-summary > button:not(.boost-reports-toggle),
.boost-reports-summary > a:not(.boost-reports-toggle) {
  display: none !important;
}

/* Keep only the main toggle button */
.boost-reports-summary .boost-reports-toggle {
  display: inline-flex !important;
}

/* Hide any extra boost toggle after the first one */
.boost-reports-summary .boost-reports-toggle ~ .boost-reports-toggle {
  display: none !important;
}


/* Remove the global details Hap/Mbyll badge only from Boost Reports */
.boost-reports-summary::after,
.boost-reports-collapse[open] .boost-reports-summary::after,
.boost-reports-collapse:not([open]) .boost-reports-summary::after {
  content: none !important;
  display: none !important;
}

/* Keep only our main Boost Reports Hap/Mbyll button */
.boost-reports-summary .boost-reports-toggle {
  margin-left: auto !important;
  display: inline-flex !important;
}


/* Boost CSV top actions */
.topbar .hero-actions-grid #boostImportForm {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  display: inline-flex !important;
}

.topbar .hero-actions-grid #boostImportForm .btn {
  width: 100% !important;
}

@media (max-width: 640px) {
  .topbar .hero-actions-grid #boostImportForm {
    display: flex !important;
  }
}


/* =========================================================
   BOOST HEADER ACTIONS SAME AS MATERIALS / VIBER
   ========================================================= */

.topbar .boost-header-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  width: auto !important;
  margin-left: auto !important;
}

.topbar .boost-header-actions > .btn,
.topbar .boost-header-actions > a.btn,
.topbar .boost-header-actions > button.btn,
.topbar .boost-header-actions > form > button.btn {
  height: auto !important;
  min-height: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 15px 22px !important;
  border-radius: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  font-size: inherit !important;
  font-weight: 900 !important;
  box-sizing: border-box !important;
}

.topbar .boost-header-import-form {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
}

/* Tablet: 2 x 2, same clean responsive behavior */
@media (min-width: 641px) and (max-width: 1024px) {
  .topbar .boost-header-actions {
    width: 100% !important;
    margin-left: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .topbar .boost-header-actions > .btn,
  .topbar .boost-header-actions > a.btn,
  .topbar .boost-header-actions > button.btn,
  .topbar .boost-header-actions > form,
  .topbar .boost-header-actions > form > button.btn {
    width: 100% !important;
  }

  .topbar .boost-header-import-form {
    width: 100% !important;
  }
}

/* Mobile: one by one */
@media (max-width: 640px) {
  .topbar .boost-header-actions {
    width: 100% !important;
    margin-left: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .topbar .boost-header-actions > .btn,
  .topbar .boost-header-actions > a.btn,
  .topbar .boost-header-actions > button.btn,
  .topbar .boost-header-actions > form,
  .topbar .boost-header-actions > form > button.btn {
    width: 100% !important;
  }

  .topbar .boost-header-import-form {
    width: 100% !important;
  }
}


/* =========================================================
   BOOST TOP CSV ACTIONS - IDENTIK SI VIBER / MATERIALS
   ========================================================= */

/* Neutralizo çdo style të vjetër për boost header buttons */
.topbar .boost-header-actions,
.topbar .hero-actions-grid.boost-header-actions,
.topbar .boost-actions-same {
  all: unset;
}

/* Boost actions same line/style as Viber/Materials desktop */
.topbar .boost-actions-same {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-left: auto !important;
  width: auto !important;
}

/* Import form mos ta prish line-in */
#boostImportForm {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
  width: auto !important;
}

/* Krejt butonat Boost header njëjtë */
.topbar .boost-actions-same > .btn,
.topbar .boost-actions-same > a.btn,
.topbar .boost-actions-same > button.btn,
.topbar .boost-actions-same > form > button.btn {
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 15px 22px !important;
  border-radius: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  font-size: inherit !important;
  font-weight: 900 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/* Import button exactly aligned */
#boostImportForm .btn {
  margin: 0 !important;
  vertical-align: middle !important;
}

/* Tablet: njëjtë si Materials/Viber, 2 me 2 */
@media (min-width: 641px) and (max-width: 1024px) {
  .topbar .boost-actions-same {
    width: 100% !important;
    margin-left: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .topbar .boost-actions-same > .btn,
  .topbar .boost-actions-same > a.btn,
  .topbar .boost-actions-same > button.btn,
  .topbar .boost-actions-same > form,
  .topbar .boost-actions-same > form > button.btn {
    width: 100% !important;
  }

  #boostImportForm {
    width: 100% !important;
    display: flex !important;
  }
}

/* Mobile: një nga një */
@media (max-width: 640px) {
  .topbar .boost-actions-same {
    width: 100% !important;
    margin-left: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .topbar .boost-actions-same > .btn,
  .topbar .boost-actions-same > a.btn,
  .topbar .boost-actions-same > button.btn,
  .topbar .boost-actions-same > form,
  .topbar .boost-actions-same > form > button.btn {
    width: 100% !important;
  }

  #boostImportForm {
    width: 100% !important;
    display: flex !important;
  }
}


/* =========================================================
   ARCHIVE PAGE
   ========================================================= */

.archive-summary-grid {
  margin: 18px 0 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.archive-summary-card {
  padding: 16px;
  border-radius: 20px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.archive-summary-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.archive-summary-card strong {
  display: block;
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
  margin-bottom: 8px;
}

.archive-summary-card small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.archive-summary-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: transparent;
}

.archive-summary-primary span,
.archive-summary-primary strong,
.archive-summary-primary small {
  color: #fff;
}

.archive-table a {
  color: #2563eb;
  font-weight: 900;
}

@media (max-width: 1280px) {
  .archive-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .archive-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-summary-card strong {
    font-size: 20px;
  }
}

@media (max-width: 460px) {
  .archive-summary-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   ARCHIVE SEARCH + EXPORT
   ========================================================= */

.archive-export-actions {
  margin: 18px 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.archive-export-actions .btn {
  white-space: nowrap;
}

@media (min-width: 641px) and (max-width: 1024px) {
  .archive-export-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-export-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .archive-export-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .archive-export-actions .btn {
    width: 100%;
    justify-content: center;
  }
}


/* =========================================================
   ARCHIVE SUMMARY + COLLAPSIBLE MODULES FINAL
   ========================================================= */

/* Web: all archive summary cards in one line */
@media (min-width: 1281px) {
  .archive-summary-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    align-items: stretch !important;
  }

  .archive-summary-card {
    min-width: 0 !important;
  }

  .archive-summary-card strong {
    font-size: 20px !important;
    word-break: normal !important;
  }
}

/* Medium desktop / tablet */
@media (min-width: 901px) and (max-width: 1280px) {
  .archive-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Archive dropdown sections */
.archive-module-collapse {
  margin: 18px 0;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.archive-module-summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.archive-module-summary::-webkit-details-marker {
  display: none;
}

.archive-module-summary::after {
  content: none !important;
  display: none !important;
}

.archive-module-summary h2 {
  margin: 8px 0 4px;
  font-size: 26px;
  line-height: 1.1;
}

.archive-module-summary .muted {
  margin: 0;
}

.archive-module-meta {
  min-width: 96px;
  padding: 12px 16px;
  border-radius: 18px;
  background: #eef4ff;
  text-align: center;
}

.archive-module-meta strong {
  display: block;
  color: #2563eb;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.archive-module-meta small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.archive-module-toggle {
  min-width: 86px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  color: #2563eb;
  font-weight: 950;
  font-size: 15px;
  white-space: nowrap;
}

.archive-module-toggle .label-close {
  display: none;
}

.archive-module-collapse[open] .archive-module-toggle .label-open {
  display: none;
}

.archive-module-collapse[open] .archive-module-toggle .label-close {
  display: inline;
}

.archive-module-body {
  padding: 0 18px 18px;
}

.archive-module-body .panel {
  margin: 0 !important;
  box-shadow: none !important;
}

/* Kur hapet, table mos me pas extra hapsirë të panevojshme */
.archive-module-body .panel > .table-wrap:first-child {
  margin-top: 0 !important;
}

/* Tablet/mobile */
@media (max-width: 900px) {
  .archive-module-summary {
    grid-template-columns: 1fr;
    padding: 18px 16px;
  }

  .archive-module-meta {
    width: 100%;
    box-sizing: border-box;
  }

  .archive-module-toggle {
    width: 100%;
    box-sizing: border-box;
  }

  .archive-module-body {
    padding: 0 12px 12px;
  }

  .archive-module-summary h2 {
    font-size: 23px;
  }
}


/* =========================================================
   REPORTS PAGE
   ========================================================= */

.reports-summary-grid {
  margin: 18px 0 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.reports-summary-card {
  padding: 16px;
  border-radius: 20px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.reports-summary-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.reports-summary-card strong {
  display: block;
  color: #0f172a;
  font-size: 24px;
  font-weight: 950;
  line-height: 1.05;
  margin-bottom: 8px;
}

.reports-summary-card small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.reports-summary-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: transparent;
}

.reports-summary-primary span,
.reports-summary-primary strong,
.reports-summary-primary small {
  color: #fff;
}

.reports-table .price {
  font-weight: 950;
}

@media (max-width: 1280px) {
  .reports-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .reports-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-summary-card strong {
    font-size: 21px;
  }
}

@media (max-width: 460px) {
  .reports-summary-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   MODERN DASHBOARD
   ========================================================= */

.dashboard-main {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, .12), transparent 34%),
    radial-gradient(circle at top left, rgba(79, 70, 229, .10), transparent 30%);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.dashboard-hero-content {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #0f2147 0%, #132b59 48%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .18);
}

.dashboard-hero-content::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -80px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}

.dashboard-kicker {
  display: inline-flex;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.dashboard-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: .95;
  color: #fff;
}

.dashboard-hero p {
  max-width: 720px;
  color: rgba(255,255,255,.86);
  font-size: 18px;
  margin: 0;
}

.dashboard-client-pill {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 15px;
  border-radius: 18px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.16);
}

.dashboard-client-pill span {
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.dashboard-client-pill strong {
  color: #fff;
}

.dashboard-hero-actions {
  padding: 22px;
  border-radius: 34px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-client-switcher label {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.dashboard-client-switcher select {
  width: 100%;
}

.dashboard-quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.modern-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.modern-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: 18px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.modern-stat-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px;
}

.modern-stat-card strong {
  display: block;
  color: #0f172a;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.modern-stat-card small {
  display: block;
  margin-top: 10px;
  color: #64748b;
  font-weight: 700;
}

.stat-icon {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  color: #2563eb;
  font-weight: 950;
}

.stat-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: transparent;
}

.stat-primary span,
.stat-primary strong,
.stat-primary small {
  color: #fff;
}

.stat-primary .stat-icon {
  background: rgba(255,255,255,.16);
  color: #fff;
}

.dashboard-grid-2 {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-panel {
  padding: 22px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
  margin-bottom: 18px;
}

.dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-panel-head h2 {
  margin: 8px 0 4px;
  font-size: 26px;
  line-height: 1.1;
}

.workload-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.workload-item {
  padding: 14px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
}

.workload-item span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.workload-item strong {
  color: #0f172a;
  font-size: 24px;
  font-weight: 950;
}

.open-months-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.open-months-list a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: #0f172a;
  font-weight: 900;
}

.open-months-list a strong {
  color: #2563eb;
}

.boost-status-stack {
  display: grid;
  gap: 10px;
}

.boost-status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
}

.boost-status-row span {
  color: #64748b;
  font-weight: 900;
}

.boost-status-row strong {
  color: #0f172a;
  font-weight: 950;
}

.boost-status-row.total {
  background: #eef4ff;
}

.dashboard-month-list,
.recent-boost-list {
  display: grid;
  gap: 10px;
}

.dashboard-month-row,
.recent-boost-item {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: center;
  padding: 15px;
  border-radius: 20px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
}

.dashboard-month-row strong,
.recent-boost-item strong {
  display: block;
  color: #0f172a;
}

.month-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.month-metrics span {
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.month-metrics b {
  color: #0f172a;
}

.recent-boost-item a {
  display: inline-block;
  margin: 4px 0;
  color: #2563eb;
  font-weight: 900;
  text-decoration: none;
}

.recent-boost-item small {
  display: block;
  color: #64748b;
}

.recent-boost-item > div:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.empty-mini {
  padding: 16px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  font-weight: 800;
}

@media (max-width: 1400px) {
  .modern-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .dashboard-hero,
  .dashboard-grid-2 {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-content,
  .dashboard-hero-actions,
  .dashboard-panel {
    border-radius: 26px;
  }
}

@media (max-width: 720px) {
  .modern-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-month-row,
  .recent-boost-item {
    grid-template-columns: 1fr;
  }

  .month-metrics,
  .recent-boost-item > div:last-child {
    justify-content: flex-start;
  }

  .dashboard-panel-head {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .modern-stats-grid,
  .workload-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-content {
    padding: 24px;
  }
}



/* SETTINGS PRO TABS */

.brand-mark-image,
.mobile-topbar-logo-image {
  overflow: hidden;
  background: #ffffff;
}

.brand-mark-image img,
.mobile-topbar-logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.settings-pro-main {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, .11), transparent 34%),
    radial-gradient(circle at top left, rgba(79, 70, 229, .09), transparent 28%);
}

.settings-pro-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.settings-pro-hero-main {
  padding: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #0f2147 0%, #132b59 52%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .18);
}

.settings-pro-hero-main h1 {
  margin: 18px 0 10px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: .95;
  color: #fff;
}

.settings-pro-hero-main p {
  margin: 0;
  max-width: 760px;
  color: rgba(255,255,255,.88);
  font-size: 18px;
}

.settings-pro-hero-side {
  display: grid;
  gap: 14px;
}

.settings-pro-stat {
  padding: 24px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.settings-pro-stat span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.settings-pro-stat strong {
  display: block;
  margin-top: 10px;
  color: #2563eb;
  font-size: 32px;
  font-weight: 950;
}

.settings-pro-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.settings-pro-tabs {
  position: sticky;
  top: 20px;
  padding: 14px;
  border-radius: 28px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
  display: grid;
  gap: 10px;
}

.settings-tab-btn {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #f8fbff;
  color: #0f172a;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  transition: .2s ease;
}

.settings-tab-btn:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
}

.settings-tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, .24);
}

.settings-pro-content {
  min-width: 0;
}

.settings-tab-panel {
  display: none;
}

.settings-tab-panel.active {
  display: block;
}

.settings-pro-card {
  padding: 24px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
  margin-bottom: 18px;
}

.settings-pro-card-head {
  margin-bottom: 16px;
}

.settings-pro-card-head h2 {
  margin: 8px 0 4px;
  font-size: 26px;
  line-height: 1.08;
}

.settings-pro-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .46fr);
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #edf2f7;
}

.settings-pro-field label {
  display: block;
  color: #0f172a;
  font-weight: 950;
  margin-bottom: 6px;
}

.settings-pro-field p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.settings-pro-field input,
.settings-pro-field select {
  width: 100%;
}

.settings-pro-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #edf2f7;
  cursor: pointer;
}

.settings-pro-toggle-row strong {
  display: block;
  color: #0f172a;
  font-weight: 950;
  margin-bottom: 5px;
}

.settings-pro-toggle-row small {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.settings-pro-toggle-row input {
  display: none;
}

.settings-pro-toggle-row > span {
  position: relative;
  width: 54px;
  height: 32px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: .2s ease;
}

.settings-pro-toggle-row > span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .18);
  transition: .2s ease;
}

.settings-pro-toggle-row input:checked + span {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.settings-pro-toggle-row input:checked + span::after {
  transform: translateX(22px);
}

.settings-pro-save-bar {
  position: sticky;
  bottom: 18px;
  z-index: 18;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-pro-save-bar strong {
  display: block;
  color: #0f172a;
  font-weight: 950;
}

.settings-pro-save-bar small {
  display: block;
  color: #64748b;
  font-weight: 700;
}

.branding-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 10px;
}

.branding-preview-card {
  padding: 16px;
  border-radius: 22px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
}

.branding-preview-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px;
}

.branding-preview-box {
  min-height: 150px;
  border-radius: 18px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 14px;
}

.branding-preview-box img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  display: block;
}

.branding-preview-favicon-box img {
  max-width: 64px;
  max-height: 64px;
}

.branding-preview-fallback {
  color: #94a3b8;
  font-weight: 900;
  letter-spacing: .08em;
}

.settings-log-list,
.restore-list {
  display: grid;
  gap: 10px;
}

.settings-log-item,
.restore-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
}

.settings-log-item strong,
.restore-item strong {
  display: block;
  color: #0f172a;
  font-weight: 950;
}

.settings-log-item small,
.restore-item small {
  display: block;
  margin-top: 4px;
  color: #64748b;
}

.settings-log-item > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.settings-restore-grid {
  display: grid;
  gap: 18px;
}

@media (max-width: 1180px) {
  .settings-pro-hero,
  .settings-pro-layout {
    grid-template-columns: 1fr;
  }

  .settings-pro-tabs {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .settings-pro-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .branding-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .settings-pro-field,
  .settings-pro-toggle-row,
  .settings-log-item,
  .restore-item {
    grid-template-columns: 1fr;
  }

  .settings-pro-toggle-row > span {
    justify-self: start;
  }

  .settings-pro-save-bar {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }

  .settings-pro-save-bar .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .settings-pro-tabs {
    grid-template-columns: 1fr;
  }

  .settings-pro-hero-main,
  .settings-pro-card {
    border-radius: 24px;
  }
}


/* RESTORE PRO PAGINATION */

.restore-pro-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.restore-pro-total {
  min-width: 150px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  text-align: center;
}

.restore-pro-total span {
  display: block;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.82);
}

.restore-pro-total strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  font-weight: 950;
  color: #fff;
}

.restore-pro-filters {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) 150px 150px 120px 120px;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 22px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
}

.restore-pro-filters label {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.restore-pro-filters input,
.restore-pro-filters select,
.restore-pro-filters button {
  width: 100%;
}

.restore-pro-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.restore-pro-actions form {
  margin: 0;
}

.restore-selected-count {
  margin-left: auto;
  padding: 10px 14px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
}

.restore-pro-list {
  display: grid;
  gap: 10px;
}

.restore-pro-item {
  display: grid;
  grid-template-columns: 34px 100px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: .18s ease;
}

.restore-pro-item.selected {
  background: #eff6ff;
  border-color: #93c5fd;
}

.restore-check-wrap {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.restore-check-wrap input {
  display: none;
}

.restore-check-wrap span {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 2px solid #cbd5e1;
  background: #fff;
  display: block;
  position: relative;
}

.restore-check-wrap input:checked + span {
  border-color: #2563eb;
  background: #2563eb;
}

.restore-check-wrap input:checked + span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.restore-type-pill {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: .05em;
}

.restore-type-materials {
  background: #eef4ff;
  color: #2563eb;
}

.restore-type-viber {
  background: #f5f3ff;
  color: #7c3aed;
}

.restore-type-boost {
  background: #ecfdf5;
  color: #059669;
}

.restore-main-info strong {
  display: block;
  color: #0f172a;
  font-weight: 950;
}

.restore-main-info a {
  display: inline-block;
  margin: 4px 0;
  color: #2563eb;
  font-weight: 900;
  text-decoration: none;
}

.restore-main-info small {
  display: block;
  color: #64748b;
  font-weight: 700;
}

.restore-pagination {
  margin-top: 16px;
}

@media (max-width: 1200px) {
  .restore-pro-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .restore-pro-item {
    grid-template-columns: 34px 92px minmax(0, 1fr);
  }

  .restore-pro-item form {
    grid-column: 1 / -1;
  }

  .restore-pro-item form .btn {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .restore-pro-head {
    flex-direction: column;
  }

  .restore-pro-total {
    width: 100%;
    box-sizing: border-box;
  }

  .restore-pro-filters {
    grid-template-columns: 1fr;
  }

  .restore-pro-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .restore-pro-actions form,
  .restore-pro-actions .btn {
    width: 100%;
  }

  .restore-selected-count {
    margin-left: 0;
    justify-content: center;
  }

  .restore-pro-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .restore-type-pill {
    grid-column: 2;
    justify-self: start;
  }

  .restore-main-info {
    grid-column: 1 / -1;
  }
}


/* =========================================================
   SETTINGS RESTORE FILTERS RESPONSIVE FIX
   ========================================================= */

.settings-restore-filters-card {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin-bottom: 16px !important;
  padding: 16px !important;
  border-radius: 22px !important;
  background: #f8fbff !important;
  border: 1px solid #e2e8f0 !important;
  box-sizing: border-box !important;
}

.settings-restore-filters-form {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.settings-restore-filters-grid {
  display: grid !important;
  grid-template-columns:
    minmax(150px, 0.95fr)
    minmax(145px, 0.9fr)
    minmax(220px, 1.35fr)
    minmax(145px, 0.85fr)
    minmax(145px, 0.85fr)
    minmax(105px, 0.55fr)
    minmax(135px, auto) !important;
  gap: 12px !important;
  align-items: end !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.settings-restore-filter-item,
.settings-restore-filter-actions {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.settings-restore-filter-item label {
  display: block !important;
  margin-bottom: 8px !important;
  font-weight: 900 !important;
  font-size: 14px !important;
  color: #24324a !important;
}

.settings-restore-filter-item input,
.settings-restore-filter-item select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.settings-restore-filter-module select {
  min-width: 0 !important;
}

.settings-restore-filter-search input {
  min-width: 0 !important;
}

.settings-restore-filter-actions {
  display: flex !important;
  align-items: end !important;
}

.settings-restore-filter-actions .btn,
.settings-restore-filter-actions button {
  width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

/* neutralize old restore filter grid so it cannot force overflow */
.restore-pro-filters {
  display: block !important;
  grid-template-columns: none !important;
  overflow: hidden !important;
}

/* Large desktop / smaller browser width */
@media (max-width: 1500px) {
  .settings-restore-filters-grid {
    grid-template-columns:
      minmax(150px, 1fr)
      minmax(145px, 0.85fr)
      minmax(240px, 1.35fr)
      minmax(145px, 0.85fr)
      minmax(145px, 0.85fr)
      minmax(105px, 0.55fr) !important;
  }

  .settings-restore-filter-actions {
    grid-column: 1 / -1 !important;
  }

  .settings-restore-filter-actions .btn,
  .settings-restore-filter-actions button {
    width: 220px !important;
  }
}

/* Tablet */
@media (max-width: 1150px) {
  .settings-restore-filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .settings-restore-filter-search {
    grid-column: span 2 !important;
  }

  .settings-restore-filter-actions {
    grid-column: 1 / -1 !important;
  }

  .settings-restore-filter-actions .btn,
  .settings-restore-filter-actions button {
    width: 100% !important;
  }
}

/* Small tablet */
@media (max-width: 820px) {
  .settings-restore-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .settings-restore-filter-search {
    grid-column: 1 / -1 !important;
  }
}

/* Mobile */
@media (max-width: 620px) {
  .settings-restore-filters-card {
    padding: 12px !important;
    border-radius: 20px !important;
  }

  .settings-restore-filters-grid {
    grid-template-columns: 1fr !important;
  }

  .settings-restore-filter-search {
    grid-column: auto !important;
  }

  .settings-restore-filter-actions {
    grid-column: auto !important;
  }
}


/* Hide save bar on non-editable settings tabs */
.settings-tab-panel[data-panel="logs"].active ~ .settings-pro-save-bar,
.settings-tab-panel[data-panel="restore"].active ~ .settings-pro-save-bar {
  display: none !important;
}


/* =========================================================
   SETTINGS / RESTORE FILTER - KEEP FILTER BUTTON VISIBLE
   ========================================================= */
.settings-tab-panel[data-panel="restore"] .restore-filter-form {
  display: grid;
  grid-template-columns:
    minmax(170px, 1fr)
    minmax(180px, 1fr)
    minmax(240px, 1.25fr)
    minmax(150px, 0.9fr)
    minmax(150px, 0.9fr)
    minmax(95px, 0.55fr)
    minmax(150px, auto);
  gap: 16px;
  align-items: end;
  width: 100%;
}

.settings-tab-panel[data-panel="restore"] .restore-filter-form > * {
  min-width: 0;
}

.settings-tab-panel[data-panel="restore"] .restore-filter-form label {
  display: block;
  margin-bottom: 8px;
}

.settings-tab-panel[data-panel="restore"] .restore-filter-form input,
.settings-tab-panel[data-panel="restore"] .restore-filter-form select,
.settings-tab-panel[data-panel="restore"] .restore-filter-form .form-control,
.settings-tab-panel[data-panel="restore"] .restore-filter-form .input,
.settings-tab-panel[data-panel="restore"] .restore-filter-form .select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.settings-tab-panel[data-panel="restore"] .restore-filter-form button,
.settings-tab-panel[data-panel="restore"] .restore-filter-form .btn,
.settings-tab-panel[data-panel="restore"] .restore-filter-form .btn-primary {
  width: 100%;
  min-width: 140px;
  white-space: nowrap;
}

/* Klienti */
.settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(1) {
  min-width: 160px;
}

/* Moduli - mos me u zgjat shume */
.settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(2) {
  min-width: 160px;
}

/* Search - le te kete me shume hapesire */
.settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(3) {
  min-width: 220px;
}

/* Prej dates */
.settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(4) {
  min-width: 145px;
}

/* Deri dates */
.settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(5) {
  min-width: 145px;
}

/* Show */
.settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(6) {
  min-width: 85px;
  max-width: 110px;
}

/* Filtro button wrapper */
.settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(7) {
  min-width: 140px;
}

/* Large tablet / small desktop */
@media (max-width: 1500px) {
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns:
      minmax(170px, 1fr)
      minmax(170px, 1fr)
      minmax(230px, 1.2fr)
      minmax(145px, 0.9fr)
      minmax(145px, 0.9fr)
      minmax(90px, 0.55fr);
  }

  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(7) {
    grid-column: 1 / span 2;
  }
}

/* Tablet */
@media (max-width: 1200px) {
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(3) {
    grid-column: span 1;
  }

  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(7) {
    grid-column: 1 / span 3;
  }
}

/* Small tablet */
@media (max-width: 900px) {
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(7) {
    grid-column: 1 / span 2;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns: 1fr;
  }

  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(7) {
    grid-column: auto;
  }
}


/* =========================================================
   RESTORE FILTERS - PERFECT RESPONSIVE, NOTHING CUTS
   ========================================================= */

/* Parent card must NEVER cut fields/buttons */
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-card,
.settings-tab-panel[data-panel="restore"] .restore-pro-filters {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

/* Main grid */
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid,
.settings-tab-panel[data-panel="restore"] .restore-filter-form {
  display: grid !important;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(0, 1.35fr)
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(0, .7fr)
    minmax(0, .95fr) !important;
  gap: 14px !important;
  align-items: end !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Every child must shrink safely */
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid > *,
.settings-tab-panel[data-panel="restore"] .restore-filter-form > * {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Labels */
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid label,
.settings-tab-panel[data-panel="restore"] .restore-filter-form label {
  display: block !important;
  margin-bottom: 8px !important;
  color: #24324a !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

/* Inputs/selects never overflow */
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid input,
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid select,
.settings-tab-panel[data-panel="restore"] .restore-filter-form input,
.settings-tab-panel[data-panel="restore"] .restore-filter-form select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Button always visible */
.settings-tab-panel[data-panel="restore"] .settings-restore-filter-actions,
.settings-tab-panel[data-panel="restore"] .restore-filter-form > :last-child {
  min-width: 0 !important;
  width: 100% !important;
}

.settings-tab-panel[data-panel="restore"] .settings-restore-filter-actions .btn,
.settings-tab-panel[data-panel="restore"] .settings-restore-filter-actions button,
.settings-tab-panel[data-panel="restore"] .restore-filter-form button,
.settings-tab-panel[data-panel="restore"] .restore-filter-form .btn {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

/* Wide but not huge screens: 4 columns + rest below */
@media (max-width: 1550px) {
  .settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1fr)
      minmax(0, 1.4fr)
      minmax(0, 1fr) !important;
  }

  .settings-tab-panel[data-panel="restore"] .settings-restore-filter-actions,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :last-child {
    grid-column: auto !important;
  }
}

/* Tablet: 3 columns */
@media (max-width: 1200px) {
  .settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .settings-tab-panel[data-panel="restore"] .settings-restore-filter-search,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(3) {
    grid-column: span 2 !important;
  }

  .settings-tab-panel[data-panel="restore"] .settings-restore-filter-actions,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :last-child {
    grid-column: 1 / -1 !important;
  }
}

/* Small tablet: 2 columns */
@media (max-width: 850px) {
  .settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .settings-tab-panel[data-panel="restore"] .settings-restore-filter-search,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(3) {
    grid-column: 1 / -1 !important;
  }

  .settings-tab-panel[data-panel="restore"] .settings-restore-filter-actions,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :last-child {
    grid-column: 1 / -1 !important;
  }
}

/* Mobile: 1 column */
@media (max-width: 580px) {
  .settings-tab-panel[data-panel="restore"] .settings-restore-filters-card {
    padding: 12px !important;
    border-radius: 20px !important;
  }

  .settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .settings-tab-panel[data-panel="restore"] .settings-restore-filter-search,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(3),
  .settings-tab-panel[data-panel="restore"] .settings-restore-filter-actions,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :last-child {
    grid-column: auto !important;
  }
}

/* Extra safety: prevent page horizontal scroll from restore filters */
.settings-tab-panel[data-panel="restore"] {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.settings-pro-content,
.settings-pro-card {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}


/* =========================================================
   RESTORE FILTERS FINAL STYLE RESET - NO DEFORM, NO CUT
   ========================================================= */

/* card itself */
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-card {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  padding: 18px !important;
  border-radius: 26px !important;
  background: #f8fbff !important;
  border: 1px solid #e2e8f0 !important;
  box-sizing: border-box !important;
}

/* form/wrapper reset */
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-form,
.settings-tab-panel[data-panel="restore"] .restore-filter-form {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

/* default responsive grid: never shrink fields into tiny columns */
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid,
.settings-tab-panel[data-panel="restore"] .restore-filter-form {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)) !important;
  gap: 14px !important;
  align-items: end !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* children reset */
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid > *,
.settings-tab-panel[data-panel="restore"] .restore-filter-form > * {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* labels normal, no overlap */
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid label,
.settings-tab-panel[data-panel="restore"] .restore-filter-form label {
  display: block !important;
  margin: 0 0 8px 0 !important;
  color: #24324a !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  position: static !important;
}

/* inputs/selects restore normal style */
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid input,
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid select,
.settings-tab-panel[data-panel="restore"] .restore-filter-form input,
.settings-tab-panel[data-panel="restore"] .restore-filter-form select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 18px !important;
  border-radius: 16px !important;
  border: 1px solid #dbe5f0 !important;
  background: #fff !important;
  color: #0f172a !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* hide hidden inputs from grid just in case */
.settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid input[type="hidden"],
.settings-tab-panel[data-panel="restore"] .restore-filter-form input[type="hidden"] {
  display: none !important;
}

/* button restore normal size/style */
.settings-tab-panel[data-panel="restore"] .settings-restore-filter-actions,
.settings-tab-panel[data-panel="restore"] .restore-filter-form > :last-child {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: end !important;
}

.settings-tab-panel[data-panel="restore"] .settings-restore-filter-actions .btn,
.settings-tab-panel[data-panel="restore"] .settings-restore-filter-actions button,
.settings-tab-panel[data-panel="restore"] .restore-filter-form button,
.settings-tab-panel[data-panel="restore"] .restore-filter-form .btn {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  border-radius: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  box-sizing: border-box !important;
}

/* wide desktop: controlled proportions */
@media (min-width: 1501px) {
  .settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns:
      minmax(170px, 1fr)
      minmax(160px, .9fr)
      minmax(260px, 1.45fr)
      minmax(170px, .9fr)
      minmax(170px, .9fr)
      minmax(120px, .55fr)
      minmax(150px, .7fr) !important;
  }
}

/* medium desktop: 4 + 3, button stays visible */
@media (min-width: 1101px) and (max-width: 1500px) {
  .settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns:
      minmax(180px, 1fr)
      minmax(170px, .85fr)
      minmax(260px, 1.35fr)
      minmax(170px, .9fr) !important;
  }
}

/* tablet: 3 columns */
@media (min-width: 821px) and (max-width: 1100px) {
  .settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .settings-tab-panel[data-panel="restore"] .settings-restore-filter-search,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(3) {
    grid-column: span 2 !important;
  }
}

/* small tablet: 2 columns */
@media (min-width: 581px) and (max-width: 820px) {
  .settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .settings-tab-panel[data-panel="restore"] .settings-restore-filter-search,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(3),
  .settings-tab-panel[data-panel="restore"] .settings-restore-filter-actions,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :last-child {
    grid-column: 1 / -1 !important;
  }
}

/* mobile: one by one */
@media (max-width: 580px) {
  .settings-tab-panel[data-panel="restore"] .settings-restore-filters-card {
    padding: 12px !important;
    border-radius: 20px !important;
  }

  .settings-tab-panel[data-panel="restore"] .settings-restore-filters-grid,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .settings-tab-panel[data-panel="restore"] .settings-restore-filter-search,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :nth-child(3),
  .settings-tab-panel[data-panel="restore"] .settings-restore-filter-actions,
  .settings-tab-panel[data-panel="restore"] .restore-filter-form > :last-child {
    grid-column: auto !important;
  }
}


/* =========================================================
   RESTORE CLEAN FINAL FILTER - ISOLATED FROM OLD CSS
   ========================================================= */

.settings-tab-panel[data-panel="restore"] .restore-clean-card {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  padding: 18px !important;
  margin: 0 0 18px 0 !important;
  border-radius: 26px !important;
  background: #f8fbff !important;
  border: 1px solid #e2e8f0 !important;
  box-sizing: border-box !important;
}

.settings-tab-panel[data-panel="restore"] .restore-clean-filter-form {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.settings-tab-panel[data-panel="restore"] .restore-clean-grid {
  display: grid !important;
  grid-template-columns:
    minmax(170px, 1fr)
    minmax(160px, .9fr)
    minmax(260px, 1.45fr)
    minmax(170px, .95fr)
    minmax(170px, .95fr)
    minmax(115px, .55fr)
    minmax(155px, .75fr) !important;
  gap: 14px !important;
  align-items: end !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.settings-tab-panel[data-panel="restore"] .restore-clean-field,
.settings-tab-panel[data-panel="restore"] .restore-clean-action {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.settings-tab-panel[data-panel="restore"] .restore-clean-field label,
.settings-tab-panel[data-panel="restore"] .restore-clean-action label {
  display: block !important;
  position: static !important;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  color: #24324a !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

.settings-tab-panel[data-panel="restore"] .restore-clean-field input,
.settings-tab-panel[data-panel="restore"] .restore-clean-field select {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 0 18px !important;
  border-radius: 16px !important;
  border: 1px solid #dbe5f0 !important;
  background: #fff !important;
  color: #0f172a !important;
  font-size: 16px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.settings-tab-panel[data-panel="restore"] .restore-clean-action .btn,
.settings-tab-panel[data-panel="restore"] .restore-clean-action button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 0 22px !important;
  border-radius: 16px !important;
  white-space: nowrap !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  box-sizing: border-box !important;
}

/* Desktop medium: 4 columns, the rest goes below cleanly */
@media (max-width: 1500px) {
  .settings-tab-panel[data-panel="restore"] .restore-clean-grid {
    grid-template-columns:
      minmax(180px, 1fr)
      minmax(170px, .9fr)
      minmax(260px, 1.35fr)
      minmax(170px, .95fr) !important;
  }
}

/* Tablet: 3 columns */
@media (max-width: 1150px) {
  .settings-tab-panel[data-panel="restore"] .restore-clean-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .settings-tab-panel[data-panel="restore"] .restore-clean-search {
    grid-column: span 2 !important;
  }

  .settings-tab-panel[data-panel="restore"] .restore-clean-action {
    grid-column: 1 / -1 !important;
  }
}

/* Small tablet: 2 columns */
@media (max-width: 820px) {
  .settings-tab-panel[data-panel="restore"] .restore-clean-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .settings-tab-panel[data-panel="restore"] .restore-clean-search,
  .settings-tab-panel[data-panel="restore"] .restore-clean-action {
    grid-column: 1 / -1 !important;
  }
}

/* Mobile: 1 column */
@media (max-width: 580px) {
  .settings-tab-panel[data-panel="restore"] .restore-clean-card {
    padding: 12px !important;
    border-radius: 20px !important;
  }

  .settings-tab-panel[data-panel="restore"] .restore-clean-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .settings-tab-panel[data-panel="restore"] .restore-clean-search,
  .settings-tab-panel[data-panel="restore"] .restore-clean-action {
    grid-column: auto !important;
  }

  .settings-tab-panel[data-panel="restore"] .restore-clean-field label,
  .settings-tab-panel[data-panel="restore"] .restore-clean-action label {
    white-space: normal !important;
  }
}

/* Safety: old restore CSS must not compress new clean layout */
.settings-tab-panel[data-panel="restore"] .restore-clean-card .restore-clean-grid > * {
  flex: initial !important;
}


/* =========================================================
   RESTORE FILTER - TRUE RESPONSIVE FINAL OVERRIDE
   Uses available card width, not browser width.
   ========================================================= */

.settings-tab-panel[data-panel="restore"] .restore-clean-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  padding: 14px !important;
  border-radius: 22px !important;
  box-sizing: border-box !important;
}

.settings-tab-panel[data-panel="restore"] .restore-clean-filter-form {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Key fix: auto-fit based on actual available width */
.settings-tab-panel[data-panel="restore"] .restore-clean-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)) !important;
  gap: 12px !important;
  align-items: end !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Remove all old forced spans/sizes */
.settings-tab-panel[data-panel="restore"] .restore-clean-grid > *,
.settings-tab-panel[data-panel="restore"] .restore-clean-client,
.settings-tab-panel[data-panel="restore"] .restore-clean-module,
.settings-tab-panel[data-panel="restore"] .restore-clean-search,
.settings-tab-panel[data-panel="restore"] .restore-clean-date,
.settings-tab-panel[data-panel="restore"] .restore-clean-show,
.settings-tab-panel[data-panel="restore"] .restore-clean-action {
  grid-column: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Labels: smaller, stable, no overlap */
.settings-tab-panel[data-panel="restore"] .restore-clean-field label,
.settings-tab-panel[data-panel="restore"] .restore-clean-action label {
  display: block !important;
  position: static !important;
  margin: 0 0 6px 0 !important;
  padding: 0 !important;
  color: #24324a !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Inputs/selects: smaller, not zoomed */
.settings-tab-panel[data-panel="restore"] .restore-clean-field input,
.settings-tab-panel[data-panel="restore"] .restore-clean-field select {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 46px !important;
  min-height: 46px !important;
  padding: 0 12px !important;
  border-radius: 14px !important;
  border: 1px solid #dbe5f0 !important;
  background: #fff !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Date inputs need less padding so icon/text fit */
.settings-tab-panel[data-panel="restore"] .restore-clean-date input[type="date"] {
  padding-left: 10px !important;
  padding-right: 8px !important;
  font-size: 12px !important;
}

/* Show field can be compact but must not break */
.settings-tab-panel[data-panel="restore"] .restore-clean-show {
  max-width: 100% !important;
}

/* Button always visible, never outside */
.settings-tab-panel[data-panel="restore"] .restore-clean-action .btn,
.settings-tab-panel[data-panel="restore"] .restore-clean-action button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 46px !important;
  min-height: 46px !important;
  padding: 0 14px !important;
  border-radius: 14px !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* When card becomes narrow, use two columns */
@media (max-width: 900px) {
  .settings-tab-panel[data-panel="restore"] .restore-clean-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .settings-tab-panel[data-panel="restore"] .restore-clean-search,
  .settings-tab-panel[data-panel="restore"] .restore-clean-action {
    grid-column: 1 / -1 !important;
  }
}

/* Mobile: one by one */
@media (max-width: 580px) {
  .settings-tab-panel[data-panel="restore"] .restore-clean-card {
    padding: 12px !important;
  }

  .settings-tab-panel[data-panel="restore"] .restore-clean-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .settings-tab-panel[data-panel="restore"] .restore-clean-search,
  .settings-tab-panel[data-panel="restore"] .restore-clean-action {
    grid-column: auto !important;
  }

  .settings-tab-panel[data-panel="restore"] .restore-clean-field label,
  .settings-tab-panel[data-panel="restore"] .restore-clean-action label {
    white-space: normal !important;
  }
}

/* Extra safety: no horizontal overflow in settings content */
.settings-pro-content,
.settings-pro-card,
.settings-tab-panel[data-panel="restore"],
.settings-tab-panel[data-panel="restore"] * {
  box-sizing: border-box !important;
}

.settings-pro-content,
.settings-pro-card,
.settings-tab-panel[data-panel="restore"] {
  max-width: 100% !important;
  min-width: 0 !important;
}


/* =========================================================
   SETTINGS LOGS PRO DETAILS
   ========================================================= */

.settings-log-item-pro {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: flex-start !important;
}

.settings-log-main {
  min-width: 0;
}

.settings-log-main strong {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.settings-log-main small {
  display: block !important;
  margin-top: 4px !important;
  color: #64748b !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  word-break: break-word !important;
}

.settings-log-main small b {
  color: #334155;
  font-weight: 950;
}

.log-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .05em;
}

.settings-log-time {
  white-space: nowrap;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 780px) {
  .settings-log-item-pro {
    grid-template-columns: 1fr !important;
  }

  .settings-log-time {
    white-space: normal;
  }
}


/* =========================================================
   LOGS FINAL PRO
   ========================================================= */

.logs-head-pro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.logs-head-pro form {
  margin: 0;
}

.settings-log-item-pro {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: flex-start !important;
}

.settings-log-main {
  min-width: 0;
}

.settings-log-main strong {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.settings-log-main small {
  display: block !important;
  margin-top: 4px !important;
  color: #64748b !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  word-break: break-word !important;
}

.settings-log-main small b {
  color: #334155;
  font-weight: 950;
}

.log-danger,
.log-restore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .05em;
}

.log-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.log-restore {
  background: #dcfce7;
  color: #15803d;
}

.settings-log-time {
  white-space: nowrap;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 780px) {
  .logs-head-pro,
  .settings-log-item-pro {
    grid-template-columns: 1fr !important;
    flex-direction: column;
  }

  .logs-head-pro .btn,
  .logs-head-pro form {
    width: 100%;
  }

  .settings-log-time {
    white-space: normal;
  }
}


/* =========================================================
   LOGS DETAILS FINAL FORCE
   ========================================================= */

.log-details-box {
  margin-top: 10px !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  overflow: hidden !important;
}

.log-details-box summary {
  cursor: pointer !important;
  padding: 11px 13px !important;
  color: #2563eb !important;
  font-weight: 950 !important;
  background: #f8fbff !important;
}

.log-details-box[open] summary {
  border-bottom: 1px solid #e2e8f0 !important;
}

.log-details-grid {
  padding: 12px !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.log-details-grid > div {
  min-width: 0 !important;
  padding: 10px !important;
  border-radius: 14px !important;
  background: #f8fbff !important;
  border: 1px solid #e2e8f0 !important;
}

.log-details-grid b {
  display: block !important;
  margin-bottom: 5px !important;
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
}

.log-details-grid span {
  display: block !important;
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  word-break: break-word !important;
}

.log-metadata-raw {
  padding: 12px !important;
  border-top: 1px solid #e2e8f0 !important;
  display: grid !important;
  gap: 8px !important;
}

.log-metadata-raw > b {
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
}

.log-metadata-raw div {
  display: grid !important;
  grid-template-columns: 170px minmax(0, 1fr) !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  background: #f8fbff !important;
}

.log-metadata-raw span {
  color: #475569 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  word-break: break-word !important;
}

.log-metadata-raw code {
  color: #0f172a !important;
  font-size: 12px !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

@media (max-width: 1100px) {
  .log-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  .log-details-grid,
  .log-metadata-raw div {
    grid-template-columns: 1fr !important;
  }
}


/* =========================================================
   LOGS PRO CONTROL CENTER FINAL
   ========================================================= */

.logs-pro-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.logs-pro-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.logs-pro-head-actions form {
  margin: 0;
}

.logs-pro-filter {
  margin: 0 0 16px 0;
  padding: 16px;
  border-radius: 24px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
}

.logs-pro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
  align-items: end;
}

.logs-pro-grid > * {
  min-width: 0;
}

.logs-pro-grid label {
  display: block;
  margin-bottom: 7px;
  color: #24324a;
  font-size: 13px;
  font-weight: 950;
}

.logs-pro-grid input,
.logs-pro-grid select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid #dbe5f0;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  box-sizing: border-box;
}

.logs-pro-search {
  grid-column: span 2;
}

.logs-pro-action .btn {
  width: 100%;
  height: 46px;
  border-radius: 14px;
}

.logs-pro-results {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #eef4ff;
  color: #334155;
  font-weight: 850;
}

.logs-pro-results strong {
  color: #2563eb;
}

.log-add,
.log-edit,
.log-danger,
.log-restore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .05em;
}

.log-add {
  background: #dcfce7;
  color: #15803d;
}

.log-edit {
  background: #e0e7ff;
  color: #4338ca;
}

.log-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.log-restore {
  background: #fef3c7;
  color: #92400e;
}

.logs-pagination {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .logs-pro-head {
    flex-direction: column;
  }

  .logs-pro-head-actions,
  .logs-pro-head-actions .btn,
  .logs-pro-head-actions form {
    width: 100%;
  }

  .logs-pro-search,
  .logs-pro-action {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .logs-pro-filter {
    padding: 12px;
    border-radius: 20px;
  }

  .logs-pro-grid {
    grid-template-columns: 1fr;
  }

  .logs-pro-search,
  .logs-pro-action {
    grid-column: auto;
  }

  .logs-pro-results {
    align-items: stretch;
  }

  .logs-pro-results .btn {
    width: 100%;
  }
}


/* =========================================================
   SETTINGS LOGS REDIRECT CARD
   ========================================================= */

.settings-logs-redirect-card {
  min-height: 300px;
  display: flex;
  align-items: center;
}

.settings-logs-redirect-content {
  max-width: 760px;
}

.settings-logs-redirect-content h2 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.settings-logs-redirect-content p {
  font-size: 17px;
  line-height: 1.55;
}

.settings-logs-redirect-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.settings-logs-redirect-actions form {
  margin: 0;
}

@media (max-width: 720px) {
  .settings-logs-redirect-actions,
  .settings-logs-redirect-actions .btn,
  .settings-logs-redirect-actions form {
    width: 100%;
  }
}


/* =========================================================
   SETTINGS > LOGS FINAL FILTERS
   ========================================================= */

.settings-logs-head-final {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.settings-logs-actions-final {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-logs-actions-final form {
  margin: 0;
}

.settings-logs-filter-final {
  margin: 0 0 16px 0;
  padding: 16px;
  border-radius: 24px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
}

.settings-logs-grid-final {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
  align-items: end;
}

.settings-logs-grid-final > * {
  min-width: 0;
}

.settings-logs-grid-final label {
  display: block;
  margin-bottom: 7px;
  color: #24324a;
  font-size: 13px;
  font-weight: 950;
}

.settings-logs-grid-final input,
.settings-logs-grid-final select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid #dbe5f0;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  box-sizing: border-box;
}

.settings-logs-search-final {
  grid-column: span 2;
}

.settings-logs-filter-action-final .btn {
  width: 100%;
  height: 46px;
  border-radius: 14px;
}

.settings-logs-results-final {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #eef4ff;
  color: #334155;
  font-weight: 850;
}

.settings-logs-results-final strong {
  color: #2563eb;
}

.log-add,
.log-edit,
.log-danger,
.log-restore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .05em;
}

.log-add {
  background: #dcfce7;
  color: #15803d;
}

.log-edit {
  background: #e0e7ff;
  color: #4338ca;
}

.log-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.log-restore {
  background: #fef3c7;
  color: #92400e;
}

.logs-pagination {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .settings-logs-head-final {
    flex-direction: column;
  }

  .settings-logs-actions-final,
  .settings-logs-actions-final .btn,
  .settings-logs-actions-final form {
    width: 100%;
  }

  .settings-logs-search-final,
  .settings-logs-filter-action-final {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .settings-logs-filter-final {
    padding: 12px;
    border-radius: 20px;
  }

  .settings-logs-grid-final {
    grid-template-columns: 1fr;
  }

  .settings-logs-search-final,
  .settings-logs-filter-action-final {
    grid-column: auto;
  }

  .settings-logs-results-final .btn {
    width: 100%;
  }
}


/* =========================================================
   SETTINGS > LOGS FORCE REAL
   ========================================================= */

.settings-logs-head-final {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.settings-logs-actions-final {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-logs-actions-final form {
  margin: 0;
}

.settings-logs-filter-final {
  margin: 0 0 16px 0;
  padding: 16px;
  border-radius: 24px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
}

.settings-logs-grid-final {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
  align-items: end;
}

.settings-logs-grid-final > * {
  min-width: 0;
}

.settings-logs-grid-final label {
  display: block;
  margin-bottom: 7px;
  color: #24324a;
  font-size: 13px;
  font-weight: 950;
}

.settings-logs-grid-final input,
.settings-logs-grid-final select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid #dbe5f0;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  box-sizing: border-box;
}

.settings-logs-search-final {
  grid-column: span 2;
}

.settings-logs-filter-action-final .btn {
  width: 100%;
  height: 46px;
  border-radius: 14px;
}

.settings-logs-results-final {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #eef4ff;
  color: #334155;
  font-weight: 850;
}

.settings-logs-results-final strong {
  color: #2563eb;
}

.log-add,
.log-edit,
.log-danger,
.log-restore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .05em;
}

.log-add {
  background: #dcfce7;
  color: #15803d;
}

.log-edit {
  background: #e0e7ff;
  color: #4338ca;
}

.log-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.log-restore {
  background: #fef3c7;
  color: #92400e;
}

@media (max-width: 900px) {
  .settings-logs-head-final {
    flex-direction: column;
  }

  .settings-logs-actions-final,
  .settings-logs-actions-final .btn,
  .settings-logs-actions-final form {
    width: 100%;
  }

  .settings-logs-search-final,
  .settings-logs-filter-action-final {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .settings-logs-filter-final {
    padding: 12px;
    border-radius: 20px;
  }

  .settings-logs-grid-final {
    grid-template-columns: 1fr;
  }

  .settings-logs-search-final,
  .settings-logs-filter-action-final {
    grid-column: auto;
  }

  .settings-logs-results-final .btn {
    width: 100%;
  }
}


/* =========================================================
   SETTINGS > LOGS REAL FINAL
   ========================================================= */

.settings-logs-head-final {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.settings-logs-actions-final {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-logs-actions-final form {
  margin: 0;
}

.settings-logs-filter-final {
  margin: 0 0 16px 0;
  padding: 16px;
  border-radius: 24px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
}

.settings-logs-grid-final {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
  align-items: end;
}

.settings-logs-grid-final > * {
  min-width: 0;
}

.settings-logs-grid-final label {
  display: block;
  margin-bottom: 7px;
  color: #24324a;
  font-size: 13px;
  font-weight: 950;
}

.settings-logs-grid-final input,
.settings-logs-grid-final select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid #dbe5f0;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  box-sizing: border-box;
}

.settings-logs-search-final {
  grid-column: span 2;
}

.settings-logs-filter-action-final .btn {
  width: 100%;
  height: 46px;
  border-radius: 14px;
}

.settings-logs-results-final {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #eef4ff;
  color: #334155;
  font-weight: 850;
}

.settings-logs-results-final strong {
  color: #2563eb;
}

.log-add,
.log-edit,
.log-danger,
.log-restore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .05em;
}

.log-add {
  background: #dcfce7;
  color: #15803d;
}

.log-edit {
  background: #e0e7ff;
  color: #4338ca;
}

.log-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.log-restore {
  background: #fef3c7;
  color: #92400e;
}

@media (max-width: 900px) {
  .settings-logs-head-final {
    flex-direction: column;
  }

  .settings-logs-actions-final,
  .settings-logs-actions-final .btn,
  .settings-logs-actions-final form {
    width: 100%;
  }

  .settings-logs-search-final,
  .settings-logs-filter-action-final {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .settings-logs-filter-final {
    padding: 12px;
    border-radius: 20px;
  }

  .settings-logs-grid-final {
    grid-template-columns: 1fr;
  }

  .settings-logs-search-final,
  .settings-logs-filter-action-final {
    grid-column: auto;
  }
}


/* =========================================================
   INBOX CHAT SYSTEM
   ========================================================= */

.nav-inbox-link {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.nav-inbox-icon {
  font-size: 15px;
  line-height: 1;
}

.nav-unread-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(239, 68, 68, .28);
}

.inbox-main {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, .10), transparent 34%),
    radial-gradient(circle at top left, rgba(79, 70, 229, .08), transparent 30%);
}

.inbox-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, .35fr);
  gap: 18px;
  margin-bottom: 18px;
}

.inbox-hero > div:first-child {
  padding: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #0f2147 0%, #132b59 52%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .18);
}

.inbox-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  color: #fff;
  line-height: .95;
}

.inbox-hero p {
  max-width: 720px;
  color: rgba(255,255,255,.86);
  font-size: 18px;
  margin: 0;
}

.inbox-hero-card {
  padding: 24px;
  border-radius: 34px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.inbox-hero-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.inbox-hero-card strong {
  margin: 10px 0;
  color: #2563eb;
  font-size: 36px;
  font-weight: 950;
}

.inbox-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  min-height: 620px;
}

.inbox-threads,
.inbox-chat {
  border-radius: 30px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
  min-width: 0;
}

.inbox-threads {
  padding: 16px;
}

.inbox-panel-head {
  margin-bottom: 14px;
}

.inbox-panel-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
}

.inbox-panel-head small {
  color: #64748b;
  font-weight: 800;
}

.inbox-start-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 14px;
}

.inbox-start-form select {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid #dbe5f0;
  padding: 0 12px;
  font-weight: 800;
}

.inbox-thread-list {
  display: grid;
  gap: 8px;
}

.inbox-thread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #f8fbff;
  text-decoration: none;
  color: inherit;
}

.inbox-thread.active {
  background: #eef4ff;
  border-color: #93c5fd;
}

.inbox-thread strong {
  display: block;
  color: #0f172a;
  font-weight: 950;
}

.inbox-thread small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-thread > span {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 950;
}

.inbox-chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.inbox-chat.client-full {
  grid-column: 1 / -1;
}

.inbox-chat-head {
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.inbox-chat-head span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.inbox-chat-head h2 {
  margin: 4px 0 0;
  color: #0f172a;
}

.inbox-messages {
  padding: 18px;
  overflow-y: auto;
  background: #f8fbff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-message {
  display: flex;
}

.chat-message.mine {
  justify-content: flex-end;
}

.chat-message.theirs {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: min(680px, 78%);
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.chat-message.mine .chat-bubble {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.chat-meta strong {
  font-size: 12px;
  font-weight: 950;
}

.chat-meta span {
  font-size: 11px;
  opacity: .75;
  font-weight: 800;
}

.chat-bubble p {
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.inbox-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.inbox-compose textarea {
  min-height: 54px;
  max-height: 160px;
  resize: vertical;
  border-radius: 18px;
  border: 1px solid #dbe5f0;
  padding: 14px 16px;
  font-weight: 800;
  box-sizing: border-box;
}

.inbox-compose .btn {
  height: 54px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inbox-empty-chat {
  padding: 34px;
}

@media (max-width: 1100px) {
  .inbox-hero,
  .inbox-shell {
    grid-template-columns: 1fr;
  }

  .inbox-chat.client-full {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .inbox-hero > div:first-child,
  .inbox-hero-card,
  .inbox-threads,
  .inbox-chat {
    border-radius: 24px;
  }

  .inbox-start-form,
  .inbox-compose {
    grid-template-columns: 1fr;
  }

  .chat-bubble {
    max-width: 92%;
  }

  .inbox-compose .btn {
    width: 100%;
  }
}


/* =========================================================
   NOTIFICATIONS BELL AUTO SYSTEM
   ========================================================= */

.nav-notification-link {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.nav-notification-icon {
  font-size: 15px;
  line-height: 1;
}

.nav-notification-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(239, 68, 68, .28);
}

.notifications-main {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, .10), transparent 34%),
    radial-gradient(circle at top left, rgba(79, 70, 229, .08), transparent 30%);
}

.notifications-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, .35fr);
  gap: 18px;
  margin-bottom: 18px;
}

.notifications-hero > div:first-child {
  padding: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #0f2147 0%, #132b59 52%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .18);
}

.notifications-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  color: #fff;
  line-height: .95;
}

.notifications-hero p {
  max-width: 720px;
  color: rgba(255,255,255,.86);
  font-size: 18px;
  margin: 0;
}

.notifications-hero-card {
  padding: 24px;
  border-radius: 34px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.notifications-hero-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.notifications-hero-card strong {
  margin: 10px 0;
  color: #2563eb;
  font-size: 36px;
  font-weight: 950;
}

.notifications-card {
  padding: 22px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
}

.notifications-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.notifications-head h2 {
  margin: 8px 0 4px;
  font-size: 26px;
}

.notifications-head form {
  margin: 0;
}

.notifications-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border-radius: 22px;
  border: 1px solid #e2e8f0;
  background: #f8fbff;
}

.notification-item.unread {
  border-color: #93c5fd;
  background: #eef4ff;
}

.notification-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.notification-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-title-row strong {
  color: #0f172a;
  font-weight: 950;
}

.notification-title-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}

.notification-body p {
  margin: 5px 0;
  color: #475569;
  font-weight: 750;
  line-height: 1.4;
}

.notification-body small {
  color: #64748b;
  font-size: 12px;
}

.notification-body small b {
  color: #334155;
  font-weight: 950;
}

.notification-item form {
  margin: 0;
}

@media (max-width: 900px) {
  .notifications-hero {
    grid-template-columns: 1fr;
  }

  .notifications-head {
    flex-direction: column;
  }

  .notifications-head .btn,
  .notifications-head form {
    width: 100%;
  }

  .notification-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .notification-item form {
    grid-column: 1 / -1;
  }

  .notification-item .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .notifications-hero > div:first-child,
  .notifications-hero-card,
  .notifications-card {
    border-radius: 24px;
  }

  .notification-item {
    grid-template-columns: 1fr;
  }

  .notification-icon {
    width: 42px;
    height: 42px;
  }
}


/* =========================================================
   NOTIFICATIONS MENU BADGE FINAL FIX
   ========================================================= */

.nav-notification-link {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.nav-notification-icon {
  font-size: 15px !important;
  line-height: 1 !important;
}

.nav-notification-badge {
  margin-left: auto !important;
  min-width: 20px !important;
  height: 20px !important;
  padding: 0 6px !important;
  border-radius: 999px !important;
  background: #ef4444 !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  box-shadow: 0 8px 18px rgba(239, 68, 68, .28) !important;
}

.nav-notification-link.active .nav-notification-badge {
  background: #dc2626 !important;
  color: #fff !important;
}

