/* Tables */
.table-container {
    flex: 1;
    overflow: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #0f172a;
    min-height: 400px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 1000px;
}

th {
    background: #1e293b;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    padding: 12px 8px;
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: #cbd5e1;
    vertical-align: middle;
    text-align: center;
}

td:first-child {
    text-align: left;
    padding-left: 15px;
    color: white;
    font-weight: 500;
}

/* Row Types */
.row-chapter td {
    background: #334155 !important;
    color: #f1f5f9;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 15px;
    border-top: 2px solid var(--border);
}

.row-pepite td {
    background: rgba(251, 191, 36, 0.05);
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

.row-pepite td:first-child {
    border-left: 3px solid var(--gold);
}

/* Column Widths */
.w-desig {
    width: auto;
    min-width: 200px;
}

.w-qte {
    width: 60px;
    color: #cbd5e1;
    font-weight: normal;
}

.w-money {
    width: 80px;
    font-family: 'JetBrains Mono';
}

.w-input {
    width: 110px;
}

.w-lock {
    width: 30px;
}

.w-total {
    width: 100px;
    font-weight: bold;
    font-family: 'JetBrains Mono';
    text-align: right;
    padding-right: 15px;
}

/* Table Inputs */
.tbl-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent);
    text-align: center;
    width: 100%;
    padding: 6px;
    font-weight: bold;
    border-radius: 3px;
    font-size: 0.85rem;
}

.input-final {
    width: 100%;
    font-weight: bold;
    transition: 0.2s;
    text-align: center;
}

.input-up {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.input-down {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

.input-neutral {
    background: transparent;
    color: #94a3b8;
}

/* Summary Table */
.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-top: 10px;
}

.summary-table th {
    text-align: left;
    color: #94a3b8;
    padding: 8px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.summary-table td {
    padding: 12px 8px;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-family: 'JetBrains Mono';
}

.summary-table tr:last-child td {
    border-bottom: none;
    font-weight: bold;
    color: var(--accent);
}

/* Progress Bars */
.progress-bg {
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    width: 60px;
    border-radius: 2px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--success);
}
