/* NexusHub — Custom Styles */

*, *::before, *::after { box-sizing: border-box; }

body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* -------- Animações -------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-fade-in-up  { animation: fadeInUp 0.35s ease both; }
.animate-fade-in     { animation: fadeIn 0.25s ease both; }
.animate-slide-right { animation: slideInRight 0.3s ease both; }
.animate-spin        { animation: spin 1s linear infinite; }

/* -------- Stagger cards -------- */
.card:nth-child(1) { animation-delay: 0ms; }
.card:nth-child(2) { animation-delay: 60ms; }
.card:nth-child(3) { animation-delay: 120ms; }
.card:nth-child(4) { animation-delay: 180ms; }

/* -------- Toast -------- */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-top: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 280px;
    max-width: 380px;
    animation: slideInRight 0.3s ease both;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.toast-success {
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.3);
    color: #34d399;
}
.toast-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.3);
    color: #f87171;
}
.toast-info {
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    color: #818cf8;
}
.toast-warn {
    background: rgba(245,158,11,0.15);
    border: 1px solid rgba(245,158,11,0.3);
    color: #fbbf24;
}

/* -------- Modal -------- */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(2,6,23,0.85);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease both;
}
.modal-box {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.3s ease both;
}
.modal-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-body   { padding: 24px 28px; }
.modal-footer { padding: 16px 28px 24px; display: flex; gap: 12px; justify-content: flex-end; }

/* -------- Inputs globais -------- */
.form-input {
    width: 100%;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 10px 14px;
    color: #e2e8f0;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-input::placeholder { color: #475569; }
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 6px;
}

/* -------- Botões -------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    outline: none;
}
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(99,102,241,0.35); transform: translateY(-1px); }
.btn-secondary {
    background: #334155;
    color: #cbd5e1;
    border: 1px solid #475569;
}
.btn-secondary:hover { background: #3f4f63; }
.btn-danger { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 6px 12px; font-size: 0.8125rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* -------- Tabelas -------- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: 12px 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid #1e293b;
}
.data-table td {
    padding: 14px 20px;
    font-size: 0.875rem;
    color: #cbd5e1;
    border-bottom: 1px solid #1e293b;
}
.data-table tr:hover td { background: rgba(30,41,59,0.5); }
.data-table tr:last-child td { border-bottom: none; }

/* -------- Badges -------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* -------- Quota bar -------- */
.quota-bar-track { height: 6px; background: #334155; border-radius: 999px; overflow: hidden; }
.quota-bar-fill  { height: 100%; border-radius: 999px; transition: width 0.5s ease; }

/* -------- Result card (módulos) -------- */
.result-section {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 24px;
    animation: fadeInUp 0.4s ease both;
}
.result-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid #1e293b;
}
.result-row:last-child { border-bottom: none; }
.result-label { color: #64748b; font-size: 0.8125rem; font-weight: 500; min-width: 160px; flex-shrink: 0; }
.result-value { color: #e2e8f0; font-size: 0.875rem; word-break: break-word; }
