/* cf-tool.css — componente partajate pentru uneltele Hub Fiscal / Pro */

/* ---- GATE / LOCK (tier) ---- */
.cf-locked { position: relative; }
.cf-locked > *:not(.cf-gate) { filter: blur(6px); pointer-events: none; user-select: none; opacity: .55; }
.cf-gate { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(2px); border-radius: var(--radius); z-index: 5; }
.cf-gate-in { text-align: center; max-width: 360px; padding: 26px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.cf-gate-ic { font-size: 2.2rem; }
.cf-gate-in h3 { margin: 6px 0; }
.cf-gate-in p { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }

/* ---- TABURI ---- */
.cf-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cf-tab { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--card);
  color: var(--muted); font-weight: 600; font-size: .9rem; cursor: pointer; transition: .2s; }
.cf-tab.active { background: var(--grad); color: #fff; border-color: transparent; }
.cf-pane { display: none; }
.cf-pane.active { display: block; animation: cf-fade .3s ease; }
@keyframes cf-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- REZULTATE ---- */
.cf-big { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 900; line-height: 1.05;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cf-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .94rem; }
.cf-row span { color: var(--muted); }
.cf-row b { font-weight: 700; }
.cf-row.total { border-bottom: none; border-top: 2px solid var(--border); margin-top: 4px; padding-top: 12px; font-size: 1.05rem; }
.cf-pos { color: var(--emerald); } .cf-neg { color: #e25555; }
.cf-note { color: var(--muted); font-size: .82rem; margin-top: 10px; }

/* ---- TERMOMETRU / PROGRES (plafoane) ---- */
.cf-meter { height: 26px; border-radius: 999px; background: var(--bg-soft2); overflow: hidden; position: relative; margin: 12px 0; }
.cf-meter-fill { height: 100%; border-radius: 999px; transition: width .6s ease; background: linear-gradient(90deg, var(--emerald), var(--blue)); }
.cf-meter-fill.warn { background: linear-gradient(90deg, #E8C268, #e2894f); }
.cf-meter-fill.danger { background: linear-gradient(90deg, #e2894f, #e25555); }
.cf-meter-lbl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; color: var(--navy); }

/* ---- ALERTE / BADGE ---- */
.cf-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: .9rem; margin: 10px 0; }
.cf-alert.ok { background: color-mix(in srgb, var(--emerald) 12%, transparent); border: 1px solid color-mix(in srgb, var(--emerald) 30%, transparent); }
.cf-alert.warn { background: color-mix(in srgb, #E8C268 14%, transparent); border: 1px solid color-mix(in srgb, #E8C268 36%, transparent); }
.cf-alert.danger { background: color-mix(in srgb, #e25555 12%, transparent); border: 1px solid color-mix(in srgb, #e25555 32%, transparent); }
.cf-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; }
.cf-badge.pro { background: var(--grad); color: #fff; }

/* ---- COMPARATOR (coloane) ---- */
.cf-compare { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.cf-card-opt { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; background: var(--card); }
.cf-card-opt.best { border-color: var(--emerald); box-shadow: 0 0 0 2px color-mix(in srgb, var(--emerald) 40%, transparent); }
.cf-card-opt h4 { margin: 0 0 4px; } .cf-card-opt .net { font-size: 1.5rem; font-weight: 800; color: var(--emerald); }

/* ---- TABEL LOG (logare lunară) ---- */
.cf-log { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 10px; }
.cf-log th, .cf-log td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.cf-log th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.cf-log td:last-child, .cf-log th:last-child { text-align: right; }

/* ---- CHAT AI (Asistent ANAF) ---- */
.cf-chat { display: flex; flex-direction: column; height: 460px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.cf-chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.cf-msg { max-width: 85%; padding: 11px 14px; border-radius: 14px; font-size: .92rem; line-height: 1.5; white-space: pre-wrap; }
.cf-msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.cf-msg.ai { align-self: flex-start; background: var(--bg-soft2); color: var(--text); border-bottom-left-radius: 4px; }
.cf-msg.ai .src { display: block; margin-top: 8px; font-size: .76rem; color: var(--muted); }
.cf-chat-in { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--bg-soft); }
.cf-chat-in textarea { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-family: inherit; font-size: .92rem; background: var(--card); color: var(--text); }
.cf-quota { font-size: .78rem; color: var(--muted); text-align: center; padding: 6px; }
.cf-typing { display: inline-flex; gap: 4px; } .cf-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: cf-bounce 1s infinite; }
.cf-typing i:nth-child(2){animation-delay:.15s} .cf-typing i:nth-child(3){animation-delay:.3s}
@keyframes cf-bounce { 0%,60%,100%{opacity:.3;transform:translateY(0)} 30%{opacity:1;transform:translateY(-4px)} }

/* ---- INPUT GROUP ---- */
.cf-suffix { position: relative; } .cf-suffix .u { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; }
.cf-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cf-mini { font-size: .82rem; color: var(--muted); }
