:root {
  --navy-950: #07142f;
  --navy-900: #0b1e43;
  --navy-800: #123365;
  --navy-700: #1d4d84;
  --coral: #fe4c57;
  --orange: #ff862f;
  --green: #2c9a69;
  --blue: #2d7ff9;
  --amber: #d98b1f;
  --red: #cf4650;
  --ink: #172238;
  --muted: #66738a;
  --line: #dfe5ee;
  --surface: #ffffff;
  --canvas: #f3f6fa;
  --header-height: 64px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--navy-700); }
a:hover, a:focus { color: var(--coral); }
button, input, select, textarea { max-width: 100%; }
code { color: #bd3d57; background: #f8edf0; white-space: normal; overflow-wrap: anywhere; }
.text-muted { color: var(--muted); }
.text-error { display: block; color: var(--red); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Bootstrap 3.4.1 icon font mappings for the legacy semantic icon names. */
[class^="icon-"], [class*=" icon-"] {
  position: relative;
  top: 1px;
  display: inline-block;
  font-family: "Glyphicons Halflings";
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}
.icon-home::before { content: "\e021"; }
.icon-play::before { content: "\e072"; }
.icon-download-alt::before { content: "\e025"; }
.icon-th-list::before { content: "\e012"; }
.icon-th-large::before { content: "\e011"; }
.icon-cog::before { content: "\e019"; }
.icon-off::before { content: "\e017"; }
.icon-user::before { content: "\e008"; }
.icon-refresh::before { content: "\e031"; }
.icon-ok::before { content: "\e013"; }
.icon-time::before { content: "\e023"; }
.icon-flag::before { content: "\e034"; }
.icon-arrow-right::before { content: "\e092"; }
.icon-random::before { content: "\e110"; }
.icon-comment::before { content: "\e111"; }
.icon-file::before { content: "\e022"; }
.icon-align-left::before { content: "\e052"; }
.icon-trash::before { content: "\e020"; }
.icon-hdd::before { content: "\e121"; }
.icon-search::before { content: "\e003"; }
.icon-plus::before { content: "\e081"; }
.icon-list::before { content: "\e056"; }
.icon-list-alt::before { content: "\e032"; }
.icon-calendar::before { content: "\e109"; }
.icon-chevron-left::before { content: "\e079"; }
.icon-chevron-right::before { content: "\e080"; }
.icon-signal::before { content: "\e018"; }
.icon-wrench::before { content: "\e136"; }
.icon-shopping-cart::before { content: "\e116"; }
.icon-lock::before { content: "\e033"; }
.icon-qrcode::before { content: "\e039"; }
.icon-repeat::before { content: "\e030"; }
.icon-eye-open::before { content: "\e105"; }
.icon-share::before { content: "\e066"; }
.icon-facetime-video::before { content: "\e059"; }
.icon-film::before { content: "\e009"; }
.icon-stats::before { content: "\e185"; }
.icon-tasks::before { content: "\e137"; }
.icon-dashboard::before { content: "\e141"; }
.icon-upload::before { content: "\e027"; }
.icon-cloud-upload::before { content: "\e198"; }
.icon-minus::before { content: "\2212"; }
.icon-remove::before { content: "\e014"; }
.icon-volume-up::before { content: "\e038"; }
.icon-camera::before { content: "\e046"; }

/* Login */
.login-page {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 24px 15px;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 15%, rgba(45, 127, 249, .22), transparent 30%),
    radial-gradient(circle at 88% 78%, rgba(254, 76, 87, .18), transparent 32%),
    linear-gradient(135deg, var(--navy-950), #102956 65%, #17396c);
}
.login-page::before,
.login-page::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
}
.login-page::before { width: 420px; height: 420px; top: -220px; right: -120px; }
.login-page::after { width: 300px; height: 300px; bottom: -180px; left: -80px; }
.login-page .container { position: relative; z-index: 1; width: 100%; max-width: 470px; }
.login-column {
  float: none;
  width: 100%;
  max-width: 440px;
  margin-right: auto;
  margin-left: auto;
}
.login-box {
  margin: 0;
  padding: 26px 32px 24px;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 30px 70px rgba(0,0,0,.35);
}
.login-brand {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 138px;
  margin: -19px 0 1px;
  overflow: hidden;
}
.login-logo { display: block; width: 172px; height: auto; margin-top: -13px; }
.login-intro { margin-bottom: 18px; text-align: center; }
.login-eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--coral);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.login-title {
  margin: 0 0 6px;
  color: var(--navy-950);
  font-size: 26px;
  font-weight: 700;
  white-space: nowrap;
}
.login-intro p { max-width: 330px; margin-right: auto; margin-left: auto; }
.login-box .form-group { margin-right: 0; margin-bottom: 14px; margin-left: 0; }
.login-box .control-label { display: block; margin-bottom: 7px; text-align: left; }
.login-box .form-control,
.login-box .input-block-level {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid #cad3df;
  border-radius: 8px;
  box-shadow: none;
}
.login-box .form-control:focus,
.login-box .input-block-level:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45,127,249,.12);
}
.password-wrap { position: relative; }
.password-wrap input { padding-right: 90px !important; }
.password-toggle { position: absolute; top: 5px; right: 5px; min-width: 76px; height: 34px; }
#loginButton { width: 100%; min-height: 46px; margin-top: 2px; border-radius: 8px; }
.login-box hr { margin: 16px 0 13px; }
.login-help { margin-bottom: 0; }

@media (max-height: 680px) and (min-width: 768px) {
  .login-page { padding-top: 12px; padding-bottom: 12px; }
  .login-box { padding: 18px 30px 17px; }
  .login-brand { height: 105px; margin-top: -15px; margin-bottom: -1px; }
  .login-logo { width: 145px; margin-top: -14px; }
  .login-intro { margin-bottom: 11px; }
  .login-eyebrow { margin-bottom: 3px; font-size: 10px; }
  .login-title { font-size: 24px; }
  .login-intro p { margin-bottom: 5px; font-size: 13px; }
  .login-box .form-group { margin-bottom: 9px; }
  .login-box .control-label { margin-bottom: 4px; }
  .login-box .form-control,
  .login-box .input-block-level { height: 40px; padding-top: 8px; padding-bottom: 8px; }
  .password-toggle { top: 3px; }
  #loginButton { min-height: 42px; }
  .login-box hr { margin: 11px 0 9px; }
  .login-help { font-size: 12px; }
}

/* Header and horizontal navbar navigation */
.navbar.navbar-inverse {
  min-height: var(--header-height);
  margin: 0;
  border: 0;
  background: var(--navy-950);
  box-shadow: 0 3px 16px rgba(7,20,47,.18);
}
.navbar-inner { min-height: var(--header-height); }
.navbar .container-fluid {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--header-height);
  padding-right: 18px;
  padding-left: 18px;
}
.navbar .brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  order: 1;
  min-height: var(--header-height);
  padding: 10px 16px 10px 0;
  color: #fff;
}
.navbar-brand-icon { width: 38px; height: 38px; margin-right: 9px; object-fit: contain; }
.brand-word { font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
.brand-word > span { color: var(--coral); }
.navbar .brand small {
  margin-left: 9px;
  padding-left: 9px;
  color: #95a5bf;
  border-left: 1px solid rgba(255,255,255,.2);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.navbar .nav.pull-right {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  order: 3;
  float: right !important;
  min-height: var(--header-height);
  margin: 0 0 0 auto;
}
.navbar-inverse .nav.pull-right > li > a,
.navbar-inverse .navbar-text {
  padding: 21px 12px;
  color: #cbd5e5;
}
.navbar-inverse .nav.pull-right > li > a:hover { color: #fff; background: rgba(255,255,255,.06); }
.btn-navbar {
  display: none;
  flex: 0 0 auto;
  order: 4;
  width: 42px;
  height: 38px;
  margin: 13px 10px 0 0;
  padding: 9px 10px;
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
}
.btn-navbar .icon-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px auto;
  border-radius: 1px;
  background: #fff;
}
.main-navigation {
  position: static;
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  order: 2;
  width: auto;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
  box-shadow: none;
}
.navbar .main-navigation > li { float: none; margin: 0 1px; }
.navbar-inverse .main-navigation > li > a {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: var(--header-height);
  padding: 21px 11px 18px;
  color: #aebbd0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.navbar-inverse .main-navigation > li > a:hover {
  color: #fff;
  background: rgba(255,255,255,.07);
  border-bottom-color: rgba(255,255,255,.25);
}
.navbar-inverse .main-navigation > .active > a,
.navbar-inverse .main-navigation > .active > a:hover {
  color: #fff;
  border-bottom-color: var(--coral);
  background: linear-gradient(180deg, rgba(254,76,87,.14), rgba(254,76,87,.04));
  box-shadow: inset 0 -1px rgba(254,76,87,.12);
}
.mobile-navigation-item { display: none !important; }

/* Main workspace */
.app-container {
  width: auto;
  min-height: 100vh;
  margin-left: 0;
  padding: calc(var(--header-height) + 24px) 28px 30px;
}
.main-panel { min-height: calc(100vh - 110px); padding-bottom: 30px; }
.page-header {
  margin: 0 0 22px;
  padding: 0 0 14px;
  border-color: var(--line);
}
.page-header h2 { margin: 0; color: var(--navy-950); font-size: 27px; font-weight: 700; letter-spacing: -.03em; }
.page-header h2 small { color: var(--muted); font-size: 13px; font-weight: 400; letter-spacing: 0; }
.has-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.has-actions > h2, .has-actions > .section-title { min-width: 0; order: 1; }
.page-actions, .well-actions { flex: 0 0 auto; order: 2; }
.well {
  min-height: 0;
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid rgba(215,223,234,.9);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 6px 22px rgba(21,40,73,.055);
}
.well-large { padding: 28px; }
.well-title {
  min-height: 30px;
  margin: -2px 0 16px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}
.well-title::after { display: table; clear: both; content: ""; }
.section-title { margin: 0 0 12px; color: var(--navy-950); font-size: 17px; font-weight: 700; line-height: 1.4; }
.section-title [class^="icon-"] { margin-right: 5px; color: var(--coral); }

/* Metrics */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 22px;
}
.metrics-row::before, .metrics-row::after { display: none; }
.metrics-row > [class*="col-"] { float: none; width: auto; min-width: 0; padding: 0; }
.metrics-row > .col-md-2 { grid-column: span 2; }
.metrics-row > .col-md-3 { grid-column: span 3; }
.metrics-row > .col-md-4 { grid-column: span 4; }
.metric-box {
  position: relative;
  min-height: 126px;
  margin: 0;
  padding: 19px;
  overflow: hidden;
  border: 0;
  border-left: 4px solid var(--coral);
}
.metric-box::after {
  position: absolute;
  width: 90px;
  height: 90px;
  right: -42px;
  bottom: -44px;
  content: "";
  border-radius: 50%;
  background: rgba(254,76,87,.06);
}
.metric-box > i { position: absolute; top: 18px; right: 18px; color: var(--coral); font-size: 27px; opacity: .18; }
.metric-box span, .metric-box strong, .metric-box small { display: block; }
.metric-box span {
  padding-right: 28px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.metric-box strong { margin: 11px 0 4px; color: var(--navy-900); font-size: 29px; line-height: 1.1; }
.metric-box small { color: #8894a6; line-height: 1.35; }
.metric-next { border-left-color: var(--blue); }
.metric-next > i { color: var(--blue); }
.metric-estimate { border-left-color: var(--green); }
.metric-estimate > i { color: var(--green); }
.metric-next strong, .metric-estimate strong { font-size: 22px; font-variant-numeric: tabular-nums; }

/* Bootstrap components and utility compatibility */
.btn {
  overflow: hidden;
  border-radius: 7px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: none;
}
.btn-primary { border-color: #226fe3; background: var(--blue); }
.btn-primary:hover, .btn-primary:focus { border-color: #185fc7; background: #216ddd; }
.btn-success { border-color: #25865b; background: var(--green); }
.btn-warning { border-color: #d67c20; background: var(--orange); }
.btn-danger { border-color: #bd3943; background: var(--red); }
.btn-group { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.btn-group > .btn { float: none; margin-left: 0 !important; border-radius: 7px !important; }
.input-block-level { width: 100%; }
input.input-block-level,
select.input-block-level,
textarea.input-block-level {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  color: #555;
  border: 1px solid #cbd4df;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}
button.input-block-level { display: block; }
.input-small { display: inline-block; width: 112px; height: 34px; padding: 6px 10px; }
.input-xlarge, .input-xxlarge { width: 100%; max-width: 680px; }
input.input-xlarge, input.input-xxlarge,
textarea.input-xlarge, textarea.input-xxlarge {
  padding: 7px 11px;
  border: 1px solid #cbd4df;
  border-radius: 6px;
}
.input-prepend, .input-append { display: flex; align-items: stretch; max-width: 100%; }
.input-prepend .add-on, .input-append .add-on {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 6px 10px;
  color: #5c687a;
  border: 1px solid #cbd4df;
  background: #edf1f6;
}
.input-prepend .add-on { border-right: 0; border-radius: 6px 0 0 6px; }
.input-append .add-on { border-left: 0; border-radius: 0 6px 6px 0; }
.input-prepend input { border-radius: 0 6px 6px 0; }
.input-append input { border-radius: 6px 0 0 6px; }
.input-block-wrap { display: flex; width: 100%; }
.input-block-wrap input { flex: 1; min-width: 0; width: auto; }
.badge-info { background: var(--blue); }
.label { display: inline-block; padding: .35em .6em; border-radius: 4px; }
.alert { border-radius: 9px; }
.alert-stack { position: fixed; z-index: 1200; top: 78px; right: 20px; width: min(390px, calc(100vw - 30px)); }
.alert-stack .alert { box-shadow: 0 12px 30px rgba(16,31,58,.18); }
.spinner-border {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 7px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: preview-spin .65s linear infinite;
}
@keyframes preview-spin { to { transform: rotate(360deg); } }
.progress { height: 9px; border-radius: 10px; box-shadow: none; }
.bar { height: 100%; border-radius: 10px; background: var(--blue); }
.bar-success { background: var(--green); }
.bar-warning { background: var(--amber); }
.bar-danger { background: var(--red); }

/* Forms */
.form-horizontal .form-group {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  margin: 0 0 20px;
}
.form-horizontal .form-group::before,
.form-horizontal .form-group::after {
  display: none;
  content: none;
}
.form-horizontal .control-label {
  width: auto;
  margin: 0;
  padding: 8px 0 0;
  text-align: right;
}
.form-controls { min-width: 0; }
.form-controls input:not([type="checkbox"]):not([type="radio"]),
.form-controls select,
.form-controls textarea {
  min-height: 34px;
  border: 1px solid #cbd4df;
  box-shadow: none;
}
.form-controls input:focus,
.form-controls select:focus,
.form-controls textarea:focus {
  border-color: var(--blue);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(45,127,249,.1);
}
.help-block { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.form-actions {
  margin: 24px -20px -20px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
  background: #f8fafc;
}
.responsive-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.credential-control { display: flex; align-items: center; gap: 9px; max-width: 720px; }
.credential-control-top { align-items: flex-start; }
.credential-control input, .credential-control textarea { flex: 1; min-width: 0; width: 100%; }
.credential-control .label { flex: 0 0 auto; margin-top: 8px; }
.secret-field { font-family: Menlo, Monaco, Consolas, monospace; font-size: 12px; }
.send-interval-controls, .send-window-controls, .weekday-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.send-interval-controls label, .send-window-controls label { margin: 0; font-weight: 500; }
.send-interval-controls input, .send-window-controls input { margin: 0 4px; }
.weekday-options .checkbox-inline { margin: 0; }

/* Dashboard, tables and products */
.recent-list { min-height: 100px; }
.recent-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.recent-item:first-child { border-top: 0; }
.recent-image { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; }
.product-thumb {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.product-placeholder { display: flex; align-items: center; justify-content: center; color: #9ca7b7; }
.recent-main { min-width: 0; }
.recent-main strong, .recent-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-main small { color: var(--muted); }
.price { color: var(--navy-900); font-weight: 700; white-space: nowrap; }
.status-pill {
  display: inline-block;
  max-width: 100%;
  padding: 4px 7px;
  overflow: hidden;
  color: #fff;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-pill.completed, .status-pill.online, .status-pill.whatsapp-generated, .status-pill.send-sent { background: var(--green); }
.status-pill.pending, .status-pill.missing, .status-pill.whatsapp-pending { background: var(--amber); }
.status-pill.processing, .status-pill.whatsapp-processing { background: var(--blue); }
.status-pill.error, .status-pill.whatsapp-error { background: var(--red); }
.status-pill.send-not-sent { background: #8894a6; }
.queue-time, .product-confidence { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.queue-time { color: #ba761b; font-weight: 700; }
.flow-table td { vertical-align: middle !important; }
.flow-table strong, .flow-table small { display: block; }
.flow-table small { color: var(--muted); }
.table-responsive {
  width: 100%;
  margin-bottom: 18px;
  overflow-x: auto;
  border: 0;
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}
.table { margin-bottom: 0; background: #fff; }
.table > thead > tr > th {
  color: #5c687a;
  border-bottom: 1px solid #cfd7e2;
  background: #edf2f7;
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.table > tbody > tr > td { vertical-align: middle; border-color: #e7ebf1; }
.table-hover > tbody > tr:hover { background: #f6f9fc; }
.product-table { min-width: 1040px; }
.product-id { width: 58px; white-space: nowrap; }
.product-image-cell { width: 62px; text-align: center; }
.product-image-cell .product-thumb { margin: 0 auto; }
.product-ml-code { font-size: 11px; white-space: nowrap; }
.old-price { display: block; color: #8b96a6; font-size: 11px; text-decoration: line-through; }
.new-price { color: var(--navy-900); font-weight: 700; white-space: nowrap; }
.product-send-status { min-width: 148px; }
.action-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-width: 290px; }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 0 16px; }
.pagination-bar .btn-group { float: none !important; }
.json-editor {
  min-height: 470px;
  padding: 14px;
  resize: vertical;
  color: #d9e5f5;
  border: 1px solid #0d1a32;
  border-radius: 10px;
  background: #0d1a32;
  font: 12px/1.65 Menlo, Monaco, Consolas, monospace;
}
.json-editor:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(45,127,249,.13); }
.editor-status { min-height: 22px; margin-top: 8px; }
.validation-message.valid { color: var(--green); font-weight: 700; }
.validation-message.invalid { color: var(--red); font-weight: 700; }
#processFeedback, #productImportFeedback { margin-top: 12px; }

/* Config tabs, WhatsApp and groups */
.config-tabs {
  margin-bottom: 0;
  padding: 0 12px;
  border-bottom-color: var(--line);
}
.config-tabs > li > a {
  margin-right: 4px;
  padding: 11px 15px;
  color: var(--muted);
  border-radius: 9px 9px 0 0;
  font-size: 12px;
  font-weight: 700;
}
.config-tabs > li.active > a,
.config-tabs > li.active > a:hover,
.config-tabs > li.active > a:focus {
  color: var(--coral);
  border-color: var(--line) var(--line) transparent;
  background: #fff;
}
.config-tab-content { min-height: 410px; }
.config-tab-content > .tab-pane { padding-top: 3px; }
.config-tab-content > .tab-pane[hidden],
[data-whatsapp-config-pane][hidden] { display: none; }
.whatsapp-config-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 5px 0 20px;
  padding: 5px;
  border-radius: 9px;
  background: #edf2f7;
}
.whatsapp-config-tabs > li { float: none; }
.whatsapp-config-tabs > li > a { padding: 8px 13px; color: var(--muted); border-radius: 7px; font-weight: 600; }
.whatsapp-config-tabs > li.active > a,
.whatsapp-config-tabs > li.active > a:hover { color: #fff; background: var(--navy-800); }
.ai-token-usage { max-width: 720px; margin-top: 14px; }
.ai-token-usage-head { min-height: 22px; margin-bottom: 5px; }
.whatsapp-session-panel { margin-top: 22px; background: #f9fbfd; box-shadow: none; }
.whatsapp-session-table { min-width: 720px; }
.whatsapp-session-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.whatsapp-qr-panel {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #b9d8f6;
  border-radius: 12px;
  background: #f2f8fe;
}
.whatsapp-qr-image {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 250px;
  width: 250px;
  height: 250px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.whatsapp-qr-image img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.whatsapp-qr-instructions { min-width: 0; }
/* A seção de grupos é movida para a subaba de configurações. Preserve as
   ações de sincronização; apenas o título duplicado não precisa aparecer. */
.whatsapp-settings-groups .page-header h2 { display: none; }
.whatsapp-settings-groups .page-header { margin-top: 0; }
.whatsapp-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.whatsapp-group-card {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 96px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(21,40,73,.05);
}
.whatsapp-group-card.selected { border-color: #62bd91; background: #f2fbf6; box-shadow: 0 0 0 3px rgba(44,154,105,.1); }
.whatsapp-group-check { position: absolute; top: 11px; right: 11px; margin: 0; }
.whatsapp-group-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  margin-right: 12px;
  overflow: hidden;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-700), var(--blue));
  font-weight: 700;
}
.whatsapp-group-avatar img { width: 100%; height: 100%; object-fit: cover; }
.whatsapp-group-details { min-width: 0; padding-right: 18px; }
.whatsapp-group-details strong,
.whatsapp-group-details span,
.whatsapp-group-details small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whatsapp-group-details span, .whatsapp-group-details small { margin-top: 4px; color: var(--muted); font-size: 11px; }

/* Custom modal behavior used by app.js, styled with Bootstrap 3 language. */
.modal {
  position: fixed;
  z-index: 1060;
  inset: 0;
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 30px 15px;
  background: transparent;
}
.modal.show {
  display: block;
  width: min(760px, calc(100vw - 30px));
  height: auto;
  max-height: calc(100vh - 50px);
  inset: 25px auto auto 50%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7,20,47,.38);
  transform: translateX(-50%);
}
.modal-header { padding: 17px 20px; border-color: var(--line); }
.modal-title { padding-right: 34px; color: var(--navy-950); font-size: 20px; font-weight: 700; }
.modal-body { max-height: calc(100vh - 190px); padding: 20px; overflow-y: auto; }
.modal-footer { padding: 13px 20px; border-color: var(--line); background: #f8fafc; }
.modal-backdrop-custom { position: fixed; z-index: 1050; inset: 0; background: rgba(7,20,47,.68); }
.modal-open { overflow: hidden; }
.detail-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; }
.detail-image { width: 100%; max-height: 210px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; }
.detail-list { min-width: 0; }
.detail-list small, .detail-list strong { display: block; }
.detail-list small { margin-top: 10px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.detail-list strong { overflow-wrap: anywhere; }
.detail-affiliate-link { display: flex; align-items: center; gap: 7px; min-width: 0; }
.detail-affiliate-link a { min-width: 0; overflow-wrap: anywhere; }
.whatsapp-ad-card { margin-top: 18px; padding: 15px; border: 1px solid #c7dfd1; border-radius: 11px; background: #f4faf6; }
.whatsapp-ad-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.whatsapp-ad-message { max-height: 270px; padding: 13px; overflow: auto; border: 1px solid #d9e8df; border-radius: 8px; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.whatsapp-send-schedule { margin: 14px 0; padding: 12px 0; border-top: 1px solid #d9e8df; border-bottom: 1px solid #d9e8df; }

/* Estúdio de vídeos integrado */
.video-section-actions .btn.active { cursor: default; }
.video-metrics > .col-md-3 { grid-column: span 3; }
.metric-quota { border-left-color: var(--amber); }
.metric-quota > i { color: var(--amber); }
.video-workflow { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto; align-items: center; gap: 12px; }
.video-flow-step { display: flex; align-items: center; gap: 9px; min-width: 112px; color: var(--muted); }
.video-step-number { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid #bcc6d3; border-radius: 50%; font-size: 11px; }
.video-flow-step.active { color: var(--ink); }
.video-flow-step.active .video-step-number { color: #fff; border-color: var(--coral); background: var(--coral); }
.video-flow-step strong, .video-flow-step small { display: block; }
.video-flow-step strong { font-size: 11px; text-transform: uppercase; }
.video-flow-step small { margin-top: 2px; font-size: 10px; }
.video-flow-line { height: 1px; min-width: 18px; background: var(--line); }
.upload-panel { padding-bottom: 0; }
.video-dropzone { position: relative; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 35px; border: 2px dashed #c5cfdb; border-radius: 11px; text-align: center; cursor: pointer; background: #f9fbfd; transition: border-color .15s ease, background .15s ease; }
.video-dropzone:hover, .video-dropzone.dragging { border-color: var(--blue); background: #f2f7ff; }
.video-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.video-dropzone-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 14px; border-radius: 50%; color: var(--blue); background: #e8f1ff; font-size: 25px; }
.video-dropzone strong { color: var(--navy-950); font-size: 20px; }
.video-dropzone > span:not(.video-dropzone-icon) { margin-top: 5px; color: var(--muted); }
.video-dropzone small { margin-top: 18px; color: #8a96a7; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.upload-file-list { display: grid; gap: 10px; padding: 16px 0 2px; }
.upload-file { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; min-height: 78px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.upload-file.uploading { border-color: #9fc3f8; background: #f8fbff; }
.upload-file.uploaded { border-color: #b8dec9; background: #f8fdf9; }
.upload-file.error { border-color: #f2b8bd; background: #fff9f9; }
.upload-index { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; border-radius: 9px; background: var(--navy-800); font-weight: 700; }
.upload-file-body { min-width: 0; }
.upload-file-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.upload-file-heading strong, .upload-file-heading small { display: block; }
.upload-file-heading strong { overflow: hidden; color: var(--navy-950); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.upload-file-heading small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.upload-remove { flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 1px solid #cbd4df; border-radius: 50%; color: var(--muted); background: #fff; }
.upload-item-progress { height: 7px; margin: 12px 0 0; }
.upload-error { margin: 5px 0 0; font-size: 10px; }
.upload-actions { display: flex; align-items: center; gap: 13px; }
.upload-actions .help-block { margin: 0; }
.readiness-list { margin-bottom: 16px; }
.readiness-list .list-group-item { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 11px; padding: 15px 4px; border-width: 1px 0 0; }
.readiness-list .list-group-item:first-child { border-top: 0; }
.readiness-list .badge { width: 27px; height: 27px; display: grid; place-items: center; padding: 0; color: var(--muted); background: #e9edf3; }
.readiness-list p { margin: 0; }
.readiness-list strong, .readiness-list small { display: block; }
.readiness-list small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.readiness-list i.ok { color: var(--green); }
.readiness-list i.error { color: var(--red); }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.video-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(21,40,73,.055); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); }
.video-cover { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-thumb::before { position: absolute; z-index: 1; inset: 0; content: ""; background: linear-gradient(180deg, rgba(7,20,47,.08), rgba(7,20,47,.34)); }
.video-play { position: relative; z-index: 2; width: 46px; height: 46px; padding-left: 4px; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; color: #fff; background: rgba(7,20,47,.42); }
.video-status-badge { position: absolute; z-index: 2; top: 11px; left: 11px; padding: 5px 8px; border-radius: 15px; background: rgba(7,20,47,.74); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.video-status-badge.completed, .video-status-badge.available { background: var(--green); }
.video-status-badge.awaiting_approval { color: #3f2c00; background: #f5b942; }
.video-status-badge.failed { background: var(--red); }
.card-delete { position: absolute; z-index: 2; top: 9px; right: 9px; width: 29px; height: 29px; padding: 0; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; color: #fff; background: rgba(7,20,47,.62); }
.video-duration { position: absolute; z-index: 2; right: 11px; bottom: 9px; font-size: 10px; font-weight: 700; }
.video-body { padding: 16px; }
.video-body h3 { overflow: hidden; margin: 0 0 6px; color: var(--navy-950); font-size: 14px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.video-body > p { margin: 0; color: var(--muted); font-size: 11px; }
.job-progress { margin-top: 13px; }
.job-progress p { display: flex; justify-content: space-between; margin: 0 0 6px; font-size: 10px; }
.job-progress i { display: block; height: 7px; border-radius: 8px; background: #e6ebf1; }
.job-progress b { display: block; height: 100%; border-radius: 8px; background: var(--blue); }
.video-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 14px; }
.video-actions button { flex: 1 1 90px; min-height: 34px; padding: 6px 9px; border: 1px solid #cbd4df; border-radius: 6px; background: #fff; font-size: 10px; font-weight: 700; }
.video-actions button.primary-action { color: #fff; border-color: var(--blue); background: var(--blue); }
.error-copy { overflow: hidden; margin-top: 10px !important; color: var(--red) !important; white-space: nowrap; text-overflow: ellipsis; }
.video-empty-state { grid-column: 1 / -1; display: grid; place-items: center; min-height: 280px; text-align: center; }
.video-empty-state > i { color: #aab5c4; font-size: 38px; }
.cost-highlight { margin: 21px 0; padding: 20px; border-left: 4px solid var(--coral); border-radius: 8px; background: #f8fafc; }
.cost-highlight span, .cost-highlight strong, .cost-highlight small { display: block; }
.cost-highlight span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.cost-highlight strong { margin: 5px 0; color: var(--navy-900); font-size: 32px; }
.resource-panel > h3 { margin: 0 0 24px; color: var(--navy-900); font-size: 25px; font-weight: 700; }
.resource-item { margin-bottom: 23px; }
.resource-note { margin: 26px 0 0; }
.video-settings-tabs { display: inline-flex; flex-wrap: wrap; gap: 5px; margin-bottom: 24px; padding: 5px; border-radius: 9px; background: #edf2f7; }
.video-settings-tabs > li { float: none; }
.video-settings-tabs > li > a { padding: 8px 13px; color: var(--muted); border-radius: 7px; font-weight: 600; }
.video-settings-tabs > li.active > a, .video-settings-tabs > li.active > a:hover { color: #fff; background: var(--navy-800); }
.instagram-login-status { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; border-color: #dbe4ee; background: #f8fafc; }
.instagram-login-status .label { flex: 0 0 auto; min-width: 84px; padding: 7px 10px; text-align: center; }
.instagram-login-status strong, .instagram-login-status small { display: block; }
.instagram-login-status small { margin-top: 3px; }
.instagram-login-actions { margin: 0 0 20px; padding: 12px 20px; border-radius: 8px; }
.instagram-secret-control { display: flex; align-items: stretch; gap: 7px; max-width: 650px; }
.instagram-secret-control input { flex: 1 1 auto; min-width: 0; }
.instagram-secret-control .btn { flex: 0 0 auto; min-width: 76px; }
.instagram-session-import { margin: 5px 0 22px; padding: 18px 20px 2px; border: 1px solid #dbe4ee; border-radius: 10px; background: #f8fafc; }
.instagram-session-import h4 { margin: 0 0 7px; color: var(--navy-900); }
.instagram-session-import > p { margin-bottom: 17px; }
.instagram-best-times { max-width: 760px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.instagram-time-row { display: grid; grid-template-columns: 105px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border-bottom: 1px solid #edf1f5; }
.instagram-time-row:last-child { border-bottom: 0; }
.instagram-time-row > span { display: flex; flex-wrap: wrap; gap: 7px; }
.instagram-time-row i { min-width: 53px; padding: 5px 8px; border: 1px solid #d5dde7; border-radius: 14px; color: var(--navy-800); background: #f8fafc; font-style: normal; text-align: center; }
.instagram-time-row i.best { color: #fff; border-color: var(--blue); background: var(--blue); }
.instagram-time-row small { color: var(--muted); }
.instagram-time-row.weaker { background: #fbfcfd; }
.instagram-schedule-source { display: inline-block; margin-top: 7px; font-size: 12px; }
.instagram-publication { margin: 10px 0 0 !important; padding: 7px 9px; border-radius: 7px; font-size: 11px !important; }
.instagram-publication.scheduled { color: #31557e !important; background: #eef6ff; }
.instagram-publication.processing { color: #795200 !important; background: #fff4d5; }
.instagram-publication.published { color: #17653a !important; background: #e9f8ef; }
.instagram-publication.error { color: #9e2f37 !important; background: #fff0f1; }
.instagram-post-now { background: linear-gradient(135deg, #c13584, #f77737) !important; border-color: #c13584 !important; }
#instagramPublishModal .modal-body { min-height: 300px; }
#instagramPublishCaption { resize: vertical; }
#originalVolume { width: min(520px, 85%); margin-right: 10px; vertical-align: middle; accent-color: var(--blue); }
.modal.video-modal { width: min(900px, calc(100vw - 30px)); }
.player-stage { background: #05090f; }
.player-stage video { display: block; width: 100%; max-height: 62vh; }
.player-copy { min-height: 74px; }
.player-copy p { margin: 0; white-space: pre-wrap; line-height: 1.55; }
.script-meta { margin: 5px 35px 0 0; }
.script-editor { min-height: 300px; resize: vertical; line-height: 1.6; }
.script-approval-progress { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.script-approval-progress span { padding: 7px 10px; border: 1px solid #c9e5d3; border-radius: 7px; color: #17653a; background: #edf9f1; font-size: 12px; }
.script-approval-progress span:nth-child(2) { border-color: #c9dbef; color: #31557e; background: #eef6ff; }
.script-approval-progress span:nth-child(3) { border-color: #f0dba4; color: #795200; background: #fff8e5; }
.video-toast-region { position: fixed; z-index: 1200; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(370px, calc(100vw - 30px)); }
.video-toast { padding: 14px 17px; border-radius: 8px; color: #fff; background: var(--navy-900); box-shadow: 0 12px 30px rgba(16,31,58,.22); font-size: 12px; }
.video-toast.error { background: var(--red); }

/* Notebook */
@media (max-width: 1366px) {
  .app-container { padding-right: 20px; padding-left: 20px; }
  .metrics-row > .col-md-2, .metrics-row > .col-md-3 { grid-column: span 4; }
  .metric-box { min-height: 116px; }
  .whatsapp-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1199px) {
  .navbar .brand small { display: none; }
  .navbar-inverse .main-navigation > li > a { padding-right: 9px; padding-left: 9px; }
}

/* Tablet and collapsed navbar */
@media (max-width: 991px) {
  .navbar.navbar-inverse { position: fixed; }
  .navbar .container-fluid { position: relative; flex-wrap: nowrap; }
  .btn-navbar { display: block; margin: 0 0 0 auto; }
  .navbar .brand { padding-left: 0; }
  .main-navigation {
    position: absolute;
    z-index: 1030;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    max-height: calc(100vh - var(--header-height));
    padding: 9px 12px 12px !important;
    overflow-y: auto;
    border-top: 1px solid rgba(255,255,255,.08);
    background: var(--navy-900);
    box-shadow: 0 16px 30px rgba(7,20,47,.3);
  }
  .main-navigation.open { display: flex; }
  .navbar .main-navigation > li { width: 100%; margin: 1px 0; }
  .navbar-inverse .main-navigation > li > a,
  .navbar-inverse .main-navigation > .active > a,
  .navbar-inverse .main-navigation > .active > a:hover {
    min-height: 0;
    padding: 12px 13px;
    border: 0;
    border-radius: 7px;
  }
  .navbar-inverse .main-navigation > .active > a,
  .navbar-inverse .main-navigation > .active > a:hover {
    background: linear-gradient(110deg, var(--coral), var(--orange));
    box-shadow: 0 7px 18px rgba(254,76,87,.2);
  }
  .mobile-navigation-item {
    display: block !important;
    margin-top: 7px !important;
    padding-top: 7px;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .user-navigation { display: none !important; }
  .app-container { padding-top: calc(var(--header-height) + 20px); }
  .metrics-row > .col-md-2, .metrics-row > .col-md-3, .metrics-row > .col-md-4 { grid-column: span 6; }
  .form-horizontal .form-group { grid-template-columns: 155px minmax(0, 1fr); }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones */
@media (max-width: 767px) {
  :root { --header-height: 58px; }
  body { font-size: 13px; }
  .navbar .container-fluid { padding-right: 10px; padding-left: 10px; }
  .btn-navbar { width: 38px; height: 36px; margin: 0 0 0 auto; padding: 8px; }
  .navbar .brand { min-height: 58px; padding-right: 5px; }
  .navbar-brand-icon { width: 34px; height: 34px; margin-right: 6px; }
  .brand-word { font-size: 18px; }
  .navbar .brand small { display: none; }
  .app-container { padding: 74px 12px 22px; }
  .main-panel { padding-right: 0; padding-left: 0; }
  .page-header { margin-bottom: 16px; }
  .page-header h2 { font-size: 22px; }
  .page-header h2 small { display: block; margin-top: 5px; line-height: 1.35; }
  .has-actions { align-items: stretch; flex-direction: column; }
  .page-actions, .well-actions { width: 100%; order: 2; }
  .page-actions .btn-group, .page-actions.btn-group { display: flex; flex-wrap: wrap; width: 100%; }
  .page-actions .btn, .page-actions.btn-group .btn {
    flex: 1 1 135px;
    min-width: 0;
    min-height: 34px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  .well { margin-bottom: 15px; padding: 15px; border-radius: 11px; }
  .well-title.has-actions { align-items: stretch; }
  .well-actions { display: flex; justify-content: flex-start; }
  .metrics-row { grid-template-columns: 1fr; gap: 10px; margin-bottom: 15px; }
  .metrics-row > .col-md-2,
  .metrics-row > .col-md-3,
  .metrics-row > .col-md-4 { grid-column: span 1; }
  .metric-box { min-height: 103px; padding: 15px; }
  .metric-box strong { margin-top: 8px; font-size: 25px; }
  .recent-item { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; }
  .recent-item > .status-pill { grid-column: 2 / -1; justify-self: start; }
  .recent-item .price { font-size: 12px; }
  .form-horizontal .form-group { display: block; margin-bottom: 17px; }
  .form-horizontal .control-label { display: block; margin-bottom: 7px; padding: 0; text-align: left; }
  .form-actions { margin: 20px -15px -15px; padding: 14px 15px; border-radius: 0 0 11px 11px; }
  .credential-control { align-items: stretch; flex-direction: column; }
  .credential-control .label { align-self: flex-start; margin-top: 0; }
  .input-small { width: 100%; }
  .send-interval-controls, .send-window-controls { align-items: stretch; flex-direction: column; gap: 8px; }
  .send-interval-controls label, .send-window-controls label { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 5px; }
  .send-interval-controls input, .send-window-controls input { width: 100%; margin: 0; }
  .weekday-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .config-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 0;
    border: 0;
  }
  .config-tabs > li { float: none; margin: 0; }
  .config-tabs > li > a { height: 100%; margin: 0; padding: 9px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: center; }
  .config-tabs > li.active > a,
  .config-tabs > li.active > a:hover { color: #fff; border-color: var(--navy-800); border-radius: 8px; background: var(--navy-800); }
  .whatsapp-config-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .whatsapp-config-tabs > li > a { text-align: center; }
  .whatsapp-group-grid { grid-template-columns: 1fr; gap: 10px; }
  .whatsapp-qr-panel { align-items: stretch; flex-direction: column; padding: 14px; }
  .whatsapp-qr-image { flex-basis: auto; width: min(100%, 260px); height: auto; aspect-ratio: 1; margin: 0 auto; }
  .pagination-bar { align-items: stretch; flex-direction: column; }
  .pagination-bar .btn-group { align-self: flex-end; }
  .action-buttons { min-width: 0; }
  .json-editor { min-height: 330px; }
  .modal.show { width: calc(100vw - 18px); max-height: calc(100vh - 18px); inset: 9px auto auto 50%; border-radius: 11px; }
  .modal-body { max-height: calc(100vh - 150px); padding: 15px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-image { max-width: 220px; margin: 0 auto; }
  .login-page { padding: 14px 10px; }
  .login-box { padding: 20px 18px; border-radius: 13px; }
  .login-brand { height: 120px; margin-top: -17px; margin-bottom: 0; }
  .login-logo { width: 155px; margin-top: -13px; }
  .login-title { font-size: 23px; }
  .workflow-panel { overflow-x: auto; }
  .video-workflow { min-width: 820px; }
  .video-dropzone { min-height: 235px; padding: 24px 15px; }
  .upload-actions { align-items: stretch; flex-direction: column; }
  .video-grid { grid-template-columns: 1fr; gap: 12px; }
  .video-settings-tabs { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; }
  .instagram-login-status { align-items: flex-start; flex-direction: column; }
  .instagram-secret-control { max-width: none; }
  .instagram-time-row { grid-template-columns: 82px 1fr; gap: 8px; }
  .instagram-time-row small { grid-column: 2; }
}

@media (max-width: 390px) {
  .brand-word { font-size: 16px; }
  .weekday-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .config-tabs { grid-template-columns: 1fr; }
  .btn { padding-right: 9px; padding-left: 9px; }
  .login-box { padding-right: 15px; padding-left: 15px; }
}
