/* ============================================================
   ProBusiness — Design System CSS
   by Grupo Pro Digital
   ============================================================ */

/* --- Variables --- */
:root {
  --pb-cyan:       #00D4FF;
  --pb-dark:       #0A1628;
  --pb-dark-2:     #0F1E35;
  --pb-dark-3:     #162540;
  --pb-dark-4:     #1E3050;
  --pb-blue:       #0066CC;
  --pb-blue-light: #3B82F6;
  --pb-white:      #FFFFFF;
  --pb-gray-50:    #F8FAFC;
  --pb-gray-100:   #F1F5F9;
  --pb-gray-200:   #E2E8F0;
  --pb-gray-300:   #CBD5E1;
  --pb-gray-400:   #94A3B8;
  --pb-gray-500:   #64748B;
  --pb-gray-600:   #475569;
  --pb-success:    #22C55E;
  --pb-warning:    #F59E0B;
  --pb-danger:     #EF4444;
  --pb-purple:     #8B5CF6;
  --pb-sidebar-w:  260px;
  --pb-topbar-h:   64px;
  --pb-radius:     12px;
  --pb-radius-sm:  8px;
  --pb-radius-lg:  16px;
  --pb-shadow:     0 4px 24px rgba(0,0,0,0.3);
  --pb-shadow-sm:  0 2px 8px rgba(0,0,0,0.2);
  --pb-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: var(--pb-dark);
  color: var(--pb-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.pb-app-body, .pb-home-body {
  min-height: 100vh;
  background: var(--pb-dark);
}

a { color: var(--pb-cyan); text-decoration: none; }
a:hover { opacity: 0.85; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* --- Layout --- */
.pb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.pb-btn--primary {
  background: var(--pb-cyan);
  color: var(--pb-dark);
}
.pb-btn--primary:hover { background: #00BBDD; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,212,255,0.3); }

.pb-btn--ghost {
  background: transparent;
  color: var(--pb-gray-400);
  border: 1px solid var(--pb-dark-4);
}
.pb-btn--ghost:hover { background: var(--pb-dark-4); color: var(--pb-white); }

.pb-btn--danger-outline {
  background: transparent;
  color: var(--pb-danger);
  border: 1px solid var(--pb-danger);
}
.pb-btn--danger-outline:hover { background: var(--pb-danger); color: #fff; }

.pb-btn--success { background: var(--pb-success); color: #fff; }
.pb-btn--success:hover { background: #16A34A; }

.pb-btn--sm  { padding: 6px 14px; font-size: 13px; }
.pb-btn--lg  { padding: 14px 28px; font-size: 15px; }
.pb-btn--xl  { padding: 18px 36px; font-size: 17px; border-radius: var(--pb-radius); }
.pb-btn--full { width: 100%; justify-content: center; }

.pb-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

.pb-btn__loader { animation: pb-spin 0.8s linear infinite; }
@keyframes pb-spin { to { transform: rotate(360deg); } }

.pb-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--pb-dark-3);
  color: var(--pb-gray-400);
  border-radius: var(--pb-radius-sm);
  transition: var(--pb-transition);
}
.pb-icon-btn:hover { background: var(--pb-dark-4); color: var(--pb-white); }
.pb-icon-btn--danger:hover { background: rgba(239,68,68,0.15); color: var(--pb-danger); }

.pb-btn-group { display: flex; gap: 6px; flex-wrap: wrap; }
.pb-btn-toggle {
  padding: 7px 14px;
  border-radius: var(--pb-radius-sm);
  border: 1px solid var(--pb-dark-4);
  background: transparent;
  color: var(--pb-gray-400);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--pb-transition);
}
.pb-btn-toggle.is-active, .pb-btn-toggle:hover { background: var(--pb-cyan); color: var(--pb-dark); border-color: var(--pb-cyan); }

/* ============================================================
   FORMS
   ============================================================ */
.pb-form__group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.pb-form__group--inline { flex-direction: row; align-items: center; gap: 10px; margin-bottom: 0; }

.pb-form__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--pb-gray-400);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pb-form__input, .pb-select, .pb-form__textarea {
  background: var(--pb-dark-3);
  border: 1px solid var(--pb-dark-4);
  color: var(--pb-white);
  padding: 10px 14px;
  border-radius: var(--pb-radius-sm);
  font-size: 14px;
  transition: var(--pb-transition);
  width: 100%;
  outline: none;
}
.pb-form__input:focus, .pb-select:focus, .pb-form__textarea:focus {
  border-color: var(--pb-cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}
.pb-form__input--sm { padding: 7px 12px; font-size: 13px; width: auto; }
.pb-form__textarea { resize: vertical; min-height: 80px; }

.pb-form__input-wrap { position: relative; display: flex; align-items: center; }
.pb-form__input-prefix {
  position: absolute;
  left: 12px;
  color: var(--pb-gray-500);
  font-weight: 600;
  font-size: 15px;
  pointer-events: none;
}
.pb-form__input--prefixed { padding-left: 28px; }
.pb-form__toggle-pass {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--pb-gray-500);
  padding: 4px;
}

.pb-form__range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--pb-dark-4);
  border-radius: 3px;
  outline: none;
}
.pb-form__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--pb-cyan);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(0,212,255,0.2);
}

.pb-form__row { display: flex; gap: 16px; }
.pb-form__row--cols2 > * { flex: 1; min-width: 0; }
.pb-form__row--between { justify-content: space-between; align-items: center; }
.pb-form__actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.pb-form__section-title { font-size: 14px; font-weight: 600; color: var(--pb-gray-400); margin: 16px 0 12px; display: flex; align-items: center; gap: 6px; }

.pb-form__checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--pb-gray-300); }
.pb-form__checkbox input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--pb-cyan); }
.pb-form__checkbox--highlight { background: var(--pb-dark-3); padding: 10px 14px; border-radius: var(--pb-radius-sm); border: 1px solid var(--pb-dark-4); }

.pb-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.pb-select--sm { padding: 7px 32px 7px 12px; font-size: 13px; width: auto; }

.pb-pass-strength { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.pb-pass-strength__bar { flex: 1; height: 4px; background: var(--pb-dark-4); border-radius: 2px; }
.pb-pass-strength__fill { height: 100%; border-radius: 2px; transition: width 0.3s, background 0.3s; }
.pb-pass-strength__label { font-size: 12px; font-weight: 600; white-space: nowrap; }

/* ============================================================
   ALERTS & BADGES
   ============================================================ */
.pb-alert {
  padding: 12px 16px;
  border-radius: var(--pb-radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}
.pb-alert--error   { background: rgba(239,68,68,0.12);  color: #FCA5A5; border: 1px solid rgba(239,68,68,0.25); }
.pb-alert--success { background: rgba(34,197,94,0.12);  color: #86EFAC; border: 1px solid rgba(34,197,94,0.25); }
.pb-alert--warning { background: rgba(245,158,11,0.12); color: #FCD34D; border: 1px solid rgba(245,158,11,0.25); }

.pb-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pb-badge--high    { background: rgba(239,68,68,0.15); color: var(--pb-danger); }
.pb-badge--medium  { background: rgba(245,158,11,0.15); color: var(--pb-warning); }
.pb-badge--low     { background: rgba(34,197,94,0.15); color: var(--pb-success); }
.pb-badge--success { background: rgba(34,197,94,0.15); color: var(--pb-success); }
.pb-badge--warning { background: rgba(245,158,11,0.15); color: var(--pb-warning); }
.pb-badge--danger  { background: rgba(239,68,68,0.15); color: var(--pb-danger); }
.pb-badge--neutral { background: rgba(100,116,139,0.2); color: var(--pb-gray-400); }
.pb-badge--plan    { background: rgba(0,212,255,0.15); color: var(--pb-cyan); }

/* ============================================================
   LINKS
   ============================================================ */
.pb-link { color: var(--pb-cyan); font-size: 14px; font-weight: 500; }
.pb-link--sm { font-size: 12px; }
.pb-link--muted { color: var(--pb-gray-500); }

/* ============================================================
   PROGRESS
   ============================================================ */
.pb-progress {
  background: var(--pb-dark-4);
  border-radius: 100px;
  overflow: hidden;
  height: 6px;
}
.pb-progress--sm  { height: 4px; }
.pb-progress--lg  { height: 10px; }
.pb-progress__bar { height: 100%; background: var(--pb-cyan); border-radius: 100px; transition: width 0.4s ease; }

.pb-progress-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.pb-progress-row .pb-progress { flex: 1; }
.pb-progress-row span { font-size: 12px; color: var(--pb-gray-400); white-space: nowrap; }

/* ============================================================
   CARDS
   ============================================================ */
.pb-card {
  background: var(--pb-dark-2);
  border: 1px solid var(--pb-dark-4);
  border-radius: var(--pb-radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.pb-card--chart .pb-card__body { padding: 16px 20px; }
.pb-card--danger-zone { border-color: rgba(239,68,68,0.25); }

.pb-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--pb-dark-4);
}
.pb-card__title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pb-white);
}
.pb-card__subtitle { font-size: 12px; color: var(--pb-gray-500); }
.pb-card__body { padding: 20px; }

/* ============================================================
   TABLES
   ============================================================ */
.pb-table-wrap { overflow-x: auto; }
.pb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.pb-table thead tr { border-bottom: 1px solid var(--pb-dark-4); }
.pb-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pb-gray-500);
  white-space: nowrap;
}
.pb-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--pb-dark-4);
  color: var(--pb-gray-300);
}
.pb-table tbody tr:last-child td { border-bottom: none; }
.pb-table tbody tr:hover { background: var(--pb-dark-3); }
.pb-table-cell-user { display: flex; align-items: center; gap: 10px; }
.pb-table-actions { display: flex; gap: 6px; }

/* ============================================================
   SKELETON / LOADING
   ============================================================ */
.pb-loading-pulse {
  height: 200px;
  background: linear-gradient(90deg, var(--pb-dark-3) 25%, var(--pb-dark-4) 50%, var(--pb-dark-3) 75%);
  background-size: 200% 100%;
  animation: pb-shimmer 1.5s infinite;
  border-radius: var(--pb-radius-sm);
}
@keyframes pb-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.pb-skeleton-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.pb-skeleton-item { height: 40px; background: var(--pb-dark-3); border-radius: var(--pb-radius-sm); animation: pb-shimmer 1.5s infinite; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.pb-empty-state { text-align: center; padding: 32px 16px; }
.pb-empty-state--full { padding: 60px 24px; }
.pb-empty-state__icon { font-size: 48px; margin-bottom: 16px; }
.pb-empty-state h3 { font-size: 18px; font-weight: 700; color: var(--pb-white); margin-bottom: 8px; }
.pb-empty-state p { font-size: 14px; color: var(--pb-gray-500); margin-bottom: 20px; line-height: 1.7; }

/* ============================================================
   TOAST
   ============================================================ */
.pb-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pb-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--pb-radius-sm);
  font-size: 14px;
  font-weight: 500;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: pb-toast-in 0.3s ease;
  backdrop-filter: blur(10px);
}
@keyframes pb-toast-in { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: none; } }
.pb-toast--success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.4); color: #86EFAC; }
.pb-toast--error   { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.4); color: #FCA5A5; }
.pb-toast--warning { background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.4); color: #FCD34D; }
.pb-toast--info    { background: rgba(0,212,255,0.1);  border: 1px solid rgba(0,212,255,0.3); color: var(--pb-cyan); }

/* ============================================================
   FILTERS BAR
   ============================================================ */
.pb-filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--pb-dark-2);
  border: 1px solid var(--pb-dark-4);
  border-radius: var(--pb-radius);
}
.pb-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
}
.pb-search-wrap span { position: absolute; left: 12px; color: var(--pb-gray-500); pointer-events: none; display: flex; }
.pb-search-input {
  width: 100%;
  background: var(--pb-dark-3);
  border: 1px solid var(--pb-dark-4);
  color: var(--pb-white);
  padding: 9px 12px 9px 36px;
  border-radius: var(--pb-radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--pb-transition);
}
.pb-search-input:focus { border-color: var(--pb-cyan); }
.pb-search-input::placeholder { color: var(--pb-gray-600); }

/* ============================================================
   TABS
   ============================================================ */
.pb-tabs {
  display: flex;
  gap: 4px;
  background: var(--pb-dark-2);
  border: 1px solid var(--pb-dark-4);
  padding: 4px;
  border-radius: var(--pb-radius-sm);
  margin-bottom: 20px;
  width: fit-content;
  overflow-x: auto;
}
.pb-tab {
  padding: 8px 18px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--pb-gray-400);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--pb-transition);
  white-space: nowrap;
}
.pb-tab.is-active, .pb-tab:hover { background: var(--pb-dark-4); color: var(--pb-white); }
.pb-tab.is-active { background: var(--pb-cyan); color: var(--pb-dark); font-weight: 700; }

/* ============================================================
   MODAL
   ============================================================ */
.pb-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pb-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.pb-modal__panel {
  position: relative;
  background: var(--pb-dark-2);
  border: 1px solid var(--pb-dark-4);
  border-radius: var(--pb-radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: pb-modal-in 0.25s ease;
  z-index: 1;
}
@keyframes pb-modal-in { from { opacity:0; transform:scale(0.96) translateY(8px); } to { opacity:1; transform:none; } }

.pb-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--pb-dark-4);
}
.pb-modal__title { font-size: 17px; font-weight: 700; }
.pb-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--pb-dark-3);
  color: var(--pb-gray-400);
  border-radius: var(--pb-radius-sm);
  transition: var(--pb-transition);
}
.pb-modal__close:hover { background: var(--pb-danger); color: #fff; }
.pb-modal__body { padding: 24px; }
.pb-modal__footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 18px 24px;
  border-top: 1px solid var(--pb-dark-4);
}

.pb-modal--celebration .pb-modal__panel { max-width: 380px; text-align: center; }
.pb-modal__panel--celebration .pb-celebration { padding: 40px 24px; }
.pb-celebration__emoji { font-size: 64px; margin-bottom: 16px; animation: pb-bounce 0.6s ease; }
@keyframes pb-bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.pb-celebration__title { font-size: 22px; font-weight: 800; margin-bottom: 20px; }
.pb-celebration__badges { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.pb-celebration__badge { background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.3); padding: 10px 18px; border-radius: var(--pb-radius-sm); font-weight: 600; color: var(--pb-cyan); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.pb-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
}
.pb-auth-bg { position: fixed; inset: 0; z-index: 0; }
.pb-auth-bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}
.pb-auth-bg__glow--1 { width: 600px; height: 600px; top: -200px; left: -200px; background: var(--pb-cyan); }
.pb-auth-bg__glow--2 { width: 500px; height: 500px; bottom: -200px; right: -100px; background: var(--pb-blue); }
.pb-auth-bg__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px,transparent 1px), linear-gradient(90deg,rgba(255,255,255,0.03) 1px,transparent 1px);
  background-size: 50px 50px;
}

.pb-auth-container { position: relative; z-index: 1; width: 100%; max-width: 460px; }
.pb-auth-card {
  background: var(--pb-dark-2);
  border: 1px solid var(--pb-dark-4);
  border-radius: var(--pb-radius-lg);
  padding: 40px;
}
.pb-auth-card--wide { max-width: 560px; }
.pb-auth-card .pb-auth-container { max-width: 560px; }

.pb-auth-card__logo { display: flex; justify-content: center; margin-bottom: 24px; }
.pb-auth-card__title { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 8px; }
.pb-auth-card__subtitle { font-size: 14px; color: var(--pb-gray-500); text-align: center; margin-bottom: 28px; }
.pb-auth-card__footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--pb-gray-500); }
.pb-auth-card__home { text-align: center; margin-top: 12px; }

/* ============================================================
   LOGO MARK
   ============================================================ */
.pb-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--pb-cyan), var(--pb-blue));
  color: var(--pb-dark);
  font-size: 20px;
  font-weight: 900;
  border-radius: 12px;
  letter-spacing: -1px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,212,255,0.3);
}
.pb-logo-mark--sm { width: 34px; height: 34px; font-size: 16px; border-radius: 9px; }

/* ============================================================
   GRADIENT TEXT
   ============================================================ */
.pb-gradient-text {
  background: linear-gradient(135deg, var(--pb-cyan), var(--pb-blue-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   MISC
   ============================================================ */
.pb-divider { border: none; border-top: 1px solid var(--pb-dark-4); margin: 20px 0; }
.text-success { color: var(--pb-success) !important; }
.text-danger  { color: var(--pb-danger) !important; }
