/* ─── BUTTONS ────────────────────────────────────── */
.btn { padding:9px 18px; border-radius:9px; font-size:13px; font-weight:600; transition:all .18s cubic-bezier(.22,1,.36,1); display:inline-flex; align-items:center; gap:6px; }
.btn:active { transform:scale(.97); }
.btn-primary { background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; box-shadow:0 3px 12px rgba(59,127,245,.25); }
.btn-primary:hover { opacity:.94; transform:translateY(-1px); box-shadow:0 8px 22px rgba(59,127,245,.38); }
.btn-ghost { background:transparent; color:var(--t2); border:1px solid var(--b1); font-weight:500; }
.btn-ghost:hover { background:var(--s2); border-color:var(--b2); color:var(--text); }
.btn-green { background:rgba(24,217,139,.1); color:var(--green); border:1px solid rgba(24,217,139,.25); }
.btn-green:hover { background:rgba(24,217,139,.18); }
.btn-red { background:rgba(240,82,95,.1); color:var(--red); border:1px solid rgba(240,82,95,.25); }
.btn-red:hover { background:rgba(240,82,95,.18); }
.btn-sm { padding:7px 14px; font-size:12px; border-radius:8px; }

/* ─── CARDS ──────────────────────────────────────── */
.card {
  background:linear-gradient(180deg, rgba(255,255,255,.015), transparent 40%), var(--s1);
  border:1px solid var(--b1); border-radius:14px;
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  animation:cardIn .35s cubic-bezier(.22,1,.36,1);
}
.card:hover { border-color:var(--b2); box-shadow:0 10px 30px rgba(0,0,0,.28); }
@keyframes cardIn { from{opacity:0; transform:translateY(8px)} to{opacity:1; transform:translateY(0)} }
.card-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid var(--b1); }
.card-title { font-size:14px; font-weight:700; }
/* stagger children of grids for a subtle premium entrance */
.stats-grid > *, .team-grid > * { animation:cardIn .4s cubic-bezier(.22,1,.36,1) backwards; }
.stats-grid > *:nth-child(1), .team-grid > *:nth-child(1) { animation-delay:.02s; }
.stats-grid > *:nth-child(2), .team-grid > *:nth-child(2) { animation-delay:.06s; }
.stats-grid > *:nth-child(3), .team-grid > *:nth-child(3) { animation-delay:.10s; }
.stats-grid > *:nth-child(4), .team-grid > *:nth-child(4) { animation-delay:.14s; }
.stats-grid > *:nth-child(5), .team-grid > *:nth-child(5) { animation-delay:.18s; }
.stats-grid > *:nth-child(n+6) { animation-delay:.20s; }

/* ─── STAT CARDS ─────────────────────────────────── */
.stats-grid { display:grid; gap:14px; margin-bottom:22px; }
.stat-card {
  background:var(--s1); border:1px solid var(--b1); border-radius:14px; padding:18px 20px;
  position:relative; overflow:hidden; transition:border-color .2s, transform .2s;
}
.stat-card:hover { border-color:var(--b2); transform:translateY(-1px); }
.stat-card::after { content:''; position:absolute; top:0; left:0; right:0; height:2px; background:var(--ac,var(--accent)); }
.stat-card::before { content:''; position:absolute; top:0; right:0; width:80px; height:80px; background:radial-gradient(circle,var(--glow) 0%,transparent 70%); }
.sc-label { font-size:11px; color:var(--t2); font-weight:600; text-transform:uppercase; letter-spacing:.8px; }
.sc-val { font-size:28px; font-weight:800; letter-spacing:-1px; margin:6px 0 2px; font-family:var(--f); }
.sc-sub { font-size:12px; color:var(--t2); }
.sc-trend { position:absolute; top:18px; right:18px; display:flex; align-items:center; gap:4px; font-size:12px; font-weight:600; padding:3px 8px; border-radius:6px; }
.sc-trend.up { background:rgba(24,217,139,.1); color:var(--green); }
.sc-trend.dn { background:rgba(240,82,95,.1); color:var(--red); }

/* ─── WEEK CHART (Dashboard) ─────────────────────── */
.week-bar-col { flex:1; display:flex; flex-direction:column; align-items:center; gap:8px; height:100%; justify-content:flex-end; }
.week-bar { width:100%; max-width:28px; background:var(--s3); border-radius:6px 6px 3px 3px; position:relative; overflow:hidden; min-height:4px; transition:height .6s cubic-bezier(.22,1,.36,1); }
.week-bar-fill { position:absolute; bottom:0; left:0; right:0; border-radius:6px 6px 3px 3px; transition:height .6s cubic-bezier(.22,1,.36,1); }
.week-bar-label { font-size:10px; color:var(--t2); font-weight:600; text-transform:uppercase; }
.week-bar-val { font-size:10px; color:var(--t3); }
.week-bar-col.is-today .week-bar-label { color:var(--accent); }

/* ─── CLOCK CARD ─────────────────────────────────── */
.clock-card {
  background:linear-gradient(135deg,#0d1526,#111d35);
  border:1px solid var(--b1); border-radius:16px;
  padding:22px 26px; display:flex; align-items:center; gap:28px;
  margin-bottom:22px; position:relative; overflow:hidden;
}
.clock-card::before {
  content:''; position:absolute; right:-60px; top:-60px;
  width:240px; height:240px;
  background:radial-gradient(circle,rgba(59,127,245,.1) 0%,transparent 65%);
}
.clock-card::after {
  content:''; position:absolute; left:-30px; bottom:-30px;
  width:160px; height:160px;
  background:radial-gradient(circle,rgba(108,79,245,.07) 0%,transparent 65%);
}
.clock-time {
  font-family:var(--mono); font-size:54px; font-weight:500; letter-spacing:-2px;
  background:linear-gradient(135deg,#fff 30%,var(--accent));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  min-width:165px;
}
.clock-info { flex:1; position:relative; z-index:1; }
.clock-date { font-size:13px; color:var(--t2); margin-bottom:8px; }
.clock-status { display:flex; align-items:center; gap:8px; font-size:14px; font-weight:500; }
.status-dot { width:8px; height:8px; border-radius:50%; position:relative; }
.status-dot.on { background:var(--green); box-shadow:0 0 8px var(--green); }
.status-dot.on::before { content:''; position:absolute; inset:-3px; border-radius:50%; background:rgba(24,217,139,.2); animation:ring 1.5s ease infinite; }
@keyframes ring { 0%{opacity:1;transform:scale(1)} 100%{opacity:0;transform:scale(2)} }
.status-dot.off { background:var(--t3); }
.clock-actions { display:flex; gap:10px; position:relative; z-index:1; }

/* ─── TABLE ──────────────────────────────────────── */
.tbl-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; }
thead tr { background:rgba(255,255,255,.018); }
th { text-align:left; padding:10px 18px; font-size:11px; color:var(--t2); font-weight:700; text-transform:uppercase; letter-spacing:.8px; border-bottom:1px solid var(--b1); position:sticky; top:0; background:var(--s1); z-index:1; }
th.sortable { cursor:pointer; user-select:none; transition:color .15s; }
th.sortable:hover { color:var(--text); }
th.sortable::after { content:'⇅'; margin-left:5px; opacity:.35; font-size:10px; }
th.sortable.sort-asc::after { content:'↑'; opacity:1; color:var(--accent); }
th.sortable.sort-desc::after { content:'↓'; opacity:1; color:var(--accent); }
td { padding:12px 18px; font-size:13.5px; border-bottom:1px solid rgba(30,39,64,.4); transition:background .12s; }
tr:last-child td { border-bottom:none; }
tr:hover td { background:rgba(255,255,255,.022); }

/* ─── SKELETON LOADING ───────────────────────────── */
.skel { position:relative; overflow:hidden; background:var(--s2); border-radius:8px; }
.skel::after {
  content:''; position:absolute; inset:0; transform:translateX(-100%);
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  animation:skelShimmer 1.4s ease-in-out infinite;
}
@keyframes skelShimmer { 100% { transform:translateX(100%); } }
.skel-line { height:12px; margin:6px 0; }
.skel-card { height:88px; border-radius:14px; border:1px solid var(--b1); }
.skel-row { height:44px; border-radius:8px; margin-bottom:8px; }

/* ─── TAGS ───────────────────────────────────────── */
.tag { display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:6px; font-size:11px; font-weight:700; }
.tg { background:rgba(24,217,139,.1); color:var(--green); }
.ty { background:rgba(240,180,41,.1); color:var(--yellow); }
.tr { background:rgba(240,82,95,.1); color:var(--red); }
.tb { background:rgba(59,127,245,.12); color:var(--accent); }
.tp { background:rgba(108,79,245,.12); color:var(--accent2); }
.to { background:rgba(240,122,48,.1); color:var(--orange); }

/* ─── MESSAGES ───────────────────────────────────── */
.msg-layout { display:grid; grid-template-columns:260px 1fr; gap:14px; height:calc(100vh - 155px); }
.msg-sidebar { background:var(--s1); border:1px solid var(--b1); border-radius:14px; display:flex; flex-direction:column; overflow:hidden; }
.msg-sb-head { padding:14px 16px; border-bottom:1px solid var(--b1); }
.msg-sb-title { font-size:14px; font-weight:700; margin-bottom:10px; }
.msg-search { position:relative; }
.msg-search input {
  width:100%; background:var(--s3); border:1px solid var(--b1); border-radius:8px;
  padding:8px 12px 8px 32px; color:var(--text); font-size:13px; outline:none; transition:border-color .2s;
}
.msg-search input:focus { border-color:var(--accent); }
.msg-search::before { content:'🔍'; position:absolute; left:10px; top:50%; transform:translateY(-50%); font-size:12px; }
.channels { flex:1; overflow-y:auto; }
.channel {
  padding:12px 14px; cursor:pointer;
  border-bottom:1px solid rgba(30,39,64,.3);
  border-left:3px solid transparent; transition:all .15s;
}
.channel:hover { background:rgba(255,255,255,.025); }
.channel.active { background:rgba(59,127,245,.07); border-left-color:var(--accent); }
.ch-hd { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.ch-name { font-size:13px; font-weight:600; color:var(--text); }
.ch-time { font-size:11px; color:var(--t2); }
.ch-prev { font-size:12px; color:var(--t2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.unread { width:7px; height:7px; border-radius:50%; background:var(--accent); display:inline-block; margin-left:5px; }
.msg-main { background:var(--s1); border:1px solid var(--b1); border-radius:14px; display:flex; flex-direction:column; overflow:hidden; }
.msg-head { padding:14px 20px; border-bottom:1px solid var(--b1); display:flex; align-items:center; gap:12px; }
.msg-head-av { width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:#fff; flex-shrink:0; }
.msg-head-title { font-size:14px; font-weight:700; }
.msg-head-sub { font-size:12px; color:var(--t2); margin-top:2px; }
.ch-badge { margin-left:auto; padding:4px 12px; background:rgba(108,79,245,.1); color:var(--accent2); border:1px solid rgba(108,79,245,.2); border-radius:20px; font-size:11px; font-weight:700; }
.msgs { flex:1; overflow-y:auto; padding:16px 18px; display:flex; flex-direction:column; gap:12px; }
.no-msgs { text-align:center; color:var(--t2); margin-top:50px; font-size:13px; line-height:2.2; }
.msg { max-width:72%; animation:msgIn .2s ease; }
@keyframes msgIn { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:translateY(0)} }
.msg.own { align-self:flex-end; }
.msg-meta { font-size:11px; color:var(--t2); margin-bottom:5px; }
.msg.own .msg-meta { text-align:right; }
.msg-bubble { padding:11px 14px; border-radius:12px; font-size:13.5px; line-height:1.6; }
.msg:not(.own) .msg-bubble { background:var(--s2); border:1px solid var(--b1); border-radius:3px 12px 12px 12px; }
.msg.own .msg-bubble { background:linear-gradient(135deg,rgba(59,127,245,.2),rgba(108,79,245,.16)); border:1px solid rgba(59,127,245,.25); border-radius:12px 3px 12px 12px; }
.msg-tipo-tag { display:inline-flex; align-items:center; gap:5px; background:rgba(24,217,139,.08); color:var(--green); border:1px solid rgba(24,217,139,.18); border-radius:5px; font-size:10px; font-weight:700; padding:2px 8px; margin-bottom:6px; text-transform:uppercase; letter-spacing:.5px; }
.msg-input-bar { padding:12px 16px; border-top:1px solid var(--b1); display:flex; gap:8px; align-items:flex-end; }
.msg-input-bar textarea {
  flex:1; background:var(--s2); border:1px solid var(--b1); border-radius:10px;
  padding:10px 14px; color:var(--text); font-size:13.5px; resize:none; outline:none;
  min-height:42px; max-height:100px; transition:border-color .2s; line-height:1.5;
}
.msg-input-bar textarea:focus { border-color:var(--accent); }
.tipo-pick { background:var(--s2); border:1px solid var(--b1); border-radius:8px; padding:6px 10px; color:var(--text); font-size:12px; outline:none; }
.btn-send { width:40px; height:40px; border-radius:9px; background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; font-size:16px; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:all .2s; }
.btn-send:hover { opacity:.9; transform:scale(1.06); }

/* ─── MODAL ──────────────────────────────────────── */
.overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.75); z-index:500; backdrop-filter:blur(6px); align-items:center; justify-content:center; }
.overlay.open { display:flex; }
.modal { background:var(--s1); border:1px solid var(--b1); border-radius:18px; padding:28px; width:480px; max-width:95vw; animation:modalIn .25s cubic-bezier(.22,1,.36,1); box-shadow:0 20px 60px rgba(0,0,0,.6); }
@keyframes modalIn { from{opacity:0;transform:scale(.95)} to{opacity:1;transform:scale(1)} }
.modal-title { font-size:18px; font-weight:800; margin-bottom:20px; letter-spacing:-.3px; }
.modal-close { position:absolute; top:20px; right:20px; background:var(--s3); border:1px solid var(--b1); border-radius:8px; width:30px; height:30px; color:var(--t2); font-size:16px; display:flex; align-items:center; justify-content:center; transition:all .15s; }
.modal-close:hover { color:var(--text); }
.fg { margin-bottom:14px; }
.fl { display:block; font-size:11px; font-weight:700; color:var(--t2); text-transform:uppercase; letter-spacing:.8px; margin-bottom:6px; }
.fi { width:100%; background:var(--s3); border:1px solid var(--b1); border-radius:9px; padding:10px 13px; color:var(--text); font-size:13.5px; outline:none; transition:border-color .2s, box-shadow .2s; }
.fi:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(59,127,245,.1); }
.frow { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.modal-actions { display:flex; gap:8px; margin-top:22px; }

/* ─── TOAST ──────────────────────────────────────── */
.toast-stack { position:fixed; bottom:24px; right:24px; display:flex; flex-direction:column; gap:8px; z-index:9999; }
.toast {
  background:var(--s2); border:1px solid var(--b1); border-radius:12px;
  padding:12px 18px; display:flex; align-items:center; gap:10px;
  font-size:13px; font-weight:500; min-width:240px; max-width:320px;
  box-shadow:0 8px 32px rgba(0,0,0,.5);
  animation:toastIn .35s cubic-bezier(.22,1,.36,1);
  transition:opacity .3s, transform .3s;
}
.toast.out { opacity:0; transform:translateY(8px); }
@keyframes toastIn { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.toast-icon { font-size:16px; flex-shrink:0; }
.toast-icon svg { width:16px; height:16px; }

/* ─── AVATAR ─────────────────────────────────────── */
.av { border-radius:10px; display:flex; align-items:center; justify-content:center; font-weight:700; color:#fff; flex-shrink:0; }

/* ─── EQUIPE ─────────────────────────────────────── */
.team-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; margin-bottom:20px; }
.team-card { background:var(--s1); border:1px solid var(--b1); border-radius:14px; padding:18px; transition:all .2s; cursor:default; }
.team-card:hover { border-color:var(--b2); transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,0,0,.3); }
.tc-top { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.tc-status { width:8px; height:8px; border-radius:50%; margin-left:auto; }
.tc-stat-row { display:flex; justify-content:space-between; padding:8px 0; border-top:1px solid var(--b1); font-size:12px; }
.tc-stat-label { color:var(--t2); }
.tc-stat-val { font-weight:600; }

/* ─── CHARTS / PROGRESS ──────────────────────────── */
.progress-bar { height:4px; background:var(--b1); border-radius:2px; overflow:hidden; margin-top:6px; }
.progress-fill { height:100%; border-radius:2px; transition:width 1s cubic-bezier(.22,1,.36,1); }

/* ─── NOTIF PANEL ────────────────────────────────── */
.notif-btn { position:relative; }
.notif-dot { position:absolute; top:6px; right:6px; width:7px; height:7px; border-radius:50%; background:var(--red); border:2px solid var(--bg); }

/* ─── TOP BAR ────────────────────────────────────── */
.topbar { display:flex; align-items:center; justify-content:space-between; padding:14px 28px; border-bottom:1px solid var(--b1); background:var(--s1); position:sticky; top:0; z-index:10; }
.topbar-left { display:flex; align-items:center; gap:12px; }
.topbar-greeting { font-size:15px; font-weight:600; }
.topbar-date { font-size:12px; color:var(--t2); }
.topbar-right { display:flex; align-items:center; gap:8px; }

/* ─── DASHBOARD WELCOME ──────────────────────────── */
.welcome-strip {
  background:linear-gradient(135deg,#0d1526 0%,#111d35 60%,#130e28 100%);
  border:1px solid var(--b1); border-radius:16px;
  padding:24px 28px; margin-bottom:22px;
  display:flex; align-items:center; justify-content:space-between;
  position:relative; overflow:hidden;
}
.welcome-strip::before {
  content:''; position:absolute; right:-50px; top:-50px;
  width:280px; height:280px;
  background:radial-gradient(circle,rgba(59,127,245,.12) 0%,transparent 60%);
}
.welcome-strip::after {
  content:''; position:absolute; right:30%; bottom:-40px;
  width:200px; height:200px;
  background:radial-gradient(circle,rgba(108,79,245,.08) 0%,transparent 60%);
}
.ws-title { font-size:20px; font-weight:800; letter-spacing:-.3px; margin-bottom:4px; }
.ws-sub { font-size:13px; color:var(--t2); }
.ws-clock { font-family:var(--mono); font-size:36px; font-weight:500; background:linear-gradient(135deg,#fff,var(--accent)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; position:relative; z-index:1; }

