/* =========================================
   PINC SYSTEM UI v2.3 - Tokens
   ========================================= */

:root {
    --bg-app: #f8fafc;
    --bg-card: #ffffff;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --brand-primary: #e91e63;
    --brand-hover: #be185d;
    --brand-light: #fdf2f8; /* Fundo bem claro para o painel de quota */
    
    --border: #e2e8f0;
    --success: #10b981;
    --green-bg: #dcfce7;
    --green-text: #166534;
    --blue-bg: #dbeafe;
    --blue-text: #1e40af;
    --purple-text: #7e22ce;
    
    --radius-md: 8px;
    --radius-lg: 12px;
    --max-width: 680px;
}

/* --- BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
}

.app-layout { display: flex; flex-direction: column; min-height: 100vh; }

/* --- HEADER --- */
.app-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-logo-icon { width: 32px; height: 32px; display: block; }

.system-status { 
    display: flex; align-items: center; gap: 8px; 
    font-size: 0.8rem; background: #f1f5f9; 
    padding: 6px 12px; border-radius: 100px; 
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.online { background-color: var(--success); box-shadow: 0 0 0 2px rgba(16,185,129,0.2); }
.status-text strong { color: var(--text-primary); }

/* --- MAIN --- */
.app-main {
    flex: 1;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.top-bar { width: 100%; max-width: var(--max-width); margin-bottom: 20px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-muted); }
.breadcrumbs .current { color: var(--text-primary); font-weight: 500; }
.icon-sm { width: 14px; height: 14px; }

/* --- TOOL CARD --- */
.tool-container { width: 100%; max-width: var(--max-width); }

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

/* --- QUOTA PANEL (NEW) --- */
.quota-panel {
    background: var(--brand-light);
    border: 1px solid #fbcfe8;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
}

.quota-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.quota-label { display: flex; align-items: center; gap: 6px; letter-spacing: 0.05em; }
.icon-brand-sm { width: 16px; height: 16px; color: var(--brand-primary); }

.quota-track {
    width: 100%;
    height: 8px;
    background: rgba(233, 30, 99, 0.1);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 10px;
}

.quota-fill {
    height: 100%;
    background: var(--brand-primary);
    border-radius: 100px;
    /* Adiciona um efeito sutil de listras/brilho */
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    background-size: 1rem 1rem;
}

.quota-bonus {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

.quota-bonus strong { color: var(--purple-text); }
.quota-bonus svg { color: var(--purple-text); flex-shrink: 0; margin-top: 2px; }

/* Card Meta Header (Tags) */
.card-meta-header { display: flex; gap: 12px; margin-bottom: 20px; }
.meta-tag { 
    display: inline-flex; align-items: center; gap: 6px; 
    font-size: 0.75rem; font-weight: 600; 
    padding: 4px 10px; border-radius: 6px; 
}
.meta-tag.free { background: var(--green-bg); color: var(--green-text); }
.meta-tag.mode { background: var(--blue-bg); color: var(--blue-text); }
.icon-xs { width: 12px; height: 12px; }

.tool-header { margin-bottom: 28px; }
.tool-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.tool-header p { font-size: 0.95rem; color: var(--text-secondary); }

/* Form */
.system-form { display: flex; flex-direction: column; gap: 24px; }

.form-section-label {
    font-size: 0.75rem; font-weight: 700; color: var(--text-muted); 
    text-transform: uppercase; letter-spacing: 0.05em;
    display: flex; align-items: center; gap: 8px; margin-bottom: -12px;
}
.form-section-label svg { width: 14px; height: 14px; color: var(--brand-primary); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group.full { grid-column: span 2; }

label { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }

input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}
input:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1); }
input::placeholder { color: #cbd5e1; font-weight: 400; }

.input-helper {
    font-size: 0.75rem; color: var(--text-secondary); 
    display: flex; align-items: center; gap: 4px; margin-top: 2px;
}
.icon-xxs { width: 10px; height: 10px; }

/* Buttons & Costs */
.btn-system {
    width: 100%; height: 52px;
    background: var(--brand-primary); color: white;
    font-weight: 600; font-size: 1.05rem;
    border: none; border-radius: var(--radius-md);
    cursor: pointer; position: relative; overflow: hidden;
    transition: background 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.btn-system:hover { background: var(--brand-hover); }
.btn-content { display: flex; align-items: center; gap: 8px; z-index: 2; }

/* Footer do Card */
.security-footer {
    display: flex; justify-content: space-between; margin-top: 16px;
    font-size: 0.75rem; color: var(--text-muted); border-top: 1px solid #f1f5f9; padding-top: 16px;
}
.security-footer span { display: flex; align-items: center; gap: 4px; }

/* Loading Bar */
.loading-bar {
    position: absolute; bottom: 0; left: 0; height: 4px; width: 0%;
    background: rgba(255,255,255,0.6); transition: width 0.2s;
}
.btn-system.loading .loading-bar { width: 100%; animation: load 2s infinite linear; }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* Trust Specs */
.specs-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.spec-item {
    background: transparent; border: 1px solid transparent; 
    padding: 12px 0;
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
}
.spec-item svg { color: var(--text-muted); width: 20px; height: 20px; }
.spec-text { display: flex; flex-direction: column; font-size: 0.8rem; line-height: 1.4; }
.spec-text strong { color: var(--text-primary); }
.spec-text span { color: var(--text-secondary); }

/* Footer App */
.app-footer {
    width: 100%; max-width: var(--max-width);
    text-align: center; color: var(--text-muted); font-size: 0.75rem;
    margin-top: 40px; display: flex; justify-content: space-between; align-items: center;
}
.footer-badge { 
    display: flex; align-items: center; gap: 6px; 
    background: #fff; padding: 4px 10px; border-radius: 100px; border: 1px solid var(--border); 
}
.pulse { width: 6px; height: 6px; background: var(--success); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* Responsive */
@media (max-width: 600px) {
    .app-main { padding: 20px 16px; }
    .tool-card { padding: 24px 20px; }
    .form-row { grid-template-columns: 1fr; gap: 16px; }
    .security-footer { flex-direction: column; gap: 8px; align-items: center; }
    .specs-grid { display: flex; justify-content: space-between; }
}

/* Bonus Alert on Success */
.bonus-alert {
    margin-top: 16px;
    background: #fdf4ff;
    border: 1px solid #f0abfc;
    color: #7e22ce;
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Success */
.system-success-view { text-align: center; padding: 20px 0; }
.success-loader { position: relative; width: 60px; height: 60px; margin: 0 auto 20px; }
.loader-circle { width: 100%; height: 100%; border: 4px solid var(--green-bg); border-top-color: var(--success); border-radius: 50%; animation: spin 1s linear infinite; }
.loader-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--success); }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-fade { animation: fadeIn 0.6s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }