/* ══ BUTTONS ══ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; font-size: 13px; font-weight: 600;
  border-radius: var(--radius-sm); cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text);
  transition: var(--transition); white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn:hover  { background: var(--gray-50); border-color: var(--gray-300); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: scale(0.97) translateY(0); }
.btn i { font-size: 16px; }

.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 8px 28px rgba(79,70,229,0.35); }

.btn-accent  { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: #0891B2; }

.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-success:hover { background: #059669; box-shadow: 0 8px 24px rgba(16,185,129,0.3); }

.btn-danger  { color: var(--red); border-color: #FECACA; background: var(--surface); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); }

.btn-ghost   { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--gray-100); border-color: transparent; }

.btn-sm  { padding: 6px 12px; font-size: 12px; border-radius: 7px; }
.btn-sm i { font-size: 14px; }
.btn-lg  { padding: 12px 24px; font-size: 15px; border-radius: 12px; }
.btn-full { width: 100%; justify-content: center; }

.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 10px; }
.btn-icon.sm { width: 30px; height: 30px; border-radius: 7px; }

/* ══ BADGES ══ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  letter-spacing: 0.02em;
}
.badge-brand  { background: var(--brand-light); color: var(--brand); }
.badge-blue   { background: #DBEAFE; color: #1D4ED8; }
.badge-green  { background: var(--green-bg); color: var(--green-text); }
.badge-amber  { background: var(--amber-bg); color: var(--amber-text); }
.badge-red    { background: var(--red-bg);   color: var(--red-text); }
.badge-purple { background: var(--purple-bg); color: #6D28D9; }
.badge-gray   { background: var(--gray-100); color: var(--gray-600); }
.badge-cyan   { background: var(--accent-bg); color: #0891B2; }
.badge-dot::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; display:inline-block; }

/* ══ CARDS ══ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  margin-bottom: 12px; box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-interactive { cursor: pointer; }
.card-interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; }
.card-title { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card-sub   { font-size: 12px; color: var(--text2); margin-top: 4px; }
.card-actions { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }

/* Card colored accent */
.card-brand { border-left: 4px solid var(--brand); }
.card-green { border-left: 4px solid var(--green); }
.card-amber { border-left: 4px solid var(--amber); }
.card-red   { border-left: 4px solid var(--red); }

/* ══ KPI CARDS ══ */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 14px; margin-bottom: 24px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow-sm); transition: var(--transition);
  position: relative; overflow: hidden;
}
.kpi::before { content:''; position:absolute; top:0; right:0; width:80px; height:80px; border-radius:50%; opacity:0.06; transform:translate(20px,-20px); }
.kpi.blue::before   { background: var(--brand); }
.kpi.green::before  { background: var(--green); }
.kpi.amber::before  { background: var(--amber); }
.kpi.red::before    { background: var(--red); }
.kpi.purple::before { background: var(--purple); }
.kpi.cyan::before   { background: var(--accent); }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 12px;
}
.kpi-icon.blue   { background: var(--brand-light); color: var(--brand); }
.kpi-icon.green  { background: var(--green-bg);    color: var(--green); }
.kpi-icon.amber  { background: var(--amber-bg);    color: var(--amber); }
.kpi-icon.red    { background: var(--red-bg);      color: var(--red); }
.kpi-icon.purple { background: var(--purple-bg);   color: var(--purple); }
.kpi-icon.cyan   { background: var(--accent-bg);   color: var(--accent); }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--text2); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; }
.kpi-value { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; font-family: 'Inter', sans-serif; }
.kpi-sub   { font-size: 11px; color: var(--text2); margin-top: 4px; display: flex; align-items: center; gap: 3px; }
.kpi-trend-up   { color: var(--green); }
.kpi-trend-down { color: var(--red); }

/* Add KPI button */
.kpi-add {
  background: var(--gray-50); border: 2px dashed var(--gray-300);
  border-radius: var(--radius); padding: 18px 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); min-height: 120px; gap: 8px;
}
.kpi-add:hover { border-color: var(--brand); background: var(--brand-light); }
.kpi-add i { font-size: 24px; color: var(--gray-400); }
.kpi-add:hover i { color: var(--brand); }
.kpi-add span { font-size: 12px; font-weight: 600; color: var(--gray-400); }
.kpi-add:hover span { color: var(--brand); }

/* ══ TABLES ══ */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { background: var(--gray-50); text-align: left; padding: 12px 16px; color: var(--text2); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; border-bottom: 1px solid var(--border); }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--brand-light); }

/* ══ FORMS ══ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fg { display: flex; flex-direction: column; gap: 5px; }
.fg.full { grid-column: 1 / -1; }
.fg label { font-size: 12px; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: .05em; }
.fg input, .fg select, .fg textarea {
  font-family: inherit; font-size: 14px; font-weight: 500;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; background: var(--surface); color: var(--text);
  outline: none; transition: var(--transition); width: 100%;
}
.fg input:focus, .fg select:focus, .fg textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.fg textarea { resize: vertical; min-height: 80px; }

/* Color picker row */
.color-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.color-swatch { width: 28px; height: 28px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: var(--transition); }
.color-swatch:hover, .color-swatch.selected { border-color: var(--gray-800); transform: scale(1.15); }

/* ══ MODALS ══ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,0.55); backdrop-filter: blur(4px);
  z-index: 200; align-items: flex-start;
  justify-content: center; padding: 32px 16px;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
.modal {
  background: var(--surface); border-radius: 20px;
  border: 1px solid var(--border);
  padding: 24px; width: 100%; max-width: 520px;
  max-height: calc(100vh - 64px); overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-lg { max-width: 680px; }
.modal-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; }
.modal-foot  { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; }

/* ══ ANNOUNCEMENT MODAL ══ */
.announcement-card {
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.announcement-header {
  padding: 28px 28px 20px;
  display: flex; align-items: flex-start; gap: 16px;
}
.announcement-icon-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.announcement-body { padding: 0 28px 28px; }
.announcement-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ══ ALERTS ══ */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 500; }
.alert i { font-size: 18px; flex-shrink: 0; }
.alert-red    { background: var(--red-bg);    color: var(--red-text);   border: 1px solid #FECACA; }
.alert-green  { background: var(--green-bg);  color: var(--green-text); border: 1px solid #A7F3D0; }
.alert-amber  { background: var(--amber-bg);  color: var(--amber-text); border: 1px solid #FDE68A; }
.alert-brand  { background: var(--brand-light); color: var(--brand);    border: 1px solid #C7D2FE; }

/* ══ PROGRESS ══ */
.progress-bar  { height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-mid)); border-radius: 4px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }

/* ══ STAT ROW ══ */
.stat-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px; }
.stat-row:last-child { border-bottom: none; }
.stat-key { color: var(--text2); font-weight: 500; }
.stat-val { font-weight: 600; color: var(--text); }

/* ══ EMPTY STATE ══ */
.empty { text-align: center; padding: 48px 20px; color: var(--gray-400); }
.empty i { font-size: 44px; display: block; margin-bottom: 12px; color: var(--gray-200); }
.empty h3 { font-size: 16px; font-weight: 700; color: var(--gray-500); margin-bottom: 6px; }
.empty p  { font-size: 13px; margin-bottom: 18px; color: var(--gray-400); }

/* ══ SEARCHBAR ══ */
.searchbar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.searchbar input, .searchbar select {
  font-family: inherit; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 13px; background: var(--surface); color: var(--text);
  outline: none; transition: var(--transition);
}
.searchbar input { flex: 1; min-width: 160px; }
.searchbar input:focus, .searchbar select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }

/* ══ LIST ITEMS ══ */
.list-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  margin-bottom: 10px; display: flex;
  align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.list-item:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.list-item-left { display: flex; align-items: center; gap: 14px; }
.list-item-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.list-item-title { font-size: 14px; font-weight: 600; color: var(--text); }
.list-item-sub   { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* ══ ANNOUNCEMENT CARD (list) ══ */
.ann-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px;
  box-shadow: var(--shadow-sm); transition: var(--transition);
  cursor: pointer; overflow: hidden;
}
.ann-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ann-card-inner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.ann-card-icon  { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.ann-card-accent { height: 4px; }

/* ══ TIMELINE ══ */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content:''; position:absolute; left:11px; top:0; bottom:0; width:2px; background: var(--gray-200); }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot  { position: absolute; left: -28px; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--surface); display: flex; align-items: center; justify-content: center; font-size: 10px; box-shadow: 0 0 0 2px var(--brand); background: var(--brand); color: #fff; }
.timeline-dot.green  { background: var(--green);  box-shadow: 0 0 0 2px var(--green); }
.timeline-dot.amber  { background: var(--amber);  box-shadow: 0 0 0 2px var(--amber); }
.timeline-dot.gray   { background: var(--gray-300); box-shadow: 0 0 0 2px var(--gray-300); }
.timeline-content { background: var(--gray-50); border-radius: var(--radius-sm); padding: 12px 14px; border: 1px solid var(--border); }
.timeline-title { font-size: 13px; font-weight: 600; color: var(--text); }
.timeline-date  { font-size: 11px; color: var(--text2); margin-top: 2px; }

/* ══ QR PLACEHOLDER ══ */
.qr-box {
  width: 180px; height: 180px; border: 3px solid var(--brand);
  border-radius: 16px; display: flex; align-items: center;
  justify-content: center; margin: 16px auto;
  background: var(--brand-light); position: relative; overflow: hidden;
}
.qr-box canvas { border-radius: 8px; }
.qr-corners::before, .qr-corners::after { content:''; position:absolute; width:20px; height:20px; border:3px solid var(--brand); }
.qr-corners::before { top:8px; left:8px; border-right:none; border-bottom:none; border-radius:4px 0 0 0; }
.qr-corners::after  { bottom:8px; right:8px; border-left:none; border-top:none; border-radius:0 0 4px 0; }

/* ══ POLL / VOTE ══ */
.poll-option { background: var(--gray-50); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 8px; cursor: pointer; transition: var(--transition); }
.poll-option:hover { border-color: var(--brand); background: var(--brand-light); }
.poll-option.voted { border-color: var(--brand); background: var(--brand-light); }
.poll-bar { height: 6px; background: var(--gray-200); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.poll-bar-fill { height: 100%; background: linear-gradient(90deg,var(--brand),var(--brand-mid)); border-radius: 3px; transition: width 0.5s ease; }
.poll-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.poll-pct { font-size: 12px; color: var(--text2); }

/* ══ BENEFIT CARD ══ */
.benefit-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: var(--transition); cursor: pointer;
}
.benefit-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.benefit-card-img { height: 80px; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.benefit-card-body { padding: 12px 14px; }
.benefit-card-name { font-size: 13px; font-weight: 700; color: var(--text); }
.benefit-card-desc { font-size: 11px; color: var(--text2); margin-top: 3px; }
.benefit-discount   { font-size: 20px; font-weight: 800; color: var(--brand); margin-top: 4px; }

/* ══ MURO SOCIAL ══ */
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; box-shadow: var(--shadow-sm); transition: var(--transition); }
.post-card:hover { box-shadow: var(--shadow); }
.post-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0; }
.post-author { font-size: 13px; font-weight: 700; color: var(--text); }
.post-date   { font-size: 11px; color: var(--text2); }
.post-content { font-size: 14px; color: var(--text); line-height: 1.6; margin-top: 12px; }
.post-actions { display: flex; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-100); }
.post-action  { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text2); cursor: pointer; transition: color .15s; font-weight: 500; }
.post-action:hover { color: var(--brand); }
.post-action i { font-size: 15px; }

/* ══ INFO BANNER ══ */
.info-banner { background: var(--brand-light); border: 1px solid #C7D2FE; border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--brand); font-weight: 500; }
.info-banner i { font-size: 18px; }

/* ══ QUICK GRID ══ */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-btn {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 80px; gap: 6px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--text); font-family: inherit; box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.quick-btn:hover { border-color: var(--brand); background: var(--brand-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-btn i { font-size: 22px; color: var(--brand); transition: transform .2s; }
.quick-btn:hover i { transform: scale(1.15); }

/* ══ UNIT GRID ══ */
.unit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.unit-tile { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12px; transition: var(--transition); }
.unit-tile:hover { border-color: var(--brand); background: var(--brand-light); }
.unit-tile-name { font-weight: 700; color: var(--text); }
.unit-tile-sub  { color: var(--text2); margin-top: 2px; }

/* ══ PAGO RESUMEN ══ */
.pago-resumen { background: var(--gray-50); border-radius: var(--radius-sm); padding: 16px; font-size: 13px; margin-top: 16px; border: 1px solid var(--border); }
.pago-row   { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--text2); font-weight: 500; }
.pago-total { display: flex; justify-content: space-between; font-weight: 700; border-top: 1.5px solid var(--border); padding-top: 10px; margin-top: 4px; font-size: 15px; }

/* ══ DASH COL TITLE ══ */
.dash-col-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }

/* ══ CLIENT ACCOUNT BANNER ══ */
.account-banner {
  background: linear-gradient(135deg, var(--sidebar) 0%, #1E3A5F 100%);
  border-radius: var(--radius-lg); padding: 24px 26px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 8px 32px rgba(15,23,42,0.2); position: relative; overflow: hidden;
}
.account-banner::before { content:''; position:absolute; top:-40px; right:-40px; width:160px; height:160px; border-radius:50%; background:rgba(255,255,255,0.04); }
.account-banner::after  { content:''; position:absolute; bottom:-60px; right:60px; width:200px; height:200px; border-radius:50%; background:rgba(255,255,255,0.03); }
.account-banner-left { display: flex; align-items: center; gap: 16px; z-index:1; }
.account-avatar { width: 54px; height: 54px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #fff; flex-shrink: 0; }
.account-name  { color: #fff; font-size: 18px; font-weight: 700; }
.account-unit  { color: rgba(255,255,255,0.6); font-size: 13px; margin-top: 3px; }
.account-balance { text-align: right; z-index:1; }
.account-balance-label { color: rgba(255,255,255,0.55); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.account-balance-val   { color: #fff; font-size: 30px; font-weight: 800; margin-top: 2px; font-family:'Inter',sans-serif; }
.account-balance-sub   { color: rgba(255,255,255,0.5); font-size: 11px; margin-top: 3px; }
