/* =============================
   AUM ADMIN - Design System
   ============================= */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root{
  --bg:#f7f5f2;
  --surface:#ffffff;
  --surface-alt:#faf8f5;
  --border:#e8e0d8;
  --border-light:#f0ebe5;
  --text:#3a3530;
  --text-light:#8a8078;
  --text-muted:#b0a89e;
  --rosa:#d9a2b5;
  --rosa-soft:rgba(217,162,181,.12);
  --rosa-hover:#c8899e;
  --lila:#b8a9d4;
  --verde:#6db89a;
  --verde-soft:rgba(109,184,154,.12);
  --rojo:#d96b6b;
  --rojo-soft:rgba(217,107,107,.12);
  --dorado:#d4c08a;
  --coral:#e09272;
  --aqua:#6db8b8;
  --esmeralda:#4d9e7e;
  --azul:#7a9fd9;
  --naranja:#e0a855;
  --celeste:#8ec5d9;
  --accent:linear-gradient(135deg,#d9a2b5,#b8a9d4);
  --radius:8px;
  --radius-lg:12px;
  --shadow:0 1px 3px rgba(58,53,48,.06),0 1px 2px rgba(58,53,48,.04);
  --shadow-lg:0 4px 16px rgba(58,53,48,.08);
  --transition:all .2s ease;
  --sidebar-w:240px;
  --header-h:56px;
}

body{
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  background:var(--bg);
  color:var(--text);
  font-size:14px;
  line-height:1.5;
  min-height:100vh;
}

/* =============================
   LOGIN
   ============================= */
.login-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:var(--bg);
}

.login-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:40px 36px;
  width:100%;
  max-width:400px;
  box-shadow:var(--shadow-lg);
}

.login-card__logo{
  text-align:center;
  margin-bottom:32px;
}

.login-card__logo-icon{
  width:56px;height:56px;border-radius:50%;
  background:var(--accent);
  display:inline-flex;align-items:center;justify-content:center;
  margin-bottom:12px;
}

.login-card__logo-icon svg{width:24px;height:24px;color:#fff}

.login-card__logo h1{font-size:20px;font-weight:700;color:var(--text)}
.login-card__logo p{font-size:13px;color:var(--text-light);margin-top:4px}

.login-card__error{
  background:var(--rojo-soft);
  color:var(--rojo);
  padding:10px 14px;
  border-radius:var(--radius);
  font-size:13px;
  font-weight:500;
  margin-bottom:16px;
  display:none;
}

.login-card__error.show{display:block}

/* =============================
   FORMS
   ============================= */
.form-group{margin-bottom:16px}
.form-label{display:block;font-size:13px;font-weight:600;color:var(--text);margin-bottom:6px}
.form-hint{font-size:12px;color:var(--text-muted);margin-top:4px}

.form-input,
.form-select,
.form-textarea{
  width:100%;
  padding:10px 14px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  font-size:14px;
  font-family:inherit;
  color:var(--text);
  background:var(--surface);
  transition:var(--transition);
  outline:none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus{
  border-color:var(--rosa);
  box-shadow:0 0 0 3px var(--rosa-soft);
}

.form-input::placeholder{color:var(--text-muted)}
.form-textarea{min-height:100px;resize:vertical}

.form-select{cursor:pointer;appearance:auto}

.form-toggle{
  display:flex;align-items:center;gap:10px;cursor:pointer;
}

.form-toggle input{display:none}

.form-toggle__track{
  width:40px;height:22px;border-radius:11px;
  background:var(--border);
  position:relative;transition:var(--transition);
  flex-shrink:0;
}

.form-toggle__track::after{
  content:'';position:absolute;
  top:3px;left:3px;
  width:16px;height:16px;border-radius:50%;
  background:#fff;transition:var(--transition);
  box-shadow:0 1px 3px rgba(0,0,0,.15);
}

.form-toggle input:checked + .form-toggle__track{
  background:var(--rosa);
}

.form-toggle input:checked + .form-toggle__track::after{
  left:21px;
}

.form-toggle__label{font-size:13px;font-weight:500;color:var(--text)}

.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}

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

/* =============================
   BUTTONS
   ============================= */
.btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 20px;
  border-radius:var(--radius);
  font-size:13px;font-weight:600;font-family:inherit;
  cursor:pointer;transition:var(--transition);
  border:1px solid transparent;
  text-decoration:none;
  white-space:nowrap;
}

.btn svg{width:16px;height:16px;flex-shrink:0}

.btn--primary{
  background:var(--accent);
  color:#fff;border-color:transparent;
}
.btn--primary:hover{opacity:.9;transform:translateY(-1px)}

.btn--secondary{
  background:var(--surface);
  color:var(--text);border-color:var(--border);
}
.btn--secondary:hover{border-color:var(--rosa);color:var(--rosa)}

.btn--danger{
  background:var(--rojo-soft);
  color:var(--rojo);border-color:transparent;
}
.btn--danger:hover{background:var(--rojo);color:#fff}

.btn--sm{padding:6px 14px;font-size:12px}
.btn--sm svg{width:14px;height:14px}

.btn--icon{
  padding:8px;border-radius:var(--radius);
  background:transparent;border:1px solid var(--border);
  color:var(--text-light);cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
  transition:var(--transition);
}
.btn--icon svg{width:16px;height:16px}
.btn--icon:hover{border-color:var(--rosa);color:var(--rosa)}

.btn--icon-danger:hover{border-color:var(--rojo);color:var(--rojo)}

.btn:disabled,.btn[disabled]{opacity:.5;cursor:not-allowed;pointer-events:none}

/* =============================
   LAYOUT - Sidebar + Main
   ============================= */
.admin-layout{
  display:flex;
  min-height:100vh;
}

.sidebar{
  width:var(--sidebar-w);
  background:var(--surface);
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  position:fixed;
  top:0;left:0;bottom:0;
  z-index:100;
  transition:transform .3s ease;
}

.sidebar__header{
  padding:20px 20px 16px;
  border-bottom:1px solid var(--border-light);
}

.sidebar__brand{
  display:flex;align-items:center;gap:10px;
  text-decoration:none;color:var(--text);
}

.sidebar__brand-icon{
  width:36px;height:36px;border-radius:50%;
  background:var(--accent);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}

.sidebar__brand-icon svg{width:18px;height:18px;color:#fff}

.sidebar__brand-text{
  font-size:15px;font-weight:700;
}

.sidebar__brand-sub{
  font-size:11px;color:var(--text-light);font-weight:400;display:block;
}

.sidebar__nav{
  flex:1;overflow-y:auto;padding:12px 8px;
}

.sidebar__section{
  margin-bottom:8px;
}

.sidebar__section-title{
  font-size:10px;font-weight:700;text-transform:uppercase;
  letter-spacing:.1em;color:var(--text-muted);
  padding:8px 12px 4px;
}

.sidebar__link{
  display:flex;align-items:center;gap:10px;
  padding:9px 12px;
  border-radius:var(--radius);
  font-size:13px;font-weight:500;
  color:var(--text-light);
  text-decoration:none;cursor:pointer;
  transition:var(--transition);
  border:none;background:none;width:100%;
  font-family:inherit;text-align:left;
}

.sidebar__link svg{width:18px;height:18px;flex-shrink:0}

.sidebar__link:hover{
  background:var(--rosa-soft);color:var(--rosa);
}

.sidebar__link.active{
  background:var(--rosa-soft);color:var(--rosa);font-weight:600;
}

.sidebar__footer{
  padding:12px 8px;
  border-top:1px solid var(--border-light);
}

.sidebar__user{
  display:flex;align-items:center;gap:10px;
  padding:8px 12px;
  font-size:13px;
}

.sidebar__user-avatar{
  width:32px;height:32px;border-radius:50%;
  background:var(--accent);
  display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:700;color:#fff;
  flex-shrink:0;
}

.sidebar__user-info{flex:1;min-width:0}
.sidebar__user-name{font-weight:600;font-size:13px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar__user-role{font-size:11px;color:var(--text-muted)}

/* Main content */
.main{
  flex:1;
  margin-left:var(--sidebar-w);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.main__header{
  height:var(--header-h);
  background:var(--surface);
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 28px;
  position:sticky;
  top:0;
  z-index:50;
}

.main__header-left{
  display:flex;align-items:center;gap:12px;
}

.main__header-title{font-size:16px;font-weight:600}

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

.main__content{
  flex:1;
  padding:28px;
}

.mobile-menu-btn{
  display:none;
  background:none;border:none;cursor:pointer;
  color:var(--text);padding:4px;
}
.mobile-menu-btn svg{width:24px;height:24px}

/* =============================
   CARDS / PANELS
   ============================= */
.panel{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow);
}

.panel__header{
  display:flex;align-items:center;justify-content:space-between;
  padding:20px 24px;
  border-bottom:1px solid var(--border-light);
  flex-wrap:wrap;gap:12px;
}

.panel__title{font-size:15px;font-weight:600}
.panel__body{padding:24px}
.panel__body--flush{padding:0}

/* =============================
   DATA TABLE
   ============================= */
.data-table{
  width:100%;border-collapse:collapse;
}

.data-table th{
  text-align:left;
  padding:10px 16px;
  font-size:11px;font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--text-muted);
  background:var(--surface-alt);
  border-bottom:1px solid var(--border);
  white-space:nowrap;
}

.data-table td{
  padding:12px 16px;
  font-size:13px;
  border-bottom:1px solid var(--border-light);
  vertical-align:middle;
}

.data-table tr:last-child td{border-bottom:none}

.data-table tr:hover td{
  background:var(--surface-alt);
}

.data-table__actions{
  display:flex;gap:6px;align-items:center;
  justify-content:flex-end;
}

.data-table__thumb{
  width:48px;height:36px;
  border-radius:6px;
  object-fit:cover;
  background:var(--bg);
  border:1px solid var(--border-light);
}

.data-table__empty{
  padding:48px 24px;text-align:center;
  color:var(--text-muted);font-size:13px;
}

/* =============================
   BADGES
   ============================= */
.badge{
  display:inline-flex;align-items:center;
  padding:3px 10px;
  border-radius:20px;
  font-size:11px;font-weight:600;
  white-space:nowrap;
}

.badge--published{background:var(--verde-soft);color:var(--verde)}
.badge--draft{background:var(--surface-alt);color:var(--text-muted);border:1px solid var(--border)}
.badge--active{background:var(--verde-soft);color:var(--verde)}
.badge--inactive{background:var(--rojo-soft);color:var(--rojo)}
.badge--admin{background:var(--rosa-soft);color:var(--rosa)}
.badge--superadmin{background:rgba(184,169,212,.15);color:var(--lila)}

/* =============================
   MODAL
   ============================= */
.modal-overlay{
  position:fixed;inset:0;
  background:rgba(58,53,48,.4);
  backdrop-filter:blur(3px);
  z-index:1000;
  display:flex;align-items:flex-start;justify-content:center;
  padding:40px 24px;
  overflow-y:auto;
  opacity:0;transition:opacity .25s ease;
}

.modal-overlay.open{opacity:1}

.modal{
  background:var(--surface);
  border-radius:var(--radius-lg);
  width:100%;max-width:600px;
  box-shadow:var(--shadow-lg);
  transform:translateY(12px);
  transition:transform .25s ease;
  margin:auto 0;
}

.modal-overlay.open .modal{transform:translateY(0)}

.modal__header{
  display:flex;align-items:center;justify-content:space-between;
  padding:20px 24px;
  border-bottom:1px solid var(--border-light);
}

.modal__title{font-size:16px;font-weight:600}

.modal__close{
  width:32px;height:32px;border-radius:50%;
  background:var(--surface-alt);border:none;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;color:var(--text-light);
  transition:var(--transition);
}
.modal__close svg{width:18px;height:18px}
.modal__close:hover{background:var(--rosa-soft);color:var(--rosa)}

.modal__body{padding:24px;max-height:65vh;overflow-y:auto}
.modal__footer{
  display:flex;align-items:center;justify-content:flex-end;gap:10px;
  padding:16px 24px;
  border-top:1px solid var(--border-light);
}

/* =============================
   TOAST
   ============================= */
.toast-container{
  position:fixed;
  bottom:24px;right:24px;
  z-index:9999;
  display:flex;
  flex-direction:column;
  gap:8px;
  pointer-events:none;
}

.toast{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:12px 18px;
  font-size:13px;font-weight:500;
  box-shadow:var(--shadow-lg);
  display:flex;align-items:center;gap:10px;
  pointer-events:auto;
  animation:toastIn .3s ease;
  max-width:360px;
}

.toast--success{border-left:3px solid var(--verde)}
.toast--error{border-left:3px solid var(--rojo)}
.toast--info{border-left:3px solid var(--rosa)}

.toast.removing{animation:toastOut .25s ease forwards}

@keyframes toastIn{
  from{opacity:0;transform:translateY(12px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes toastOut{
  from{opacity:1;transform:translateY(0)}
  to{opacity:0;transform:translateY(12px)}
}

/* =============================
   STATS
   ============================= */
.stats-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:16px;
  margin-bottom:24px;
}

.stat-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:20px;
  display:flex;align-items:flex-start;gap:14px;
  cursor:pointer;
  transition:var(--transition);
}

.stat-card:hover{
  border-color:var(--rosa);
  box-shadow:var(--shadow);
  transform:translateY(-1px);
}

.stat-card__icon{
  width:40px;height:40px;border-radius:var(--radius);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}

.stat-card__icon svg{width:20px;height:20px}

.stat-card__value{font-size:24px;font-weight:700;color:var(--text)}
.stat-card__label{font-size:12px;color:var(--text-muted);margin-top:2px}

/* =============================
   LOADING
   ============================= */
.loader{
  display:flex;align-items:center;justify-content:center;
  padding:48px;
  color:var(--text-muted);
  gap:12px;font-size:13px;
}

.loader__spin{
  width:24px;height:24px;
  border:2.5px solid var(--border);
  border-top-color:var(--rosa);
  border-radius:50%;
  animation:spin .7s linear infinite;
}

@keyframes spin{to{transform:rotate(360deg)}}

/* =============================
   EMPTY STATE
   ============================= */
.empty-state{
  text-align:center;padding:48px 24px;
  color:var(--text-muted);
}

.empty-state__icon{
  width:48px;height:48px;
  margin:0 auto 16px;
  opacity:.4;
}
.empty-state__icon svg{width:48px;height:48px}
.empty-state__text{font-size:14px;margin-bottom:16px}

/* =============================
   CONFIRM DIALOG
   ============================= */
.confirm-body{text-align:center;padding:8px 0}
.confirm-body__icon{
  width:56px;height:56px;border-radius:50%;
  background:var(--rojo-soft);
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 16px;
}
.confirm-body__icon svg{width:28px;height:28px;color:var(--rojo)}
.confirm-body__text{font-size:14px;color:var(--text);line-height:1.6}
.confirm-body__sub{font-size:13px;color:var(--text-light);margin-top:6px}

/* =============================
   SEARCH BAR
   ============================= */
.search-bar{
  position:relative;max-width:280px;
}
.search-bar__input{
  width:100%;padding:8px 14px 8px 36px;
  border:1px solid var(--border);border-radius:var(--radius);
  font-size:13px;font-family:inherit;color:var(--text);
  background:var(--surface-alt);
  outline:none;transition:var(--transition);
}
.search-bar__input:focus{border-color:var(--rosa);background:var(--surface)}
.search-bar__icon{
  position:absolute;left:10px;top:50%;transform:translateY(-50%);
  width:16px;height:16px;color:var(--text-muted);pointer-events:none;
}

/* =============================
   PAGINATION
   ============================= */
.pg{
  padding:16px 24px;
  border-top:1px solid var(--border-light);
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
}

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

.pg__controls{
  display:flex;
  align-items:center;
  gap:4px;
}

.pg__btn{
  padding:6px 14px;
  border-radius:var(--radius);
  font-size:12px;
  font-weight:600;
  font-family:inherit;
  color:var(--text-light);
  background:var(--surface);
  border:1px solid var(--border);
  cursor:pointer;
  transition:var(--transition);
}

.pg__btn:hover:not(:disabled){
  border-color:var(--rosa);
  color:var(--rosa);
}

.pg__btn:disabled{
  opacity:.4;
  cursor:not-allowed;
}

.pg__page{
  width:32px;
  height:32px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:600;
  font-family:inherit;
  color:var(--text-light);
  background:var(--surface);
  border:1px solid var(--border);
  cursor:pointer;
  transition:var(--transition);
}

.pg__page:hover:not(.pg__page--active){
  border-color:var(--rosa);
  color:var(--rosa);
}

.pg__page--active{
  background:var(--accent);
  color:#fff;
  border-color:transparent;
}

.pg__dots{
  font-size:12px;
  color:var(--text-muted);
  padding:0 4px;
}

/* =============================
   BENEFIT ROWS
   ============================= */
.ben-row{
  display:flex;
  align-items:center;
  gap:8px;
}

/* =============================
   CALENDAR RULES INLINE
   ============================= */
.cal-rules-section{
  margin-top:24px;
  padding-top:20px;
  border-top:2px solid var(--border);
}

.cal-rules-section__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
}

.cal-rules-section__title{
  font-size:14px;
  font-weight:700;
  color:var(--text);
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.cal-rules-section__title svg{
  width:18px;height:18px;color:var(--rosa);
}

.cal-rules-empty{
  color:var(--text-muted);
  font-size:13px;
  text-align:center;
  padding:24px 16px;
  background:var(--surface-alt);
  border-radius:var(--radius);
  border:1px dashed var(--border);
}

.cal-rule-card{
  background:var(--surface-alt);
  border:1px solid var(--border-light);
  border-radius:var(--radius-lg);
  margin-bottom:12px;
  overflow:hidden;
  transition:var(--transition);
}

.cal-rule-card:hover{
  border-color:var(--border);
}

.cal-rule-card__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px 0;
}

.cal-rule-card__num{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--rosa);
}

.cal-rule-card__body{
  padding:12px 16px;
}

.cal-rule-card__summary{
  padding:10px 16px;
  background:var(--surface);
  border-top:1px solid var(--border-light);
  font-size:12px;
  font-weight:500;
  color:var(--text-light);
}

/* Chip selectors */
.cal-freq-chips,
.cal-day-chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.cal-chip{
  padding:6px 14px;
  border-radius:20px;
  font-size:12px;
  font-weight:600;
  font-family:inherit;
  color:var(--text-light);
  background:var(--surface);
  border:1px solid var(--border);
  cursor:pointer;
  transition:var(--transition);
  white-space:nowrap;
}

.cal-chip:hover{
  border-color:var(--rosa);
  color:var(--rosa);
}

.cal-chip--active{
  background:var(--rosa);
  color:#fff;
  border-color:var(--rosa);
}

.cal-chip--active:hover{
  background:var(--rosa-hover);
  border-color:var(--rosa-hover);
  color:#fff;
}

.cal-chip--day{
  width:44px;
  padding:6px 0;
  text-align:center;
  border-radius:50%;
  aspect-ratio:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

@media(max-width:480px){
  .cal-chip--day{
    width:38px;
    font-size:11px;
  }
}

/* =============================
   ICON PICKER (scrollable grid with search)
   ============================= */
.icon-picker-wrap{
  display:flex;flex-direction:column;gap:6px;
}
.icon-picker-search{
  padding:7px 10px;font-size:13px;border:1px solid var(--border);
  border-radius:var(--radius);background:var(--surface);color:var(--text);
  font-family:inherit;width:100%;
}
.icon-picker-search:focus{outline:none;border-color:var(--rosa)}
.icon-picker{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  max-height:200px;
  overflow-y:auto;
  padding:8px;
  background:var(--surface-alt);
  border:1px solid var(--border);
  border-radius:var(--radius);
}

.icon-picker__item{
  width:40px;height:40px;
  border-radius:var(--radius);
  border:2px solid transparent;
  background:var(--surface);
  cursor:pointer;
  display:inline-flex;
  align-items:center;justify-content:center;
  transition:var(--transition);
  color:var(--text-light);
  padding:0;
}

.icon-picker__item svg{width:20px;height:20px}

.icon-picker__item:hover{
  border-color:var(--rosa);
  color:var(--rosa);
}

.icon-picker__item--active{
  border-color:var(--rosa);
  background:var(--rosa-soft);
  color:var(--rosa);
  box-shadow:0 0 0 2px var(--rosa-soft);
}

.icon-picker__item[hidden]{display:none}

/* =============================
   COLOR DROPDOWN (custom)
   ============================= */
.color-dd{position:relative;width:100%}
.color-dd__trigger{
  display:flex;align-items:center;gap:10px;
  padding:8px 12px;width:100%;cursor:pointer;
  border:1px solid var(--border);border-radius:var(--radius);
  background:var(--surface);transition:var(--transition);
  font-family:inherit;font-size:13px;font-weight:600;color:var(--text);
}
.color-dd__trigger:hover{border-color:var(--text-light)}
.color-dd__trigger.open{border-color:var(--rosa)}
.color-dd__trigger svg{width:12px;height:12px;margin-left:auto;flex-shrink:0;opacity:.5}
.color-dd__swatch{
  width:18px;height:18px;border-radius:50%;flex-shrink:0;
  border:2px solid rgba(255,255,255,.6);box-shadow:0 1px 3px rgba(0,0,0,.15);
}
.color-dd__list{
  display:none;position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:80;
  max-height:200px;overflow-y:auto;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:0 8px 24px rgba(0,0,0,.12);
  padding:4px;
}
.color-dd__list.open{display:block}
.color-dd__option{
  display:flex;align-items:center;gap:10px;
  padding:8px 10px;cursor:pointer;border-radius:calc(var(--radius) - 2px);
  font-size:13px;font-weight:500;color:var(--text);
  transition:background .15s ease;
}
.color-dd__option:hover{background:var(--surface-alt)}
.color-dd__option.active{background:var(--rosa-soft)}
.color-dd__option .color-dd__swatch{width:16px;height:16px}

/* =============================
   TABLE ICON & COLOR DISPLAY
   ============================= */
.data-table__icon{
  display:inline-flex;
  align-items:center;justify-content:center;
  width:32px;height:32px;
  border-radius:var(--radius);
  background:var(--surface-alt);
  color:var(--text-light);
}

.data-table__icon svg{width:18px;height:18px}

.data-table__color{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:500;
  color:var(--text-light);
}

.data-table__color-dot{
  width:14px;height:14px;
  border-radius:50%;
  flex-shrink:0;
  border:2px solid rgba(255,255,255,.5);
  box-shadow:0 1px 2px rgba(0,0,0,.12);
}

/* =============================
   CLOCK INPUT & POPUP
   ============================= */
.clock-input{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
  cursor:pointer;
  transition:var(--transition);
}

.clock-input:hover{
  border-color:var(--rosa);
}

.clock-input__icon{
  display:flex;
  color:var(--text-muted);
}

.clock-input__icon svg{width:18px;height:18px}

.clock-input__value{
  font-size:14px;
  font-weight:600;
  font-family:'Inter',system-ui,sans-serif;
  color:var(--text);
  letter-spacing:.05em;
}

/* Clock popup overlay */
.clock-popup{
  position:fixed;inset:0;
  background:rgba(58,53,48,.4);
  backdrop-filter:blur(3px);
  z-index:2000;
  display:flex;
  align-items:center;justify-content:center;
  opacity:0;
  transition:opacity .2s ease;
}

.clock-popup.open{opacity:1}

.clock-popup__content{
  background:var(--surface);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg);
  width:300px;
  max-width:90vw;
  overflow:hidden;
}

.clock-popup__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 20px;
  border-bottom:1px solid var(--border-light);
}

.clock-popup__title{
  font-size:14px;
  font-weight:600;
  color:var(--text);
}

.clock-popup__display{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:20px 0 8px;
}

.clock-popup__num{
  font-size:40px;
  font-weight:700;
  font-family:'Inter',system-ui,sans-serif;
  color:var(--text-muted);
  background:none;
  border:none;
  cursor:pointer;
  padding:4px 8px;
  border-radius:var(--radius);
  transition:var(--transition);
  line-height:1;
}

.clock-popup__num:hover{
  background:var(--surface-alt);
}

.clock-popup__num--active{
  color:var(--rosa);
  background:var(--rosa-soft);
}

.clock-popup__sep{
  font-size:36px;
  font-weight:700;
  color:var(--text-muted);
  line-height:1;
}

/* Clock face */
.clock-face{
  position:relative;
  width:240px;height:240px;
  margin:8px auto 16px;
  background:var(--surface-alt);
  border-radius:50%;
  border:2px solid var(--border);
}

.clock-face__center{
  position:absolute;
  top:50%;left:50%;
  width:8px;height:8px;
  margin:-4px 0 0 -4px;
  border-radius:50%;
  background:var(--rosa);
  z-index:3;
}

.clock-face__hand{
  position:absolute;
  top:50%;left:50%;
  height:2px;
  background:var(--rosa);
  transform-origin:0 50%;
  transition:transform .2s ease, width .2s ease;
  border-radius:2px;
  z-index:2;
}

.clock-face__numbers{
  position:absolute;inset:0;
}

.clock-face__num{
  position:absolute;
  width:34px;height:34px;
  margin:-17px 0 0 -17px;
  border-radius:50%;
  display:flex;
  align-items:center;justify-content:center;
  font-size:13px;
  font-weight:600;
  font-family:'Inter',system-ui,sans-serif;
  color:var(--text);
  background:transparent;
  border:none;
  cursor:pointer;
  transition:var(--transition);
  z-index:4;
}

.clock-face__num:hover{
  background:var(--rosa-soft);
  color:var(--rosa);
}

.clock-face__num--active{
  background:var(--rosa);
  color:#fff;
}

.clock-face__num--active:hover{
  background:var(--rosa-hover);
  color:#fff;
}

.clock-face__num--inner{
  font-size:11px;
  width:28px;height:28px;
  margin:-14px 0 0 -14px;
  color:var(--text-light);
}

.clock-popup__footer{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  padding:12px 20px;
  border-top:1px solid var(--border-light);
}

/* =============================
   SEARCH BAR & SORTABLE COLUMNS
   ============================= */
.panel__toolbar{
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 20px 16px;
}

.panel__search{
  flex:1;
  max-width:320px;
  display:flex;
  align-items:center;
  gap:8px;
  background:var(--surface-alt);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:0 12px;
  transition:var(--transition);
}

.panel__search:focus-within{
  border-color:var(--rosa);
  box-shadow:0 0 0 2px var(--rosa-soft);
}

.panel__search svg{
  width:16px;height:16px;
  color:var(--text-muted);
  flex-shrink:0;
}

.panel__search input{
  flex:1;
  border:none;
  background:none;
  padding:8px 0;
  font-size:13px;
  color:var(--text-main);
  outline:none;
  font-family:inherit;
}

.panel__search input::placeholder{
  color:var(--text-muted);
}

th.sortable{
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}

th.sortable:hover{
  color:var(--rosa);
}

.sort-arrow{
  display:inline-block;
  margin-left:4px;
  font-size:10px;
  opacity:0.3;
}

th.sort--active .sort-arrow{
  opacity:1;
  color:var(--rosa);
}

/* =============================
   STATUS BADGES
   ============================= */
.badge--no_leido{background:#e2e8f0;color:#475569}
.badge--en_progreso{background:#fef3c7;color:#92400e}
.badge--resuelto{background:#d1fae5;color:#065f46}
.badge--activo{background:#d1fae5;color:#065f46}
.badge--inactivo{background:#fee2e2;color:#991b1b}

/* =============================
   SUB-TABS (Contact status tabs)
   ============================= */
.sub-tabs{
  display:flex;
  gap:0;
  border-bottom:2px solid var(--border);
  margin-bottom:16px;
  padding:0 20px;
}

.sub-tab{
  padding:10px 20px;
  font-size:13px;
  font-weight:500;
  color:var(--text-muted);
  border:none;
  background:none;
  cursor:pointer;
  border-bottom:2px solid transparent;
  margin-bottom:-2px;
  transition:var(--transition);
  display:flex;
  align-items:center;
  gap:6px;
}

.sub-tab:hover{color:var(--text-main)}

.sub-tab.active{
  color:var(--rosa);
  border-bottom-color:var(--rosa);
}

/* Status-colored sub-tabs */
.sub-tab.active.sub-tab--no_leido{
  color:#475569;
  border-bottom-color:#94a3b8;
}
.sub-tab.active.sub-tab--en_progreso{
  color:#92400e;
  border-bottom-color:#f59e0b;
}
.sub-tab.active.sub-tab--resuelto{
  color:#065f46;
  border-bottom-color:#10b981;
}

.sub-tab__count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  font-size:11px;
  font-weight:600;
  border-radius:10px;
  background:var(--surface-alt);
  color:var(--text-muted);
}

.sub-tab.active .sub-tab__count{
  background:var(--rosa-soft);
  color:var(--rosa);
}

/* Status-colored counts */
.sub-tab.active.sub-tab--no_leido .sub-tab__count{
  background:#e2e8f0;
  color:#475569;
}
.sub-tab.active.sub-tab--en_progreso .sub-tab__count{
  background:#fef3c7;
  color:#92400e;
}
.sub-tab.active.sub-tab--resuelto .sub-tab__count{
  background:#d1fae5;
  color:#065f46;
}

/* =============================
   EMAIL CHIPS (Gmail-style)
   ============================= */
.email-chips{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  min-height:42px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--bg);
  cursor:text;
  transition:var(--transition);
}

.email-chips:focus-within{
  border-color:var(--rosa);
  box-shadow:0 0 0 2px var(--rosa-soft);
}

.email-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 8px 4px 10px;
  font-size:12px;
  font-weight:500;
  background:var(--surface-alt);
  border:1px solid var(--border);
  border-radius:16px;
  color:var(--text-main);
  line-height:1;
  max-width:260px;
}

.email-chip__text{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.email-chip__remove{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:16px;
  height:16px;
  border:none;
  background:none;
  color:var(--text-muted);
  cursor:pointer;
  border-radius:50%;
  font-size:13px;
  line-height:1;
  padding:0;
  transition:var(--transition);
  flex-shrink:0;
}

.email-chip__remove:hover{
  background:#fee2e2;
  color:#e53e3e;
}

.email-chips__input{
  flex:1;
  min-width:140px;
  border:none;
  outline:none;
  font-size:13px;
  font-family:inherit;
  background:transparent;
  color:var(--text-main);
  padding:2px 0;
}

.email-chips__input::placeholder{
  color:var(--text-muted);
}

/* =============================
   CONTACT DETAIL PANEL
   ============================= */
.contact-detail{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.contact-info{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  padding:20px;
  background:var(--surface-alt);
  border-radius:var(--radius);
  border:1px solid var(--border);
}

.contact-info__item{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.contact-info__item--full{
  grid-column:1/-1;
}

.contact-info__label{
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.5px;
  color:var(--text-muted);
}

.contact-info__value{
  font-size:14px;
  color:var(--text-main);
  word-break:break-word;
}

.status-btns{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.status-btn{
  padding:6px 14px;
  font-size:12px;
  font-weight:500;
  border-radius:var(--radius);
  border:2px solid var(--border);
  background:var(--bg);
  cursor:pointer;
  transition:var(--transition);
}

.status-btn:hover{border-color:var(--rosa)}
.status-btn.active--no_leido{border-color:#94a3b8;background:#e2e8f0;color:#475569}
.status-btn.active--en_progreso{border-color:#f59e0b;background:#fef3c7;color:#92400e}
.status-btn.active--resuelto{border-color:#10b981;background:#d1fae5;color:#065f46}

/* =============================
   MAIL COMPOSER
   ============================= */
.mail-composer{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:20px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
}

.mail-composer__header{
  font-size:14px;
  font-weight:600;
  color:var(--text-main);
  display:flex;
  align-items:center;
  gap:8px;
}

.mail-composer__header svg{
  width:18px;height:18px;
  color:var(--rosa);
}

.mail-field{
  display:flex;
  align-items:center;
  gap:8px;
}

.mail-field__label{
  font-size:12px;
  font-weight:600;
  min-width:50px;
  color:var(--text-muted);
}

.mail-field__input{
  flex:1;
  padding:8px 12px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  font-size:13px;
  font-family:inherit;
  background:var(--bg);
  color:var(--text-main);
  transition:var(--transition);
}

.mail-field__input:focus{
  outline:none;
  border-color:var(--rosa);
  box-shadow:0 0 0 2px var(--rosa-soft);
}

/* =============================
   RICH TEXT TOOLBAR
   ============================= */
.richtext-toolbar{
  display:flex;
  align-items:center;
  gap:3px;
  padding:6px 8px;
  border:1px solid var(--border);
  border-bottom:none;
  border-radius:var(--radius) var(--radius) 0 0;
  background:var(--surface-alt);
  flex-wrap:wrap;
}

.richtext-toolbar button{
  padding:4px 7px;
  font-size:12px;
  font-weight:600;
  border:1px solid transparent;
  border-radius:4px;
  background:none;
  color:var(--text-muted);
  cursor:pointer;
  transition:var(--transition);
  line-height:1;
}

.richtext-toolbar button:hover{
  background:var(--bg);
  color:var(--text-main);
  border-color:var(--border);
}

.richtext-toolbar button.active{
  background:var(--rosa-soft);
  color:var(--rosa);
  border-color:var(--rosa);
}

.richtext-toolbar .spacer{
  flex:1;
}

/* Separator */
.rt-sep{
  width:1px;
  height:20px;
  background:var(--border);
  margin:0 2px;
  flex-shrink:0;
}

/* Selects */
.rt-select{
  padding:3px 6px;
  font-size:11px;
  border:1px solid var(--border);
  border-radius:4px;
  background:var(--bg);
  color:var(--text-main);
  cursor:pointer;
  font-family:inherit;
  outline:none;
  max-width:110px;
}

.rt-select--sm{ max-width:85px }

.rt-select:focus{
  border-color:var(--rosa);
}

/* Color dropdown */
.rt-dropdown{
  position:relative;
}

.rt-dropdown__trigger{
  font-size:13px !important;
}

.rt-dropdown__panel{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  z-index:50;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:6px;
  gap:4px;
  flex-wrap:wrap;
  width:140px;
  box-shadow:0 4px 12px rgba(0,0,0,0.12);
}

.rt-dropdown__panel.open{
  display:flex;
}

.richtext-body{
  min-height:200px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:0 0 var(--radius) var(--radius);
  font-size:13px;
  font-family:inherit;
  background:var(--bg);
  color:var(--text-main);
  resize:vertical;
  outline:none;
  transition:var(--transition);
}

.richtext-body:focus{
  border-color:var(--rosa);
  box-shadow:0 0 0 2px var(--rosa-soft);
}

textarea.richtext-body{
  width:100%;
  box-sizing:border-box;
}

/* =============================
   NEWSLETTER SEND MODAL
   ============================= */
.nl-modal-overlay{
  position:fixed;
  inset:0;
  z-index:1500;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,0.45);
  backdrop-filter:blur(2px);
  padding:16px;
  overflow-y:auto;
}

.nl-modal{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  width:100%;
  max-width:480px;
  box-shadow:0 20px 60px rgba(0,0,0,0.2);
  overflow:hidden;
  margin:auto;
}

.nl-modal__header{
  padding:16px 20px;
  font-size:15px;
  font-weight:600;
  color:var(--text-main);
  border-bottom:1px solid var(--border);
}

.nl-modal__body{
  padding:20px;
  font-size:14px;
  color:var(--text-main);
  line-height:1.6;
}

.nl-modal__footer{
  padding:12px 20px;
  display:flex;
  gap:8px;
  justify-content:flex-end;
  border-top:1px solid var(--border);
  background:var(--surface-alt);
}

/* Simple spinner */
.spinner{
  width:28px;
  height:28px;
  border:3px solid var(--border);
  border-top-color:var(--rosa);
  border-radius:50%;
  animation:spin .7s linear infinite;
}

@keyframes spin{ to{ transform:rotate(360deg); } }

/* =============================
   IMAGE PICKER MODAL (Global)
   ============================= */
.img-picker-overlay{
  position:fixed;inset:0;z-index:2000;
  display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,0.5);backdrop-filter:blur(2px);
  padding:16px;
}
.img-picker-modal{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);
  width:100%;max-width:720px;max-height:85vh;display:flex;flex-direction:column;
  box-shadow:0 20px 60px rgba(0,0,0,0.2);overflow:hidden;
}
.img-picker-modal__header{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 20px;border-bottom:1px solid var(--border);
  font-size:15px;font-weight:600;color:var(--text);
  flex-shrink:0;
}
.img-picker-modal__search{ padding:12px 20px;flex-shrink:0; }
.img-picker-modal__grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:10px;
  padding:0 20px 16px;overflow-y:auto;flex:1;min-height:0;
}
.img-picker-item{
  cursor:pointer;border:2px solid var(--border);border-radius:var(--radius);
  overflow:hidden;transition:var(--transition);display:flex;flex-direction:column;
}
.img-picker-item:hover{ border-color:var(--rosa);box-shadow:0 0 0 2px var(--rosa-soft); }
.img-picker-item img{
  width:100%;height:100px;object-fit:cover;display:block;background:var(--surface-alt);
}
.img-picker-item__name{
  padding:6px 8px;font-size:11px;color:var(--text-muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.img-picker-modal__pagination{
  display:flex;gap:4px;padding:10px 20px;border-top:1px solid var(--border);
  justify-content:center;flex-wrap:wrap;flex-shrink:0;
}

/* =============================
   IMAGENES PAGE (CMS)
   ============================= */
.img-stats{
  display:grid;grid-template-columns:repeat(4,1fr);gap:12px;padding:20px 24px;
}
.img-stat-card{
  background:var(--surface-alt);border:1px solid var(--border);border-radius:var(--radius);
  padding:16px;display:flex;flex-direction:column;gap:4px;
}
.img-stat-card__label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.5px;color:var(--text-muted)}
.img-stat-card__value{font-size:22px;font-weight:700;color:var(--text)}

.img-thumb{width:48px;height:48px;object-fit:cover;border-radius:4px;border:1px solid var(--border);background:var(--surface-alt)}

.img-url-cell{
  max-width:260px;font-size:12px;color:var(--text-muted);font-family:monospace;
  word-break:break-all;line-height:1.5;
}

/* Upload modal */
.upload-preview{
  display:flex;gap:16px;align-items:flex-start;padding:16px;
  background:var(--surface-alt);border:1px solid var(--border);border-radius:var(--radius);
}
.upload-preview img{width:120px;height:90px;object-fit:cover;border-radius:var(--radius);border:1px solid var(--border)}
.upload-preview__info{display:flex;flex-direction:column;gap:6px;flex:1}
.upload-preview__info span{font-size:12px;color:var(--text-muted)}

.btn--browse{
  padding:6px 14px;font-size:12px;font-weight:500;border:1px solid var(--border);
  border-radius:var(--radius);background:var(--bg);cursor:pointer;color:var(--text);transition:var(--transition);
}
.btn--browse:hover{border-color:var(--rosa);color:var(--rosa)}

/* Sortable table headers */
.data-table th.sortable{cursor:pointer;user-select:none;transition:var(--transition)}
.data-table th.sortable:hover{color:var(--rosa)}
.data-table th.sortable .sort-arrow{font-size:10px;margin-left:4px;opacity:.4}
.data-table th.sortable.active .sort-arrow{opacity:1;color:var(--rosa)}

/* Warning box for delete in-use */
.warn-box{
  background:#fef3c7;border:1px solid #f59e0b;border-radius:var(--radius);
  padding:14px 16px;display:flex;gap:12px;align-items:flex-start;
}
.warn-box__icon{flex-shrink:0;width:24px;height:24px;color:#d97706}
.warn-box__icon svg{width:24px;height:24px}
.warn-box__body{flex:1}
.warn-box__title{font-size:14px;font-weight:700;color:#92400e;margin-bottom:4px}
.warn-box__text{font-size:13px;color:#78350f;line-height:1.6}
.warn-box__list{margin:8px 0 0;padding-left:18px;font-size:12px;color:#92400e;line-height:1.8}

/* =============================
   RESPONSIVE
   ============================= */
@media(max-width:768px){
  .sidebar{transform:translateX(-100%)}
  .sidebar.open{transform:translateX(0)}

  .main{margin-left:0}
  .main__content{padding:12px}
  .main__header{padding:0 12px}

  .mobile-menu-btn{display:block}

  .panel__header{padding:12px 16px;gap:8px;flex-wrap:wrap}
  .panel__body{padding:16px}

  /* ---- TABLE -> CARDS on mobile ---- */
  .data-table-wrap{overflow:hidden}
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table th,
  .data-table td,
  .data-table tr{display:block;width:100%}

  .data-table thead{
    position:absolute;left:-9999px;top:-9999px;
  }

  .data-table tr{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    margin-bottom:10px;
    padding:12px 14px;
    display:flex;
    flex-direction:column;
    gap:4px;
  }
  .data-table tr:hover td{background:transparent}

  .data-table td{
    border:none;
    padding:3px 0;
    font-size:13px;
    display:flex;
    align-items:baseline;
    gap:8px;
    width:100%;
    min-width:0;
    word-break:break-word;
  }

  .data-table td::before{
    content:attr(data-label);
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.06em;
    color:var(--text-muted);
    min-width:65px;
    max-width:65px;
    flex-shrink:0;
  }
  .data-table td[data-label=""]::before,
  .data-table td:not([data-label])::before{display:none}

  /* Image cell -- no label, center the thumb */
  .data-table td[data-label=""]{justify-content:flex-start;padding-bottom:4px}

  /* Full-width cells */
  .data-table td[data-label="Acciones"],
  .data-table td[data-label="Mensaje"],
  .data-table td.mobile-full{
    padding-top:8px;
    border-top:1px solid var(--border);
    margin-top:4px;
  }
  .data-table td[data-label="Acciones"]::before{display:none}

  /* Image thumbnails in cards */
  .data-table__thumb{width:56px;height:42px;border-radius:6px}
  .img-thumb{width:56px;height:56px}

  /* URL cell word-break */
  .img-url-cell{max-width:100%;word-break:break-all}

  /* Action buttons */
  .data-table__actions{display:flex;gap:6px;flex-wrap:wrap}
  .action-group{display:flex;gap:6px;flex-wrap:wrap}

  /* Modals */
  .modal{max-width:100%;border-radius:var(--radius)}
  .modal-overlay{padding:8px}
  .modal__body{padding:16px}
  .modal__header{padding:14px 16px;font-size:14px}
  .modal__footer{padding:10px 16px}

  .form-row{grid-template-columns:1fr}

  .stats-grid{grid-template-columns:1fr 1fr}

  /* Image stats */
  .img-stats{grid-template-columns:1fr 1fr;padding:16px;gap:8px}

  /* Image picker grid */
  .img-picker-modal__grid{grid-template-columns:repeat(2,1fr);gap:8px;padding:0 12px 12px}
  .img-picker-modal{max-height:90vh;border-radius:var(--radius)}
  .img-picker-overlay{padding:8px}
  .img-picker-modal__header{padding:12px 16px;font-size:14px}
  .img-picker-modal__search{padding:8px 12px}

  /* Newsletter/Send modals */
  .nl-modal-overlay{padding:8px}
  .nl-modal{max-width:100%;border-radius:var(--radius)}
  .nl-modal__body{padding:16px}
  .nl-modal__header{padding:12px 16px;font-size:14px}
  .nl-modal__footer{padding:10px 16px}

  /* Search bar */
  .search-bar{max-width:100%}

  /* Sub-tabs scroll on mobile */
  .sub-tabs{overflow-x:auto;-webkit-overflow-scrolling:touch;flex-wrap:nowrap}
  .sub-tab{white-space:nowrap;flex-shrink:0}

  /* Upload preview */
  .upload-preview{flex-direction:column;align-items:center}
  .upload-preview img{width:100%;height:auto;max-height:160px}

  /* Btn groups */
  .panel__header .btn{font-size:11px;padding:5px 10px}

  /* Rich text editor */
  .richtext-toolbar{gap:2px;padding:4px 6px}
  .rt-select{max-width:80px;font-size:10px}
  .rt-select--sm{max-width:65px}

  /* Image URL cell */
  .img-url-cell{max-width:100%;word-break:break-all}
}

@media(max-width:480px){
  .stats-grid{grid-template-columns:1fr}
  .img-stats{grid-template-columns:1fr}
  .img-picker-modal__grid{grid-template-columns:repeat(2,1fr)}
}
