/* COMPONENTS.CSS — Componentes adicionais para a Teddy Intranet PHP */
/* NÃO redefinir classes ou variáveis existentes em original.css */

:root {
  /* Variáveis auxiliares para componentes novos (não existem no original) */
  --success: #10b981;
  --success-bg: rgba(16,185,129,.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245,158,11,.1);
  --error: #ef4444;
  --error-bg: rgba(239,68,68,.1);
  --info: #3b82f6;
  --info-bg: rgba(59,130,246,.1);
  
  /* Shadows adicionais */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.16);
  
  --z-dropdown: 100;
  --z-modal: 500;
  --z-toast: 900;
  
  --transition: .2s ease;
}

/* ── Toast Notifications ───────────────────────────────── */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: all; display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); border-left: 4px solid #e2e8f0; min-width: 300px; max-width: 420px; position: relative; overflow: hidden; animation: slideInRight .3s ease forwards; }
.toast.hiding { animation: slideOutRight .3s ease forwards; }
.toast-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; }
.toast-title { font-weight: 600; font-size: .88rem; line-height: 1.3; color: #0f172a; }
.toast-message { font-size: .8rem; color: #475569; margin-top: 2px; line-height: 1.4; }
.toast-close { cursor: pointer; color: #94a3b8; font-size: 1.1rem; padding: 2px; transition: color var(--transition); flex-shrink: 0; }
.toast-close:hover { color: #0f172a; }
.toast-progress { position: absolute; bottom: 0; left: 0; height: 3px; animation: shrink linear forwards; }
.toast-success { border-left-color: var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-success .toast-progress { background: var(--success); }
.toast-error { border-left-color: var(--error); }
.toast-error .toast-icon { color: var(--error); }
.toast-error .toast-progress { background: var(--error); }
.toast-warning { border-left-color: var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-warning .toast-progress { background: var(--warning); }
.toast-info { border-left-color: var(--info); }
.toast-info .toast-icon { color: var(--info); }
.toast-info .toast-progress { background: var(--info); }

/* ── Modal System ──────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; animation: fadeIn .2s ease; padding: 20px; }
.modal-overlay.hiding { animation: fadeOut .2s ease forwards; }
.modal { background: #fff; border-radius: 20px; box-shadow: var(--shadow-xl); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; animation: scaleIn .25s ease; }
.modal-sm { max-width: 380px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }
.modal-header { padding: 24px 28px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 1.15rem; font-weight: 700; color: #0f172a; }
.modal-close { cursor: pointer; color: #94a3b8; font-size: 1.3rem; padding: 4px; border-radius: 8px; transition: all var(--transition); }
.modal-close:hover { background: #f1f5f9; color: #0f172a; }
.modal-body { padding: 20px 28px; }
.modal-footer { padding: 0 28px 24px; display: flex; justify-content: flex-end; gap: 12px; }

/* ── Skeleton Loaders ──────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
.skeleton-text { height: 14px; border-radius: 4px; margin-bottom: 8px; }
.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }
.skeleton-text.full { width: 100%; }
.skeleton-title { height: 22px; width: 70%; border-radius: 4px; margin-bottom: 14px; }
.skeleton-avatar { border-radius: 50%; }
.skeleton-avatar.sm { width: 32px; height: 32px; }
.skeleton-avatar.md { width: 40px; height: 40px; }
.skeleton-avatar.lg { width: 56px; height: 56px; }
.skeleton-image { aspect-ratio: 16/9; border-radius: 12px; width: 100%; }
.skeleton-card { padding: 20px; border-radius: 20px; border: 1px solid #f1f5f9; }

/* ── Progress ──────────────────────────────────────────── */
.progress { width: 100%; height: 8px; background: #f1f5f9; border-radius: 9999px; overflow: hidden; }
.progress-bar { height: 100%; background: #eb6625; border-radius: 9999px; transition: width .6s ease; }
.progress-bar.green { background: var(--success); }
.progress-bar.blue { background: var(--info); }

/* ── Empty States ──────────────────────────────────────── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; }
.empty-state-icon { font-size: 4rem; color: #e2e8f0; margin-bottom: 16px; line-height: 1; }
.empty-state-title { font-size: 1.15rem; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.empty-state-description { font-size: .88rem; color: #94a3b8; max-width: 320px; line-height: 1.6; }

/* ── TOTP Input (2FA) ──────────────────────────────────── */
.totp-group { display: flex; gap: 10px; justify-content: center; margin: 20px 0; }
.totp-input { width: 45px; height: 55px; border: 2px solid #e2e8f0; border-radius: 12px; text-align: center; font-size: 1.5rem; font-weight: 700; color: #eb6625; background: #fff; transition: all .2s; }
.totp-input:focus { border-color: #eb6625; box-shadow: 0 0 0 3px rgba(235, 102, 37, 0.1); outline: none; }
.totp-input.error { border-color: #ef4444; color: #ef4444; }

/* ── Badges (adicionais) ────────────────────────────────── */
.badge-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; font-size: 0.75rem; font-weight: 600; }
.badge-status.online { background: #dcfce7; color: #166534; }
.badge-status.offline { background: #f1f5f9; color: #475569; }

/* ── Animations ────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(110%); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(110%); } }
@keyframes shrink { from { width: 100%; } to { width: 0%; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.animate-spin { animation: spin 1s linear infinite; }
