/* ========== ZÁKLAD – DARK PALETA & TYPOGRAFIA (ADS) ========== */

:root {
  --ads-bg:            #020617;
  --ads-bg-alt:        #02081f;
  --ads-card-bg:       #111827;
  --ads-border-soft:   #1f2937;
  --ads-border-strong: #374151;

  --ads-text-main:     #e5e7eb;
  --ads-text-muted:    #9ca3af;
  --ads-text-soft:     #6b7280;

  --ads-primary:       #1d8cf8;
  --ads-primary-dark:  #1b6dd8;
  --ads-primary-soft:  rgba(29, 140, 248, 0.16);

  --ads-accent:        #f97316;
  --ads-danger:        #ef4444;
  --ads-success:       #22c55e;

  --ads-radius-sm:     4px;
  --ads-radius-md:     6px;
  --ads-radius-lg:     8px;

  --ads-shadow-soft:   0 20px 40px rgba(15, 23, 42, 0.85);
  --ads-shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.8);

  --top-menu-height:   52px;
}

body {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--ads-bg);
  color: var(--ads-text-main);
  overflow-x: hidden; /* zabránime horizontálnemu scrollu celej stránky */
}

/*==========================
  LOADER / PROCESS OVERLAY
===========================*/

/* Celoplošný tmavý overlay */
.process-box {
  position: fixed;
  inset: 0;
  z-index: 9990;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  display: none;
  text-align: center;
}

/* Text vo vnútri loadera */
.process-box div {
  color: #ffffff !important;
  font-size: 20px;
  margin-top: 250px;
  position: relative;
  z-index: 9991;
}

.ajax-box-loader {
  position:fixed;
  top:0; left:0; z-index:9980; width:100%; height:100%;
  background:rgba(255,255,255,0.7);
  display:none;
}
.ajax-box-loader div { padding-top:300px; }

/*================================
  TOP MENU – DESKTOP + HAMBURGER
=================================*/

/* fixnutý pruh hore */
.sys-menu-cont {
  width:100%;
  height: var(--top-menu-height);
  top:0;
  position:fixed;
  z-index:9999;
  box-shadow:0 0 15px #000;
}

.sys-menu-box {
  width:99%;
  padding:0 0 0 1%;
  position:relative;
  display:flex;
  align-items:center;
}

/* skrytý checkbox pre hamburger */
.nav-toggle {
  position: absolute;
  left: -9999px;
}

/* default: hamburger neukazujeme na desktopoch */
.nav-toggle-label {
  display: none;
}

/* tri čiarky v labeli */
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  position: relative;
  transition: transform .15s ease, opacity .15s ease;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-label span::before { top: -6px; }
.nav-toggle-label span::after  { top:  6px; }

/* mobilný režim */
@media (max-width: 768px) {
  /* ukáž hamburger v ľavom rohu baru */
  .nav-toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-left: 6px;
    cursor: pointer;
    z-index: 10000;
  }

  /* menu bude defaultne schované a zvislé */
  ul#navmenu-h {
    position: fixed;
    top: 50px;         /* výška horného baru */
    left: 0;
    right: 0;
    height: auto;
    flex-direction: column;
    background: #020617;
    border-bottom: 1px solid #1f2937;
    display: none;
  }

  ul#navmenu-h > li {
    float: none;
    width: 100%;
  }

  ul#navmenu-h > li > a {
    height: 44px;
    padding: 0 16px;
  }

  /* keď je nav-toggle CHECKED → menu sa zobrazí */
  .nav-toggle:checked + .nav-toggle-label + #navmenu-h {
    display: flex;
  }
}

/* Hlavný UL – desktop layout */
ul#navmenu-h {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  height: var(--top-menu-height);
  background: #020617;
  border-bottom: 1px solid #1f2937;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
  width: 100%;
}

/* reset submenu */
ul#navmenu-h ul {
  margin: 0;
  padding: 6px 0;
  list-style: none;
  display: none;
  position: absolute;
  top: var(--top-menu-height);
  left: 0;
  width: 240px;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0,0,0,.65);
}

/* 3. úroveň */
ul#navmenu-h ul ul {
  top: 0;
  left: 100%;
  border-radius: 8px;
}

/* root položky */
ul#navmenu-h li {
  float: left;
  position: relative;
}

/* položky submenu */
ul#navmenu-h ul li {
  width: 100%;
  padding: 0;
}

/* root odkazy */
ul#navmenu-h > li > a {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--top-menu-height);
  padding: 0 20px;
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

/* ikonky v menu */
ul#navmenu-h a img {
  width: 26px;
  height: 26px;
  opacity: .88;
}

/* submenu odkazy */
ul#navmenu-h ul li a {
  display: block;
  padding: 6px 18px 6px 34px;
  font-size: 13px;
  color: #cbd5e1;
  text-decoration: none;
  line-height: 28px;
  transition: background .12s ease, color .12s ease;
}

/* root hover */
ul#navmenu-h > li:hover > a {
  background: #0b1120;
  color: #f9fafb;
}

/* submenu default */
ul#navmenu-h li:hover li a {
  background: transparent;
  color: #cbd5e1;
}

/* submenu hover */
ul#navmenu-h li:hover li a:hover {
  background: #1e293b;
  color: #f9fafb;
}

/* sub-submenu hover */
ul#navmenu-h ul ul li a:hover {
  background: #1d4ed8;
  color: #f0f9ff;
}

/* šedé texty v submenu */
ul#navmenu-h ul li a span {
  color: #6b7280;
}
ul#navmenu-h ul li a:hover span {
  color: #f9fafb;
}

/* zobrazovanie submenu */
ul#navmenu-h li:hover > ul,
ul#navmenu-h ul li:hover > ul {
  display: block;
}

/* pravé uzamykanie (logout) */
ul#navmenu-h li.last {
  margin-left: auto;
  padding-right: 20px;
}

/* admin špeciál */
ul#navmenu-h .admin a {
  background: #1f2937 !important;
  color: #f9fafb !important;
}

/* lepší mobil + tablet – hamburger */
@media (max-width: 992px) {

  .sys-menu-cont {
    height: var(--top-menu-height);
    padding: 0;
  }

  .sys-menu-box {
    padding: 0 8px;
  }

  /* viditeľný hamburger */
  .nav-toggle-label {
    display:flex;
  }

  /* menu je default skryté, zobrazí sa pri checked */
  ul#navmenu-h {
    position: absolute;
    top: var(--top-menu-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    height: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,.7);
    border-bottom: 1px solid #1f2937;
    display: none;
  }

  .nav-toggle:checked + .nav-toggle-label + ul#navmenu-h {
    display:flex;
  }

  ul#navmenu-h > li {
    width: 100%;
  }

  ul#navmenu-h > li > a {
    height: 44px;
    padding: 0 16px;
    justify-content: flex-start;
    border-bottom: 1px solid #1f2937;
  }

  /* submenu v mobile */
  ul#navmenu-h ul {
    position: static;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    border: 0;
    background:#020617;
  }

  ul#navmenu-h ul li a {
    padding-left: 32px;
    border-bottom: 1px solid #111827;
  }
}

/* ešte kompaktnejší fallback pre úzky mobil */
@media (max-width: 480px) {
  ul#navmenu-h > li > a {
    font-size: 13px;
    padding: 0 14px;
  }
}

/* Reset pár starých vecí v rámci ADS */
.ads-page img {
  max-width: 100%;
  height: auto;
  border: 0;
}

/* ========== ZÁKLADNÁ STRÁNKOVÁ ŠTRUKTÚRA ========== */

.ads-page {
  padding-top: calc(var(--top-menu-height) + 18px);
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 40px;
}

.ads-page-content {
  margin-top: 16px;
}

/* Hlavička stránky (nadpis + akcie) */
.ads-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.ads-page-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: var(--ads-text-main);
}

.ads-page-title img {
  width: 32px;
  height: 32px;
}

.ads-page-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Základ všetkých odkazov v ADS */
.ads-page a,
.ads-page a:visited {
    color: #3b82f6 !important;       /* jednotná modrá */
    text-decoration: none !important;
}

/* Hover efekt */
.ads-page a:hover {
    color: #60a5fa !important;       /* svetlejšia modrá */
    text-decoration: underline;
}

/* Špeciálne v tabuľkách, kde sa text láme */
.ads-table a {
    color: #3b82f6 !important;
}

.ads-table a:hover {
    color: #60a5fa !important;
}

.ads-mini-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ads-mini-chart-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ads-mini-chart-label {
  font-size: 11px;
  color: #6b7280;
  word-break: break-all;
}

.ads-mini-chart-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ads-mini-chart-bar {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #03a9f4, #0f766e);
  max-width: 100%;
}

.ads-mini-chart-value {
  font-size: 11px;
  color: #111827;
  min-width: 24px;
  text-align: right;
}

/* ========== KARTY (CARD) ========== */

.ads-card {
  background: var(--ads-card-bg);
  border-radius: var(--ads-radius-md);
  border: 1px solid var(--ads-border-soft);
  box-shadow: var(--ads-shadow-subtle);
}

.ads-card-body {
  padding: 16px 18px;
}

.ads-card-footer {
  padding: 10px 18px 14px;
  border-top: 1px solid var(--ads-border-soft);
  display: flex;
  justify-content: flex-end;
}

/* špeciálne center card */
.ads-card--center {
  max-width: 640px;
  margin: 80px auto 0;
}

/* ========== DASHBOARD / KPI DLAŽDICE ========== */

.ads-dashboard {
  margin-bottom: 24px;
}

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

.ads-kpi-card {
  padding: 16px 18px;
  background: #020617;
  border-radius: var(--ads-radius-md);
  border: 1px solid var(--ads-border-soft);
  box-shadow: var(--ads-shadow-soft);
}

.ads-kpi-label {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ads-text-soft);
  margin-bottom: 6px;
}

.ads-kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ads-primary);
  margin-bottom: 4px;
}

.ads-kpi-subtitle {
  font-size: 14px;
  color: var(--ads-text-muted);
}

/* split KPI (odoslané / neodoslané) */
.ads-kpi-split {
  padding: 14px 16px;
}

.ads-kpi-split-row {
  display: flex;
  align-items: stretch;
  border-radius: var(--ads-radius-sm);
  overflow: hidden;
  border: 1px solid var(--ads-border-soft);
  margin-bottom: 6px;
  background: #020617;
}

.ads-kpi-split-item {
  flex: 1;
  padding: 10px 12px;
  background: #02081f;
}

.ads-kpi-split-divider {
  width: 1px;
  background: #1f2937;
}

.ads-kpi-small-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ads-text-soft);
}

.ads-kpi-small-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--ads-text-main);
}

.ads-dashboard-section {
  margin-top: 24px;
}

.ads-section-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.ads-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ads-text-main);
}

.ads-section-note {
  font-size: 14px;
  color: var(--ads-text-muted);
}

/* Aktivita (posledné záujmy) */
.ads-activity-card {
  padding: 10px 12px;
}

.ads-activity-row {
  padding: 8px 0;
  border-bottom: 1px solid #1f2937;
}

.ads-activity-row:last-child {
  border-bottom: 0;
}

.ads-activity-meta {
  font-size: 14px;
  margin-bottom: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ads-activity-date {
  color: var(--ads-primary);
  font-weight: 500;
}

.ads-activity-email {
  color: var(--ads-text-main);
  font-weight: 500;
}

.ads-activity-campaign {
  color: var(--ads-accent);
}

.ads-activity-link {
  font-size: 14px;
  color: var(--ads-text-muted);
  word-break: break-all;
}

.ads-email-link,
.ads-email-link:visited {
  color: #4da3ff !important;
  text-decoration: none;
}

/* ========== DataTables wrapper ========== */

.dataTables_wrapper {
  margin-top: 8px;
}

.dataTables_wrapper .dataTables_length {
  float: left;
  margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_filter {
  float: right;
  margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_filter label {
  white-space: nowrap;
}

.dataTables_wrapper .dataTables_filter input[type="search"] {
  margin-left: 6px;
}

/* Na mobile nech to padne pod seba */
@media (max-width: 768px) {
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    float: none;
    text-align: left;
  }

  .dataTables_wrapper .dataTables_filter {
    margin-top: 8px;
  }
}

/* ========== TABUĽKY (EMAILY, REKLAMY, LINKY, FRONTA...) ========== */

/* wrapper pre tabuľky – horizontálny scroll iba vo vnútri */
.ads-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--ads-bg);
}

.ads-table thead {
  background: #020617;
}

.ads-table thead th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  color: var(--ads-text-main);
  border-bottom: 1px solid var(--ads-border-soft);
  white-space: nowrap;
}

.ads-table tbody td,
.ads-table tbody th {
  padding: 8px 10px;
  border-bottom: 1px solid #111827;
  color: var(--ads-text-main);
  vertical-align: middle;
}

.ads-table tbody tr {
  background: #020617;
}

.ads-table tbody tr:nth-child(even) {
  background: #02081f;
}

.ads-table tbody tr:hover {
  background: #0b1120;
}

/* stĺpce – len jemné šírky / zarovnanie */
.ads-table .col-select {
  width: 32px;
  text-align: center;
}

.ads-table .col-email,
.ads-table .col-name {
  min-width: 160px;
}

.ads-table .col-change {
  min-width: 170px;
}

.ads-table .col-unsub {
  min-width: 120px;
}

.ads-table .col-action {
  width: 40px;
  text-align: center;
}

/* checkboxy v tabuľkách */
.ads-table input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

/* ===========================================
   HLAVIČKA MESIACA / SKUPINOVACÍ RIADOK
   =========================================== */

.ads-table-group,
.ads-table-group td,
.ads-month-row td {
  padding: 6px 10px;
  background-color: #020617;
  border-top: 1px solid #1f2937;
  border-bottom: 1px solid #1f2937;
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

.ads-table-group-label {
  opacity: .9;
}

/* ===========================================
   FILTER MESIACA NAD TABUĽKOU
   =========================================== */

.ads-filter-select {
  background-color: #111827;
  color: #e5e7eb;
  border: 1px solid #4b5563;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
}

.ads-filter-select option {
  background-color: #111827;
  color: #e5e7eb;
}

/* ===========================================
   ZÁKLADNÝ VZHĽAD RIADKU V TABUĽKE
   =========================================== */

.ads-table tbody tr td {
  background-color: #020617;
  transition: background-color .12s ease, filter .12s ease;
}

/* jemný hover pre všetky riadky */
.ads-table tbody tr:hover td {
  filter: brightness(1.05);
}

/* ===========================================
   FAREBNÉ ŠABLÓNY – TENKÝ PRUH + JEMNÝ NÁDYCH
   =========================================== */

/* spoločné pre všetky TPL riadky */
   .ads-table tbody tr[class*="ads-row-tpl-"] td {
     position: relative;
     background-color: #020617 !important;
   }
   
   /* tenký farebný pruh len v prvom stĺpci */
   .ads-table tbody tr[class*="ads-row-tpl-"] td:first-child {
     border-left-width: 3px !important;
     border-left-style: solid !important;
   }
   
   /* jemný gradient – trochu širší a výraznejší */
   .ads-table tbody tr[class*="ads-row-tpl-"] td::before {
     content: "";
     position: absolute;
     left: 0;
     top: 0;
     width: 12%;              /* bolo 6% – teraz šíršie */
     height: 100%;
     pointer-events: none;
     opacity: 0.30;           /* bolo ~0.18 – teraz viditeľnejšie */
   }
   
   /* ========== TPL 1 – modrý nádych ========== */
   .ads-row-tpl-01 td:first-child {
     border-left-color: #38bdf8;
   }
   .ads-row-tpl-01 td::before {
     background: linear-gradient(90deg, #38bdf8, transparent);
   }
   
   /* ========== TPL 2 – žltý nádych ========== */
   .ads-row-tpl-02 td:first-child {
     border-left-color: #eab308;
   }
   .ads-row-tpl-02 td::before {
     background: linear-gradient(90deg, #eab308, transparent);
   }
   
   /* ========== TPL 3 – zelený nádych ========== */
   .ads-row-tpl-03 td:first-child {
     border-left-color: #22c55e;
   }
   .ads-row-tpl-03 td::before {
     background: linear-gradient(90deg, #22c55e, transparent);
   }
   
   /* ========== TPL 4 – fialový nádych ========== */
   .ads-row-tpl-04 td:first-child {
     border-left-color: #8b5cf6;
   }
   .ads-row-tpl-04 td::before {
     background: linear-gradient(90deg, #8b5cf6, transparent);
   }
   
   /* ========== TPL 5 – ružový nádych ========== */
   .ads-row-tpl-05 td:first-child {
     border-left-color: #ec4899;
   }
   .ads-row-tpl-05 td::before {
     background: linear-gradient(90deg, #ec4899, transparent);
   }
   
   /* ========== TPL 6 – oranžový nádych ========== */
   .ads-row-tpl-06 td:first-child {
     border-left-color: #f97316;
   }
   .ads-row-tpl-06 td::before {
     background: linear-gradient(90deg, #f97316, transparent);
   }
/* na úzkych zariadeniach nech sa radšej scrolluje */
@media (max-width: 768px) {
  .ads-table {
    min-width: 700px;
  }

  .ads-card-body {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* stav "žiadne záznamy" */
.ads-empty,
.ads-empty-state {
  padding: 18px 12px;
  font-size: 13px;
  color: var(--ads-text-muted);
}

/* ========== FORMULÁRE (NOVÝ EMAIL, NOVÁ REKLAMA, IMPORT, MÔJ ÚČET...) ========== */

.ads-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(230px, 0.9fr);
  gap: 24px;
}

.ads-form-main {
  min-width: 0;
}

.ads-form-side {
  min-width: 0;
}

.ads-form-group {
  margin-bottom: 14px;
}

.ads-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ads-text-soft);
  margin-bottom: 4px;
}

/* základné inputy/selecty/textarea – dark ADS štýl */
.ads-input,
.ads-select,
.ads-textarea {
  width: 100%;
  font-size: 13px;
  border-radius: var(--ads-radius-sm);
  border: 1px solid var(--ads-border-soft);
  padding: 7px 9px;
  background: #020617;
  color: var(--ads-text-main);
  box-sizing: border-box;
}

.ads-input:focus,
.ads-select:focus,
.ads-textarea:focus {
  outline: 0;
  border-color: var(--ads-primary);
  box-shadow: 0 0 0 1px rgba(29, 140, 248, 0.35);
}

/* placeholder */
.ads-input::placeholder,
.ads-textarea::placeholder {
  color: var(--ads-text-soft);
}

/* textarea */
.ads-textarea {
  min-height: 120px;
  resize: vertical;
}

/* 2 stĺpcový riadok */
.ads-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.ads-form-col {
  flex: 1;
  min-width: 0;
}

/* pravý bočný panel so sumármi */
.ads-metric-box {
  background: #020617;
  border-radius: var(--ads-radius-md);
  padding: 12px 14px;
  border: 1px solid rgba(29, 140, 248, 0.35);
  margin-bottom: 10px;
  box-shadow: var(--ads-shadow-subtle);
}

.ads-metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ads-text-soft);
  margin-bottom: 4px;
}

.ads-metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ads-primary);
  line-height: 1.1;
  margin-bottom: 2px;
}

.ads-metric-sub {
  font-size: 11px;
  color: var(--ads-text-muted);
}

.ads-side-note {
  font-size: 12px;
  color: var(--ads-text-muted);
}

/* footer formulára – tlačidlá vpravo */
.ads-form-footer {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--ads-border-soft);
  display: flex;
  justify-content: flex-end;
}

/* staré .label, .input-submit – zjednotené do dark štýlu */
.label {
  font-size: 12px;
  color: var(--ads-text-soft);
  margin-bottom: 4px;
}

.input-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--ads-radius-sm);
  border: 1px solid var(--ads-primary);
  background: var(--ads-primary);
  color: #ffffff;
  cursor: pointer;
}

.input-submit:hover {
  background: var(--ads-primary-dark);
  border-color: var(--ads-primary-dark);
}

/* ========== TLAČIDLÁ ========== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--ads-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}

.btn i {
  margin-right: 6px;
}

.btn-primary {
  background: var(--ads-primary);
  border-color: var(--ads-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--ads-primary-dark);
  border-color: var(--ads-primary-dark);
}

.btn-secondary {
  background: #374151;
  border-color: #374151;
  color: #ffffff;
}

.btn-secondary:hover {
  background: #111827;
  border-color: #111827;
}

/* malé pomocné */
.text-center {
  text-align: center;
}

/* ========== LOGIN / FORGOT PASSWORD (ADS) ========== */

/* Celá login stránka – centrovanie a pozadie */
.ads-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, #0ea5e9 0, #020617 45%) fixed;
}

/* wrapper */
.ads-auth-wrapper {
  width: 100%;
  max-width: 880px;
  padding: 24px;
}

/* dvojstĺpcové rozloženie */
.ads-auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.7);
}

/* ľavá strana – info */
.ads-auth-side-info {
  padding: 32px 28px;
  background: linear-gradient(145deg, #0ea5e9 0, #0369a1 45%, #020617 100%);
  color: #e5f3ff;
}

.ads-auth-side-info h1 {
  font-size: 26px;
  margin: 0 0 8px;
  color: #f9fafb;
}

.ads-auth-side-info p {
  margin: 0 0 6px;
  font-size: 13px;
}

/* pravý panel – karta s formulárom */
.ads-auth-card {
  background: #020617 url("../images/page/b-logo.png") right bottom no-repeat;
  background-size: 220px auto;
  color: #e5e7eb;
  padding: 28px 30px 26px;
}

/* logo hore */
.ads-auth-logo {
  margin-bottom: 18px;
}

.ads-auth-logo img {
  height: 28px;
  width: auto;
}

/* nadpis + podnadpis */
.ads-auth-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
}

.ads-auth-subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 18px;
}

/* skupiny inputov */
.ads-auth-form-group {
  margin-bottom: 12px;
}

.ads-auth-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #9ca3af;
  margin-bottom: 4px;
}

/* inputy */
.ads-auth-input {
  width: 100%;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #1f2937;
  padding: 7px 9px;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  box-sizing: border-box;
}

.ads-auth-input::placeholder {
  color: #6b7280;
}

.ads-auth-input:focus {
  outline: 0;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.45);
}

/* riadok s "Zobraziť heslo" */
.ads-auth-checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
  margin: 4px 0 16px;
}

.ads-auth-checkbox-native {
  width: 14px;
  height: 14px;
}

/* spodok formulára – tlačidlo */
.ads-auth-footer {
  display: flex;
  justify-content: flex-end;
}

/* link na zabudnuté heslo (ľavý panel) */
.ads-auth-forgot {
  margin-top: 18px;
  font-size: 12px;
}

.ads-auth-forgot .ads-link {
  color: #f9fafb;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.ads-auth-forgot .ads-link:hover {
  color: #e0f2fe;
}

/* responzívne – na mobil stack na seba */
@media (max-width: 768px) {
  .ads-auth-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ads-auth-side-info {
    display: none; /* ak chceš, môžeš skryť info panel na mobile */
  }

  .ads-auth-card {
    padding: 24px 20px 22px;
    background-position: right 10px bottom 10px;
    background-size: 180px auto;
  }
}

/* checkbox "zobraziť heslo" */
.ads-auth-checkbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin: 6px 0 10px;
}

.ads-auth-checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.ads-auth-checkbox-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

/* primárne tlačidlo login */
.ads-auth-submit {
  margin-top: 6px;
}

.ads-auth-submit .btn-primary {
  width: 100%;
}

/* odkazy pod formulárom */
.ads-auth-links {
  margin-top: 14px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  color: #9ca3af;
}

.ads-auth-links a {
  color: #e5e7eb;
  text-decoration: none;
}

.ads-auth-links a:hover {
  text-decoration: underline;
}

/* jednoduchý unsub message */
.ads-unsub-message {
  padding: 120px 16px;
  text-align: center;
  font-size: 18px;
  color: var(--ads-text-main);
}

/* ========== TEMPLATY – GRID PREHĽAD ========== */

/* kontajner pre karty – šablóny vedľa seba */
.ads-template-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  padding: 10px 0;
}

/* samotná karta šablóny */
.ads-template-card {
  flex: 0 0 260px;
  max-width: 260px;
  border-radius: 8px;
  border: 1px solid var(--ads-border-soft);
  background: #202328;
  box-shadow: var(--ads-shadow-soft);
  padding: 14px;
  text-align: center;
}

/* náhľad šablóny */
.ads-template-thumb {
  width: 100%;
  margin-bottom: 12px;
  border-radius: 6px;
  background: #2a2f36;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ads-template-thumb img {
  width: 100%;
  height: auto;
}

/* názov / cesta / meta */
.ads-template-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
  color: #f3f4f6;
}

.ads-template-path {
  font-size: 11px;
  color: #a1a1aa;
  margin-bottom: 6px;
  word-break: break-all;
}

.ads-template-meta {
  font-size: 11px;
  color: #a1a1aa;
  margin-bottom: 10px;
}

/* tlačidlá pod šablónou */
.ads-template-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

/* jednotný základ pre ikonky (sprite 80x40) – aj v tabuľkách, aj v templatoch */
.alink,
.aedit,
.adelete,
.achart,
.aview,
.ads-icon-btn {
  width:40px;
  height:40px;
  display:inline-block;
  background-repeat:no-repeat;
  background-position:left center;
  background-size:80px 40px;
  border:none !important;
  padding:0 !important;
  margin:0 !important;
  background-color:transparent !important;
  cursor:pointer;
  opacity:0.9;
  transition: opacity .15s ease, background-position .15s ease;
}

.alink:hover,
.aedit:hover,
.adelete:hover,
.achart:hover,
.aview:hover,
.ads-icon-btn:hover {
  opacity:1;
  background-position:right center;
}

/* konkrétne ikonky – cesty k sprite obrázkom */
.alink   { background-image:url("../images/ico/link.png"); }
.aedit   { background-image:url("../images/ico/edit.png"); }
.adelete { background-image:url("../images/ico/close.png"); }
.achart  { background-image:url("../images/ico/achart.png"); }
.aview   { background-image:url("../images/ico/view.png"); }

/* v rámci templátov použijeme tie isté triedy */
.ads-template-actions a {
  /* layout templátových tlačidiel, vzhľad ikon berie z .alink/.aedit/... */
}

/* mobil – nech sú karty na celý riadok */
@media (max-width: 768px) {
  .ads-template-card {
    flex: 1 0 100%;
    max-width: 100%;
  }
}

/* ========== CODEMIRROR WRAPPER (EDITÁCIA TEMPLATU) ========== */

.ads-code-editor {
  border-radius: var(--ads-radius-md);
  border: 1px solid var(--ads-border-soft);
  overflow: hidden;
}

.CodeMirror {
  height: 520px;
  font-size: 13px;
}

/* ========== RESPONSIVE – GLOBAL ========== */

@media (max-width: 1200px) {
  .ads-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ads-template-card {
    flex: 0 0 calc(50% - 20px);
  }
}

@media (max-width: 992px) {
  .ads-form-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ads-form-side {
    order: -1;
  }

  .ads-auth-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ads-auth-side-info {
    display: none;
  }

  .ads-auth-card {
    border-radius: 18px;
  }
}

@media (max-width: 768px) {
  .ads-page {
    padding: 16px 12px 28px;
  }

  .ads-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ads-page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ads-page-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .ads-card-body,
  .ads-card-footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .ads-template-card {
    flex: 1 1 100%;
  }
}