.bt-form-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.bt-form-container h2 {
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2em;
    text-align: center;
    border-bottom: 3px solid #0073aa;
    padding-bottom: 15px;
}

.bt-form-container h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #34495e;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bt-form-container h3:before {
    content: '';
    width: 4px;
    height: 24px;
    background: #0073aa;
    border-radius: 2px;
}

.bt-section {
    margin-bottom: 35px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.bt-form-group {
    margin-bottom: 0;
}

.bt-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.bt-form-group label span.required {
    color: #e74c3c;
}

.bt-form-group input[type="text"],
.bt-form-group input[type="email"],
.bt-form-group input[type="password"],
.bt-form-group input[type="tel"],
.bt-form-group input[type="number"],
.bt-form-group input[type="date"],
.bt-form-group select,
.bt-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.bt-form-group input:focus,
.bt-form-group select:focus,
.bt-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.bt-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.bt-form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.bt-form-group-full {
    grid-column: 1 / -1;
}

.bt-input-with-button {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bt-input-with-button input {
    width: 100%;
}

.bt-input-with-button .bt-btn-small {
    margin-top: 8px;
    width: 100%;
}

.bt-anexo-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.bt-anexo-item:not(:last-child) {
    margin-bottom: 10px;
}

#bt-agregar-anexo {
    margin-top: 10px;
}
.bt-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.bt-form-actions {
    margin-top: 35px;
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

.bt-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bt-btn-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
}

.bt-btn-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004866 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
}

.bt-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.bt-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.bt-btn-danger {
    background: #dc3545;
    color: #fff;
}

.bt-btn-danger:hover {
    background: #c82333;
}

.bt-btn-small {
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
}

.bt-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.bt-mensaje {
    margin-top: 25px;
    padding: 15px 20px;
    border-radius: 6px;
    display: none;
    font-weight: 500;
    text-align: center;
}

.bt-mensaje.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #b1dfbb;
}

.bt-mensaje.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #f1b0b7;
}

.bt-form-footer {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.bt-dashboard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.bt-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0073aa;
}

.bt-dashboard-actions {
    display: flex;
    gap: 10px;
}

.bt-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.bt-stat-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.bt-stat-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bt-stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #0073aa;
}

.bt-dashboard-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bt-convocatorias-list {
    display: grid;
    gap: 20px;
}

.bt-convocatoria-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s;
}

.bt-convocatoria-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bt-convocatoria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bt-convocatoria-header h4 {
    margin: 0;
    color: #333;
}

.bt-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.bt-badge-activa {
    background: #d4edda;
    color: #155724;
}

.bt-badge-cerrada {
    background: #f8d7da;
    color: #721c24;
}

.bt-convocatoria-body {
    margin-bottom: 15px;
}

.bt-convocatoria-body p {
    margin: 8px 0;
    color: #666;
}

.bt-convocatoria-actions {
    display: flex;
    gap: 10px;
}

.bt-listado-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.bt-listado-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.bt-filtros select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.bt-convocatorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.bt-convocatoria-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.bt-convocatoria-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.bt-convocatoria-logo {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    padding: 20px;
}

.bt-convocatoria-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bt-convocatoria-content {
    padding: 20px;
}

.bt-convocatoria-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: #333;
}

.bt-empresa {
    color: #0073aa;
    font-weight: 600;
    margin-bottom: 15px;
}

.bt-convocatoria-info {
    margin: 15px 0;
}

.bt-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

.bt-icon {
    font-size: 16px;
}

.bt-convocatoria-desc {
    margin: 15px 0;
    color: #666;
    line-height: 1.6;
}

.bt-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
}

.bt-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.bt-pagination a,
.bt-pagination span {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0073aa;
    text-decoration: none;
    transition: all 0.3s;
}

.bt-pagination a:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.bt-pagination .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
.bt-form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s;
}

.bt-form-group input[type="file"]:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.bt-form-group input[type="file"]:focus {
    outline: none;
    border-color: #0073aa;
    background: #fff;
}

.bt-form-group input[type="file"]::file-selector-button {
    padding: 8px 16px;
    margin-right: 10px;
    border: none;
    border-radius: 4px;
    background: #0073aa;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.bt-form-group input[type="file"]::file-selector-button:hover {
    background: #005a87;
}

.bt-anexo-item {
    margin-bottom: 15px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.bt-anexo-item:not(:last-child) {
    margin-bottom: 15px;
}

.bt-anexo-item .bt-form-row {
    align-items: flex-end;
}

.bt-anexo-item .bt-form-group:last-child {
    flex: 0 0 auto;
}

#bt-agregar-anexo {
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

#bt-agregar-anexo:before {
    content: "📎";
    font-size: 16px;
}

.bt-eliminar-anexo {
    white-space: nowrap;
}
@media (max-width: 768px) {
    .bt-form-container {
        padding: 25px;
        margin: 20px;
    }

    .bt-form-grid,
    .bt-form-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .bt-input-with-button {
        flex-direction: column;
        align-items: stretch;
    }

    .bt-input-with-button .bt-btn-small {
        width: 100%;
    }
    
    .bt-form-row {
        grid-template-columns: 1fr;
    }
    
    .bt-dashboard-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .bt-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .bt-convocatorias-grid {
        grid-template-columns: 1fr;
    }

    .bt-form-actions {
        flex-direction: column;
    }

    .bt-btn {
        width: 100%;
    }
}
*, *::before, *::after {
  box-sizing: border-box;
}

.bt-form-group input,
.bt-form-group textarea,
.bt-form-group select {
  max-width: 100%;
  width: 100%;
  display: block;
}

.bt-input-with-button {
  display: flex;           /* fila por defecto */
  gap: 12px;
  align-items: center;
}

.bt-input-with-button input {
  flex: 1 1 auto;          /* ocupa el espacio restante */
  width: auto;             /* evita conflicto con width:100% */
  min-width: 0;            /* importante para que flex items colapsen correctamente */
}

.bt-input-with-button .bt-btn-small {
  flex: 0 0 240px;       
  width: auto;
}

.bt-form-grid > * ,
.bt-form-grid-3 > * ,
.bt-form-row > * {
  min-width: 0;     
}

@media (max-width: 768px) {
  .bt-input-with-button {
    flex-direction: column;
    align-items: stretch;
  }
  .bt-input-with-button .bt-btn-small {
    flex: 0 0 auto;
    width: 100%;
  }
}
