:root {
    --bg-dark: #0a0c10;
    --card-bg: rgba(20, 24, 33, 0.7);
    --accent-primary: #00f2fe;
    --accent-secondary: #4facfe;
    --text-main: #e2e8f0;
    --text-dim: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    --glow-color: rgba(79, 172, 254, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.dark-theme {
    background-image:
        radial-gradient(circle at 0% 0%, rgba(79, 172, 254, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(0, 242, 254, 0.05) 0%, transparent 50%);
}

.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at 50% -20%, var(--glow-color), transparent 70%);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    background: rgba(10, 12, 16, 0.8);
    backdrop-filter: var(--glass-blur);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag {
    font-size: 0.6rem;
    background: var(--accent-primary);
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

/* Hero */
.hero {
    padding: 6rem 5% 4rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-dim);
}

/* Layout Containers */
.container {
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-container {
    padding: 4rem 0;
}

.section-header {
    margin-bottom: 3rem;
    text-align: left;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: var(--glass-blur);
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 242, 254, 0.3);
}

.card.large {
    grid-column: span 2;
    grid-row: span 2;
}

.card.medium {
    grid-column: span 2;
}

.card.full-width {
    grid-column: 1 / -1;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-dim);
    font-weight: 400;
}

/* Table Styles */
.table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: var(--text-main);
    text-align: left;
    table-layout: fixed;
    /* Fixed layout allows better column width control */
}

th,
td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: top;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: normal;
    white-space: normal;
}

th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--accent-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Default column width */
th,
td {
    width: 150px;
}

/* Long text column optimization */
.col-resume,
.col-solution,
.col-overall-summary,
.col-resolution-summary,
.col-call-reason,
.col-transcript,
.col-entryfeatures,
.col-exitfeatures {
    width: 400px !important;
}

.col-keywords,
.col-main-sentiments,
.col-secondary-sentiments {
    width: 250px !important;
}

.col-nps,
.col-satisfaction,
.col-perfomance,
.col-solver,
.col-step1-saludo,
.col-step2-requerimiento,
.col-step3-solucion,
.col-step4-despedida {
    width: 90px !important;
    text-align: center;
}

.col-namefile,
.col-date,
.col-supervisor,
.col-employee,
.col-client {
    width: 200px !important;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Scrollbar for tables */
.table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Chart Styles */
.chart-wrapper {
    flex-grow: 1;
    position: relative;
    min-height: 250px;
}

/* Specific Card Styles */
.stats-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Outfit';
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.keyword-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-content: center;
}

.keyword-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.keyword-tag:hover {
    background: var(--accent-primary);
    color: #000;
    transform: scale(1.1);
}

/* Satisfaction Meter */
.satisfaction-meter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.meter-value {
    font-size: 5rem;
    font-weight: 800;
    font-family: 'Outfit';
    margin-bottom: 1rem;
}

.meter-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4d4d, #ffd700, #00f2fe);
    width: 0%;
    transition: width 1s ease-out;
}

.meter-labels {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.quality-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.quality-score span {
    font-size: 4rem;
    font-weight: 800;
    color: var(--accent-secondary);
}

.quality-score label {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

/* Confidence List */
.confidence-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.confidence-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
}

.conf-label {
    font-size: 0.9rem;
}

.conf-bar-wrapper {
    width: 60%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
}

.conf-bar-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 3px;
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1s 0.3s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    padding: 4rem 5%;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .card.large,
    .card.medium {
        grid-column: span 1;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        /* Simplification for mobile demo */
    }
}