/* Fontes do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Cores Premium Inspiradas na Identidade Linx (Roxo e Verde) */
    --primary-color: #5D00A5;      /* Roxo Linx */
    --primary-hover: #45007A;
    --secondary-color: #9CC300;    /* Verde Linx */
    --secondary-hover: #82A300;
    
    /* Cores de Fundo (Tema Escuro Glassmorphism) */
    --bg-dark: #0f1923;
    --bg-panel: rgba(15, 25, 35, 0.75);
    --bg-card: rgba(20, 35, 50, 0.50);
    --bg-input: rgba(255, 255, 255, 0.07);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(156, 195, 0, 0.5);
    
    /* Feedback */
    --success: #2ec4b6;
    --error: #e71d36;
    --warning: #ff9f1c;
    --info: #00b4d8;
    
    /* Texto */
    --text-primary: #f3f0f7;
    --text-secondary: #c2b9d2;
    --text-muted: #8d81a3;
    
    /* Layout */
    --sidebar-width: 250px;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f1923;
    background-image: 
        radial-gradient(at 10% 20%, rgba(93, 0, 165, 0.12) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(156, 195, 0, 0.06) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Layout Principal */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Barra Lateral (Sidebar) */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 10, 24, 0.85);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
    padding-left: 8px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 20px;
}

.logo-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    background: linear-gradient(to right, #ffffff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-size: 11px;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: -4px;
}

.menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.menu-item a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.menu-item.active a {
    background: linear-gradient(135deg, rgba(93, 0, 165, 0.3), rgba(156, 195, 0, 0.1));
    border-left: 3px solid var(--secondary-color);
    color: var(--text-primary);
}

.menu-item i {
    font-size: 18px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* Área de Conteúdo Principal */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topo / Cabeçalho */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-title h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: white;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

/* Ações Globais */
.action-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: #1a2200;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
    background: rgba(231, 29, 54, 0.14);
    border: 1px solid rgba(231, 29, 54, 0.35);
    color: #ffb3bd;
}

.btn-danger:hover {
    background: rgba(231, 29, 54, 0.22);
}

.shutdown-btn {
    width: 100%;
    justify-content: center;
    padding: 9px 10px;
    margin-bottom: 12px;
    font-size: 12px;
}

/* Grid de Resumos (Dashboard Stats) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(156, 195, 0, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-info h3 {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-info .value {
    font-size: 28px;
    font-weight: 700;
    margin-top: 8px;
    color: white;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--secondary-color);
}

/* Barra de Busca Inteligente */
.search-container {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px 16px 52px;
    color: white;
    font-size: 16px;
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px var(--border-focus);
    background: rgba(255, 255, 255, 0.1);
}

.search-wrapper i {
    position: absolute;
    left: 20px;
    font-size: 20px;
    color: var(--text-muted);
}

/* Painéis de Resultados */
.panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 32px;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* Tabelas */
.table-wrapper {
    width: 100%;
    max-height: calc(100vh - 320px);
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    padding: 14px 16px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sortable-th {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable-th::after {
    content: "\f0dc";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    opacity: 0.35;
    margin-left: 8px;
}

.sortable-th.sort-asc::after {
    content: "\f0de";
    opacity: 0.9;
}

.sortable-th.sort-desc::after {
    content: "\f0dd";
    opacity: 0.9;
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: white;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

/* Pills / Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success {
    background: rgba(46, 196, 182, 0.15);
    color: var(--success);
}

.badge-error {
    background: rgba(230, 29, 54, 0.15);
    color: var(--error);
}

.badge-warning {
    background: rgba(255, 159, 28, 0.15);
    color: var(--warning);
}

.badge-info {
    background: rgba(0, 180, 216, 0.15);
    color: var(--info);
}

/* Estilos de Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px var(--border-focus);
}

/* Área de Drop de Arquivo (Upload Zone) */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 48px;
    text-align: center;
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
}

.upload-zone:hover {
    border-color: var(--secondary-color);
    background: rgba(156, 195, 0, 0.05);
}

.upload-zone i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Histórico / Linha do Tempo (Logs) */
.log-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.log-item:last-child {
    border-bottom: none;
}

.log-time {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 140px;
}

.log-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Preço Sugerido e Formação */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.pricing-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
}

.price-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.price-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-top: 8px;
}

/* Utilitários */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-bold { font-weight: 600; }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.mt-4 { margin-top: 16px; }

/* Detalhe do Produto */
.product-info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.info-card {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
}

.info-val {
    color: var(--text-primary);
    font-weight: 500;
}



/* ====== ENHANCED MODERN STYLES ====== */

/* Cards com glassmorphism mais forte */
.panel, .search-container, .pricing-panel, .stat-card, .info-card {
    background: rgba(15, 25, 35, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel:hover, .stat-card:hover {
    border-color: rgba(156, 195, 0, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Botoes com gradiente Premium */
.btn-primary {
    background: linear-gradient(135deg, #5D00A5, #9CC300);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6B00BF, #A8D600);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(93, 0, 165, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #9CC300, #82A300);
    color: #1a2200;
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #A8D600, #8FB800);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(231, 29, 54, 0.12);
    border: 1px solid rgba(231, 29, 54, 0.25);
    color: #ffb3bd;
}

.btn-danger:hover {
    background: rgba(231, 29, 54, 0.25);
    transform: translateY(-1px);
}

/* Badges modernos */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(46, 196, 182, 0.12);
    color: #4dd9cc;
    border: 1px solid rgba(46, 196, 182, 0.2);
}

.badge-error {
    background: rgba(230, 29, 54, 0.12);
    color: #ff7a8a;
    border: 1px solid rgba(230, 29, 54, 0.2);
}

.badge-warning {
    background: rgba(255, 159, 28, 0.12);
    color: #ffc04d;
    border: 1px solid rgba(255, 159, 28, 0.2);
}

.badge-info {
    background: rgba(0, 180, 216, 0.12);
    color: #4dd4ed;
    border: 1px solid rgba(0, 180, 216, 0.2);
}

/* Tabelas modernas */
.custom-table {
    border-collapse: separate;
    border-spacing: 0 2px;
}

.custom-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.custom-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
}

.custom-table tr td:first-child {
    border-radius: 8px 0 0 8px;
}

.custom-table tr td:last-child {
    border-radius: 0 8px 8px 0;
}

.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Formularios modernos */
.form-control, .search-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: white;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus, .search-input:focus {
    border-color: #9CC300;
    box-shadow: 0 0 0 3px rgba(156, 195, 0, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-control:hover, .search-input:hover {
    background: rgba(255, 255, 255, 0.08);
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

/* Upload zone */
.upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: #9CC300;
    background: rgba(156, 195, 0, 0.04);
}

/* Header bar refinado */
.header-bar {
    background: rgba(15, 25, 35, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.page-title h1 {
    font-size: 24px;
}

/* Sidebar refinada */
.sidebar {
    background: rgba(10, 18, 28, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.menu-item a {
    border-radius: 10px;
    font-size: 14px;
}

.menu-item.active a {
    background: linear-gradient(135deg, rgba(93, 0, 165, 0.25), rgba(156, 195, 0, 0.08));
    border-left: 3px solid #9CC300;
}

/* Stat cards melhorados */
.stat-card {
    border-radius: 12px;
    padding: 20px 24px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

/* Pricing panels */
.price-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.price-value {
    font-size: 32px;
    font-weight: 700;
}

/* Product info */
.product-info-grid {
    gap: 20px;
}

/* Logs */
.log-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Tables com scroll */
.table-wrapper {
    border-radius: 8px;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 12px;
    }
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .product-info-grid {
        grid-template-columns: 1fr;
    }
}
