/* Estilos para Studios y Nómina */

/* Tabs Navigation */
.tabs-navigation {
    display: flex;
    gap: 10px;
    margin: 30px 0;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Section */
.section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.section h2 {
    margin-bottom: 20px;
    color: var(--dark);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light);
}

.section h3 {
    margin: 20px 0 15px 0;
    color: var(--dark);
}

/* Grid de Studios */
.studios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.studio-card {
    background: linear-gradient(135deg, rgba(155,89,182,0.05), rgba(52,152,219,0.05));
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
}

.studio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.studio-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.3em;
}

.studio-card p {
    margin: 10px 0;
    color: #666;
    font-size: 0.95em;
}

.studio-card .badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
}

.studio-card .badge-info {
    background: var(--secondary-color);
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* Tabla de Modelos */
.models-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.models-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.models-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

.models-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
}

.models-table tbody tr:hover {
    background: #f8f9fa;
}

/* Tabla de Ganancias */
.earnings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.earnings-table thead {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.earnings-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

.earnings-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
}

.earnings-table tbody tr:hover {
    background: #f0fdf4;
}

/* Filtros */
.earnings-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.earnings-filter label {
    font-weight: bold;
    display: flex;
    align-items: center;
}

.earnings-filter input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
}

/* Exchange Rate */
.exchange-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: linear-gradient(135deg, rgba(155,89,182,0.1), rgba(52,152,219,0.1));
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.exchange-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.exchange-info h3 {
    margin-top: 0;
}

.big-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.exchange-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.exchange-form h3 {
    margin-top: 0;
}

.exchange-form input {
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 5px;
    font-size: 1em;
}

.exchange-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.exchange-form .btn {
    align-self: flex-start;
}

/* Payroll Actions */
.payroll-actions {
    margin-bottom: 20px;
}

/* Payroll Card */
.payroll-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.payroll-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.payroll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.payroll-period {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--dark);
}

.payroll-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
}

.payroll-status.draft {
    background: #fff3cd;
    color: #856404;
}

.payroll-status.approved {
    background: #d1ecf1;
    color: #0c5460;
}

.payroll-status.paid {
    background: #d4edda;
    color: #155724;
}

.payroll-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.payroll-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.payroll-item label {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.payroll-item .value {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
    color: var(--primary-color);
}

.payroll-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.payroll-details-table thead {
    background: #f0f0f0;
}

.payroll-details-table th {
    padding: 10px;
    text-align: left;
    font-weight: bold;
    font-size: 0.9em;
    border-bottom: 2px solid var(--border);
}

.payroll-details-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9em;
}

.payroll-details-table tbody tr:hover {
    background: #f8f9fa;
}

.payroll-actions-buttons {
    display: flex;
    gap: 10px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
    background: var(--primary-color);
    color: white;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
}

.btn-block {
    width: 100%;
}

/* Modal extendido */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.3s;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--danger-color);
}

/* Rate History */
#rateHistory {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.rate-item .rate-value {
    font-weight: bold;
    color: var(--primary-color);
}

.rate-item .rate-date {
    color: #666;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .studios-grid {
        grid-template-columns: 1fr;
    }

    .exchange-card {
        grid-template-columns: 1fr;
    }

    .models-table,
    .earnings-table,
    .payroll-details-table {
        font-size: 0.9em;
    }

    .models-table th,
    .models-table td,
    .earnings-table th,
    .earnings-table td {
        padding: 8px;
    }

    .tabs-navigation {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        min-width: 120px;
    }

    .payroll-summary {
        grid-template-columns: 1fr;
    }

    .payroll-actions-buttons {
        flex-direction: column;
    }
}
