/* =========================================================
   BotSpace IA - Estilos Gerais do Sistema e Painel
   ========================================================= */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #475569;
    --dark: #0f172a;
    --dark-surface: #1e293b;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Utilitários */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}
.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}
.btn-secondary:hover {
    background: #cbd5e1;
}
.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover {
    background: #15803d;
}
.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-outline:hover {
    background: #f1f5f9;
}

/* Header & Top Bar */
.top-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}
.logo-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}
.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Banner de Trial */
.trial-banner {
    background: linear-gradient(90deg, #1e3a8a, #2563eb);
    color: #ffffff;
    padding: 10px 24px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.trial-banner.expired {
    background: linear-gradient(90deg, #991b1b, #dc2626);
}
.trial-banner a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-left: 10px;
    transition: background 0.2s;
}
.trial-banner a:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Layout Geral do Painel */
.dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 110px);
}
.sidebar {
    width: 250px;
    background: #ffffff;
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.sidebar-link:hover {
    background: var(--light-bg);
    color: var(--primary);
}
.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}
.sidebar-link i {
    width: 20px;
    font-size: 16px;
    text-align: center;
}

.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* Cards & Formulários */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
textarea.form-control {
    min-height: 110px;
    resize: vertical;
}
.form-help {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Grid & Estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.stat-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: #1e293b;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease-out;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 12px;
    }
    .main-content {
        padding: 16px;
    }
}

